

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# StartRestoreJob
<a name="API_StartRestoreJob"></a>

恢复由 Amazon 资源名称 (ARN) 标识的已保存资源。

## 请求语法
<a name="API_StartRestoreJob_RequestSyntax"></a>

```
PUT /restore-jobs HTTP/1.1
Content-type: application/json

{
   "CopySourceTagsToRestoredResource": boolean,
   "IamRoleArn": "string",
   "IdempotencyToken": "string",
   "Metadata": { 
      "string" : "string" 
   },
   "RecoveryPointArn": "string",
   "ResourceType": "string"
}
```

## URI 请求参数
<a name="API_StartRestoreJob_RequestParameters"></a>

该请求不使用任何 URI 参数。

## 请求正文
<a name="API_StartRestoreJob_RequestBody"></a>

请求接受采用 JSON 格式的以下数据。

 ** [CopySourceTagsToRestoredResource](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-CopySourceTagsToRestoredResource"></a>
此参数为可选参数。如果此值等于 `True`，则备份中包含的标签将被复制到已还原的资源中。  
这只能应用于通过创建的备份 AWS Backup。  
类型：布尔值  
必需：否

 ** [IamRoleArn](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-IamRoleArn"></a>
 AWS Backup 用于创建目标资源的 IAM 角色的亚马逊资源名称 (ARN)；例如：。`arn:aws:iam::123456789012:role/S3Access`  
类型：字符串  
必需：否

 ** [IdempotencyToken](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-IdempotencyToken"></a>
客户选择的字符串，可用于区分对 `StartRestoreJob` 的其他相同调用。使用相同的幂等性令牌重试成功的请求会生成一条成功消息，而不执行任何操作。  
类型：字符串  
必需：否

 ** [Metadata](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-Metadata"></a>
一组元数据键值对。  
您可以通过调用 `GetRecoveryPointRestoreMetadata` 来获取在备份资源时有关该资源的配置元数据。但是，除了 `GetRecoveryPointRestoreMetadata` 提供的值之外，可能还需要其他值才能还原资源。例如，如果原始资源名称已存在，您可能需要提供一个新的资源名称。  
有关各资源的元数据的更多信息，请参阅以下内容：  
+  [Amazon Aurora 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-aur.html#aur-restore-cli) 
+  [Amazon DocumentDB 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-docdb.html#docdb-restore-cli) 
+  [的元数据 AWS CloudFormation](https://docs.aws.amazon.com/aws-backup/latest/devguide/restore-application-stacks.html#restoring-cfn-cli) 
+  [Amazon DynamoDB 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-dynamodb.html#ddb-restore-cli) 
+  [Amazon EBS 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-ebs.html#ebs-restore-cli) 
+  [Amazon 的元数据 EC2](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-ec2.html#restoring-ec2-cli) 
+  [Amazon EFS 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-efs.html#efs-restore-cli) 
+  [亚马逊 EKS 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-eks.html#eks-restore-backup-section) 
+  [Amazon 的元数据 FSx](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-fsx.html#fsx-restore-cli) 
+  [Amazon Neptune 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-nep.html#nep-restore-cli) 
+  [Amazon RDS 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-rds.html#rds-restore-cli) 
+  [Amazon Redshift 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/redshift-restores.html#redshift-restore-api) 
+  [的元数据 AWS Storage Gateway](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-storage-gateway.html#restoring-sgw-cli) 
+  [Amazon S3 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-s3.html#s3-restore-cli) 
+  [Amazon Timestream 的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/timestream-restore.html#timestream-restore-api) 
+  [虚拟机的元数据](https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-vm.html#vm-restore-cli) 
类型：字符串到字符串映射  
是否必需：是

 ** [RecoveryPointArn](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-RecoveryPointArn"></a>
唯一标识恢复点的 ARN；例如，`arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45`。  
类型：字符串  
是否必需：是

 ** [ResourceType](#API_StartRestoreJob_RequestSyntax) **   <a name="Backup-StartRestoreJob-request-ResourceType"></a>
启动作业，恢复以下资源之一的恢复点：  
+  `Aurora`：Amazon Aurora
+  `DocumentDB`：Amazon DocumentDB
+  `CloudFormation` - AWS CloudFormation 
+  `DynamoDB`：Amazon DynamoDB
+  `EBS`：Amazon Elastic Block Store
+  `EC2`：Amazon Elastic Compute Cloud
+  `EFS`：Amazon Elastic File System
+  `EKS`-亚马逊 Elastic Kubernetes Service
+  `FSx`-亚马逊 FSx
+  `Neptune`：Amazon Neptune
+  `RDS`：Amazon Relational Database Service
+  `Redshift`：Amazon Redshift
+  `Storage Gateway` - AWS Storage Gateway 
+  `S3`：Amazon Simple Storage Service
+  `Timestream`：Amazon Timestream
+  `VirtualMachine`：虚拟机
类型：字符串  
模式：`^[a-zA-Z0-9\-\_\.]{1,50}$`  
必需：否

## 响应语法
<a name="API_StartRestoreJob_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "RestoreJobId": "string"
}
```

## 响应元素
<a name="API_StartRestoreJob_ResponseElements"></a>

如果此操作成功，则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

 ** [RestoreJobId](#API_StartRestoreJob_ResponseSyntax) **   <a name="Backup-StartRestoreJob-response-RestoreJobId"></a>
唯一标识还原恢复点的作业。  
类型：字符串

## 错误
<a name="API_StartRestoreJob_Errors"></a>

有关所有操作返回的常见错误的信息，请参阅[常见错误类型](CommonErrors.md)。

 ** InvalidParameterValueException **   
表示参数的值有问题。例如，该值超出了范围。    
 ** Context **   
  
 ** Type **   

HTTP 状态代码：400

 ** InvalidRequestException **   
表示请求的输入有问题。例如，参数的类型错误。    
 ** Context **   
  
 ** Type **   

HTTP 状态代码：400

 ** MissingParameterValueException **   
表示缺少必需的参数。    
 ** Context **   
  
 ** Type **   

HTTP 状态代码：400

 ** ResourceNotFoundException **   
该操作所需的资源不存在。    
 ** Context **   
  
 ** Type **   

HTTP 状态代码：400

 ** ServiceUnavailableException **   
由于服务器发生临时故障而导致请求失败。    
 ** Context **   
  
 ** Type **   

HTTP 状态代码：500

## 另请参阅
<a name="API_StartRestoreJob_SeeAlso"></a>

有关以特定语言之一使用此 API 的更多信息 AWS SDKs，请参阅以下内容：
+  [AWS 命令行界面 V2](https://docs.aws.amazon.com/goto/cli2/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于.NET 的 SDK V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 Go v2 的 SDK](https://docs.aws.amazon.com/goto/SdkForGoV2/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 Java 的 SDK V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/backup-2018-11-15/StartRestoreJob) 
+  [AWS JavaScript V3 版软件开发工具包](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 PHP 的 SDK V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/backup-2018-11-15/StartRestoreJob) 
+  [AWS Python 软件开发工具包](https://docs.aws.amazon.com/goto/boto3/backup-2018-11-15/StartRestoreJob) 
+  [AWS 适用于 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/backup-2018-11-15/StartRestoreJob) 