

# RetryBuild
<a name="API_RetryBuild"></a>

Restarts a build.

## Request Syntax
<a name="API_RetryBuild_RequestSyntax"></a>

```
{
   "id": "string",
   "idempotencyToken": "string"
}
```

## Request Parameters
<a name="API_RetryBuild_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [id](#API_RetryBuild_RequestSyntax) **   <a name="CodeBuild-RetryBuild-request-id"></a>
Specifies the identifier of the build to restart.  
Type: String  
Length Constraints: Minimum length of 1.  
Required: No

 ** [idempotencyToken](#API_RetryBuild_RequestSyntax) **   <a name="CodeBuild-RetryBuild-request-idempotencyToken"></a>
A unique, case sensitive identifier you provide to ensure the idempotency of the `RetryBuild` request. The token is included in the `RetryBuild` request and is valid for five minutes. If you repeat the `RetryBuild` request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.  
Type: String  
Required: No

## Response Syntax
<a name="API_RetryBuild_ResponseSyntax"></a>

```
{
   "build": { 
      "arn": "string",
      "artifacts": { 
         "artifactIdentifier": "string",
         "bucketOwnerAccess": "string",
         "encryptionDisabled": boolean,
         "location": "string",
         "md5sum": "string",
         "overrideArtifactName": boolean,
         "sha256sum": "string"
      },
      "autoRetryConfig": { 
         "autoRetryLimit": number,
         "autoRetryNumber": number,
         "nextAutoRetry": "string",
         "previousAutoRetry": "string"
      },
      "buildBatchArn": "string",
      "buildComplete": boolean,
      "buildNumber": number,
      "buildStatus": "string",
      "cache": { 
         "cacheNamespace": "string",
         "location": "string",
         "modes": [ "string" ],
         "type": "string"
      },
      "currentPhase": "string",
      "debugSession": { 
         "sessionEnabled": boolean,
         "sessionTarget": "string"
      },
      "encryptionKey": "string",
      "endTime": number,
      "environment": { 
         "certificate": "string",
         "computeConfiguration": { 
            "disk": number,
            "instanceType": "string",
            "machineType": "string",
            "memory": number,
            "vCpu": number
         },
         "computeType": "string",
         "dockerServer": { 
            "computeType": "string",
            "securityGroupIds": [ "string" ],
            "status": { 
               "message": "string",
               "status": "string"
            }
         },
         "environmentVariables": [ 
            { 
               "name": "string",
               "type": "string",
               "value": "string"
            }
         ],
         "fleet": { 
            "fleetArn": "string"
         },
         "image": "string",
         "imagePullCredentialsType": "string",
         "privilegedMode": boolean,
         "registryCredential": { 
            "credential": "string",
            "credentialProvider": "string"
         },
         "type": "string"
      },
      "exportedEnvironmentVariables": [ 
         { 
            "name": "string",
            "value": "string"
         }
      ],
      "fileSystemLocations": [ 
         { 
            "identifier": "string",
            "location": "string",
            "mountOptions": "string",
            "mountPoint": "string",
            "type": "string"
         }
      ],
      "id": "string",
      "initiator": "string",
      "logs": { 
         "cloudWatchLogs": { 
            "groupName": "string",
            "status": "string",
            "streamName": "string"
         },
         "cloudWatchLogsArn": "string",
         "deepLink": "string",
         "groupName": "string",
         "s3DeepLink": "string",
         "s3Logs": { 
            "bucketOwnerAccess": "string",
            "encryptionDisabled": boolean,
            "location": "string",
            "status": "string"
         },
         "s3LogsArn": "string",
         "streamName": "string"
      },
      "networkInterface": { 
         "networkInterfaceId": "string",
         "subnetId": "string"
      },
      "phases": [ 
         { 
            "contexts": [ 
               { 
                  "message": "string",
                  "statusCode": "string"
               }
            ],
            "durationInSeconds": number,
            "endTime": number,
            "phaseStatus": "string",
            "phaseType": "string",
            "startTime": number
         }
      ],
      "projectName": "string",
      "queuedTimeoutInMinutes": number,
      "reportArns": [ "string" ],
      "resolvedSourceVersion": "string",
      "secondaryArtifacts": [ 
         { 
            "artifactIdentifier": "string",
            "bucketOwnerAccess": "string",
            "encryptionDisabled": boolean,
            "location": "string",
            "md5sum": "string",
            "overrideArtifactName": boolean,
            "sha256sum": "string"
         }
      ],
      "secondarySources": [ 
         { 
            "auth": { 
               "resource": "string",
               "type": "string"
            },
            "buildspec": "string",
            "buildStatusConfig": { 
               "context": "string",
               "targetUrl": "string"
            },
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "fetchSubmodules": boolean
            },
            "insecureSsl": boolean,
            "location": "string",
            "reportBuildStatus": boolean,
            "sourceIdentifier": "string",
            "type": "string"
         }
      ],
      "secondarySourceVersions": [ 
         { 
            "sourceIdentifier": "string",
            "sourceVersion": "string"
         }
      ],
      "serviceRole": "string",
      "source": { 
         "auth": { 
            "resource": "string",
            "type": "string"
         },
         "buildspec": "string",
         "buildStatusConfig": { 
            "context": "string",
            "targetUrl": "string"
         },
         "gitCloneDepth": number,
         "gitSubmodulesConfig": { 
            "fetchSubmodules": boolean
         },
         "insecureSsl": boolean,
         "location": "string",
         "reportBuildStatus": boolean,
         "sourceIdentifier": "string",
         "type": "string"
      },
      "sourceVersion": "string",
      "startTime": number,
      "timeoutInMinutes": number,
      "vpcConfig": { 
         "securityGroupIds": [ "string" ],
         "subnets": [ "string" ],
         "vpcId": "string"
      }
   }
}
```

## Response Elements
<a name="API_RetryBuild_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [build](#API_RetryBuild_ResponseSyntax) **   <a name="CodeBuild-RetryBuild-response-build"></a>
Information about a build.  
Type: [Build](API_Build.md) object

## Errors
<a name="API_RetryBuild_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccountLimitExceededException **   
An AWS service limit was exceeded for the calling AWS account.  
HTTP Status Code: 400

 ** InvalidInputException **   
The input value that was provided is not valid.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The specified AWS resource cannot be found.  
HTTP Status Code: 400

## See Also
<a name="API_RetryBuild_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/codebuild-2016-10-06/RetryBuild) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/codebuild-2016-10-06/RetryBuild) 