

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

# 开始一份工作
<a name="starting-a-job"></a>

提交包含您的任务配置的`StartJob`请求。指定您要执行的操作，提供您的执行角色 ARN，并使用您的 Amazon S3 存储桶位置配置输入和输出选项。

某些操作类型支持可选的附加功能，这些功能可以增强结果。可用功能取决于操作类型。有关地址验证的其他功能，请参阅[地址验证功能](address-validation-concepts.md#address-validation-features)。

提供有意义的任务名称，以帮助识别监控和管理操作中的作业。考虑在作业名称中包含时间戳或批次标识符，以便于跟踪。

## 地址验证示例
<a name="start-job-examples"></a>

以下示例说明如何启动地址验证作业。使用它们作为请求结构的参考。

### 启动异步地址验证作业
<a name="start-address-validation-example"></a>

------
#### [ Sample request ]

```
{
   "Action": "ValidateAddress",
   "Name": "MyFirstValidationJob",
   "ExecutionRoleArn": "arn:aws:iam::{{YOUR_ACCOUNT_ID}}:role/LocationServiceJobExecutionRole",
   "InputOptions": {
       "Location": "arn:aws:s3:::{{YOUR_INPUT_BUCKET_NAME}}",
       "Format": "Parquet"
   },
   "OutputOptions": {
       "Location": "arn:aws:s3:::{{YOUR_OUTPUT_BUCKET_NAME}}",
       "Format": "Parquet"
   }
}
```

------
#### [ Sample response ]

```
{
   "CreatedAt": "2024-01-01T00:00:00Z",
   "JobArn": "arn:aws:geo:us-west-2:{{YOUR_ACCOUNT_ID}}:job/MyFirstValidationJob-12345678-abcd-1234-5678-abcdef123456",
   "JobId": "MyFirstValidationJob-12345678-abcd-1234-5678-abcdef123456",
   "Status": "Pending"
}
```

------
#### [ AWS CLI ]

```
aws location start-job \
  --action ValidateAddress \
  --execution-role-arn "arn:aws:iam::{{YOUR_ACCOUNT_ID}}:role/LocationServiceJobExecutionRole" \
  --input-options Location=arn:aws:s3:::{{YOUR_INPUT_BUCKET}},Format=Parquet \
  --name "MyFirstCLIJob" \
  --output-options Location=arn:aws:s3:::{{YOUR_OUTPUT_BUCKET}},Format=Parquet \
  --region us-west-2
```

------

### 使用其他功能开始工作
<a name="start-job-with-features-example"></a>

以下示例包括`Position``CountrySpecificAttributes`和其他功能：

------
#### [ Sample request ]

```
{
   "Action": "ValidateAddress",
   "Name": "ValidationJobWithFeatures",
   "ExecutionRoleArn": "arn:aws:iam::{{YOUR_ACCOUNT_ID}}:role/LocationServiceJobExecutionRole",
   "InputOptions": {
       "Location": "arn:aws:s3:::{{YOUR_INPUT_BUCKET_NAME}}",
       "Format": "Parquet"
   },
   "OutputOptions": {
       "Location": "arn:aws:s3:::{{YOUR_OUTPUT_BUCKET_NAME}}",
       "Format": "Parquet"
   },
   "ActionOptions": {
       "ValidateAddress": {
           "AdditionalFeatures": [
               "Position",
               "CountrySpecificAttributes"
           ]
       }
   }
}
```

------
#### [ AWS CLI ]

```
aws location start-job \
  --action ValidateAddress \
  --execution-role-arn "arn:aws:iam::{{YOUR_ACCOUNT_ID}}:role/LocationServiceJobExecutionRole" \
  --input-options Location=arn:aws:s3:::{{YOUR_INPUT_BUCKET}},Format=Parquet \
  --name "ValidationJobWithFeatures" \
  --output-options Location=arn:aws:s3:::{{YOUR_OUTPUT_BUCKET}},Format=Parquet \
  --action-options '{"ValidateAddress":{"AdditionalFeatures":["Position","CountrySpecificAttributes"]}}' \
  --region us-west-2
```

------