

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# GetPublicBuildBatch
<a name="API_GetPublicBuildBatch"></a>

**注意**  
此 API 元素不包含在 AWS CLI AWS SDKs中。

## 請求語法
<a name="API_GetPublicBuildBatch_RequestSyntax"></a>

```
{
   "publicBuildBatchAlias": "{{string}}"
}
```

## 請求參數
<a name="API_GetPublicBuildBatch_RequestParameters"></a>

如需所有動作的一般參數資訊，請參閱《[Common Parameters](https://docs.aws.amazon.com/codebuild/latest/APIReference/CommonParameters.html)》。

請求接受採用 JSON 格式的下列資料。

**注意**  
在下列清單中，會先描述必要的參數。

 ** [publicBuildBatchAlias](#API_GetPublicBuildBatch_RequestSyntax) **   <a name="CodeBuild-GetPublicBuildBatch-request-publicBuildBatchAlias"></a>
類型：字串  
長度限制：長度下限為 1。長度上限為 1024。  
模式：`^[0-9a-zA-Z%+=]+:[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$`  
必要：是

## 回應語法
<a name="API_GetPublicBuildBatch_ResponseSyntax"></a>

```
{
   "publicBuildBatch": { 
      "artifacts": { 
         "artifactIdentifier": "string",
         "packaging": "string",
         "type": "string"
      },
      "buildBatchConfig": { 
         "combineArtifacts": boolean,
         "restrictions": { 
            "[computeTypesAllowed](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BatchRestrictions.html)": [ "string" ],
            "[maximumBuildsAllowed](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BatchRestrictions.html)": number
         },
         "timeoutInMins": number
      },
      "buildBatchNumber": number,
      "buildBatchStatus": "string",
      "buildGroups": [ 
         { 
            "currentBuildSummary": { 
               "buildStatus": "string",
               "primaryArtifact": { 
                  "[identifier](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                  "[location](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                  "[type](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string"
               },
               "publicBuildAlias": "string",
               "requestedOn": number,
               "secondaryArtifacts": [ 
                  { 
                     "[identifier](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                     "[location](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                     "[type](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string"
                  }
               ]
            },
            "dependsOn": [ "string" ],
            "identifier": "string",
            "ignoreFailure": boolean,
            "priorBuildSummaryList": [ 
               { 
                  "buildStatus": "string",
                  "primaryArtifact": { 
                     "[identifier](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                     "[location](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                     "[type](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string"
                  },
                  "publicBuildAlias": "string",
                  "requestedOn": number,
                  "secondaryArtifacts": [ 
                     { 
                        "[identifier](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                        "[location](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string",
                        "[type](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ResolvedArtifact.html)": "string"
                     }
                  ]
               }
            ]
         }
      ],
      "buildTimeoutInMinutes": number,
      "complete": boolean,
      "currentPhase": "string",
      "endTime": number,
      "environment": { 
         "computeType": "string",
         "environmentVariables": [ 
            { 
               "[name](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_EnvironmentVariable.html)": "string",
               "[type](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_EnvironmentVariable.html)": "string",
               "[value](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_EnvironmentVariable.html)": "string"
            }
         ],
         "image": "string",
         "type": "string"
      },
      "id": "string",
      "initiator": "string",
      "logsStatus": { 
         "cloudWatchLogsStatus": "string",
         "s3LogsStatus": "string"
      },
      "phases": [ 
         { 
            "[contexts](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": [ 
               { 
                  "[message](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_PhaseContext.html)": "string",
                  "[statusCode](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_PhaseContext.html)": "string"
               }
            ],
            "[durationInSeconds](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": number,
            "[endTime](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": number,
            "[phaseStatus](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": "string",
            "[phaseType](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": "string",
            "[startTime](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_BuildBatchPhase.html)": number
         }
      ],
      "projectName": "string",
      "publicBuildBatchAlias": "string",
      "queuedTimeoutInMinutes": number,
      "resolvedSourceVersion": "string",
      "secondaryArtifacts": [ 
         { 
            "artifactIdentifier": "string",
            "packaging": "string",
            "type": "string"
         }
      ],
      "secondarySources": [ 
         { 
            "buildspec": "string",
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "[fetchSubmodules](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_GitSubmodulesConfig.html)": boolean
            },
            "location": "string",
            "sourceIdentifier": "string",
            "type": "string"
         }
      ],
      "secondarySourceVersions": [ 
         { 
            "[sourceIdentifier](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSourceVersion.html)": "string",
            "[sourceVersion](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSourceVersion.html)": "string"
         }
      ],
      "source": { 
         "buildspec": "string",
         "gitCloneDepth": number,
         "gitSubmodulesConfig": { 
            "[fetchSubmodules](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_GitSubmodulesConfig.html)": boolean
         },
         "location": "string",
         "sourceIdentifier": "string",
         "type": "string"
      },
      "sourceVersion": "string",
      "startTime": number
   }
}
```

## 回應元素
<a name="API_GetPublicBuildBatch_ResponseElements"></a>

如果動作成功，則服務傳回 HTTP 200 回應。

服務會傳回下列 JSON 格式的資料。

 ** [publicBuildBatch](#API_GetPublicBuildBatch_ResponseSyntax) **   <a name="CodeBuild-GetPublicBuildBatch-response-publicBuildBatch"></a>
類型：[PublicBuildBatch](API_PublicBuildBatch.md) 物件

## 錯誤
<a name="API_GetPublicBuildBatch_Errors"></a>

如需所有動作常見錯誤的相關資訊，請參閱[常見錯誤](https://docs.aws.amazon.com/codebuild/latest/APIReference/CommonErrors.html)。

 **InvalidInputException**   
HTTP 狀態碼：400

 **ResourceNotFoundException**   
HTTP 狀態碼：400