Backup Policies - Create Or Update
Membuat atau Memperbarui kebijakan cadangan milik brankas cadangan
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}?api-version=2021-01-01
Parameter URI
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
backup
|
path | True |
|
Nama kebijakan |
|
resource
|
path | True |
|
Nama grup sumber daya tempat vault cadangan berada. |
|
subscription
|
path | True |
|
Id langganan. |
|
vault
|
path | True |
|
Nama brankas cadangan. |
|
api-version
|
query | True |
|
Versi Api Klien. |
Isi Permintaan
| Name | Type | Description |
|---|---|---|
| properties | BaseBackupPolicy: |
BaseBackupPolicy |
Respons
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
Respons kesalahan yang menjelaskan mengapa operasi gagal. |
Keamanan
azure_auth
Azure Active Directory Flow OAuth2
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | meniru akun pengguna Anda. |
Contoh
CreateOrUpdate BackupPolicy
Sample Request
PUT https://management.azure.com/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PrivatePreviewVault/backupPolicies/OSSDBPolicy?api-version=2021-01-01
{
"properties": {
"policyRules": [
{
"backupParameters": {
"backupType": "Full",
"objectType": "AzureBackupParams"
},
"trigger": {
"schedule": {
"repeatingTimeIntervals": [
"R/2019-11-20T08:00:00-08:00/P1W"
]
},
"taggingCriteria": [
{
"tagInfo": {
"tagName": "Default"
},
"taggingPriority": 99,
"isDefault": true
},
{
"tagInfo": {
"tagName": "Weekly"
},
"taggingPriority": 20,
"isDefault": false,
"criteria": [
{
"scheduleTimes": [
"2019-03-01T13:00:00Z"
],
"daysOfTheWeek": [
"Sunday"
],
"objectType": "ScheduleBasedBackupCriteria"
}
]
}
],
"objectType": "ScheduleBasedTriggerContext"
},
"dataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"name": "BackupWeekly",
"objectType": "AzureBackupRule"
},
{
"lifecycles": [
{
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"deleteAfter": {
"objectType": "AbsoluteDeleteOption",
"duration": "P1W"
}
}
],
"isDefault": true,
"name": "Default",
"objectType": "AzureRetentionRule"
},
{
"lifecycles": [
{
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"deleteAfter": {
"objectType": "AbsoluteDeleteOption",
"duration": "P12W"
}
}
],
"isDefault": false,
"name": "Weekly",
"objectType": "AzureRetentionRule"
}
],
"datasourceTypes": [
"OssDB"
],
"objectType": "BackupPolicy"
}
}
Sample Response
{
"id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PrivatePreviewVault/backupPolicies/OSSDBPolicy",
"name": "OSSDBPolicy",
"type": "Microsoft.DataProtection/backupVaults/backupPolicies",
"properties": {
"policyRules": [
{
"backupParameters": {
"backupType": "Full",
"objectType": "AzureBackupParams"
},
"trigger": {
"schedule": {
"repeatingTimeIntervals": [
"R/2019-11-20T08:00:00-08:00/P1W"
]
},
"taggingCriteria": [
{
"tagInfo": {
"tagName": "Default",
"id": "Default_"
},
"taggingPriority": 99,
"isDefault": true
},
{
"tagInfo": {
"tagName": "Weekly",
"id": "Weekly_"
},
"taggingPriority": 20,
"isDefault": false,
"criteria": [
{
"scheduleTimes": [
"2019-03-01T13:00:00Z"
],
"daysOfTheWeek": [
"Sunday"
],
"objectType": "ScheduleBasedBackupCriteria"
}
]
}
],
"objectType": "ScheduleBasedTriggerContext"
},
"dataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"name": "BackupWeekly",
"objectType": "AzureBackupRule"
},
{
"lifecycles": [
{
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"deleteAfter": {
"objectType": "AbsoluteDeleteOption",
"duration": "P1W"
}
}
],
"isDefault": true,
"name": "Default",
"objectType": "AzureRetentionRule"
},
{
"lifecycles": [
{
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"deleteAfter": {
"objectType": "AbsoluteDeleteOption",
"duration": "P12W"
}
}
],
"isDefault": false,
"name": "Weekly",
"objectType": "AzureRetentionRule"
}
],
"datasourceTypes": [
"OssDB"
],
"objectType": "BackupPolicy"
}
}
Definisi
|
Absolute |
AbsoluteDeleteOption |
|
Adhoc |
AdhocBasedTaggingCriteria |
|
Adhoc |
AdhocBasedTriggerContext |
|
Azure |
AzureBackupParams |
|
Azure |
AzureBackupRule |
|
Azure |
AzureRetentionRule |
|
Backup |
BackupPolicy |
|
Backup |
BackupSchedule |
|
Base |
BaseBackupPolicyResource |
|
Cloud |
CloudError |
|
Copy |
CopyOnExpiryOption |
|
created |
Jenis identitas yang membuat sumber daya. |
|
Custom |
CustomCopyOption |
|
Data |
DataStoreInfoBase |
|
Data |
jenis datastore; Operasional/Vault/Arsip |
| Day |
Hari |
| Error |
Respons kesalahan manajemen sumber daya. |
|
Error |
Info tambahan kesalahan manajemen sumber daya. |
|
Immediate |
ImmediateCopyOption |
|
Retention |
RetentionTag |
|
Schedule |
ScheduleBasedBackupCriteria |
|
Schedule |
ScheduleBasedTriggerContext |
|
Source |
SourceLifeCycle |
|
system |
Metadata yang berkaitan dengan pembuatan dan modifikasi terakhir sumber daya. |
|
Tagging |
PenandaanCriteria |
|
Target |
TargetCopySetting |
AbsoluteDeleteOption
AbsoluteDeleteOption
| Name | Type | Description |
|---|---|---|
| duration |
|
Durasi penghapusan setelah rentang waktu yang diberikan |
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
AdhocBasedTaggingCriteria
AdhocBasedTaggingCriteria
| Name | Type | Description |
|---|---|---|
| tagInfo |
RetentionTag |
AdhocBasedTriggerContext
AdhocBasedTriggerContext
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
| taggingCriteria |
AdhocBasedTaggingCriteria |
AzureBackupParams
AzureBackupParams
| Name | Type | Description |
|---|---|---|
| backupType |
|
BackupType ; Penuh/Inkremental dll |
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
AzureBackupRule
AzureBackupRule
| Name | Type | Description |
|---|---|---|
| backupParameters | BackupParameters: |
BackupParameters |
| dataStore |
DataStoreInfoBase |
|
| name |
|
|
| objectType | string: | |
| trigger | TriggerContext: |
TriggerContext |
AzureRetentionRule
AzureRetentionRule
| Name | Type | Description |
|---|---|---|
| isDefault |
|
|
| lifecycles |
SourceLifeCycle |
|
| name |
|
|
| objectType | string: |
BackupPolicy
BackupPolicy
| Name | Type | Description |
|---|---|---|
| datasourceTypes |
|
Jenis sumber data untuk manajemen cadangan |
| objectType | string: | |
| policyRules | BasePolicyRule[]: |
Kamus aturan kebijakan yang berisi aturan untuk setiap jenis cadangan yaitu Full/Incremental/Logs dll |
BackupSchedule
BackupSchedule
| Name | Type | Description |
|---|---|---|
| repeatingTimeIntervals |
|
Format interval waktu berulang ISO 8601 |
BaseBackupPolicyResource
BaseBackupPolicyResource
| Name | Type | Description |
|---|---|---|
| id |
|
Id Sumber Daya mewakili jalur lengkap ke sumber daya. |
| name |
|
Nama sumber daya yang terkait dengan sumber daya. |
| properties | BaseBackupPolicy: |
BaseBackupPolicy |
| systemData |
Metadata yang berkaitan dengan pembuatan dan modifikasi terakhir sumber daya. |
|
| type |
|
Jenis sumber daya mewakili jalur lengkap formulir Namespace/ResourceType/ResourceType/... |
CloudError
CloudError
| Name | Type | Description |
|---|---|---|
| error |
Respons kesalahan manajemen sumber daya. |
CopyOnExpiryOption
CopyOnExpiryOption
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
createdByType
Jenis identitas yang membuat sumber daya.
| Name | Type | Description |
|---|---|---|
| Application |
|
|
| Key |
|
|
| ManagedIdentity |
|
|
| User |
|
CustomCopyOption
CustomCopyOption
| Name | Type | Description |
|---|---|---|
| duration |
|
Data yang disalin setelah rentang waktu yang diberikan |
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
DataStoreInfoBase
DataStoreInfoBase
| Name | Type | Description |
|---|---|---|
| dataStoreType |
jenis datastore; Operasional/Vault/Arsip |
|
| objectType |
|
Jenis objek Datasource, digunakan untuk menginisialisasi jenis warisan yang tepat |
DataStoreTypes
jenis datastore; Operasional/Vault/Arsip
| Name | Type | Description |
|---|---|---|
| ArchiveStore |
|
|
| OperationalStore |
|
|
| VaultStore |
|
Day
Hari
| Name | Type | Description |
|---|---|---|
| date |
|
Tanggal bulan |
| isLast |
|
Apakah Tanggal adalah tanggal terakhir bulan |
Error
Respons kesalahan manajemen sumber daya.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
Info tambahan kesalahan. |
|
| code |
|
Kode kesalahan. |
| details |
|
Detail kesalahan. |
| message |
|
Pesan kesalahan. |
| target |
|
Target kesalahan. |
ErrorAdditionalInfo
Info tambahan kesalahan manajemen sumber daya.
| Name | Type | Description |
|---|---|---|
| info |
|
Info tambahan. |
| type |
|
Jenis info tambahan. |
ImmediateCopyOption
ImmediateCopyOption
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
RetentionTag
RetentionTag
| Name | Type | Description |
|---|---|---|
| eTag |
|
Versi Tag Retensi. |
| id |
|
Versi Tag Retensi. |
| tagName |
|
Nama Tag Retensi untuk menghubungkannya dengan aturan retensi. |
ScheduleBasedBackupCriteria
ScheduleBasedBackupCriteria
| Name | Type | Description |
|---|---|---|
| absoluteCriteria |
|
ini berisi nilai absolut seperti "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" dan harus menjadi bagian dari enum AbsoluteMarker |
| daysOfMonth |
|
Ini adalah hari dalam sebulan dari 1 hingga 28 bijaksana lainnya bulan lalu |
| daysOfTheWeek |
|
Seharusnya Hari Minggu/Senin/T..../Sabtu |
| monthsOfYear |
|
Seharusnya Januari/Februari/.../Desember |
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
| scheduleTimes |
|
Daftar waktu jadwal untuk pencadangan |
| weeksOfTheMonth |
|
Seharusnya Pertama/Detik/Ketiga/Keempat/Terakhir |
ScheduleBasedTriggerContext
ScheduleBasedTriggerContext
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Jenis objek tertentu - digunakan untuk deserialisasi |
| schedule |
BackupSchedule |
|
| taggingCriteria |
Daftar tag yang dapat berlaku untuk jadwal tertentu. |
SourceLifeCycle
SourceLifeCycle
| Name | Type | Description |
|---|---|---|
| deleteAfter | DeleteOption: |
DeleteOption |
| sourceDataStore |
DataStoreInfoBase |
|
| targetDataStoreCopySettings |
TargetCopySetting |
systemData
Metadata yang berkaitan dengan pembuatan dan modifikasi terakhir sumber daya.
| Name | Type | Description |
|---|---|---|
| createdAt |
|
Tanda waktu pembuatan sumber daya (UTC). |
| createdBy |
|
Identitas yang membuat sumber daya. |
| createdByType |
Jenis identitas yang membuat sumber daya. |
|
| lastModifiedAt |
|
Jenis identitas yang terakhir mengubah sumber daya. |
| lastModifiedBy |
|
Identitas yang terakhir mengubah sumber daya. |
| lastModifiedByType |
Jenis identitas yang terakhir mengubah sumber daya. |
TaggingCriteria
PenandaanCriteria
| Name | Type | Description |
|---|---|---|
| criteria | BackupCriteria[]: |
Kriteria yang memutuskan apakah tag dapat diterapkan ke cadangan yang dipicu. |
| isDefault |
|
Menentukan apakah tag adalah default. |
| tagInfo |
RetentionTag |
|
| taggingPriority |
|
Prioritas Tag Retensi. |
TargetCopySetting
TargetCopySetting
| Name | Type | Description |
|---|---|---|
| copyAfter | CopyOption: |
CopyOption |
| dataStore |
DataStoreInfoBase |