Recovery Services コンテナーに関連付けられているバックアップ ポリシーの一覧。 API には、スコープ付き結果をフェッチするための改ページパラメーターが用意されています。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies?api-version=2025-02-01
省略可能なパラメーターを含む:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies?api-version=2025-02-01&$filter={$filter}
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
Recovery Services コンテナーが存在するリソース グループの名前。
|
subscriptionId
|
path |
True
|
string
|
サブスクリプション ID。
|
vaultName
|
path |
True
|
string
|
Recovery Services コンテナーの名前。
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
$filter
|
query |
|
string
|
OData フィルター オプション。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントを偽装します。
|
例
List protection policies with backupManagementType filter as AzureIaasVm
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies?api-version=2025-02-01&$filter=backupManagementType eq 'AzureIaasVM'
/**
* Samples for BackupPolicies List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/
* AzureIaasVm/BackupPolicies_List.json
*/
/**
* Sample code: List protection policies with backupManagementType filter as AzureIaasVm.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.backupPolicies().list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureIaasVM'",
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 azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup.activestamp import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python backup_policies_list.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 = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.backup_policies.list(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
)
for item in response:
print(item)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/BackupPolicies_List.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 armrecoveryservicesbackup_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/recoveryservices/armrecoveryservicesbackup/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/BackupPolicies_List.json
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBackupPoliciesClient().NewListPager("NetSDKTestRsVault", "SwaggerTestRg", &armrecoveryservicesbackup.BackupPoliciesClientListOptions{Filter: to.Ptr("backupManagementType eq 'AzureIaasVM'")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ProtectionPolicyResourceList = armrecoveryservicesbackup.ProtectionPolicyResourceList{
// Value: []*armrecoveryservicesbackup.ProtectionPolicyResource{
// {
// Name: to.Ptr("DefaultPolicy"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"),
// Properties: &armrecoveryservicesbackup.AzureIaaSVMProtectionPolicy{
// BackupManagementType: to.Ptr("AzureIaasVM"),
// ProtectedItemsCount: to.Ptr[int32](0),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](30),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicy{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicy"),
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// ScheduleWeeklyFrequency: to.Ptr[int32](0),
// },
// },
// },
// {
// Name: to.Ptr("testPolicy1"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1"),
// Properties: &armrecoveryservicesbackup.AzureIaaSVMProtectionPolicy{
// BackupManagementType: to.Ptr("AzureIaasVM"),
// ProtectedItemsCount: to.Ptr[int32](0),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](1),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T02:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicy{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicy"),
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T02:00:00.000Z"); return t}())},
// ScheduleWeeklyFrequency: to.Ptr[int32](0),
// },
// TimeZone: to.Ptr("Pacific Standard Time"),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVM() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options = { filter };
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.backupPolicies.list(vaultName, resourceGroupName, options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.RecoveryServicesBackup;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/BackupPolicies_List.json
// this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BackupProtectionPolicyResource
string vaultName = "NetSDKTestRsVault";
BackupProtectionPolicyCollection collection = resourceGroupResource.GetBackupProtectionPolicies(vaultName);
// invoke the operation and iterate over the result
string filter = "backupManagementType eq 'AzureIaasVM'";
await foreach (BackupProtectionPolicyResource item in collection.GetAllAsync(filter: filter))
{
// the variable item 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
BackupProtectionPolicyData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"value": [
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy",
"name": "DefaultPolicy",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureIaasVM",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2017-12-05T19:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2017-12-05T19:00:00Z"
],
"retentionDuration": {
"count": 30,
"durationType": "Days"
}
}
},
"protectedItemsCount": 0
}
},
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1",
"name": "testPolicy1",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureIaasVM",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2018-01-24T02:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2018-01-24T02:00:00Z"
],
"retentionDuration": {
"count": 1,
"durationType": "Days"
}
}
},
"timeZone": "Pacific Standard Time",
"protectedItemsCount": 0
}
}
]
}
List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2 policies
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies?api-version=2025-02-01&$filter=backupManagementType eq 'AzureIaasVM'
/**
* Samples for BackupPolicies List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/
* AzureIaasVm/V2Policy/v2-List-Policies.json
*/
/**
* Sample code: List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2
* policies.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVmWithBothV1AndV2Policies(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.backupPolicies().list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureIaasVM'",
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 azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup.activestamp import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python v2_list_policies.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 = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.backup_policies.list(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
)
for item in response:
print(item)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.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 armrecoveryservicesbackup_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/recoveryservices/armrecoveryservicesbackup/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVmWithBothV1AndV2Policies() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBackupPoliciesClient().NewListPager("NetSDKTestRsVault", "SwaggerTestRg", &armrecoveryservicesbackup.BackupPoliciesClientListOptions{Filter: to.Ptr("backupManagementType eq 'AzureIaasVM'")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ProtectionPolicyResourceList = armrecoveryservicesbackup.ProtectionPolicyResourceList{
// Value: []*armrecoveryservicesbackup.ProtectionPolicyResource{
// {
// Name: to.Ptr("DefaultPolicy"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"),
// Properties: &armrecoveryservicesbackup.AzureIaaSVMProtectionPolicy{
// BackupManagementType: to.Ptr("AzureIaasVM"),
// ProtectedItemsCount: to.Ptr[int32](0),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](30),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicy{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicy"),
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// ScheduleWeeklyFrequency: to.Ptr[int32](0),
// },
// },
// },
// {
// Name: to.Ptr("testPolicy1"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1"),
// Properties: &armrecoveryservicesbackup.AzureIaaSVMProtectionPolicy{
// BackupManagementType: to.Ptr("AzureIaasVM"),
// ProtectedItemsCount: to.Ptr[int32](0),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](1),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T02:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicy{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicy"),
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T02:00:00.000Z"); return t}())},
// ScheduleWeeklyFrequency: to.Ptr[int32](0),
// },
// TimeZone: to.Ptr("Pacific Standard Time"),
// },
// },
// {
// Name: to.Ptr("v2-daily-policy"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-policy"),
// Properties: &armrecoveryservicesbackup.AzureIaaSVMProtectionPolicy{
// BackupManagementType: to.Ptr("AzureIaasVM"),
// ProtectedItemsCount: to.Ptr[int32](0),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](1),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T02:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicyV2{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicyV2"),
// DailySchedule: &armrecoveryservicesbackup.DailySchedule{
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-24T10:00:00.000Z"); return t}())},
// },
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// },
// TimeZone: to.Ptr("Pacific Standard Time"),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVMWithBothV1AndV2Policies() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureIaasVM'";
const options = { filter };
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.backupPolicies.list(vaultName, resourceGroupName, options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.RecoveryServicesBackup;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json
// this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BackupProtectionPolicyResource
string vaultName = "NetSDKTestRsVault";
BackupProtectionPolicyCollection collection = resourceGroupResource.GetBackupProtectionPolicies(vaultName);
// invoke the operation and iterate over the result
string filter = "backupManagementType eq 'AzureIaasVM'";
await foreach (BackupProtectionPolicyResource item in collection.GetAllAsync(filter: filter))
{
// the variable item 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
BackupProtectionPolicyData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"value": [
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy",
"name": "DefaultPolicy",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureIaasVM",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2017-12-05T19:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2017-12-05T19:00:00Z"
],
"retentionDuration": {
"count": 30,
"durationType": "Days"
}
}
},
"protectedItemsCount": 0
}
},
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1",
"name": "testPolicy1",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureIaasVM",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2018-01-24T02:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2018-01-24T02:00:00Z"
],
"retentionDuration": {
"count": 1,
"durationType": "Days"
}
}
},
"timeZone": "Pacific Standard Time",
"protectedItemsCount": 0
}
},
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-policy",
"name": "v2-daily-policy",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureIaasVM",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicyV2",
"scheduleRunFrequency": "Daily",
"dailySchedule": {
"scheduleRunTimes": [
"2018-01-24T10:00:00Z"
]
}
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2018-01-24T02:00:00Z"
],
"retentionDuration": {
"count": 1,
"durationType": "Days"
}
}
},
"timeZone": "Pacific Standard Time",
"protectedItemsCount": 0
}
}
]
}
List protection policies with backupManagementType filter as AzureWorkload
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies?api-version=2025-02-01&$filter=backupManagementType eq 'AzureWorkload'
/**
* Samples for BackupPolicies List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/
* AzureWorkload/BackupPolicies_List.json
*/
/**
* Sample code: List protection policies with backupManagementType filter as AzureWorkload.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.backupPolicies().list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureWorkload'",
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 azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup.activestamp import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python backup_policies_list.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 = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.backup_policies.list(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
)
for item in response:
print(item)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureWorkload/BackupPolicies_List.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 armrecoveryservicesbackup_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/recoveryservices/armrecoveryservicesbackup/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureWorkload/BackupPolicies_List.json
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBackupPoliciesClient().NewListPager("NetSDKTestRsVault", "SwaggerTestRg", &armrecoveryservicesbackup.BackupPoliciesClientListOptions{Filter: to.Ptr("backupManagementType eq 'AzureWorkload'")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ProtectionPolicyResourceList = armrecoveryservicesbackup.ProtectionPolicyResourceList{
// Value: []*armrecoveryservicesbackup.ProtectionPolicyResource{
// {
// Name: to.Ptr("HourlyLogBackup"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupPolicies"),
// ID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/HourlyLogBackup"),
// Properties: &armrecoveryservicesbackup.AzureVMWorkloadProtectionPolicy{
// BackupManagementType: to.Ptr("AzureWorkload"),
// ProtectedItemsCount: to.Ptr[int32](0),
// Settings: &armrecoveryservicesbackup.Settings{
// Issqlcompression: to.Ptr(false),
// TimeZone: to.Ptr("UTC"),
// },
// SubProtectionPolicy: []*armrecoveryservicesbackup.SubProtectionPolicy{
// {
// PolicyType: to.Ptr(armrecoveryservicesbackup.PolicyTypeFull),
// RetentionPolicy: &armrecoveryservicesbackup.LongTermRetentionPolicy{
// RetentionPolicyType: to.Ptr("LongTermRetentionPolicy"),
// DailySchedule: &armrecoveryservicesbackup.DailyRetentionSchedule{
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](30),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// RetentionTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.SimpleSchedulePolicy{
// SchedulePolicyType: to.Ptr("SimpleSchedulePolicy"),
// ScheduleRunFrequency: to.Ptr(armrecoveryservicesbackup.ScheduleRunTypeDaily),
// ScheduleRunTimes: []*time.Time{
// to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T19:00:00.000Z"); return t}())},
// ScheduleWeeklyFrequency: to.Ptr[int32](0),
// },
// },
// {
// PolicyType: to.Ptr(armrecoveryservicesbackup.PolicyTypeLog),
// RetentionPolicy: &armrecoveryservicesbackup.SimpleRetentionPolicy{
// RetentionPolicyType: to.Ptr("SimpleRetentionPolicy"),
// RetentionDuration: &armrecoveryservicesbackup.RetentionDuration{
// Count: to.Ptr[int32](30),
// DurationType: to.Ptr(armrecoveryservicesbackup.RetentionDurationTypeDays),
// },
// },
// SchedulePolicy: &armrecoveryservicesbackup.LogSchedulePolicy{
// SchedulePolicyType: to.Ptr("LogSchedulePolicy"),
// ScheduleFrequencyInMins: to.Ptr[int32](60),
// },
// }},
// WorkLoadType: to.Ptr(armrecoveryservicesbackup.WorkloadTypeSQLDataBase),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
*
* @summary Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch
scoped results.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureWorkload/BackupPolicies_List.json
*/
async function listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const filter = "backupManagementType eq 'AzureWorkload'";
const options = { filter };
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.backupPolicies.list(vaultName, resourceGroupName, options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.RecoveryServicesBackup;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureWorkload/BackupPolicies_List.json
// this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BackupProtectionPolicyResource
string vaultName = "NetSDKTestRsVault";
BackupProtectionPolicyCollection collection = resourceGroupResource.GetBackupProtectionPolicies(vaultName);
// invoke the operation and iterate over the result
string filter = "backupManagementType eq 'AzureWorkload'";
await foreach (BackupProtectionPolicyResource item in collection.GetAllAsync(filter: filter))
{
// the variable item 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
BackupProtectionPolicyData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"value": [
{
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/HourlyLogBackup",
"name": "HourlyLogBackup",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureWorkload",
"workLoadType": "SQLDataBase",
"settings": {
"timeZone": "UTC",
"issqlcompression": false
},
"subProtectionPolicy": [
{
"policyType": "Full",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2017-12-05T19:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2017-12-05T19:00:00Z"
],
"retentionDuration": {
"count": 30,
"durationType": "Days"
}
}
}
},
{
"policyType": "Log",
"schedulePolicy": {
"schedulePolicyType": "LogSchedulePolicy",
"scheduleFrequencyInMins": 60
},
"retentionPolicy": {
"retentionPolicyType": "SimpleRetentionPolicy",
"retentionDuration": {
"count": 30,
"durationType": "Days"
}
}
}
],
"protectedItemsCount": 0
}
}
]
}
定義
AzureFileShareProtectionPolicy
Object
AzureStorage バックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
AzureStorage
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
retentionPolicy
|
RetentionPolicy:
|
バックアップ コピーの保持範囲の詳細を含む保持ポリシー。
|
schedulePolicy
|
SchedulePolicy:
|
バックアップ ポリシーの一部として指定されたバックアップ スケジュール。
|
timeZone
|
string
|
TimeZone 省略可能な文字列としての入力。 たとえば、TimeZone = "Pacific Standard Time" です。
|
vaultRetentionPolicy
|
VaultRetentionPolicy
|
セキュリティで強化されたバックアップ コピーの保持範囲の詳細を含む保持ポリシー。
|
workLoadType
|
WorkloadType
|
バックアップ管理のワークロードの種類
|
AzureIaaSVMProtectionPolicy
Object
IaaS VM ワークロード固有のバックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
AzureIaasVM
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
instantRPDetails
|
InstantRPAdditionalDetails
|
|
instantRpRetentionRangeInDays
|
integer
(int32)
|
インスタント RP リテンション期間ポリシーの範囲 (日数)
|
policyType
|
IAASVMPolicyType
|
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
retentionPolicy
|
RetentionPolicy:
|
バックアップ コピーの保持範囲の詳細を含む保持ポリシー。
|
schedulePolicy
|
SchedulePolicy:
|
バックアップ ポリシーの一部として指定されたバックアップ スケジュール。
|
snapshotConsistencyType
|
IaasVMSnapshotConsistencyType
|
|
tieringPolicy
|
<string,
TieringPolicy>
|
RP を別の層のキーに自動的に移動する階層化ポリシーは、RecoveryPointTierType 列挙型で定義されているターゲット層です。
階層化ポリシーは、RP をターゲット層に移動する条件を指定します。
|
timeZone
|
string
|
TimeZone 省略可能な文字列としての入力。 たとえば、TimeZone = "Pacific Standard Time" です。
|
AzureSqlProtectionPolicy
Object
Azure SQL ワークロード固有のバックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
AzureSql
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
retentionPolicy
|
RetentionPolicy:
|
アイテム保持ポリシーの詳細。
|
AzureVmWorkloadProtectionPolicy
Object
Azure VM (Mercury) ワークロード固有のバックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
AzureWorkload
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
makePolicyConsistent
|
boolean
|
ポリシーの不整合を修正する
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
settings
|
Settings
|
バックアップ管理の一般的な設定
|
subProtectionPolicy
|
SubProtectionPolicy[]
|
スケジュールと保持を含むサブ保護ポリシーの一覧
|
workLoadType
|
WorkloadType
|
バックアップ管理のワークロードの種類
|
CloudError
Object
コンテナー インスタンス サービスからのエラー応答。
CloudErrorBody
Object
コンテナー インスタンス サービスからのエラー応答。
名前 |
型 |
説明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
code
|
string
|
エラーの識別子。 コードは不変であり、プログラムで使用することを目的としています。
|
details
|
CloudErrorBody[]
|
エラーに関する追加の詳細の一覧。
|
message
|
string
|
ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。
|
target
|
string
|
特定のエラーのターゲット。 たとえば、エラーが発生したプロパティの名前です。
|
Object
毎日の保持形式。
名前 |
型 |
説明 |
daysOfTheMonth
|
Day[]
|
月の日の一覧。
|
DailyRetentionSchedule
Object
毎日の保持スケジュール。
名前 |
型 |
説明 |
retentionDuration
|
RetentionDuration
|
アイテム保持ポリシーの保持期間。
|
retentionTimes
|
string[]
(date-time)
|
アイテム保持ポリシーの保持時間。
|
DailySchedule
Object
名前 |
型 |
説明 |
scheduleRunTimes
|
string[]
(date-time)
|
このスケジュールを実行する必要がある時刻の一覧。
|
Day
Object
曜日。
名前 |
型 |
説明 |
date
|
integer
(int32)
|
月の日付
|
isLast
|
boolean
|
日付が月の最後の日付かどうか
|
DayOfWeek
列挙
値 |
説明 |
Friday
|
|
Monday
|
|
Saturday
|
|
Sunday
|
|
Thursday
|
|
Tuesday
|
|
Wednesday
|
|
ErrorAdditionalInfo
Object
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
GenericProtectionPolicy
Object
Azure VM (Mercury) ワークロード固有のバックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
GenericProtectionPolicy
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
fabricName
|
string
|
このポリシーのファブリックの名前。
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
subProtectionPolicy
|
SubProtectionPolicy[]
|
スケジュールと保持を含むサブ保護ポリシーの一覧
|
timeZone
|
string
|
TimeZone 省略可能な文字列としての入力。 たとえば、TimeZone = "Pacific Standard Time" です。
|
HourlySchedule
Object
名前 |
型 |
説明 |
interval
|
integer
(int32)
|
バックアップをトリガーする必要がある間隔。 時間単位では、値は 4/6/8/12 にすることができます
|
scheduleWindowDuration
|
integer
(int32)
|
バックアップ ウィンドウの期間を指定するには
|
scheduleWindowStartTime
|
string
(date-time)
|
バックアップ ウィンドウの開始時刻を指定するには
|
IAASVMPolicyType
列挙
IaasVMSnapshotConsistencyType
列挙
InstantRPAdditionalDetails
Object
名前 |
型 |
説明 |
azureBackupRGNamePrefix
|
string
|
|
azureBackupRGNameSuffix
|
string
|
|
LogSchedulePolicy
Object
ログ ポリシーのスケジュール。
名前 |
型 |
説明 |
scheduleFrequencyInMins
|
integer
(int32)
|
このポリシーのログ スケジュール操作の頻度 (分単位)。
|
schedulePolicyType
|
string:
LogSchedulePolicy
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
LongTermRetentionPolicy
Object
長期保持ポリシー。
LongTermSchedulePolicy
Object
長期的なポリシー スケジュール。
MabProtectionPolicy
Object
Mab コンテナー固有のバックアップ ポリシー。
名前 |
型 |
説明 |
backupManagementType
|
string:
MAB
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
protectedItemsCount
|
integer
(int32)
|
このポリシーに関連付けられている項目の数。
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard 操作要求
|
retentionPolicy
|
RetentionPolicy:
|
アイテム保持ポリシーの詳細。
|
schedulePolicy
|
SchedulePolicy:
|
バックアップ ポリシーのバックアップ スケジュール。
|
MonthlyRetentionSchedule
Object
毎月の保持スケジュール。
MonthOfYear
列挙
年単位の保持ポリシーの月の一覧。
値 |
説明 |
April
|
|
August
|
|
December
|
|
February
|
|
Invalid
|
|
January
|
|
July
|
|
June
|
|
March
|
|
May
|
|
November
|
|
October
|
|
September
|
|
PolicyType
列挙
バックアップ ポリシーの種類
値 |
説明 |
CopyOnlyFull
|
|
Differential
|
|
Full
|
|
Incremental
|
|
Invalid
|
|
Log
|
|
SnapshotCopyOnlyFull
|
|
SnapshotFull
|
|
ProtectionPolicyResource
Object
バックアップ ポリシーの基本クラス。 ワークロード固有のバックアップ ポリシーは、このクラスから派生します。
名前 |
型 |
説明 |
eTag
|
string
|
省略可能な ETag。
|
id
|
string
|
リソース ID は、リソースへの完全なパスを表します。
|
location
|
string
|
リソースの場所。
|
name
|
string
|
リソースに関連付けられているリソース名。
|
properties
|
ProtectionPolicy:
|
ProtectionPolicyResource プロパティ
|
tags
|
object
|
リソース タグ。
|
type
|
string
|
リソースの種類は、Namespace/ResourceType/ResourceType/..フォームの完全なパスを表します。
|
ProtectionPolicyResourceList
Object
ProtectionPolicy リソースの一覧
名前 |
型 |
説明 |
nextLink
|
string
|
リソースの次のページをフェッチする URI。各 API 呼び出しでは、1 ページあたり最大 200 個のリソースが返されます。 リソースの合計数が 200 を超える場合は、ListNext() を使用して次のページをフェッチします。
|
value
|
ProtectionPolicyResource[]
|
リソースの一覧。
|
RetentionDuration
Object
保持期間。
名前 |
型 |
説明 |
count
|
integer
(int32)
|
期間の種類の数。 保持期間は、期間の種類の Count times をカウントすることによって取得されます。
たとえば、Count = 3、DurationType = Weeks の場合、保持期間は 3 週間になります。
|
durationType
|
RetentionDurationType
|
アイテム保持ポリシーの保持期間の種類。
|
RetentionDurationType
列挙
保持期間の種類: 日/週/月/年 TieringMode が TierAfter に設定されている場合にのみ使用されます
値 |
説明 |
Days
|
|
Invalid
|
|
Months
|
|
Weeks
|
|
Years
|
|
列挙
月次アイテム保持ポリシーの保持スケジュール形式の種類。
値 |
説明 |
Daily
|
|
Invalid
|
|
Weekly
|
|
ScheduleRunType
列挙
このポリシーのスケジュール操作の頻度。
値 |
説明 |
Daily
|
|
Hourly
|
|
Invalid
|
|
Weekly
|
|
Settings
Object
バックアップ管理の共通設定フィールド
名前 |
型 |
説明 |
isCompression
|
boolean
|
ワークロード圧縮フラグ。 これは、クライアントがこのフラグを考慮するようにアップグレードした後に 'isSqlCompression' が非推奨になるように追加されました。
|
issqlcompression
|
boolean
|
SQL 圧縮フラグ
|
timeZone
|
string
|
TimeZone 省略可能な文字列としての入力。 たとえば、TimeZone = "Pacific Standard Time" です。
|
SimpleRetentionPolicy
Object
単純なポリシーの保持。
SimpleSchedulePolicy
Object
単純なポリシー スケジュール。
名前 |
型 |
説明 |
hourlySchedule
|
HourlySchedule
|
本ポリシーの時間単位のスケジュール
|
schedulePolicyType
|
string:
SimpleSchedulePolicy
|
このプロパティは、型のポリモーフィック チェーン内の特定の型を決定するための識別子として使用されます。
|
scheduleRunDays
|
DayOfWeek[]
|
このスケジュールを実行する必要がある曜日の一覧。
|
scheduleRunFrequency
|
ScheduleRunType
|
このポリシーのスケジュール操作の頻度。
|
scheduleRunTimes
|
string[]
(date-time)
|
このスケジュールを実行する必要がある時刻の一覧。
|
scheduleWeeklyFrequency
|
integer
(int32)
|
週ごとに、このスケジュールを実行する必要があります。
|
SimpleSchedulePolicyV2
Object
時間単位のバックアップをサポートする IaaS の V2 ポリシー スケジュール。
SnapshotBackupAdditionalDetails
Object
WorkloadType SaPHanaSystem のスナップショット バックアップ関連フィールド
SubProtectionPolicy
Object
スケジュールと保持を含むサブ保護ポリシー
名前 |
型 |
説明 |
policyType
|
PolicyType
|
バックアップ ポリシーの種類
|
retentionPolicy
|
RetentionPolicy:
|
バックアップ コピーの保持範囲の詳細を含む保持ポリシー。
|
schedulePolicy
|
SchedulePolicy:
|
バックアップ ポリシーの一部として指定されたバックアップ スケジュール。
|
snapshotBackupAdditionalDetails
|
SnapshotBackupAdditionalDetails
|
WorkloadType SaPHanaSystem のスナップショット バックアップ関連フィールド
|
tieringPolicy
|
<string,
TieringPolicy>
|
RP を別の層に自動的に移動するための階層化ポリシー。
キーは、RecoveryPointTierType 列挙型で定義されているターゲット層です。
階層化ポリシーは、RP をターゲット層に移動する条件を指定します。
|
TieringMode
列挙
復旧ポイントの自動階層化を制御する階層化モード。 サポートされる値は次のとおりです。
- TierRecommended: 階層化することをお勧めするすべての復旧ポイントを階層化する
- TierAfter: 以下の duration + durationType で指定されているように、一定期間後にすべての復旧ポイントを階層化します。
- DoNotTier: 復旧ポイントを階層化しない
値 |
説明 |
DoNotTier
|
|
Invalid
|
|
TierAfter
|
|
TierRecommended
|
|
TieringPolicy
Object
ターゲット層の階層化ポリシー。
特定のターゲット 層に対してポリシーが指定されていない場合、サービスはそのレベルに対して構成されている既存の階層化ポリシーを保持します
名前 |
型 |
説明 |
duration
|
integer
(int32)
|
階層化する前に現在のレベルでバックアップを保持する日数/週/月/年数。
TieringMode が TierAfter に設定されている場合にのみ使用されます
|
durationType
|
RetentionDurationType
|
保持期間の種類: 日/週/月/年 TieringMode が TierAfter に設定されている場合にのみ使用されます
|
tieringMode
|
TieringMode
|
復旧ポイントの自動階層化を制御する階層化モード。 サポートされる値は次のとおりです。
- TierRecommended: 階層化することをお勧めするすべての復旧ポイントを階層化する
- TierAfter: 以下の duration + durationType で指定されているように、一定期間後にすべての復旧ポイントを階層化します。
- DoNotTier: 復旧ポイントを階層化しない
|
UserAssignedIdentityProperties
Object
ユーザー割り当てマネージド ID プロパティ
名前 |
型 |
説明 |
clientId
|
string
|
割り当てられた ID のクライアント ID。
|
principalId
|
string
|
割り当てられた ID のプリンシパル ID。
|
UserAssignedManagedIdentityDetails
Object
ユーザー割り当てマネージド ID の詳細
名前 |
型 |
説明 |
identityArmId
|
string
|
割り当てられた ID の ARM ID。
|
identityName
|
string
|
割り当てられた ID の名前。
|
userAssignedIdentityProperties
|
UserAssignedIdentityProperties
|
ユーザー割り当てマネージド ID プロパティ
|
VaultRetentionPolicy
Object
AzureFileShare のコンテナー保持ポリシー
名前 |
型 |
説明 |
snapshotRetentionInDays
|
integer
(int32)
|
|
vaultRetention
|
RetentionPolicy:
|
アイテム保持ポリシーの基本クラス。
|
Object
週単位の保持形式。
WeeklyRetentionSchedule
Object
毎週の保持スケジュール。
名前 |
型 |
説明 |
daysOfTheWeek
|
DayOfWeek[]
|
週単位のアイテム保持ポリシーの曜日の一覧。
|
retentionDuration
|
RetentionDuration
|
アイテム保持ポリシーの保持期間。
|
retentionTimes
|
string[]
(date-time)
|
アイテム保持ポリシーの保持時間。
|
WeeklySchedule
Object
名前 |
型 |
説明 |
scheduleRunDays
|
DayOfWeek[]
|
|
scheduleRunTimes
|
string[]
(date-time)
|
このスケジュールを実行する必要がある時刻の一覧。
|
WeekOfMonth
列挙
月の週の一覧。
値 |
説明 |
First
|
|
Fourth
|
|
Invalid
|
|
Last
|
|
Second
|
|
Third
|
|
WorkloadType
列挙
バックアップ管理のワークロードの種類
値 |
説明 |
AzureFileShare
|
|
AzureSqlDb
|
|
Client
|
|
Exchange
|
|
FileFolder
|
|
GenericDataSource
|
|
Invalid
|
|
SAPAseDatabase
|
|
SAPHanaDBInstance
|
|
SAPHanaDatabase
|
|
SQLDB
|
|
SQLDataBase
|
|
Sharepoint
|
|
SystemState
|
|
VM
|
|
VMwareVM
|
|
YearlyRetentionSchedule
Object
毎年のリテンション期間のスケジュール。