O recurso ALIYUN::HBR::RestoreJob crie um trabalho de restauração.
Sintaxe
{
"Type": "ALIYUN::HBR::RestoreJob",
"Properties": {
"SnapshotId": String,
"TargetClientId": String,
"TargetPath": String,
"SourceType": String,
"SourceClientId": String,
"TargetInstanceId": String,
"VaultId": String,
"SourceInstanceId": String,
"RestoreType": String
}
}
Propriedades
| Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
| SnapshotId | String | Sim | Não | ID do snapshot. | Nenhuma |
| TargetClientId | String | Sim | Não | ID do cliente de destino. | Obrigatório se RestoreType for FILE. |
| TargetPath | String | Sim | Não | Caminho de restauração dos dados de backup. | Exemplo: /. |
| SourceType | String | Sim | Não | Tipo do arquivo de source. | Valores válidos:
|
| SourceClientId | String | Sim | Não | ID do cliente de source. | Obrigatório se SourceType for FILE. |
| TargetInstanceId | String | Sim | Não | ID da instância ECS de destino. | Obrigatório se RestoreType for ECS_FILE. |
| VaultId | String | Sim | Não | Cofre de backup onde o cliente de source está implantado. | Nenhuma |
| SourceInstanceId | String | Sim | Não | ID da instância ECS de source. | Obrigatório se SourceType for ECS_FILE. |
| RestoreType | String | Sim | Não | Tipo do arquivo após a restauração. | Valores válidos:
|
Parâmetros de resposta
Fn::GetAtt
Status: status do trabalho de restauração.
SourceType: tipo do arquivo de source.
RestoreId: ID do trabalho de restauração.
ErrorMessage: mensagem de erro do trabalho de restauração.
RestoreType: tipo do arquivo após a restauração.
Exemplos
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SnapshotId": {
"Type": "String",
"Description": "Snapshot ID"
},
"TargetClientId": {
"Type": "String",
"Description": "Target client ID. It should be provided when RestoreType=FILE."
},
"TargetPath": {
"Type": "String",
"Description": "Target path. For instance, \"/\"."
},
"SourceType": {
"Type": "String",
"Description": "Source type",
"AllowedValues": [
"FILE",
"ECS_FILE"
]
},
"SourceClientId": {
"Type": "String",
"Description": "Source client ID. It should be provided when SourceType=FILE."
},
"TargetInstanceId": {
"Type": "String",
"Description": "Source client ID. It should be provided when RestoreType=ECS_FILE."
},
"VaultId": {
"Type": "String",
"Description": "Vault ID"
},
"SourceInstanceId": {
"Type": "String",
"Description": "Source instance ID. It should be provided when SourceType=ECS_FILE."
},
"RestoreType": {
"Type": "String",
"Description": "Restore type",
"AllowedValues": [
"FILE",
"ECS_FILE"
]
}
},
"Resources": {
"RestoreJob": {
"Type": "ALIYUN::HBR::RestoreJob",
"Properties": {
"SnapshotId": {
"Ref": "SnapshotId"
},
"TargetClientId": {
"Ref": "TargetClientId"
},
"TargetPath": {
"Ref": "TargetPath"
},
"SourceType": {
"Ref": "SourceType"
},
"SourceClientId": {
"Ref": "SourceClientId"
},
"TargetInstanceId": {
"Ref": "TargetInstanceId"
},
"VaultId": {
"Ref": "VaultId"
},
"SourceInstanceId": {
"Ref": "SourceInstanceId"
},
"RestoreType": {
"Ref": "RestoreType"
}
}
}
},
"Outputs": {
"Status": {
"Description": "Restore job status",
"Value": {
"Fn::GetAtt": [
"RestoreJob",
"Status"
]
}
},
"SourceType": {
"Description": "Source type",
"Value": {
"Fn::GetAtt": [
"RestoreJob",
"SourceType"
]
}
},
"RestoreId": {
"Description": "Restore job ID",
"Value": {
"Fn::GetAtt": [
"RestoreJob",
"RestoreId"
]
}
},
"ErrorMessage": {
"Description": "Error message of restore job",
"Value": {
"Fn::GetAtt": [
"RestoreJob",
"ErrorMessage"
]
}
},
"RestoreType": {
"Description": "Restore type",
"Value": {
"Fn::GetAtt": [
"RestoreJob",
"RestoreType"
]
}
}
}
}
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SnapshotId:
Type: String
Description: Snapshot ID
TargetClientId:
Type: String
Description: Target client ID. It should be provided when RestoreType=FILE.
TargetPath:
Type: String
Description: 'Target path. For instance, "/".'
SourceType:
Type: String
Description: Source type
AllowedValues:
- FILE
- ECS_FILE
SourceClientId:
Type: String
Description: Source client ID. It should be provided when SourceType=FILE.
TargetInstanceId:
Type: String
Description: Source client ID. It should be provided when RestoreType=ECS_FILE.
VaultId:
Type: String
Description: Vault ID
SourceInstanceId:
Type: String
Description: Source instance ID. It should be provided when SourceType=ECS_FILE.
RestoreType:
Type: String
Description: Restore type
AllowedValues:
- FILE
- ECS_FILE
Resources:
RestoreJob:
Type: 'ALIYUN::HBR::RestoreJob'
Properties:
SnapshotId:
Ref: SnapshotId
TargetClientId:
Ref: TargetClientId
TargetPath:
Ref: TargetPath
SourceType:
Ref: SourceType
SourceClientId:
Ref: SourceClientId
TargetInstanceId:
Ref: TargetInstanceId
VaultId:
Ref: VaultId
SourceInstanceId:
Ref: SourceInstanceId
RestoreType:
Ref: RestoreType
Outputs:
Status:
Description: Restore job status
Value:
'Fn::GetAtt':
- RestoreJob
- Status
SourceType:
Description: Source type
Value:
'Fn::GetAtt':
- RestoreJob
- SourceType
RestoreId:
Description: Restore job ID
Value:
'Fn::GetAtt':
- RestoreJob
- RestoreId
ErrorMessage:
Description: Error message of restore job
Value:
'Fn::GetAtt':
- RestoreJob
- ErrorMessage
RestoreType:
Description: Restore type
Value:
'Fn::GetAtt':
- RestoreJob
- RestoreType