建立 API 管理 服務的備份至指定的 Azure 記憶體帳戶。 這是長時間執行的作業,可能需要幾分鐘的時間才能完成。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup?api-version=2022-08-01
URI 參數
名稱 |
位於 |
必要 |
類型 |
Description |
resourceGroupName
|
path |
True
|
string
|
資源群組的名稱。 名稱不區分大小寫。
|
serviceName
|
path |
True
|
string
|
API 管理 服務的名稱。
Regex 模式: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
|
subscriptionId
|
path |
True
|
string
|
目標訂用帳戶的標識碼。
|
api-version
|
query |
True
|
string
|
用於此作業的 API 版本。
|
要求本文
名稱 |
必要 |
類型 |
Description |
backupName
|
True
|
string
|
要建立/擷取的備份文件名稱。
|
containerName
|
True
|
string
|
用來放置/擷取備份) 的 Blob 容器名稱 (。
|
storageAccount
|
True
|
string
|
用來放置/擷取備份) 的 Azure 記憶體帳戶名稱 (。
|
accessKey
|
|
string
|
儲存體帳戶存取金鑰。 只有設定為AccessKey 時才accessType 需要 。
|
accessType
|
|
AccessType
|
要用於記憶體帳戶的存取類型。
|
clientId
|
|
string
|
使用者指派受控識別的用戶端標識碼。 只有設定為UserAssignedManagedIdentity 時才accessType 需要 。
|
回應
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 |
Description |
user_impersonation
|
模擬您的用戶帳戶
|
範例
ApiManagementBackupWithAccessKey
範例要求
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backup?api-version=2022-08-01
{
"storageAccount": "teststorageaccount",
"containerName": "backupContainer",
"backupName": "apimService1backup_2017_03_19",
"accessType": "AccessKey",
"accessKey": "**************************************************"
}
import com.azure.resourcemanager.apimanagement.models.AccessType;
import com.azure.resourcemanager.apimanagement.models.ApiManagementServiceBackupRestoreParameters;
/** Samples for ApiManagementService Backup. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json
*/
/**
* Sample code: ApiManagementBackupWithAccessKey.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementBackupWithAccessKey(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.apiManagementServices()
.backup(
"rg1",
"apimService1",
new ApiManagementServiceBackupRestoreParameters()
.withStorageAccount("teststorageaccount")
.withContainerName("backupContainer")
.withBackupName("apimService1backup_2017_03_19")
.withAccessType(AccessType.ACCESS_KEY)
.withAccessKey("fakeTokenPlaceholder"),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_backup_with_access_key.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 = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.api_management_service.begin_backup(
resource_group_name="rg1",
service_name="apimService1",
parameters={
"accessKey": "**************************************************",
"accessType": "AccessKey",
"backupName": "apimService1backup_2017_03_19",
"containerName": "backupContainer",
"storageAccount": "teststorageaccount",
},
).result()
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.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 armapimanagement_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/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json
func ExampleServiceClient_BeginBackup_apiManagementBackupWithAccessKey() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
AccessKey: to.Ptr("**************************************************"),
AccessType: to.Ptr(armapimanagement.AccessTypeAccessKey),
BackupName: to.Ptr("apimService1backup_2017_03_19"),
ContainerName: to.Ptr("backupContainer"),
StorageAccount: to.Ptr("teststorageaccount"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.ServiceResource = armapimanagement.ServiceResource{
// Name: to.Ptr("apimService1"),
// Type: to.Ptr("Microsoft.ApiManagement/service"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// Tags: map[string]*string{
// "tag1": to.Ptr("value1"),
// "tag2": to.Ptr("value2"),
// "tag3": to.Ptr("value3"),
// },
// Etag: to.Ptr("AAAAAAACXok="),
// Location: to.Ptr("West US"),
// Properties: &armapimanagement.ServiceProperties{
// AdditionalLocations: []*armapimanagement.AdditionalLocation{
// {
// DisableGateway: to.Ptr(true),
// GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// Location: to.Ptr("East US"),
// PublicIPAddresses: []*string{
// to.Ptr("23.101.138.153")},
// SKU: &armapimanagement.ServiceSKUProperties{
// Name: to.Ptr(armapimanagement.SKUTypePremium),
// Capacity: to.Ptr[int32](1),
// },
// }},
// APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// MinAPIVersion: to.Ptr("2019-01-01"),
// },
// CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:26:20.334Z"); return t}()),
// CustomProperties: map[string]*string{
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// },
// DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// DisableGateway: to.Ptr(false),
// GatewayRegionalURL: to.Ptr("https://apimService1-westus-01.regional.azure-api.net"),
// GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// {
// Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// DefaultSSLBinding: to.Ptr(false),
// HostName: to.Ptr("apimService1.azure-api.net"),
// NegotiateClientCertificate: to.Ptr(false),
// },
// {
// Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// Certificate: &armapimanagement.CertificateInformation{
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// Subject: to.Ptr("CN=*.msitesting.net"),
// Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// },
// DefaultSSLBinding: to.Ptr(true),
// HostName: to.Ptr("gateway1.msitesting.net"),
// NegotiateClientCertificate: to.Ptr(false),
// },
// {
// Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// Certificate: &armapimanagement.CertificateInformation{
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// Subject: to.Ptr("CN=*.msitesting.net"),
// Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// },
// DefaultSSLBinding: to.Ptr(false),
// HostName: to.Ptr("mgmt.msitesting.net"),
// NegotiateClientCertificate: to.Ptr(false),
// },
// {
// Type: to.Ptr(armapimanagement.HostnameTypePortal),
// Certificate: &armapimanagement.CertificateInformation{
// Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// Subject: to.Ptr("CN=*.msitesting.net"),
// Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// },
// DefaultSSLBinding: to.Ptr(false),
// HostName: to.Ptr("portal1.msitesting.net"),
// NegotiateClientCertificate: to.Ptr(false),
// }},
// ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// ProvisioningState: to.Ptr("Succeeded"),
// PublicIPAddresses: []*string{
// to.Ptr("13.91.32.113")},
// ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// TargetProvisioningState: to.Ptr(""),
// VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// PublisherName: to.Ptr("autorestsdk"),
// },
// SKU: &armapimanagement.ServiceSKUProperties{
// Name: to.Ptr(armapimanagement.SKUTypePremium),
// Capacity: to.Ptr[int32](1),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
*
* @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json
*/
async function apiManagementBackupWithAccessKey() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const parameters = {
accessKey: "**************************************************",
accessType: "AccessKey",
backupName: "apimService1backup_2017_03_19",
containerName: "backupContainer",
storageAccount: "teststorageaccount",
};
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.apiManagementService.beginBackupAndWait(
resourceGroupName,
serviceName,
parameters
);
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 System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.ApiManagement.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.ApiManagement;
// Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json
// this example is just showing the usage of "ApiManagementService_Backup" 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 ApiManagementServiceResource created on azure
// for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource
string subscriptionId = "subid";
string resourceGroupName = "rg1";
string serviceName = "apimService1";
ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName);
ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId);
// invoke the operation
ApiManagementServiceBackupRestoreContent content = new ApiManagementServiceBackupRestoreContent("teststorageaccount", "backupContainer", "apimService1backup_2017_03_19")
{
AccessType = StorageAccountAccessType.AccessKey,
AccessKey = "**************************************************",
};
ArmOperation<ApiManagementServiceResource> lro = await apiManagementService.BackupAsync(WaitUntil.Completed, content);
ApiManagementServiceResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ApiManagementServiceData 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
範例回覆
location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2022-08-01
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
"tag1": "value1",
"tag2": "value2",
"tag3": "value3"
},
"location": "West US",
"etag": "AAAAAAACXok=",
"properties": {
"publisherEmail": "apim@autorestsdk.com",
"publisherName": "autorestsdk",
"notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2019-12-18T06:26:20.3348609Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"developerPortalUrl": "https://apimService1.developer.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "apimService1.azure-api.net",
"negotiateClientCertificate": false,
"defaultSslBinding": false
},
{
"type": "Proxy",
"hostName": "gateway1.msitesting.net",
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2036-01-01T07:00:00+00:00",
"thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2",
"subject": "CN=*.msitesting.net"
},
"defaultSslBinding": true
},
{
"type": "Management",
"hostName": "mgmt.msitesting.net",
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2036-01-01T07:00:00+00:00",
"thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2",
"subject": "CN=*.msitesting.net"
},
"defaultSslBinding": false
},
{
"type": "Portal",
"hostName": "portal1.msitesting.net",
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2036-01-01T07:00:00+00:00",
"thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2",
"subject": "CN=*.msitesting.net"
},
"defaultSslBinding": false
}
],
"publicIPAddresses": [
"13.91.32.113"
],
"additionalLocations": [
{
"location": "East US",
"sku": {
"name": "Premium",
"capacity": 1
},
"publicIPAddresses": [
"23.101.138.153"
],
"gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net",
"disableGateway": true
}
],
"customProperties": {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False"
},
"virtualNetworkType": "None",
"disableGateway": false,
"apiVersionConstraint": {
"minApiVersion": "2019-01-01"
}
},
"sku": {
"name": "Premium",
"capacity": 1
}
}
ApiManagementBackupWithSystemManagedIdentity
範例要求
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backup?api-version=2022-08-01
{
"storageAccount": "contosorpstorage",
"containerName": "apim-backups",
"backupName": "backup5",
"accessType": "SystemAssignedManagedIdentity"
}
import com.azure.resourcemanager.apimanagement.models.AccessType;
import com.azure.resourcemanager.apimanagement.models.ApiManagementServiceBackupRestoreParameters;
/** Samples for ApiManagementService Backup. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json
*/
/**
* Sample code: ApiManagementBackupWithSystemManagedIdentity.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementBackupWithSystemManagedIdentity(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.apiManagementServices()
.backup(
"rg1",
"apimService1",
new ApiManagementServiceBackupRestoreParameters()
.withStorageAccount("contosorpstorage")
.withContainerName("apim-backups")
.withBackupName("backup5")
.withAccessType(AccessType.SYSTEM_ASSIGNED_MANAGED_IDENTITY),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_backup_with_system_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 = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.api_management_service.begin_backup(
resource_group_name="rg1",
service_name="apimService1",
parameters={
"accessType": "SystemAssignedManagedIdentity",
"backupName": "backup5",
"containerName": "apim-backups",
"storageAccount": "contosorpstorage",
},
).result()
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.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 armapimanagement_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/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json
func ExampleServiceClient_BeginBackup_apiManagementBackupWithSystemManagedIdentity() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
AccessType: to.Ptr(armapimanagement.AccessTypeSystemAssignedManagedIdentity),
BackupName: to.Ptr("backup5"),
ContainerName: to.Ptr("apim-backups"),
StorageAccount: to.Ptr("contosorpstorage"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.ServiceResource = armapimanagement.ServiceResource{
// Name: to.Ptr("apimService1"),
// Type: to.Ptr("Microsoft.ApiManagement/service"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// Tags: map[string]*string{
// "Owner": to.Ptr("apimService1"),
// },
// Etag: to.Ptr("AAAAAAAQM8o="),
// Identity: &armapimanagement.ServiceIdentity{
// Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("00000000-5fb4-4916-95d4-64b306f9d924"),
// TenantID: to.Ptr("00000000-86f1-0000-91ab-2d7cd011db47"),
// UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": &armapimanagement.UserIdentityProperties{
// ClientID: to.Ptr("00000000-a154-4830-0000-46a12da1a1e2"),
// PrincipalID: to.Ptr("00000000-a100-4478-0000-d65d98118ba0"),
// },
// "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": &armapimanagement.UserIdentityProperties{
// ClientID: to.Ptr("00000000-6328-4db2-0000-ab0e3e7806cf"),
// PrincipalID: to.Ptr("00000000-9208-4128-af2d-a10d2af9b5a3"),
// },
// },
// },
// Location: to.Ptr("Central US EUAP"),
// Properties: &armapimanagement.ServiceProperties{
// CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-23T16:26:47.863Z"); return t}()),
// CustomProperties: map[string]*string{
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// },
// DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// DisableGateway: to.Ptr(false),
// GatewayRegionalURL: to.Ptr("https://apimService1-centraluseuap-01.regional.azure-api.net"),
// GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// {
// Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// DefaultSSLBinding: to.Ptr(true),
// HostName: to.Ptr("apimService1.azure-api.net"),
// NegotiateClientCertificate: to.Ptr(false),
// }},
// ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// ProvisioningState: to.Ptr("Succeeded"),
// PublicIPAddresses: []*string{
// to.Ptr("52.XXXX.160.66")},
// PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// TargetProvisioningState: to.Ptr(""),
// VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// PublisherEmail: to.Ptr("apimService1@corp.microsoft.com"),
// PublisherName: to.Ptr("MS"),
// },
// SKU: &armapimanagement.ServiceSKUProperties{
// Name: to.Ptr(armapimanagement.SKUTypePremium),
// Capacity: to.Ptr[int32](1),
// },
// SystemData: &armapimanagement.SystemData{
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-30T06:24:57.000Z"); return t}()),
// LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
*
* @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json
*/
async function apiManagementBackupWithSystemManagedIdentity() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const parameters = {
accessType: "SystemAssignedManagedIdentity",
backupName: "backup5",
containerName: "apim-backups",
storageAccount: "contosorpstorage",
};
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.apiManagementService.beginBackupAndWait(
resourceGroupName,
serviceName,
parameters
);
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 System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.ApiManagement.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.ApiManagement;
// Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json
// this example is just showing the usage of "ApiManagementService_Backup" 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 ApiManagementServiceResource created on azure
// for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource
string subscriptionId = "subid";
string resourceGroupName = "rg1";
string serviceName = "apimService1";
ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName);
ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId);
// invoke the operation
ApiManagementServiceBackupRestoreContent content = new ApiManagementServiceBackupRestoreContent("contosorpstorage", "apim-backups", "backup5")
{
AccessType = StorageAccountAccessType.SystemAssignedManagedIdentity,
};
ArmOperation<ApiManagementServiceResource> lro = await apiManagementService.BackupAsync(WaitUntil.Completed, content);
ApiManagementServiceResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ApiManagementServiceData 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
範例回覆
location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2022-08-01
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
"Owner": "apimService1"
},
"location": "Central US EUAP",
"etag": "AAAAAAAQM8o=",
"properties": {
"publisherEmail": "apimService1@corp.microsoft.com",
"publisherName": "MS",
"notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2020-04-23T16:26:47.8637967Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"developerPortalUrl": "https://apimService1.developer.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "apimService1.azure-api.net",
"negotiateClientCertificate": false,
"defaultSslBinding": true,
"certificateSource": "BuiltIn"
}
],
"publicIPAddresses": [
"52.XXXX.160.66"
],
"customProperties": {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False"
},
"virtualNetworkType": "None",
"disableGateway": false,
"publicNetworkAccess": "Enabled",
"platformVersion": "stv1"
},
"sku": {
"name": "Premium",
"capacity": 1
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "00000000-5fb4-4916-95d4-64b306f9d924",
"tenantId": "00000000-86f1-0000-91ab-2d7cd011db47",
"userAssignedIdentities": {
"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": {
"principalId": "00000000-a100-4478-0000-d65d98118ba0",
"clientId": "00000000-a154-4830-0000-46a12da1a1e2"
},
"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": {
"principalId": "00000000-9208-4128-af2d-a10d2af9b5a3",
"clientId": "00000000-6328-4db2-0000-ab0e3e7806cf"
}
}
},
"systemData": {
"lastModifiedBy": "contoso@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-06-30T06:24:57.0008037Z"
}
}
ApiManagementBackupWithUserAssignedManagedIdentity
範例要求
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backup?api-version=2022-08-01
{
"storageAccount": "contosorpstorage",
"containerName": "apim-backups",
"backupName": "backup5",
"accessType": "UserAssignedManagedIdentity",
"clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2"
}
import com.azure.resourcemanager.apimanagement.models.AccessType;
import com.azure.resourcemanager.apimanagement.models.ApiManagementServiceBackupRestoreParameters;
/** Samples for ApiManagementService Backup. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json
*/
/**
* Sample code: ApiManagementBackupWithUserAssignedManagedIdentity.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementBackupWithUserAssignedManagedIdentity(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.apiManagementServices()
.backup(
"rg1",
"apimService1",
new ApiManagementServiceBackupRestoreParameters()
.withStorageAccount("contosorpstorage")
.withContainerName("apim-backups")
.withBackupName("backup5")
.withAccessType(AccessType.USER_ASSIGNED_MANAGED_IDENTITY)
.withClientId("XXXXX-a154-4830-XXXX-46a12da1a1e2"),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_backup_with_user_assigned_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 = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.api_management_service.begin_backup(
resource_group_name="rg1",
service_name="apimService1",
parameters={
"accessType": "UserAssignedManagedIdentity",
"backupName": "backup5",
"clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2",
"containerName": "apim-backups",
"storageAccount": "contosorpstorage",
},
).result()
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.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 armapimanagement_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/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json
func ExampleServiceClient_BeginBackup_apiManagementBackupWithUserAssignedManagedIdentity() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
AccessType: to.Ptr(armapimanagement.AccessTypeUserAssignedManagedIdentity),
BackupName: to.Ptr("backup5"),
ClientID: to.Ptr("XXXXX-a154-4830-XXXX-46a12da1a1e2"),
ContainerName: to.Ptr("apim-backups"),
StorageAccount: to.Ptr("contosorpstorage"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.ServiceResource = armapimanagement.ServiceResource{
// Name: to.Ptr("apimService1"),
// Type: to.Ptr("Microsoft.ApiManagement/service"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// Tags: map[string]*string{
// "Owner": to.Ptr("apimService1"),
// },
// Etag: to.Ptr("AAAAAAAQM8o="),
// Identity: &armapimanagement.ServiceIdentity{
// Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("00000000-5fb4-4916-95d4-64b306f9d924"),
// TenantID: to.Ptr("00000000-86f1-0000-91ab-2d7cd011db47"),
// UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": &armapimanagement.UserIdentityProperties{
// ClientID: to.Ptr("00000000-a154-4830-0000-46a12da1a1e2"),
// PrincipalID: to.Ptr("00000000-a100-4478-0000-d65d98118ba0"),
// },
// "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": &armapimanagement.UserIdentityProperties{
// ClientID: to.Ptr("00000000-6328-4db2-0000-ab0e3e7806cf"),
// PrincipalID: to.Ptr("00000000-9208-4128-af2d-a10d2af9b5a3"),
// },
// },
// },
// Location: to.Ptr("Central US EUAP"),
// Properties: &armapimanagement.ServiceProperties{
// CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-23T16:26:47.863Z"); return t}()),
// CustomProperties: map[string]*string{
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// },
// DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// DisableGateway: to.Ptr(false),
// GatewayRegionalURL: to.Ptr("https://apimService1-centraluseuap-01.regional.azure-api.net"),
// GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// {
// Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// DefaultSSLBinding: to.Ptr(true),
// HostName: to.Ptr("apimService1.azure-api.net"),
// NegotiateClientCertificate: to.Ptr(false),
// }},
// ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// ProvisioningState: to.Ptr("Succeeded"),
// PublicIPAddresses: []*string{
// to.Ptr("52.XXXX.160.66")},
// PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// TargetProvisioningState: to.Ptr(""),
// VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// PublisherEmail: to.Ptr("apimService1@corp.microsoft.com"),
// PublisherName: to.Ptr("MS"),
// },
// SKU: &armapimanagement.ServiceSKUProperties{
// Name: to.Ptr(armapimanagement.SKUTypePremium),
// Capacity: to.Ptr[int32](1),
// },
// SystemData: &armapimanagement.SystemData{
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-30T06:24:57.000Z"); return t}()),
// LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
*
* @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json
*/
async function apiManagementBackupWithUserAssignedManagedIdentity() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const parameters = {
accessType: "UserAssignedManagedIdentity",
backupName: "backup5",
clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2",
containerName: "apim-backups",
storageAccount: "contosorpstorage",
};
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.apiManagementService.beginBackupAndWait(
resourceGroupName,
serviceName,
parameters
);
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 System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.ApiManagement.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.ApiManagement;
// Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json
// this example is just showing the usage of "ApiManagementService_Backup" 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 ApiManagementServiceResource created on azure
// for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource
string subscriptionId = "subid";
string resourceGroupName = "rg1";
string serviceName = "apimService1";
ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName);
ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId);
// invoke the operation
ApiManagementServiceBackupRestoreContent content = new ApiManagementServiceBackupRestoreContent("contosorpstorage", "apim-backups", "backup5")
{
AccessType = StorageAccountAccessType.UserAssignedManagedIdentity,
ClientId = "XXXXX-a154-4830-XXXX-46a12da1a1e2",
};
ArmOperation<ApiManagementServiceResource> lro = await apiManagementService.BackupAsync(WaitUntil.Completed, content);
ApiManagementServiceResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ApiManagementServiceData 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
範例回覆
location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2022-08-01
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
"Owner": "apimService1"
},
"location": "Central US EUAP",
"etag": "AAAAAAAQM8o=",
"properties": {
"publisherEmail": "apimService1@corp.microsoft.com",
"publisherName": "MS",
"notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2020-04-23T16:26:47.8637967Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"developerPortalUrl": "https://apimService1.developer.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "apimService1.azure-api.net",
"negotiateClientCertificate": false,
"defaultSslBinding": true,
"certificateSource": "BuiltIn"
}
],
"publicIPAddresses": [
"52.XXXX.160.66"
],
"customProperties": {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False"
},
"virtualNetworkType": "None",
"disableGateway": false,
"publicNetworkAccess": "Enabled",
"platformVersion": "stv1"
},
"sku": {
"name": "Premium",
"capacity": 1
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "00000000-5fb4-4916-95d4-64b306f9d924",
"tenantId": "00000000-86f1-0000-91ab-2d7cd011db47",
"userAssignedIdentities": {
"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": {
"principalId": "00000000-a100-4478-0000-d65d98118ba0",
"clientId": "00000000-a154-4830-0000-46a12da1a1e2"
},
"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": {
"principalId": "00000000-9208-4128-af2d-a10d2af9b5a3",
"clientId": "00000000-6328-4db2-0000-ab0e3e7806cf"
}
}
},
"systemData": {
"lastModifiedBy": "contoso@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-06-30T06:24:57.0008037Z"
}
}
定義
AccessType
要用於記憶體帳戶的存取類型。
名稱 |
類型 |
Description |
AccessKey
|
string
|
使用存取金鑰。
|
SystemAssignedManagedIdentity
|
string
|
使用系統指派的受控識別。
|
UserAssignedManagedIdentity
|
string
|
使用使用者指派的受控識別。
|
AdditionalLocation
其他 API 管理 資源位置的描述。
名稱 |
類型 |
預設值 |
Description |
disableGateway
|
boolean
|
False
|
屬性僅適用於部署在多個位置的 Api 管理服務。 這可用來停用此額外位置中的閘道。
|
gatewayRegionalUrl
|
string
|
|
區域中 API 管理 服務的閘道 URL。
|
location
|
string
|
|
Azure 資料中心區域之間其他區域的位置名稱。
|
natGatewayState
|
NatGatewayState
|
Disabled
|
屬性可用來啟用此 API 管理 服務的 NAT 閘道。
|
outboundPublicIPAddresses
|
string[]
|
|
與 NAT 閘道部署服務相關聯的輸出公用 IPV4 位址前綴。 僅適用於 stv2 平臺上的進階 SKU。
|
platformVersion
|
PlatformVersion
|
|
執行服務的計算平臺版本。
|
privateIPAddresses
|
string[]
|
|
API 管理 服務的私人靜態負載平衡 IP 位址,此位址部署在特定額外位置的內部 虛擬網路。 僅適用於基本、標準、進階和隔離 SKU。
|
publicIPAddresses
|
string[]
|
|
其他位置中 API 管理 服務的公用靜態負載平衡 IP 位址。 僅適用於基本、標準、進階和隔離 SKU。
|
publicIpAddressId
|
string
|
|
公用標準 SKU IP V4 型 IP 位址,要與位置中 虛擬網路 部署的服務相關聯。 僅支援在 虛擬網路 中部署進階 SKU。
|
sku
|
ApiManagementServiceSkuProperties
|
|
API 管理 服務的 SKU 屬性。
|
virtualNetworkConfiguration
|
VirtualNetworkConfiguration
|
|
位置的虛擬網路組態。
|
zones
|
string[]
|
|
可用性區域清單,表示資源需要來自何處。
|
ApiManagementServiceBackupRestoreParameters
提供給 API 管理 服務作業之備份/還原的參數。
名稱 |
類型 |
預設值 |
Description |
accessKey
|
string
|
|
儲存體帳戶存取金鑰。 只有設定為AccessKey 時才accessType 需要 。
|
accessType
|
AccessType
|
AccessKey
|
要用於記憶體帳戶的存取類型。
|
backupName
|
string
|
|
要建立/擷取的備份文件名稱。
|
clientId
|
string
|
|
使用者指派受控識別的用戶端標識碼。 只有設定為UserAssignedManagedIdentity 時才accessType 需要 。
|
containerName
|
string
|
|
用來放置/擷取備份) 的 Blob 容器名稱 (。
|
storageAccount
|
string
|
|
用來放置/擷取備份) 的 Azure 記憶體帳戶名稱 (。
|
ApiManagementServiceIdentity
Api 管理服務資源的識別屬性。
名稱 |
類型 |
Description |
principalId
|
string
|
身分識別的主體標識碼。
|
tenantId
|
string
|
身分識別的用戶端租用戶標識碼。
|
type
|
ApimIdentityType
|
用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。
|
userAssignedIdentities
|
<string,
UserIdentityProperties>
|
與資源相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。
|
ApiManagementServiceResource
List 或 Get 回應中的單一 API 管理 服務資源。
名稱 |
類型 |
預設值 |
Description |
etag
|
string
|
|
資源的 ETag。
|
id
|
string
|
|
資源識別碼。
|
identity
|
ApiManagementServiceIdentity
|
|
Api 管理服務的受控服務識別。
|
location
|
string
|
|
資源位置。
|
name
|
string
|
|
資源名稱。
|
properties.additionalLocations
|
AdditionalLocation[]
|
|
API 管理 服務的其他數據中心位置。
|
properties.apiVersionConstraint
|
ApiVersionConstraint
|
|
API 管理 服務的控制平面 API 版本條件約束。
|
properties.certificates
|
CertificateConfiguration[]
|
|
需要在 API 管理 服務中安裝的憑證清單。 可安裝的憑證上限為10。
|
properties.createdAtUtc
|
string
|
|
API 管理 服務的建立UTC日期。日期符合下列格式:yyyy-MM-ddTHH:mm:ssZ 如 ISO 8601 標準所指定。
|
properties.customProperties
|
object
|
|
API 管理 服務的自定義屬性。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 會停用所有 TLS (1.0、1.1 和 1.2) 的加密TLS_RSA_WITH_3DES_EDE_CBC_SHA。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 可用來只停用 TLS 1.1。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 可用來在 API 管理 服務上停用 TLS 1.0。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 可用來只停用 TLS 1.1,以便與後端進行通訊。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 可用來停用 TLS 1.0 與後端的通訊。 設定Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 可用來在 API 管理 服務上啟用 HTTP2 通訊協定。 在 PATCH 作業上未指定上述任何屬性,將會將省略的屬性值重設為預設值。 針對 Http2 以外的所有設定,預設值為 True 如果服務是在 2018 年 4 月 1 日或之前建立, False 否則為 。 Http2 設定的預設值為 False 。
您可以使用設定 Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name] 停用下列任何加密:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA、TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA、TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA、TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA、TLS_RSA_WITH_AES_128_GCM_SHA256、TLS_RSA_WITH_AES_256_CBC_SHA256、 TLS_RSA_WITH_AES_128_CBC_SHA256、TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA。 例如:Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256 false 。 預設值為 true 。
注意:由於內部平臺元件需要下列加密,因此無法停用:TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
properties.developerPortalUrl
|
string
|
|
API 管理 服務的 DEveloper 入口網站端點 URL。
|
properties.disableGateway
|
boolean
|
False
|
屬性僅適用於部署在多個位置的 Api 管理服務。 這可用來停用主要區域中的閘道。
|
properties.enableClientCertificate
|
boolean
|
False
|
屬性僅供取用 SKU 服務使用。 這會強制在閘道的每個要求上顯示客戶端憑證。 這也可讓您在閘道的原則中驗證憑證。
|
properties.gatewayRegionalUrl
|
string
|
|
默認區域中 API 管理 服務的閘道 URL。
|
properties.gatewayUrl
|
string
|
|
API 管理 服務的閘道 URL。
|
properties.hostnameConfigurations
|
HostnameConfiguration[]
|
|
API 管理 服務的自定義主機名組態。
|
properties.managementApiUrl
|
string
|
|
API 管理 服務的管理 API 端點 URL。
|
properties.natGatewayState
|
NatGatewayState
|
Disabled
|
屬性可用來啟用此 API 管理 服務的 NAT 閘道。
|
properties.notificationSenderEmail
|
string
|
|
Email 將從中傳送通知的位址。
|
properties.outboundPublicIPAddresses
|
string[]
|
|
與 NAT 閘道部署服務相關聯的輸出公用 IPV4 位址前綴。 僅適用於 stv2 平臺上的進階 SKU。
|
properties.platformVersion
|
PlatformVersion
|
|
在此位置中執行服務的計算平臺版本。
|
properties.portalUrl
|
string
|
|
API 管理 服務的發行者入口網站端點 URL。
|
properties.privateEndpointConnections
|
RemotePrivateEndpointConnectionWrapper[]
|
|
此服務的私人端點連線清單。
|
properties.privateIPAddresses
|
string[]
|
|
主要區域中部署於內部 虛擬網路 中 API 管理 服務的私人靜態負載平衡 IP 位址。 僅適用於基本、標準、進階和隔離 SKU。
|
properties.provisioningState
|
string
|
|
API 管理 服務的目前布建狀態,可以是下列其中一項:Created/Activating/Succeeded/Updateing/Failed/Stopped/Terminating/TerminationFailed/Deleted。
|
properties.publicIPAddresses
|
string[]
|
|
主要區域中 API 管理 服務的公用靜態負載平衡 IP 位址。 僅適用於基本、標準、進階和隔離 SKU。
|
properties.publicIpAddressId
|
string
|
|
要與區域中已部署 虛擬網路 服務相關聯的公用標準 SKU IP V4 型 IP 位址。 僅支援部署在 虛擬網路 中的開發人員和進階 SKU。
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
|
此 API 管理 服務是否允許公用端點存取。 值是選擇性的,但如果傳入,則必須是 『Enabled』 或 'Disabled'。 如果 「已停用」,私人端點就是獨佔存取方法。 預設值為 'Enabled'
|
properties.publisherEmail
|
string
|
|
發行者電子郵件。
|
properties.publisherName
|
string
|
|
發行者名稱。
|
properties.restore
|
boolean
|
False
|
如果先前已虛刪除 Api Management Service,請將其取消刪除。 如果指定此旗標,並將設定為 True,則會忽略所有其他屬性。
|
properties.scmUrl
|
string
|
|
API 管理 服務的 SCM 端點 URL。
|
properties.targetProvisioningState
|
string
|
|
API 管理 服務的布建狀態,此狀態是以服務上啟動長時間執行的作業為目標。
|
properties.virtualNetworkConfiguration
|
VirtualNetworkConfiguration
|
|
API 管理 服務的虛擬網路組態。
|
properties.virtualNetworkType
|
VirtualNetworkType
|
None
|
需要在其中設定 API 管理 服務的 VPN 類型。 無 (預設值) 表示 API 管理 服務不屬於任何 虛擬網路,外部表示 API 管理 部署是在具有因特網面向端點的 虛擬網路 內設定,而內部表示 API 管理 部署只會在具有內部網路面向端點的 虛擬網路 內設定.
|
sku
|
ApiManagementServiceSkuProperties
|
|
API 管理 服務的 SKU 屬性。
|
systemData
|
systemData
|
|
與建立和上次修改資源相關的元數據。
|
tags
|
object
|
|
資源標籤。
|
type
|
string
|
|
API 管理 資源的資源類型設定為 Microsoft.ApiManagement。
|
zones
|
string[]
|
|
可用性區域清單,表示資源需要來自何處。
|
ApiManagementServiceSkuProperties
API 管理 服務資源 SKU 屬性。
名稱 |
類型 |
Description |
capacity
|
integer
|
SKU 的容量 (SKU) 的已部署單位數目。 針對 [耗用量 SKU 容量] 必須指定為 0。
|
name
|
SkuType
|
Sku 的名稱。
|
ApimIdentityType
用於資源的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從服務中移除任何身分識別。
名稱 |
類型 |
Description |
None
|
string
|
|
SystemAssigned
|
string
|
|
SystemAssigned, UserAssigned
|
string
|
|
UserAssigned
|
string
|
|
ApiVersionConstraint
API 管理 服務的控制平面 API 版本條件約束。
名稱 |
類型 |
Description |
minApiVersion
|
string
|
將控制平面 API 呼叫限制為版本等於或大於此值 API 管理 服務。
|
ArmIdWrapper
ARM 資源標識碼的包裝函式
名稱 |
類型 |
Description |
id
|
string
|
|
CertificateConfiguration
憑證組態,其中包含不受信任的中繼和跟證書。
名稱 |
類型 |
Description |
certificate
|
CertificateInformation
|
憑證資訊。
|
certificatePassword
|
string
|
憑證密碼。
|
encodedCertificate
|
string
|
Base64 編碼憑證。
|
storeName
|
enum:
-
CertificateAuthority
-
Root
|
System.Security.Cryptography.x509certificates.StoreName 證書存儲位置。 只有 Root 和 CertificateAuthority 是有效的位置。
|
SSL 憑證資訊。
名稱 |
類型 |
Description |
expiry
|
string
|
憑證的到期日。 日期符合下列格式: yyyy-MM-ddTHH:mm:ssZ 如 ISO 8601 標準所指定。
|
subject
|
string
|
憑證的主體。
|
thumbprint
|
string
|
憑證的指紋。
|
CertificateSource
憑證來源。
名稱 |
類型 |
Description |
BuiltIn
|
string
|
|
Custom
|
string
|
|
KeyVault
|
string
|
|
Managed
|
string
|
|
CertificateStatus
憑證狀態。
名稱 |
類型 |
Description |
Completed
|
string
|
|
Failed
|
string
|
|
InProgress
|
string
|
|
createdByType
建立資源的身分識別類型。
名稱 |
類型 |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorFieldContract
錯誤欄位合約。
名稱 |
類型 |
Description |
code
|
string
|
屬性層級錯誤碼。
|
message
|
string
|
人類可讀取的屬性層級錯誤表示法。
|
target
|
string
|
屬性名稱。
|
ErrorResponse
錯誤回應。
名稱 |
類型 |
Description |
error.code
|
string
|
服務定義的錯誤碼。 此代碼會作為回應中指定之 HTTP 錯誤碼的子狀態。
|
error.details
|
ErrorFieldContract[]
|
在驗證錯誤時,要求中傳送的無效欄位清單。
|
error.message
|
string
|
人類可閱讀的錯誤表示法。
|
HostnameConfiguration
自定義主機名組態。
名稱 |
類型 |
預設值 |
Description |
certificate
|
CertificateInformation
|
|
憑證資訊。
|
certificatePassword
|
string
|
|
憑證密碼。
|
certificateSource
|
CertificateSource
|
|
憑證來源。
|
certificateStatus
|
CertificateStatus
|
|
憑證狀態。
|
defaultSslBinding
|
boolean
|
False
|
指定 true,將與此主機名相關聯的憑證設定為預設 SSL 憑證。 如果用戶端未傳送 SNI 標頭,則這會是將會受到挑戰的憑證。 如果服務已啟用多個自定義主機名,而且必須決定預設 SSL 憑證,則屬性會很有用。 僅套用至閘道主機名稱類型的設定。
|
encodedCertificate
|
string
|
|
Base64 編碼憑證。
|
hostName
|
string
|
|
在 Api 管理服務上設定的主機名。
|
identityClientId
|
string
|
|
由 Azure AD 產生的系統或使用者指派受控識別 clientId,其具有包含 SSL 憑證之 keyVault 的 GET 存取權。
|
keyVaultId
|
string
|
|
包含 Ssl 憑證的 KeyVault 秘密 URL。 如果提供包含版本的絕對 URL,SSL 憑證的自動更新將無法運作。 這需要使用 aka.ms/apimmsi 來設定 Api 管理服務。 秘密的類型應該是 application/x-pkcs12
|
negotiateClientCertificate
|
boolean
|
False
|
指定 true 以一律交涉主機名上的客戶端憑證。 默認值為 false。
|
type
|
HostnameType
|
|
主機名類型。
|
HostnameType
主機名類型。
名稱 |
類型 |
Description |
DeveloperPortal
|
string
|
|
Management
|
string
|
|
Portal
|
string
|
|
Proxy
|
string
|
|
Scm
|
string
|
|
NatGatewayState
屬性可用來啟用此 API 管理 服務的 NAT 閘道。
名稱 |
類型 |
Description |
Disabled
|
string
|
服務的 Nat 閘道已停用。
|
Enabled
|
string
|
已啟用服務的 Nat 閘道。
|
執行服務的計算平臺版本。
名稱 |
類型 |
Description |
mtv1
|
string
|
在多租使用者 V1 平台上執行服務的平臺。
|
stv1
|
string
|
在單一租使用者 V1 平台上執行服務的平臺。
|
stv2
|
string
|
在單一租使用者 V2 平台上執行服務的平臺。
|
undetermined
|
string
|
無法判斷平臺版本,因為未部署計算平臺。
|
PrivateEndpointServiceConnectionStatus
私人端點連線狀態。
名稱 |
類型 |
Description |
Approved
|
string
|
|
Pending
|
string
|
|
Rejected
|
string
|
|
PrivateLinkServiceConnectionState
服務取用者與提供者之間連線狀態的相關信息集合。
PublicNetworkAccess
是否允許此 API 管理 服務的公用端點存取。 值是選擇性的,但如果傳入,則必須是 『Enabled』 或 'Disabled'。 如果 「已停用」,私人端點就是獨佔存取方法。 預設值為 'Enabled'
名稱 |
類型 |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
RemotePrivateEndpointConnectionWrapper
遠端私人端點連線資源。
名稱 |
類型 |
Description |
id
|
string
|
私人端點聯機資源標識碼
|
name
|
string
|
私人端點連線名稱
|
properties.groupIds
|
string[]
|
所有群組標識碼。
|
properties.privateEndpoint
|
ArmIdWrapper
|
私人端點的資源。
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
服務取用者與提供者之間連線狀態的相關信息集合。
|
properties.provisioningState
|
string
|
私人端點聯機資源的布建狀態。
|
type
|
string
|
私人端點連線資源類型
|
SkuType
Sku 的名稱。
名稱 |
類型 |
Description |
Basic
|
string
|
API 管理的基本 SKU。
|
Consumption
|
string
|
API 管理的取用 SKU。
|
Developer
|
string
|
Api 管理的開發人員 SKU。
|
Isolated
|
string
|
Api 管理的隔離 SKU。
|
Premium
|
string
|
Api 管理的進階 SKU。
|
Standard
|
string
|
Api 管理的標準 SKU。
|
systemData
與建立和上次修改資源相關的元數據。
名稱 |
類型 |
Description |
createdAt
|
string
|
資源建立的時間戳 (UTC) 。
|
createdBy
|
string
|
建立資源的身分識別。
|
createdByType
|
createdByType
|
建立資源的身分識別類型。
|
lastModifiedAt
|
string
|
上次修改的資源時間戳 (UTC)
|
lastModifiedBy
|
string
|
上次修改資源的身分識別。
|
lastModifiedByType
|
createdByType
|
上次修改資源的身分識別類型。
|
UserIdentityProperties
名稱 |
類型 |
Description |
clientId
|
string
|
使用者指派身分識別的用戶端標識碼。
|
principalId
|
string
|
使用者指派身分識別的主體標識碼。
|
VirtualNetworkConfiguration
部署 API 管理 服務的虛擬網路組態。
名稱 |
類型 |
Description |
subnetResourceId
|
string
|
虛擬網路中要部署 API 管理 服務之子網的完整資源標識符。
|
subnetname
|
string
|
子網路的名稱。
|
vnetid
|
string
|
虛擬網路識別碼。 這通常是 GUID。 預設會預期 Null GUID。
|
VirtualNetworkType
需要在其中設定 API 管理 服務的 VPN 類型。 無 (預設值) 表示 API 管理 服務不屬於任何 虛擬網路,外部表示 API 管理 部署是在具有因特網面向端點的 虛擬網路 內設定,而內部表示 API 管理 部署只會在具有內部網路面向端點的 虛擬網路 內設定.
名稱 |
類型 |
Description |
External
|
string
|
此服務是 虛擬網路的一部分,可從因特網存取。
|
Internal
|
string
|
此服務是 虛擬網路的一部分,而且只能從虛擬網路記憶體取。
|
None
|
string
|
此服務不是任何 虛擬網路的一部分。
|