特定の Azure ストレージ アカウントへの API Management サービスのバックアップを作成します。 これは実行時間の長い操作であり、完了までに数分かかる場合があります。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup?api-version=2022-08-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
リソース グループの名前。 名前では大文字と小文字が区別されません。
|
serviceName
|
path |
True
|
string
minLength: 1 maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
|
API Management サービスの名前。
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
ターゲット サブスクリプションの ID。
|
api-version
|
query |
True
|
string
minLength: 1
|
この操作に使用する API バージョン。
|
要求本文
名前 |
必須 |
型 |
説明 |
backupName
|
True
|
string
|
作成/取得するバックアップ ファイルの名前。
|
containerName
|
True
|
string
|
BLOB コンテナーの名前 (バックアップの配置/取得に使用されます)。
|
storageAccount
|
True
|
string
|
Azure ストレージ アカウントの名前 (バックアップの配置/取得に使用されます)。
|
accessKey
|
|
string
|
ストレージ アカウントのアクセス キー。
accessType が AccessKey に設定されている場合にのみ必要です。
|
accessType
|
|
AccessType
|
ストレージ アカウントに使用するアクセスの種類。
|
clientId
|
|
string
|
ユーザー割り当てマネージド ID のクライアント ID。
accessType が UserAssignedManagedIdentity に設定されている場合にのみ必要です。
|
応答
名前 |
型 |
説明 |
200 OK
|
ApiManagementServiceResource
|
API Management サービスをストレージ アカウントに正常にバックアップしました。
|
202 Accepted
|
|
受け入れ済み: Location ヘッダーには、実行時間の長い操作の状態を確認できる URL が含まれています。
ヘッダー
Location: string
|
Other Status Codes
|
ErrorResponse
|
操作が失敗した理由を説明するエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
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
列挙
ストレージ アカウントに使用するアクセスの種類。
値 |
説明 |
AccessKey
|
アクセス キーを使用します。
|
SystemAssignedManagedIdentity
|
システム割り当てマネージド ID を使用します。
|
UserAssignedManagedIdentity
|
ユーザー割り当てマネージド ID を使用します。
|
AdditionalLocation
Object
追加の API Management リソースの場所の説明。
名前 |
型 |
規定値 |
説明 |
disableGateway
|
boolean
|
False
|
プロパティは、複数の場所にデプロイされた Api Management サービスに対してのみ有効です。 これを使用して、この追加の場所でゲートウェイを無効にすることができます。
|
gatewayRegionalUrl
|
string
|
|
リージョン内の API Management サービスのゲートウェイ URL。
|
location
|
string
|
|
Azure データ センター リージョン間の追加リージョンの場所名。
|
natGatewayState
|
NatGatewayState
|
Disabled
|
プロパティを使用して、この API Management サービスの NAT ゲートウェイを有効にすることができます。
|
outboundPublicIPAddresses
|
string[]
|
|
NAT ゲートウェイでデプロイされたサービスに関連付けられている送信パブリック IPV4 アドレス プレフィックス。 stv2 プラットフォームの Premium SKU でのみ使用できます。
|
platformVersion
|
PlatformVersion
|
|
サービスを実行しているコンピューティング プラットフォームのバージョン。
|
privateIPAddresses
|
string[]
|
|
特定の追加の場所にある内部仮想ネットワークにデプロイされる API Management サービスのプライベート静的負荷分散 IP アドレス。 Basic、Standard、Premium、Isolated SKU でのみ使用できます。
|
publicIPAddresses
|
string[]
|
|
追加の場所にある API Management サービスのパブリック静的負荷分散 IP アドレス。 Basic、Standard、Premium、Isolated SKU でのみ使用できます。
|
publicIpAddressId
|
string
|
|
場所にデプロイされた Virtual Network サービスに関連付けられるパブリック Standard SKU IP V4 ベースの IP アドレス。 Virtual Network にデプロイされている Premium SKU でのみサポートされます。
|
sku
|
ApiManagementServiceSkuProperties
|
|
API Management サービスの SKU プロパティ。
|
virtualNetworkConfiguration
|
VirtualNetworkConfiguration
|
|
場所の仮想ネットワーク構成。
|
zones
|
string[]
|
|
リソースの取得場所を表す可用性ゾーンの一覧。
|
ApiManagementServiceBackupRestoreParameters
Object
API Management サービス操作のバックアップ/復元に指定されたパラメーター。
名前 |
型 |
規定値 |
説明 |
accessKey
|
string
|
|
ストレージ アカウントのアクセス キー。
accessType が AccessKey に設定されている場合にのみ必要です。
|
accessType
|
AccessType
|
AccessKey
|
ストレージ アカウントに使用するアクセスの種類。
|
backupName
|
string
|
|
作成/取得するバックアップ ファイルの名前。
|
clientId
|
string
|
|
ユーザー割り当てマネージド ID のクライアント ID。
accessType が UserAssignedManagedIdentity に設定されている場合にのみ必要です。
|
containerName
|
string
|
|
BLOB コンテナーの名前 (バックアップの配置/取得に使用されます)。
|
storageAccount
|
string
|
|
Azure ストレージ アカウントの名前 (バックアップの配置/取得に使用されます)。
|
ApiManagementServiceIdentity
Object
Api Management サービス リソースの ID プロパティ。
名前 |
型 |
説明 |
principalId
|
string
(uuid)
|
ID のプリンシパル ID。
|
tenantId
|
string
(uuid)
|
ID のクライアント テナント ID。
|
type
|
ApimIdentityType
|
リソースに使用される ID の種類。 型 'SystemAssigned, UserAssigned' には、暗黙的に作成された ID とユーザー割り当て ID のセットの両方が含まれます。 型 'None' は、サービスからすべての ID を削除します。
|
userAssignedIdentities
|
<string,
UserIdentityProperties>
|
リソースに関連付けられているユーザー ID の一覧。 ユーザー ID ディクショナリ のキー参照は、'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' という形式の ARM リソース ID になります。
|
ApiManagementServiceResource
Object
List または Get 応答の単一の API Management サービス リソース。
名前 |
型 |
規定値 |
説明 |
etag
|
string
|
|
リソースの ETag。
|
id
|
string
|
|
リソース ID。
|
identity
|
ApiManagementServiceIdentity
|
|
Api Management サービスのマネージド サービス ID。
|
location
|
string
|
|
リソースの場所。
|
name
|
string
|
|
リソース名。
|
properties.additionalLocations
|
AdditionalLocation[]
|
|
API Management サービスの追加のデータセンターの場所。
|
properties.apiVersionConstraint
|
ApiVersionConstraint
|
|
API Management サービスのコントロール プレーン API のバージョン制約。
|
properties.certificates
|
CertificateConfiguration[]
|
|
API Management サービスにインストールする必要がある証明書の一覧。 インストールできるサポートされる証明書の最大数は 10 です。
|
properties.createdAtUtc
|
string
(date-time)
|
|
API Management サービスの作成 UTC 日付。日付は、ISO 8601 標準で指定された yyyy-MM-ddTHH:mm:ssZ 形式に準拠しています。
|
properties.customProperties
|
object
|
|
API Management サービスのカスタム プロパティ。 設定 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 Management サービスで 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 Management サービスで HTTP2 プロトコルを有効にすることができます。 PATCH 操作でこれらのプロパティを指定しないと、省略されたプロパティの値が既定値にリセットされます。 Http2 を除くすべての設定で、サービスが 2018 年 4 月 1 日以前に作成された場合は既定値が True され、それ以外の場合 False 。 Http2 設定の既定値は False です。
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA、TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA、Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name] 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 Management サービスの DEveloper Portal エンドポイント URL。
|
properties.disableGateway
|
boolean
|
False
|
プロパティは、複数の場所にデプロイされた Api Management サービスに対してのみ有効です。 これを使用して、マスター リージョンのゲートウェイを無効にすることができます。
|
properties.enableClientCertificate
|
boolean
|
False
|
プロパティは、従量課金 SKU サービスにのみ使用されます。 これにより、ゲートウェイへの各要求にクライアント証明書が提示されます。 これにより、ゲートウェイのポリシーで証明書を認証することもできます。
|
properties.gatewayRegionalUrl
|
string
|
|
既定のリージョンの API Management サービスのゲートウェイ URL。
|
properties.gatewayUrl
|
string
|
|
API Management サービスのゲートウェイ URL。
|
properties.hostnameConfigurations
|
HostnameConfiguration[]
|
|
API Management サービスのカスタム ホスト名構成。
|
properties.managementApiUrl
|
string
|
|
API Management サービスの管理 API エンドポイント URL。
|
properties.natGatewayState
|
NatGatewayState
|
Disabled
|
プロパティを使用して、この API Management サービスの NAT ゲートウェイを有効にすることができます。
|
properties.notificationSenderEmail
|
string
maxLength: 100
|
|
通知の送信先となる電子メール アドレス。
|
properties.outboundPublicIPAddresses
|
string[]
|
|
NAT ゲートウェイでデプロイされたサービスに関連付けられている送信パブリック IPV4 アドレス プレフィックス。 stv2 プラットフォームの Premium SKU でのみ使用できます。
|
properties.platformVersion
|
PlatformVersion
|
|
この場所でサービスを実行しているコンピューティング プラットフォーム のバージョン。
|
properties.portalUrl
|
string
|
|
API Management サービスのパブリッシャー ポータル エンドポイント URL。
|
properties.privateEndpointConnections
|
RemotePrivateEndpointConnectionWrapper[]
|
|
このサービスのプライベート エンドポイント接続の一覧。
|
properties.privateIPAddresses
|
string[]
|
|
内部仮想ネットワークにデプロイされているプライマリ リージョンの API Management サービスのプライベート静的負荷分散 IP アドレス。 Basic、Standard、Premium、Isolated SKU でのみ使用できます。
|
properties.provisioningState
|
string
|
|
API Management サービスの現在のプロビジョニング状態。作成済み/アクティブ化/成功/更新/失敗/停止/終了/終了Failed/削除済みのいずれかです。
|
properties.publicIPAddresses
|
string[]
|
|
プライマリ リージョンの API Management サービスのパブリック静的負荷分散 IP アドレス。 Basic、Standard、Premium、Isolated SKU でのみ使用できます。
|
properties.publicIpAddressId
|
string
|
|
リージョンにデプロイされた Virtual Network サービスに関連付けられるパブリック Standard SKU IP V4 ベースの IP アドレス。 Virtual Network にデプロイされている Developer SKU と Premium SKU でのみサポートされます。
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
|
この API Management サービスに対してパブリック エンドポイント アクセスが許可されているかどうか。 値は省略可能ですが、渡される場合は 'Enabled' または 'Disabled' である必要があります。 "無効" の場合、プライベート エンドポイントは排他アクセス方法です。 既定値は 'Enabled' です
|
properties.publisherEmail
|
string
maxLength: 100
|
|
発行元の電子メール。
|
properties.publisherName
|
string
maxLength: 100
|
|
発行元名。
|
properties.restore
|
boolean
|
False
|
以前に論理的に削除された場合は、Api Management サービスの削除を取り消します。 このフラグを指定し、True に設定すると、他のすべてのプロパティは無視されます。
|
properties.scmUrl
|
string
|
|
API Management サービスの SCM エンドポイント URL。
|
properties.targetProvisioningState
|
string
|
|
API Management サービスのプロビジョニング状態。これは、サービスで開始された実行時間の長い操作を対象とします。
|
properties.virtualNetworkConfiguration
|
VirtualNetworkConfiguration
|
|
API Management サービスの仮想ネットワーク構成。
|
properties.virtualNetworkType
|
VirtualNetworkType
|
None
|
API Management サービスを構成する必要がある VPN の種類。 None (既定値) は、API Management サービスが仮想ネットワークに含まれていないことを意味し、外部は、インターネットに接続するエンドポイントを持つ仮想ネットワーク内に API Management デプロイが設定されていることを意味し、内部はイントラネットに接続するエンドポイントのみを持つ仮想ネットワーク内で API Management のデプロイが設定されることを意味します。
|
sku
|
ApiManagementServiceSkuProperties
|
|
API Management サービスの SKU プロパティ。
|
systemData
|
systemData
|
|
リソースの作成と最後の変更に関連するメタデータ。
|
tags
|
object
|
|
リソース タグ。
|
type
|
string
|
|
API Management リソースのリソースの種類が Microsoft.ApiManagement に設定されています。
|
zones
|
string[]
|
|
リソースの取得場所を表す可用性ゾーンの一覧。
|
ApiManagementServiceSkuProperties
Object
API Management サービス リソース SKU のプロパティ。
名前 |
型 |
説明 |
capacity
|
integer
(int32)
|
SKU の容量 (SKU のデプロイされたユニットの数)。 従量課金 SKU の容量は 0 として指定する必要があります。
|
name
|
SkuType
|
SKU の名前。
|
ApimIdentityType
列挙
リソースに使用される ID の種類。 型 'SystemAssigned, UserAssigned' には、暗黙的に作成された ID とユーザー割り当て ID のセットの両方が含まれます。 型 'None' は、サービスからすべての ID を削除します。
値 |
説明 |
None
|
|
SystemAssigned
|
|
SystemAssigned, UserAssigned
|
|
UserAssigned
|
|
ApiVersionConstraint
Object
API Management サービスのコントロール プレーン API のバージョン制約。
名前 |
型 |
説明 |
minApiVersion
|
string
|
この値以上のバージョンを使用して、API Management サービスへのコントロール プレーン API 呼び出しを制限します。
|
ArmIdWrapper
Object
ARM リソース ID のラッパー
CertificateConfiguration
Object
信頼されていない中間証明書とルート証明書で構成される証明書の構成。
名前 |
型 |
説明 |
certificate
|
CertificateInformation
|
証明書情報。
|
certificatePassword
|
string
|
証明書パスワード。
|
encodedCertificate
|
string
|
Base64 でエンコードされた証明書。
|
storeName
|
enum:
-
CertificateAuthority
-
Root
|
System.Security.Cryptography.x509certificates.StoreName 証明書ストアの場所。 有効な場所は Root と CertificateAuthority だけです。
|
Object
SSL 証明書情報。
名前 |
型 |
説明 |
expiry
|
string
(date-time)
|
証明書の有効期限。 日付は、ISO 8601 標準で指定された yyyy-MM-ddTHH:mm:ssZ 形式に準拠しています。
|
subject
|
string
|
証明書のサブジェクト。
|
thumbprint
|
string
|
証明書の拇印。
|
CertificateSource
列挙
証明書ソース。
値 |
説明 |
BuiltIn
|
|
Custom
|
|
KeyVault
|
|
Managed
|
|
CertificateStatus
列挙
証明書の状態。
値 |
説明 |
Completed
|
|
Failed
|
|
InProgress
|
|
createdByType
列挙
リソースを作成した ID の種類。
値 |
説明 |
Application
|
|
Key
|
|
ManagedIdentity
|
|
User
|
|
ErrorFieldContract
Object
エラー フィールド コントラクト。
名前 |
型 |
説明 |
code
|
string
|
プロパティ レベルのエラー コード。
|
message
|
string
|
プロパティ レベルエラーの人間が判読できる表現。
|
target
|
string
|
プロパティ名。
|
ErrorResponse
Object
エラー応答。
名前 |
型 |
説明 |
error.code
|
string
|
サービス定義エラー コード。 このコードは、応答で指定された HTTP エラー コードのサブステータスとして機能します。
|
error.details
|
ErrorFieldContract[]
|
検証エラーが発生した場合に要求で送信される無効なフィールドの一覧。
|
error.message
|
string
|
エラーの人間が判読できる表現。
|
HostnameConfiguration
Object
カスタム ホスト名の構成。
名前 |
型 |
規定値 |
説明 |
certificate
|
CertificateInformation
|
|
証明書情報。
|
certificatePassword
|
string
|
|
証明書パスワード。
|
certificateSource
|
CertificateSource
|
|
証明書ソース。
|
certificateStatus
|
CertificateStatus
|
|
証明書の状態。
|
defaultSslBinding
|
boolean
|
False
|
このホスト名に関連付けられている証明書を既定の SSL 証明書として設定するには、true を指定します。 クライアントが SNI ヘッダーを送信しない場合、これはチャレンジされる証明書になります。 このプロパティは、サービスで複数のカスタム ホスト名が有効になっていて、既定の ssl 証明書を決定する必要がある場合に便利です。 この設定は、ゲートウェイのホスト名の種類にのみ適用されます。
|
encodedCertificate
|
string
|
|
Base64 でエンコードされた証明書。
|
hostName
|
string
|
|
Api Management サービスで構成するホスト名。
|
identityClientId
|
string
|
|
Azure AD によって生成されたシステムまたはユーザー割り当てマネージド ID clientId。SSL 証明書を含む keyVault への GET アクセス権を持ちます。
|
keyVaultId
|
string
|
|
Ssl 証明書を含む KeyVault シークレットの URL。 バージョンを含む絶対 URL が指定されている場合、ssl 証明書の自動更新は機能しません。 そのためには、api Management サービスを aka.ms/apimmsi で構成する必要があります。 シークレットの種類は application/x-pkcs12 する必要があります
|
negotiateClientCertificate
|
boolean
|
False
|
ホスト名のクライアント証明書を常にネゴシエートするには、true を指定します。 既定値は false です。
|
type
|
HostnameType
|
|
ホスト名の種類。
|
HostnameType
列挙
ホスト名の種類。
値 |
説明 |
DeveloperPortal
|
|
Management
|
|
Portal
|
|
Proxy
|
|
Scm
|
|
NatGatewayState
列挙
プロパティを使用して、この API Management サービスの NAT ゲートウェイを有効にすることができます。
値 |
説明 |
Disabled
|
Nat Gateway はサービスに対して無効になっています。
|
Enabled
|
サービスに対して Nat Gateway が有効になっています。
|
列挙
サービスを実行しているコンピューティング プラットフォームのバージョン。
値 |
説明 |
mtv1
|
マルチテナント V1 プラットフォームでサービスを実行しているプラットフォーム。
|
stv1
|
シングル テナント V1 プラットフォームでサービスを実行しているプラットフォーム。
|
stv2
|
シングル テナント V2 プラットフォームでサービスを実行しているプラットフォーム。
|
undetermined
|
コンピューティング プラットフォームがデプロイされていないため、プラットフォームのバージョンを特定できません。
|
PrivateEndpointServiceConnectionStatus
列挙
プライベート エンドポイント接続の状態。
値 |
説明 |
Approved
|
|
Pending
|
|
Rejected
|
|
PrivateLinkServiceConnectionState
Object
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
PublicNetworkAccess
列挙
この API Management サービスに対してパブリック エンドポイント アクセスが許可されているかどうか。 値は省略可能ですが、渡される場合は 'Enabled' または 'Disabled' である必要があります。 "無効" の場合、プライベート エンドポイントは排他アクセス方法です。 既定値は 'Enabled' です
RemotePrivateEndpointConnectionWrapper
Object
リモート プライベート エンドポイント接続リソース。
名前 |
型 |
説明 |
id
|
string
|
プライベート エンドポイント接続リソース ID
|
name
|
string
|
プライベート エンドポイント接続名
|
properties.groupIds
|
string[]
|
すべてのグループ ID。
|
properties.privateEndpoint
|
ArmIdWrapper
|
プライベート エンドポイントのリソース。
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
|
properties.provisioningState
|
string
|
プライベート エンドポイント接続リソースのプロビジョニング状態。
|
type
|
string
|
プライベート エンドポイント接続リソースの種類
|
SkuType
列挙
SKU の名前。
値 |
説明 |
Basic
|
Api Management の Basic SKU。
|
Consumption
|
Api Management の従量課金 SKU。
|
Developer
|
Api Management の開発者 SKU。
|
Isolated
|
Api Management の分離 SKU。
|
Premium
|
Api Management の Premium SKU。
|
Standard
|
Api Management の Standard SKU。
|
systemData
Object
リソースの作成と最後の変更に関連するメタデータ。
名前 |
型 |
説明 |
createdAt
|
string
(date-time)
|
リソース作成のタイムスタンプ (UTC)。
|
createdBy
|
string
|
リソースを作成した ID。
|
createdByType
|
createdByType
|
リソースを作成した ID の種類。
|
lastModifiedAt
|
string
(date-time)
|
リソースの最終変更のタイムスタンプ (UTC)
|
lastModifiedBy
|
string
|
リソースを最後に変更した ID。
|
lastModifiedByType
|
createdByType
|
リソースを最後に変更した ID の種類。
|
UserIdentityProperties
Object
名前 |
型 |
説明 |
clientId
|
string
|
ユーザー割り当て ID のクライアント ID。
|
principalId
|
string
|
ユーザー割り当て ID のプリンシパル ID。
|
VirtualNetworkConfiguration
Object
API Management サービスのデプロイ先となる仮想ネットワークの構成。
名前 |
型 |
説明 |
subnetResourceId
|
string
pattern: ^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$
|
API Management サービスをデプロイする仮想ネットワーク内のサブネットの完全なリソース ID。
|
subnetname
|
string
|
サブネットの名前。
|
vnetid
|
string
|
仮想ネットワーク ID。 これは通常、GUID です。 既定では null GUID が必要です。
|
VirtualNetworkType
列挙
API Management サービスを構成する必要がある VPN の種類。 None (既定値) は、API Management サービスが仮想ネットワークに含まれていないことを意味し、外部は、インターネットに接続するエンドポイントを持つ仮想ネットワーク内に API Management デプロイが設定されていることを意味し、内部はイントラネットに接続するエンドポイントのみを持つ仮想ネットワーク内で API Management のデプロイが設定されることを意味します。
値 |
説明 |
External
|
このサービスは仮想ネットワークの一部であり、インターネットからアクセスできます。
|
Internal
|
サービスは仮想ネットワークの一部であり、仮想ネットワーク内からのみアクセスできます。
|
None
|
サービスは仮想ネットワークの一部ではありません。
|