Table of Contents
A low-level client representing AWS CodeBuild:
import boto3
client = boto3.client('codebuild')
These are the available methods:
Deletes one or more builds.
See also: AWS API Documentation
Request Syntax
response = client.batch_delete_builds(
ids=[
'string',
]
)
[REQUIRED]
The IDs of the builds to delete.
{
'buildsDeleted': [
'string',
],
'buildsNotDeleted': [
{
'id': 'string',
'statusCode': 'string'
},
]
}
Response Structure
The IDs of the builds that were successfully deleted.
Information about any builds that could not be successfully deleted.
Information about a build that could not be successfully deleted.
The ID of the build that could not be successfully deleted.
Additional information about the build that could not be successfully deleted.
Gets information about builds.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_builds(
ids=[
'string',
]
)
[REQUIRED]
The IDs of the builds.
{
'builds': [
{
'id': 'string',
'arn': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'currentPhase': 'string',
'buildStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'sourceVersion': 'string',
'projectName': 'string',
'phases': [
{
'phaseType': 'SUBMITTED'|'PROVISIONING'|'DOWNLOAD_SOURCE'|'INSTALL'|'PRE_BUILD'|'BUILD'|'POST_BUILD'|'UPLOAD_ARTIFACTS'|'FINALIZING'|'COMPLETED',
'phaseStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'durationInSeconds': 123,
'contexts': [
{
'statusCode': 'string',
'message': 'string'
},
]
},
],
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'location': 'string',
'sha256sum': 'string',
'md5sum': 'string',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'logs': {
'groupName': 'string',
'streamName': 'string',
'deepLink': 'string'
},
'timeoutInMinutes': 123,
'buildComplete': True|False,
'initiator': 'string',
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'networkInterface': {
'subnetId': 'string',
'networkInterfaceId': 'string'
},
'encryptionKey': 'string'
},
],
'buildsNotFound': [
'string',
]
}
Response Structure
Information about the requested builds.
Information about a build.
The unique ID for the build.
The Amazon Resource Name (ARN) of the build.
When the build process started, expressed in Unix time format.
When the build process ended, expressed in Unix time format.
The current build phase.
The current status of the build. Valid values include:
Any version identifier for the version of the source code to be built.
The name of the AWS CodeBuild project.
Information about all previous build phases that are completed and information about any current build phase that is not yet complete.
Information about a stage for a build.
The name of the build phase. Valid values include:
The current status of the build phase. Valid values include:
When the build phase started, expressed in Unix time format.
When the build phase ended, expressed in Unix time format.
How long, in seconds, between the starting and ending times of the build's phase.
Additional information about a build phase, especially to help troubleshoot a failed build.
Additional information about a build phase that has an error. You can use this information to help troubleshoot a failed build.
The status code for the context of the build phase.
An explanation of the build phase's context. This explanation might include a command ID and an exit code.
Information about the source code to be built.
The type of repository that contains the source code to be built. Valid values include:
Information about the location of the source code to be built. Valid values include:
Information about the git clone depth for the build project.
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
Enable this flag to ignore SSL warnings while connecting to the project source code.
Information about the output artifacts for the build.
Information about the location of the build artifacts.
The SHA-256 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
The MD5 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Information that tells you if encryption for build artifacts is disabled.
Information about the cache for the build.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
Information about the build environment for this build.
The type of build environment to use for related builds.
The ID of the Docker image to use for this build project.
Information about the compute resources the build project will use. Available values include:
A set of environment variables to make available to builds for this build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
The certificate to use with this build project.
The name of a service role used for this build.
Information about the build's logs in Amazon CloudWatch Logs.
The name of the Amazon CloudWatch Logs group for the build logs.
The name of the Amazon CloudWatch Logs stream for the build logs.
The URL to an individual build log in Amazon CloudWatch Logs.
How long, in minutes, for AWS CodeBuild to wait before timing out this build if it does not get marked as completed.
Whether the build has finished. True if completed; otherwise, false.
The entity that started the build. Valid values include:
If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You must provide at least one security group and one subnet ID.
The ID of the Amazon VPC.
A list of one or more subnet IDs in your Amazon VPC.
A list of one or more security groups IDs in your Amazon VPC.
Describes a network interface.
The ID of the subnet.
The ID of the network interface.
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
The IDs of builds for which information could not be found.
Gets information about build projects.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_projects(
names=[
'string',
]
)
[REQUIRED]
The names of the build projects.
{
'projects': [
{
'name': 'string',
'arn': 'string',
'description': 'string',
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'timeoutInMinutes': 123,
'encryptionKey': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'created': datetime(2015, 1, 1),
'lastModified': datetime(2015, 1, 1),
'webhook': {
'url': 'string',
'payloadUrl': 'string',
'secret': 'string',
'branchFilter': 'string',
'lastModifiedSecret': datetime(2015, 1, 1)
},
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'badge': {
'badgeEnabled': True|False,
'badgeRequestUrl': 'string'
}
},
],
'projectsNotFound': [
'string',
]
}
Response Structure
Information about the requested build projects.
Information about a build project.
The name of the build project.
The Amazon Resource Name (ARN) of the build project.
A description that makes the build project easy to identify.
Information about the build input source code for this build project.
The type of repository that contains the source code to be built. Valid values include:
Information about the location of the source code to be built. Valid values include:
Information about the git clone depth for the build project.
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
Enable this flag to ignore SSL warnings while connecting to the project source code.
Information about the build output artifacts for the build project.
The type of build output artifact. Valid values include:
Information about the build output artifact location, as follows:
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
The type of build output artifact to create, as follows:
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
Information about the cache for the build project.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
Information about the build environment for this build project.
The type of build environment to use for related builds.
The ID of the Docker image to use for this build project.
Information about the compute resources the build project will use. Available values include:
A set of environment variables to make available to builds for this build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
The certificate to use with this build project.
The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
The tags for this build project.
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
A tag, consisting of a key and a value.
This tag is available for use by AWS services that support tags in AWS CodeBuild.
The tag's key.
The tag's value.
When the build project was created, expressed in Unix time format.
When the build project's settings were last modified, expressed in Unix time format.
Information about a webhook in GitHub that connects repository events to a build project in AWS CodeBuild.
The URL to the webhook.
The CodeBuild endpoint where webhook events are sent.
The secret token of the associated repository.
A regular expression used to determine which branches in a repository are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If it doesn't match, then it is not. If branchFilter is empty, then all branches are built.
A timestamp indicating the last time a repository's secret token was modified.
Information about the VPC configuration that AWS CodeBuild will access.
The ID of the Amazon VPC.
A list of one or more subnet IDs in your Amazon VPC.
A list of one or more security groups IDs in your Amazon VPC.
Information about the build badge for the build project.
Set this to true to generate a publicly-accessible URL for your project's build badge.
The publicly-accessible URL through which you can access the build badge for your project.
The names of build projects for which information could not be found.
Check if an operation can be paginated.
Creates a build project.
See also: AWS API Documentation
Request Syntax
response = client.create_project(
name='string',
description='string',
source={
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
artifacts={
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
cache={
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
environment={
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
serviceRole='string',
timeoutInMinutes=123,
encryptionKey='string',
tags=[
{
'key': 'string',
'value': 'string'
},
],
vpcConfig={
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
badgeEnabled=True|False
)
[REQUIRED]
The name of the build project.
[REQUIRED]
Information about the build input source code for the build project.
The type of repository that contains the source code to be built. Valid values include:
Information about the location of the source code to be built. Valid values include:
Information about the git clone depth for the build project.
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
Enable this flag to ignore SSL warnings while connecting to the project source code.
[REQUIRED]
Information about the build output artifacts for the build project.
The type of build output artifact. Valid values include:
Information about the build output artifact location, as follows:
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
The type of build output artifact to create, as follows:
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
Stores recently used information so that it can be quickly accessed at a later time.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
[REQUIRED]
Information about the build environment for the build project.
The type of build environment to use for related builds.
The ID of the Docker image to use for this build project.
Information about the compute resources the build project will use. Available values include:
A set of environment variables to make available to builds for this build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
The certificate to use with this build project.
[REQUIRED]
The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format ``alias/alias-name `` ).
A set of tags for this build project.
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
A tag, consisting of a key and a value.
This tag is available for use by AWS services that support tags in AWS CodeBuild.
The tag's key.
The tag's value.
VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
The ID of the Amazon VPC.
A list of one or more subnet IDs in your Amazon VPC.
A list of one or more security groups IDs in your Amazon VPC.
dict
Response Syntax
{
'project': {
'name': 'string',
'arn': 'string',
'description': 'string',
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'timeoutInMinutes': 123,
'encryptionKey': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'created': datetime(2015, 1, 1),
'lastModified': datetime(2015, 1, 1),
'webhook': {
'url': 'string',
'payloadUrl': 'string',
'secret': 'string',
'branchFilter': 'string',
'lastModifiedSecret': datetime(2015, 1, 1)
},
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'badge': {
'badgeEnabled': True|False,
'badgeRequestUrl': 'string'
}
}
}
Response Structure
(dict) --
project (dict) --
Information about the build project that was created.
name (string) --
The name of the build project.
arn (string) --
The Amazon Resource Name (ARN) of the build project.
description (string) --
A description that makes the build project easy to identify.
source (dict) --
Information about the build input source code for this build project.
type (string) --
The type of repository that contains the source code to be built. Valid values include:
location (string) --
Information about the location of the source code to be built. Valid values include:
gitCloneDepth (integer) --
Information about the git clone depth for the build project.
buildspec (string) --
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
auth (dict) --
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
type (string) --
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
resource (string) --
The resource value that applies to the specified authorization type.
reportBuildStatus (boolean) --
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
insecureSsl (boolean) --
Enable this flag to ignore SSL warnings while connecting to the project source code.
artifacts (dict) --
Information about the build output artifacts for the build project.
type (string) --
The type of build output artifact. Valid values include:
location (string) --
Information about the build output artifact location, as follows:
path (string) --
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
namespaceType (string) --
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
name (string) --
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
packaging (string) --
The type of build output artifact to create, as follows:
overrideArtifactName (boolean) --
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
encryptionDisabled (boolean) --
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
cache (dict) --
Information about the cache for the build project.
type (string) --
The type of cache used by the build project. Valid values include:
location (string) --
Information about the cache location, as follows:
environment (dict) --
Information about the build environment for this build project.
type (string) --
The type of build environment to use for related builds.
image (string) --
The ID of the Docker image to use for this build project.
computeType (string) --
Information about the compute resources the build project will use. Available values include:
environmentVariables (list) --
A set of environment variables to make available to builds for this build project.
(dict) --
Information about an environment variable for a build project or a build.
name (string) --
The name or key of the environment variable.
value (string) --
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
type (string) --
The type of environment variable. Valid values include:
privilegedMode (boolean) --
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
certificate (string) --
The certificate to use with this build project.
serviceRole (string) --
The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
timeoutInMinutes (integer) --
How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.
encryptionKey (string) --
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
tags (list) --
The tags for this build project.
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
(dict) --
A tag, consisting of a key and a value.
This tag is available for use by AWS services that support tags in AWS CodeBuild.
key (string) --
The tag's key.
value (string) --
The tag's value.
created (datetime) --
When the build project was created, expressed in Unix time format.
lastModified (datetime) --
When the build project's settings were last modified, expressed in Unix time format.
webhook (dict) --
Information about a webhook in GitHub that connects repository events to a build project in AWS CodeBuild.
url (string) --
The URL to the webhook.
payloadUrl (string) --
The CodeBuild endpoint where webhook events are sent.
secret (string) --
The secret token of the associated repository.
branchFilter (string) --
A regular expression used to determine which branches in a repository are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If it doesn't match, then it is not. If branchFilter is empty, then all branches are built.
lastModifiedSecret (datetime) --
A timestamp indicating the last time a repository's secret token was modified.
vpcConfig (dict) --
Information about the VPC configuration that AWS CodeBuild will access.
vpcId (string) --
The ID of the Amazon VPC.
subnets (list) --
A list of one or more subnet IDs in your Amazon VPC.
securityGroupIds (list) --
A list of one or more security groups IDs in your Amazon VPC.
badge (dict) --
Information about the build badge for the build project.
badgeEnabled (boolean) --
Set this to true to generate a publicly-accessible URL for your project's build badge.
badgeRequestUrl (string) --
The publicly-accessible URL through which you can access the build badge for your project.
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding the source code every time a code change is pushed to the repository.
Warning
If you enable webhooks for an AWS CodeBuild project, and the project is used as a build step in AWS CodePipeline, then two identical builds will be created for each commit. One build is triggered through webhooks, and one through AWS CodePipeline. Because billing is on a per-build basis, you will be billed for both builds. Therefore, if you are using AWS CodePipeline, we recommend that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings .
See also: AWS API Documentation
Request Syntax
response = client.create_webhook(
projectName='string',
branchFilter='string'
)
[REQUIRED]
The name of the AWS CodeBuild project.
dict
Response Syntax
{
'webhook': {
'url': 'string',
'payloadUrl': 'string',
'secret': 'string',
'branchFilter': 'string',
'lastModifiedSecret': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
webhook (dict) --
Information about a webhook in GitHub that connects repository events to a build project in AWS CodeBuild.
url (string) --
The URL to the webhook.
payloadUrl (string) --
The CodeBuild endpoint where webhook events are sent.
secret (string) --
The secret token of the associated repository.
branchFilter (string) --
A regular expression used to determine which branches in a repository are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If it doesn't match, then it is not. If branchFilter is empty, then all branches are built.
lastModifiedSecret (datetime) --
A timestamp indicating the last time a repository's secret token was modified.
Deletes a build project.
See also: AWS API Documentation
Request Syntax
response = client.delete_project(
name='string'
)
[REQUIRED]
The name of the build project.
{}
Response Structure
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, stops AWS CodeBuild from automatically rebuilding the source code every time a code change is pushed to the repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_webhook(
projectName='string'
)
[REQUIRED]
The name of the AWS CodeBuild project.
{}
Response Structure
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Resets the cache for a project.
See also: AWS API Documentation
Request Syntax
response = client.invalidate_project_cache(
projectName='string'
)
[REQUIRED]
The name of the AWS CodeBuild build project that the cache will be reset for.
{}
Response Structure
Gets a list of build IDs, with each build ID representing a single build.
See also: AWS API Documentation
Request Syntax
response = client.list_builds(
sortOrder='ASCENDING'|'DESCENDING',
nextToken='string'
)
The order to list build IDs. Valid values include:
dict
Response Syntax
{
'ids': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
ids (list) --
A list of build IDs, with each build ID representing a single build.
nextToken (string) --
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token . To get the next batch of items in the list, call this operation again, adding the next token to the call.
Gets a list of build IDs for the specified build project, with each build ID representing a single build.
See also: AWS API Documentation
Request Syntax
response = client.list_builds_for_project(
projectName='string',
sortOrder='ASCENDING'|'DESCENDING',
nextToken='string'
)
[REQUIRED]
The name of the AWS CodeBuild project.
The order to list build IDs. Valid values include:
dict
Response Syntax
{
'ids': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
ids (list) --
A list of build IDs for the specified build project, with each build ID representing a single build.
nextToken (string) --
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token . To get the next batch of items in the list, call this operation again, adding the next token to the call.
Gets information about Docker images that are managed by AWS CodeBuild.
See also: AWS API Documentation
Request Syntax
response = client.list_curated_environment_images()
{
'platforms': [
{
'platform': 'DEBIAN'|'AMAZON_LINUX'|'UBUNTU'|'WINDOWS_SERVER',
'languages': [
{
'language': 'JAVA'|'PYTHON'|'NODE_JS'|'RUBY'|'GOLANG'|'DOCKER'|'ANDROID'|'DOTNET'|'BASE',
'images': [
{
'name': 'string',
'description': 'string',
'versions': [
'string',
]
},
]
},
]
},
]
}
Response Structure
Information about supported platforms for Docker images that are managed by AWS CodeBuild.
A set of Docker images that are related by platform and are managed by AWS CodeBuild.
The platform's name.
The list of programming languages that are available for the specified platform.
A set of Docker images that are related by programming language and are managed by AWS CodeBuild.
The programming language for the Docker images.
The list of Docker images that are related by the specified programming language.
Information about a Docker image that is managed by AWS CodeBuild.
The name of the Docker image.
The description of the Docker image.
A list of environment image versions.
Gets a list of build project names, with each build project name representing a single build project.
See also: AWS API Documentation
Request Syntax
response = client.list_projects(
sortBy='NAME'|'CREATED_TIME'|'LAST_MODIFIED_TIME',
sortOrder='ASCENDING'|'DESCENDING',
nextToken='string'
)
The criterion to be used to list build project names. Valid values include:
Use sortOrder to specify in what order to list the build project names based on the preceding criteria.
The order in which to list build projects. Valid values include:
Use sortBy to specify the criterion to be used to list build project names.
dict
Response Syntax
{
'nextToken': 'string',
'projects': [
'string',
]
}
Response Structure
(dict) --
nextToken (string) --
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token . To get the next batch of items in the list, call this operation again, adding the next token to the call.
projects (list) --
The list of build project names, with each build project name representing a single build project.
Starts running a build.
See also: AWS API Documentation
Request Syntax
response = client.start_build(
projectName='string',
sourceVersion='string',
artifactsOverride={
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
environmentVariablesOverride=[
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
sourceTypeOverride='CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
sourceLocationOverride='string',
sourceAuthOverride={
'type': 'OAUTH',
'resource': 'string'
},
gitCloneDepthOverride=123,
buildspecOverride='string',
insecureSslOverride=True|False,
reportBuildStatusOverride=True|False,
environmentTypeOverride='WINDOWS_CONTAINER'|'LINUX_CONTAINER',
imageOverride='string',
computeTypeOverride='BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
certificateOverride='string',
cacheOverride={
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
serviceRoleOverride='string',
privilegedModeOverride=True|False,
timeoutInMinutesOverride=123,
idempotencyToken='string'
)
[REQUIRED]
The name of the AWS CodeBuild build project to start running a build.
A version of the build input to be built, for this build only. If not specified, the latest version will be used. If specified, must be one of:
Build output artifact settings that override, for this build only, the latest ones already defined in the build project.
The type of build output artifact. Valid values include:
Information about the build output artifact location, as follows:
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
The type of build output artifact to create, as follows:
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket or GitHub.
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
A ProjectCache object specified for this build that overrides the one defined in the build project.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
dict
Response Syntax
{
'build': {
'id': 'string',
'arn': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'currentPhase': 'string',
'buildStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'sourceVersion': 'string',
'projectName': 'string',
'phases': [
{
'phaseType': 'SUBMITTED'|'PROVISIONING'|'DOWNLOAD_SOURCE'|'INSTALL'|'PRE_BUILD'|'BUILD'|'POST_BUILD'|'UPLOAD_ARTIFACTS'|'FINALIZING'|'COMPLETED',
'phaseStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'durationInSeconds': 123,
'contexts': [
{
'statusCode': 'string',
'message': 'string'
},
]
},
],
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'location': 'string',
'sha256sum': 'string',
'md5sum': 'string',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'logs': {
'groupName': 'string',
'streamName': 'string',
'deepLink': 'string'
},
'timeoutInMinutes': 123,
'buildComplete': True|False,
'initiator': 'string',
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'networkInterface': {
'subnetId': 'string',
'networkInterfaceId': 'string'
},
'encryptionKey': 'string'
}
}
Response Structure
(dict) --
build (dict) --
Information about the build to be run.
id (string) --
The unique ID for the build.
arn (string) --
The Amazon Resource Name (ARN) of the build.
startTime (datetime) --
When the build process started, expressed in Unix time format.
endTime (datetime) --
When the build process ended, expressed in Unix time format.
currentPhase (string) --
The current build phase.
buildStatus (string) --
The current status of the build. Valid values include:
sourceVersion (string) --
Any version identifier for the version of the source code to be built.
projectName (string) --
The name of the AWS CodeBuild project.
phases (list) --
Information about all previous build phases that are completed and information about any current build phase that is not yet complete.
(dict) --
Information about a stage for a build.
phaseType (string) --
The name of the build phase. Valid values include:
phaseStatus (string) --
The current status of the build phase. Valid values include:
startTime (datetime) --
When the build phase started, expressed in Unix time format.
endTime (datetime) --
When the build phase ended, expressed in Unix time format.
durationInSeconds (integer) --
How long, in seconds, between the starting and ending times of the build's phase.
contexts (list) --
Additional information about a build phase, especially to help troubleshoot a failed build.
(dict) --
Additional information about a build phase that has an error. You can use this information to help troubleshoot a failed build.
statusCode (string) --
The status code for the context of the build phase.
message (string) --
An explanation of the build phase's context. This explanation might include a command ID and an exit code.
source (dict) --
Information about the source code to be built.
type (string) --
The type of repository that contains the source code to be built. Valid values include:
location (string) --
Information about the location of the source code to be built. Valid values include:
gitCloneDepth (integer) --
Information about the git clone depth for the build project.
buildspec (string) --
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
auth (dict) --
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
type (string) --
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
resource (string) --
The resource value that applies to the specified authorization type.
reportBuildStatus (boolean) --
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
insecureSsl (boolean) --
Enable this flag to ignore SSL warnings while connecting to the project source code.
artifacts (dict) --
Information about the output artifacts for the build.
location (string) --
Information about the location of the build artifacts.
sha256sum (string) --
The SHA-256 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
md5sum (string) --
The MD5 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
overrideArtifactName (boolean) --
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
encryptionDisabled (boolean) --
Information that tells you if encryption for build artifacts is disabled.
cache (dict) --
Information about the cache for the build.
type (string) --
The type of cache used by the build project. Valid values include:
location (string) --
Information about the cache location, as follows:
environment (dict) --
Information about the build environment for this build.
type (string) --
The type of build environment to use for related builds.
image (string) --
The ID of the Docker image to use for this build project.
computeType (string) --
Information about the compute resources the build project will use. Available values include:
environmentVariables (list) --
A set of environment variables to make available to builds for this build project.
(dict) --
Information about an environment variable for a build project or a build.
name (string) --
The name or key of the environment variable.
value (string) --
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
type (string) --
The type of environment variable. Valid values include:
privilegedMode (boolean) --
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
certificate (string) --
The certificate to use with this build project.
serviceRole (string) --
The name of a service role used for this build.
logs (dict) --
Information about the build's logs in Amazon CloudWatch Logs.
groupName (string) --
The name of the Amazon CloudWatch Logs group for the build logs.
streamName (string) --
The name of the Amazon CloudWatch Logs stream for the build logs.
deepLink (string) --
The URL to an individual build log in Amazon CloudWatch Logs.
timeoutInMinutes (integer) --
How long, in minutes, for AWS CodeBuild to wait before timing out this build if it does not get marked as completed.
buildComplete (boolean) --
Whether the build has finished. True if completed; otherwise, false.
initiator (string) --
The entity that started the build. Valid values include:
vpcConfig (dict) --
If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You must provide at least one security group and one subnet ID.
vpcId (string) --
The ID of the Amazon VPC.
subnets (list) --
A list of one or more subnet IDs in your Amazon VPC.
securityGroupIds (list) --
A list of one or more security groups IDs in your Amazon VPC.
networkInterface (dict) --
Describes a network interface.
subnetId (string) --
The ID of the subnet.
networkInterfaceId (string) --
The ID of the network interface.
encryptionKey (string) --
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
Attempts to stop running a build.
See also: AWS API Documentation
Request Syntax
response = client.stop_build(
id='string'
)
[REQUIRED]
The ID of the build.
{
'build': {
'id': 'string',
'arn': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'currentPhase': 'string',
'buildStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'sourceVersion': 'string',
'projectName': 'string',
'phases': [
{
'phaseType': 'SUBMITTED'|'PROVISIONING'|'DOWNLOAD_SOURCE'|'INSTALL'|'PRE_BUILD'|'BUILD'|'POST_BUILD'|'UPLOAD_ARTIFACTS'|'FINALIZING'|'COMPLETED',
'phaseStatus': 'SUCCEEDED'|'FAILED'|'FAULT'|'TIMED_OUT'|'IN_PROGRESS'|'STOPPED',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'durationInSeconds': 123,
'contexts': [
{
'statusCode': 'string',
'message': 'string'
},
]
},
],
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'location': 'string',
'sha256sum': 'string',
'md5sum': 'string',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'logs': {
'groupName': 'string',
'streamName': 'string',
'deepLink': 'string'
},
'timeoutInMinutes': 123,
'buildComplete': True|False,
'initiator': 'string',
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'networkInterface': {
'subnetId': 'string',
'networkInterfaceId': 'string'
},
'encryptionKey': 'string'
}
}
Response Structure
Information about the build.
The unique ID for the build.
The Amazon Resource Name (ARN) of the build.
When the build process started, expressed in Unix time format.
When the build process ended, expressed in Unix time format.
The current build phase.
The current status of the build. Valid values include:
Any version identifier for the version of the source code to be built.
The name of the AWS CodeBuild project.
Information about all previous build phases that are completed and information about any current build phase that is not yet complete.
Information about a stage for a build.
The name of the build phase. Valid values include:
The current status of the build phase. Valid values include:
When the build phase started, expressed in Unix time format.
When the build phase ended, expressed in Unix time format.
How long, in seconds, between the starting and ending times of the build's phase.
Additional information about a build phase, especially to help troubleshoot a failed build.
Additional information about a build phase that has an error. You can use this information to help troubleshoot a failed build.
The status code for the context of the build phase.
An explanation of the build phase's context. This explanation might include a command ID and an exit code.
Information about the source code to be built.
The type of repository that contains the source code to be built. Valid values include:
Information about the location of the source code to be built. Valid values include:
Information about the git clone depth for the build project.
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
Enable this flag to ignore SSL warnings while connecting to the project source code.
Information about the output artifacts for the build.
Information about the location of the build artifacts.
The SHA-256 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
The MD5 hash of the build artifact.
You can use this hash along with a checksum tool to confirm both file integrity and authenticity.
Note
This value is available only if the build project's packaging value is set to ZIP .
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Information that tells you if encryption for build artifacts is disabled.
Information about the cache for the build.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
Information about the build environment for this build.
The type of build environment to use for related builds.
The ID of the Docker image to use for this build project.
Information about the compute resources the build project will use. Available values include:
A set of environment variables to make available to builds for this build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
The certificate to use with this build project.
The name of a service role used for this build.
Information about the build's logs in Amazon CloudWatch Logs.
The name of the Amazon CloudWatch Logs group for the build logs.
The name of the Amazon CloudWatch Logs stream for the build logs.
The URL to an individual build log in Amazon CloudWatch Logs.
How long, in minutes, for AWS CodeBuild to wait before timing out this build if it does not get marked as completed.
Whether the build has finished. True if completed; otherwise, false.
The entity that started the build. Valid values include:
If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You must provide at least one security group and one subnet ID.
The ID of the Amazon VPC.
A list of one or more subnet IDs in your Amazon VPC.
A list of one or more security groups IDs in your Amazon VPC.
Describes a network interface.
The ID of the subnet.
The ID of the network interface.
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
Changes the settings of a build project.
See also: AWS API Documentation
Request Syntax
response = client.update_project(
name='string',
description='string',
source={
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
artifacts={
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
cache={
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
environment={
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
serviceRole='string',
timeoutInMinutes=123,
encryptionKey='string',
tags=[
{
'key': 'string',
'value': 'string'
},
],
vpcConfig={
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
badgeEnabled=True|False
)
[REQUIRED]
The name of the build project.
Note
You cannot change a build project's name.
Information to be changed about the build input source code for the build project.
The type of repository that contains the source code to be built. Valid values include:
Information about the location of the source code to be built. Valid values include:
Information about the git clone depth for the build project.
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
The resource value that applies to the specified authorization type.
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
Enable this flag to ignore SSL warnings while connecting to the project source code.
Information to be changed about the build output artifacts for the build project.
The type of build output artifact. Valid values include:
Information about the build output artifact location, as follows:
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
The type of build output artifact to create, as follows:
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
Stores recently used information so that it can be quickly accessed at a later time.
The type of cache used by the build project. Valid values include:
Information about the cache location, as follows:
Information to be changed about the build environment for the build project.
The type of build environment to use for related builds.
The ID of the Docker image to use for this build project.
Information about the compute resources the build project will use. Available values include:
A set of environment variables to make available to builds for this build project.
Information about an environment variable for a build project or a build.
The name or key of the environment variable.
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
The type of environment variable. Valid values include:
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
The certificate to use with this build project.
The replacement AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format ``alias/alias-name `` ).
The replacement set of tags for this build project.
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
A tag, consisting of a key and a value.
This tag is available for use by AWS services that support tags in AWS CodeBuild.
The tag's key.
The tag's value.
VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
The ID of the Amazon VPC.
A list of one or more subnet IDs in your Amazon VPC.
A list of one or more security groups IDs in your Amazon VPC.
dict
Response Syntax
{
'project': {
'name': 'string',
'arn': 'string',
'description': 'string',
'source': {
'type': 'CODECOMMIT'|'CODEPIPELINE'|'GITHUB'|'S3'|'BITBUCKET'|'GITHUB_ENTERPRISE',
'location': 'string',
'gitCloneDepth': 123,
'buildspec': 'string',
'auth': {
'type': 'OAUTH',
'resource': 'string'
},
'reportBuildStatus': True|False,
'insecureSsl': True|False
},
'artifacts': {
'type': 'CODEPIPELINE'|'S3'|'NO_ARTIFACTS',
'location': 'string',
'path': 'string',
'namespaceType': 'NONE'|'BUILD_ID',
'name': 'string',
'packaging': 'NONE'|'ZIP',
'overrideArtifactName': True|False,
'encryptionDisabled': True|False
},
'cache': {
'type': 'NO_CACHE'|'S3',
'location': 'string'
},
'environment': {
'type': 'WINDOWS_CONTAINER'|'LINUX_CONTAINER',
'image': 'string',
'computeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
'environmentVariables': [
{
'name': 'string',
'value': 'string',
'type': 'PLAINTEXT'|'PARAMETER_STORE'
},
],
'privilegedMode': True|False,
'certificate': 'string'
},
'serviceRole': 'string',
'timeoutInMinutes': 123,
'encryptionKey': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'created': datetime(2015, 1, 1),
'lastModified': datetime(2015, 1, 1),
'webhook': {
'url': 'string',
'payloadUrl': 'string',
'secret': 'string',
'branchFilter': 'string',
'lastModifiedSecret': datetime(2015, 1, 1)
},
'vpcConfig': {
'vpcId': 'string',
'subnets': [
'string',
],
'securityGroupIds': [
'string',
]
},
'badge': {
'badgeEnabled': True|False,
'badgeRequestUrl': 'string'
}
}
}
Response Structure
(dict) --
project (dict) --
Information about the build project that was changed.
name (string) --
The name of the build project.
arn (string) --
The Amazon Resource Name (ARN) of the build project.
description (string) --
A description that makes the build project easy to identify.
source (dict) --
Information about the build input source code for this build project.
type (string) --
The type of repository that contains the source code to be built. Valid values include:
location (string) --
Information about the location of the source code to be built. Valid values include:
gitCloneDepth (integer) --
Information about the git clone depth for the build project.
buildspec (string) --
The build spec declaration to use for the builds in this build project.
If this value is not specified, a build spec must be included along with the source code to be built.
auth (dict) --
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is BITBUCKET or GITHUB ).
type (string) --
The authorization type to use. The only valid value is OAUTH , which represents the OAuth authorization type.
resource (string) --
The resource value that applies to the specified authorization type.
reportBuildStatus (boolean) --
Set to true to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. If this is set and you use a different source provider, an invalidInputException is thrown.
insecureSsl (boolean) --
Enable this flag to ignore SSL warnings while connecting to the project source code.
artifacts (dict) --
Information about the build output artifacts for the build project.
type (string) --
The type of build output artifact. Valid values include:
location (string) --
Information about the build output artifact location, as follows:
path (string) --
Along with namespaceType and name , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to NONE , and name is set to MyArtifact.zip , then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip .
namespaceType (string) --
Along with path and name , the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:
For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name is set to MyArtifact.zip , then the output artifact would be stored in MyArtifacts/*build-ID* /MyArtifact.zip .
name (string) --
Along with path and namespaceType , the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:
For example:
packaging (string) --
The type of build output artifact to create, as follows:
overrideArtifactName (boolean) --
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
encryptionDisabled (boolean) --
Set to true if you do not want your output artifacts encrypted. This option is only valid if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException will be thrown.
cache (dict) --
Information about the cache for the build project.
type (string) --
The type of cache used by the build project. Valid values include:
location (string) --
Information about the cache location, as follows:
environment (dict) --
Information about the build environment for this build project.
type (string) --
The type of build environment to use for related builds.
image (string) --
The ID of the Docker image to use for this build project.
computeType (string) --
Information about the compute resources the build project will use. Available values include:
environmentVariables (list) --
A set of environment variables to make available to builds for this build project.
(dict) --
Information about an environment variable for a build project or a build.
name (string) --
The name or key of the environment variable.
value (string) --
The value of the environment variable.
Warning
We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).
type (string) --
The type of environment variable. Valid values include:
privilegedMode (boolean) --
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux, add the -t argument to timeout :
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo .; sleep 1; done"
certificate (string) --
The certificate to use with this build project.
serviceRole (string) --
The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
timeoutInMinutes (integer) --
How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.
encryptionKey (string) --
The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.
This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format ``alias/alias-name `` ).
tags (list) --
The tags for this build project.
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
(dict) --
A tag, consisting of a key and a value.
This tag is available for use by AWS services that support tags in AWS CodeBuild.
key (string) --
The tag's key.
value (string) --
The tag's value.
created (datetime) --
When the build project was created, expressed in Unix time format.
lastModified (datetime) --
When the build project's settings were last modified, expressed in Unix time format.
webhook (dict) --
Information about a webhook in GitHub that connects repository events to a build project in AWS CodeBuild.
url (string) --
The URL to the webhook.
payloadUrl (string) --
The CodeBuild endpoint where webhook events are sent.
secret (string) --
The secret token of the associated repository.
branchFilter (string) --
A regular expression used to determine which branches in a repository are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If it doesn't match, then it is not. If branchFilter is empty, then all branches are built.
lastModifiedSecret (datetime) --
A timestamp indicating the last time a repository's secret token was modified.
vpcConfig (dict) --
Information about the VPC configuration that AWS CodeBuild will access.
vpcId (string) --
The ID of the Amazon VPC.
subnets (list) --
A list of one or more subnet IDs in your Amazon VPC.
securityGroupIds (list) --
A list of one or more security groups IDs in your Amazon VPC.
badge (dict) --
Information about the build badge for the build project.
badgeEnabled (boolean) --
Set this to true to generate a publicly-accessible URL for your project's build badge.
badgeRequestUrl (string) --
The publicly-accessible URL through which you can access the build badge for your project.
Updates the webhook associated with an AWS CodeBuild build project.
See also: AWS API Documentation
Request Syntax
response = client.update_webhook(
projectName='string',
branchFilter='string',
rotateSecret=True|False
)
[REQUIRED]
The name of the AWS CodeBuild project.
dict
Response Syntax
{
'webhook': {
'url': 'string',
'payloadUrl': 'string',
'secret': 'string',
'branchFilter': 'string',
'lastModifiedSecret': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
webhook (dict) --
Information about a repository's webhook that is associated with a project in AWS CodeBuild.
url (string) --
The URL to the webhook.
payloadUrl (string) --
The CodeBuild endpoint where webhook events are sent.
secret (string) --
The secret token of the associated repository.
branchFilter (string) --
A regular expression used to determine which branches in a repository are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If it doesn't match, then it is not. If branchFilter is empty, then all branches are built.
lastModifiedSecret (datetime) --
A timestamp indicating the last time a repository's secret token was modified.
The available paginators are:
paginator = client.get_paginator('list_builds')
Creates an iterator that will paginate through responses from CodeBuild.Client.list_builds().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
sortOrder='ASCENDING'|'DESCENDING',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The order to list build IDs. Valid values include:
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'ids': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
ids (list) --
A list of build IDs, with each build ID representing a single build.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_builds_for_project')
Creates an iterator that will paginate through responses from CodeBuild.Client.list_builds_for_project().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
projectName='string',
sortOrder='ASCENDING'|'DESCENDING',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the AWS CodeBuild project.
The order to list build IDs. Valid values include:
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'ids': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
ids (list) --
A list of build IDs for the specified build project, with each build ID representing a single build.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_projects')
Creates an iterator that will paginate through responses from CodeBuild.Client.list_projects().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
sortBy='NAME'|'CREATED_TIME'|'LAST_MODIFIED_TIME',
sortOrder='ASCENDING'|'DESCENDING',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The criterion to be used to list build project names. Valid values include:
Use sortOrder to specify in what order to list the build project names based on the preceding criteria.
The order in which to list build projects. Valid values include:
Use sortBy to specify the criterion to be used to list build project names.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'projects': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
projects (list) --
The list of build project names, with each build project name representing a single build project.
NextToken (string) --
A token to resume pagination.