

AWS Data Pipeline 不再向新客户提供。的现有客户 AWS Data Pipeline 可以继续照常使用该服务。[了解详情](https://aws.amazon.com/blogs/big-data/migrate-workloads-from-aws-data-pipeline/)

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

# HttpProxy
<a name="dp-object-httpproxy"></a>

HttpProxy 允许您配置自己的代理并让 Task Runner 通过它访问 AWS Data Pipeline 服务。您不需要使用此信息配置正在运行的任务运行程序。

## in 的示 HttpProxy 例 TaskRunner
<a name="example9"></a>

以下管道定义显示一个 `HttpProxy` 对象：

```
{
  "objects": [
    {
      "schedule": {
        "ref": "Once"
      },
      "pipelineLogUri": "s3://myDPLogUri/path",
      "name": "Default",
      "id": "Default"
    },
    {
      "name": "test_proxy",
      "hostname": "hostname",
      "port": "port",
      "username": "username",
      "*password": "password",
      "windowsDomain": "windowsDomain",
      "type": "HttpProxy",
      "id": "test_proxy",
    },
    {
      "name": "ShellCommand",
      "id": "ShellCommand",
      "runsOn": {
        "ref": "Resource"
      },
      "type": "ShellCommandActivity",
      "command": "echo 'hello world' "
    },
    {
      "period": "1 day",
      "startDateTime": "2013-03-09T00:00:00",
      "name": "Once",
      "id": "Once",
      "endDateTime": "2013-03-10T00:00:00",
      "type": "Schedule"
    },
    {
      "role": "dataPipelineRole",
      "httpProxy": {
        "ref": "test_proxy"
      },
      "actionOnResourceFailure": "retrynone",
      "maximumRetries": "0",
      "type": "Ec2Resource",
      "terminateAfter": "10 minutes",
      "resourceRole": "resourceRole",
      "name": "Resource",
      "actionOnTaskFailure": "terminate",
      "securityGroups": "securityGroups",
      "keyPair": "keyPair",
      "id": "Resource",
      "region": "us-east-1"
    }
  ],
  "parameters": []
}
```

## 语法
<a name="httpproxy-slots"></a>


****  

| 必填字段 | 说明 | 槽位类型 | 
| --- | --- | --- | 
| hostname | 客户端将用来连接到 Amazon Web Services 的代理的主机。 | 字符串 | 
| 端口 | 客户端将用来连接到 Amazon Web Services 的代理主机的端口。 | 字符串 | 

 


****  

| 可选字段 | 说明 | 槽位类型 | 
| --- | --- | --- | 
| parent | 槽将继承自的当前对象的父级。 | 引用对象，例如 “父对象”：\$1"ref”:” myBaseObject Id "\$1 | 
| \$1password | 代理的密码。 | 字符串 | 
| s3 NoProxy | 在连接到 Amazon S3 时禁用 HTTP 代理 | 布尔值 | 
| username | 代理的用户名。 | 字符串 | 
| windowsDomain | NTLM 代理的 Windows 域名。 | 字符串 | 
| windowsWorkgroup | NTLM 代理的 Windows 工作组名。 | 字符串 | 

 


****  

| 运行时字段 | 说明 | 槽位类型 | 
| --- | --- | --- | 
| @version | 用来创建对象的管道版本。 | 字符串 | 

 


****  

| 系统字段 | 说明 | 槽位类型 | 
| --- | --- | --- | 
| @error | 用于描述格式不正确的对象的错误消息。 | 字符串 | 
| @pipelineId | 该对象所属的管道的 ID。 | 字符串 | 
| @sphere | 对象的范围指明对象在生命周期中的位置：组件对象产生实例对象，后者执行尝试对象。 | 字符串 | 