

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 服務。您不需要使用此資訊設定執行中的 Task Runner。

## TaskRunner 中的 HttpProxy 範例
<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>


****  

| 必要欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| hostname | 用戶端用來連線到 AWS 服務的代理主機。 | String | 
| port | 用戶端用來連線到 AWS 服務的代理主機連接埠。 | String | 

 


****  

| 選用欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| parent | 目前物件的父系，其插槽會被繼承。 | 參考物件，例如 "parent":\$1"ref":"myBaseObjectId"\$1 | 
| \$1password | 代理的密碼。 | String | 
| s3NoProxy | 在連線到 Amazon S3 時停用 HTTP 代理 | Boolean | 
| 使用者名稱 | 代理的使用者名稱。 | String | 
| windowsDomain | NTLM 代理的 Windows 網域名稱。 | String | 
| windowsWorkgroup | NTLM 代理的 Windows 工作群組名稱。 | String | 

 


****  

| 執行時間欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| @version | 建立物件使用的管道版本。 | String | 

 


****  

| 系統欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| @error | 描述格式錯誤物件的錯誤。 | String | 
| @pipelineId | 此物件所屬管道的 ID。 | String | 
| @sphere | 物件範圍代表其在生命週期中的位置：Component 物件會引發執行 Attempt 物件的 Instance 物件。 | String | 