Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::HBR::RestoreJob

Dernière mise à jour :Aug 10, 2026

La ressource ALIYUN::HBR::RestoreJob permet de créer une tâche de restauration.

Syntaxe

{
  "Type": "ALIYUN::HBR::RestoreJob",
  "Properties": {
    "SnapshotId": String,
    "TargetClientId": String,
    "TargetPath": String,
    "SourceType": String,
    "SourceClientId": String,
    "TargetInstanceId": String,
    "VaultId": String,
    "SourceInstanceId": String,
    "RestoreType": String
  }
}

Propriétés

PropriétéTypeObligatoireModifiableDescriptionContrainte
SnapshotIdStringOuiNonID du snapshot.Aucune
TargetClientIdStringOuiNonID du client de destination.Ce paramètre est obligatoire si le paramètre RestoreType est défini sur FILE.
TargetPathStringOuiNonChemin de restauration des données de sauvegarde.Exemple : /.
SourceTypeStringOuiNonType du fichier source.Valeurs valides :
  • FILE : fichier stocké sur une machine locale.
  • ECS_FILE : fichier stocké dans une instance ECS.
SourceClientIdStringOuiNonID du client source.Ce paramètre est obligatoire si le paramètre SourceType est défini sur FILE.
TargetInstanceIdStringOuiNonID de l'instance ECS de destination.Ce paramètre est obligatoire si le paramètre RestoreType est défini sur ECS_FILE.
VaultIdStringOuiNonCoffre-fort de sauvegarde dans lequel le client source est déployé.Aucune
SourceInstanceIdStringOuiNonID de l'instance ECS source.Ce paramètre est obligatoire si le paramètre SourceType est défini sur ECS_FILE.
RestoreTypeStringOuiNonType du fichier après restauration.Valeurs valides :
  • FILE : fichier stocké sur une machine locale.
  • ECS_FILE : fichier stocké dans une instance ECS.

Paramètres de réponse

Fn::GetAtt

  • Status : statut de la tâche de restauration.

  • SourceType : type du fichier source.

  • RestoreId : ID de la tâche de restauration.

  • ErrorMessage : message d'erreur de la tâche de restauration.

  • RestoreType : type du fichier après restauration.

Exemples

Format 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"
        ]
      }
    }
  }
}

Format 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