# This file is automatically generated by botocraft. Do not edit directly.
# mypy: disable-error-code="index, override, assignment, union-attr, misc"
from botocraft.mixins.codebuild import report_group_arns_to_report_groups
from .abstract import (
Boto3Model,
ReadonlyBoto3Model,
PrimaryBoto3Model,
ReadonlyPrimaryBoto3Model,
Boto3ModelManager,
ReadonlyBoto3ModelManager,
)
from .abstract import PrimaryBoto3ModelQuerySet
from datetime import datetime
import builtins
from botocraft.mixins.codebuild import webhook_response_with_project_name
from botocraft.mixins.codebuild import build_batch_response_to_build_batch
from botocraft.mixins.codebuild import report_arns_to_reports
from botocraft.mixins.codebuild import build_batch_ids_to_build_batches
from typing import ClassVar, Literal, Any, cast
from botocraft.mixins.codebuild import fleet_response_to_fleet
from botocraft.mixins.codebuild import sandbox_ids_to_sandboxes
from botocraft.services.common import Tag
from botocraft.mixins.codebuild import project_response_to_project
from botocraft.mixins.codebuild import sandbox_response_to_sandbox
from botocraft.mixins.codebuild import build_batch_ids_to_build_batches_with_project
from botocraft.mixins.codebuild import build_response_to_build
from botocraft.mixins.codebuild import command_execution_response_to_command_execution
from botocraft.services.ec2 import NetworkInterface
from botocraft.mixins.codebuild import project_names_to_projects
from botocraft.mixins.codebuild import build_ids_to_builds
from botocraft.mixins.codebuild import sandbox_ids_to_sandboxes_with_project
from botocraft.mixins.codebuild import fleet_names_to_fleets
from pydantic import Field
from botocraft.mixins.codebuild import build_ids_to_builds_with_project
from collections import OrderedDict
from botocraft.mixins.codebuild import report_group_response_to_report_group
from botocraft.mixins.tags import TagsDictMixin
from botocraft.mixins.codebuild import report_arns_to_reports_with_group
# ===============
# Managers
# ===============
[docs]class ProjectManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] @project_response_to_project
def create(self, model: "Project", badgeEnabled: "bool | None" = None) -> "Project":
"""
Creates a build project.
Args:
model: The :py:class:`Project` to create.
Keyword Args:
badgeEnabled: Set this to true to generate a publicly accessible URL for your project's build badge.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
name=data.get("name"),
source=data.get("source"),
artifacts=data.get("artifacts"),
environment=data.get("environment"),
serviceRole=data.get("serviceRole"),
description=data.get("description"),
secondarySources=data.get("secondarySources"),
sourceVersion=data.get("sourceVersion"),
secondarySourceVersions=data.get("secondarySourceVersions"),
secondaryArtifacts=data.get("secondaryArtifacts"),
cache=data.get("cache"),
timeoutInMinutes=data.get("timeoutInMinutes"),
queuedTimeoutInMinutes=data.get("queuedTimeoutInMinutes"),
encryptionKey=data.get("encryptionKey"),
tags=data.get("tags"),
vpcConfig=data.get("vpcConfig"),
badgeEnabled=self.serialize(badgeEnabled),
logsConfig=data.get("logsConfig"),
fileSystemLocations=data.get("fileSystemLocations"),
buildBatchConfig=data.get("buildBatchConfig"),
concurrentBuildLimit=data.get("concurrentBuildLimit"),
autoRetryLimit=data.get("autoRetryLimit"),
)
_response = self.client.create_project(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateProjectOutput(**_response)
self.sessionize(response.project)
return cast("Project", response.project)
[docs] @project_response_to_project
def update(self, model: "Project", badgeEnabled: "bool | None" = None) -> "Project":
"""
Changes the settings of a build project.
Args:
model: The :py:class:`Project` to update.
Keyword Args:
badgeEnabled: Set this to true to generate a publicly accessible URL for your project's build badge.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
name=data.get("name"),
description=data.get("description"),
source=data.get("source"),
secondarySources=data.get("secondarySources"),
sourceVersion=data.get("sourceVersion"),
secondarySourceVersions=data.get("secondarySourceVersions"),
artifacts=data.get("artifacts"),
secondaryArtifacts=data.get("secondaryArtifacts"),
cache=data.get("cache"),
environment=data.get("environment"),
serviceRole=data.get("serviceRole"),
timeoutInMinutes=data.get("timeoutInMinutes"),
queuedTimeoutInMinutes=data.get("queuedTimeoutInMinutes"),
encryptionKey=data.get("encryptionKey"),
tags=data.get("tags"),
vpcConfig=data.get("vpcConfig"),
badgeEnabled=self.serialize(badgeEnabled),
logsConfig=data.get("logsConfig"),
fileSystemLocations=data.get("fileSystemLocations"),
buildBatchConfig=data.get("buildBatchConfig"),
concurrentBuildLimit=data.get("concurrentBuildLimit"),
autoRetryLimit=data.get("autoRetryLimit"),
)
_response = self.client.update_project(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateProjectOutput(**_response)
self.sessionize(response.project)
return cast("Project", response.project)
[docs] def delete(self, name: str) -> None:
"""
Deletes a build project. When you delete a project, its builds are not deleted.
Args:
name: The name of the build project.
"""
args: dict[str, Any] = dict(name=self.serialize(name))
self.client.delete_project(**{k: v for k, v in args.items() if v is not None})
[docs] def get(self, name: str) -> "Project | None":
"""
Gets information about one or more build projects.
Args:
name: The name of the project to retrieve.
"""
args: dict[str, Any] = dict(names=self.serialize([name]))
_response = self.client.batch_get_projects(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetProjectsOutput(**_response)
if response and response.projects:
self.sessionize(response.projects[0])
return response.projects[0]
return None
[docs] @project_names_to_projects
def list(
self,
*,
sortBy: "Literal['NAME', 'CREATED_TIME', 'LAST_MODIFIED_TIME'] | None" = None,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Gets a list of build project names, with each build project name representing a
single build project.
Keyword Args:
sortBy: The criterion to be used to list build project names. Valid values include:
sortOrder: The order in which to list build projects. Valid values include:
"""
paginator = self.client.get_paginator("list_projects")
args: dict[str, Any] = dict(
sortBy=self.serialize(sortBy), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListProjectsOutput(**_response)
if response.projects:
results.extend(response.projects)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @project_names_to_projects
def list_shared(
self,
*,
sortBy: "Literal['ARN', 'MODIFIED_TIME'] | None" = None,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> "builtins.list[str]":
"""
Gets a list of projects that are shared with other Amazon Web Services accounts
or users.
Keyword Args:
sortBy: The criterion to be used to list build projects shared with the current Amazon Web Services account or user.
Valid values include:
sortOrder: The order in which to list shared build projects. Valid values include:
"""
paginator = self.client.get_paginator("list_shared_projects")
args: dict[str, Any] = dict(
sortBy=self.serialize(sortBy), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListSharedProjectsOutput(**_response)
if response.projects is not None:
results.extend(response.projects)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] def invalidate_cache(self, projectName: str) -> None:
"""
Resets the cache for a project.
Args:
projectName: The name of the CodeBuild build project that the cache is reset for.
"""
args: dict[str, Any] = dict(projectName=self.serialize(projectName))
self.client.invalidate_project_cache(
**{k: v for k, v in args.items() if v is not None}
)
[docs] def update_visibility(
self,
projectArn: str,
projectVisibility: Literal["PUBLIC_READ", "PRIVATE"],
*,
resourceAccessRole: "str | None" = None,
) -> None:
"""
Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the
general public. For more information, see `Public build
projects <https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html>`_ in the *CodeBuild User Guide*.
Args:
projectArn: The Amazon Resource Name (ARN) of the build project.
projectVisibility: Specifies the visibility of the project's builds. Possible values are:
Keyword Args:
resourceAccessRole: The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3
artifacts for the project's builds.
"""
args: dict[str, Any] = dict(
projectArn=self.serialize(projectArn),
projectVisibility=self.serialize(projectVisibility),
resourceAccessRole=self.serialize(resourceAccessRole),
)
self.client.update_project_visibility(
**{k: v for k, v in args.items() if v is not None}
)
[docs] def get_resource_policy(self, resourceArn: str) -> "GetResourcePolicyOutput":
"""
Gets a resource policy that is identified by its resource ARN.
Args:
resourceArn: The ARN of the resource that is associated with the resource policy.
"""
args: dict[str, Any] = dict(resourceArn=self.serialize(resourceArn))
_response = self.client.get_resource_policy(
**{k: v for k, v in args.items() if v is not None}
)
response = GetResourcePolicyOutput(**_response)
results: "GetResourcePolicyOutput" = None
if response is not None:
results = response
self.sessionize(results)
return cast("GetResourcePolicyOutput", results)
[docs] def put_resource_policy(self, policy: str, resourceArn: str) -> None:
"""
Stores a resource policy for the ARN of a ``Project`` or ``ReportGroup`` object.
Args:
policy: A JSON-formatted resource policy. For more information, see `Sharing a Project
<https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html#project-sharing-share>`_ and `Sharing a
Report Group <https://docs.aws.amazon.com/codebuild/latest/userguide/report-groups-sharing.html#report-groups-
sharing- share>`_ in the *CodeBuild User Guide*.
resourceArn: The ARN of the ``Project`` or ``ReportGroup`` resource you want to associate with a resource policy.
"""
args: dict[str, Any] = dict(
policy=self.serialize(policy), resourceArn=self.serialize(resourceArn)
)
self.client.put_resource_policy(
**{k: v for k, v in args.items() if v is not None}
)
[docs] def delete_resource_policy(self, resourceArn: str) -> None:
"""
Deletes a resource policy that is identified by its resource ARN.
Args:
resourceArn: The ARN of the resource that is associated with the resource policy.
"""
args: dict[str, Any] = dict(resourceArn=self.serialize(resourceArn))
self.client.delete_resource_policy(
**{k: v for k, v in args.items() if v is not None}
)
[docs]class BuildManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def get(self, id: str) -> "Build | None":
"""
Gets information about one or more builds.
Args:
id: The build identifier returned by list and start operations.
"""
args: dict[str, Any] = dict(ids=self.serialize([[id]]))
_response = self.client.batch_get_builds(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetBuildsOutput(**_response)
if response and response.builds:
self.sessionize(response.builds[0])
return response.builds[0]
return None
[docs] @build_ids_to_builds
def list(
self, *, sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None
) -> PrimaryBoto3ModelQuerySet:
"""
Gets a list of build IDs, with each build ID representing a single build.
Keyword Args:
sortOrder: The order to list build IDs. Valid values include:
"""
paginator = self.client.get_paginator("list_builds")
args: dict[str, Any] = dict(sortOrder=self.serialize(sortOrder))
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListBuildsOutput(**_response)
if response.ids:
results.extend(response.ids)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @build_ids_to_builds_with_project
def list_for_project(
self,
projectName: str,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> "builtins.list[str]":
"""
Gets a list of build identifiers for the specified build project, with each
build identifier representing a single build.
Args:
projectName: The name of the CodeBuild project.
Keyword Args:
sortOrder: The order to sort the results in. The results are sorted by build number, not the build identifier. If
this is not specified, the results are sorted in descending order.
"""
paginator = self.client.get_paginator("list_builds_for_project")
args: dict[str, Any] = dict(
projectName=self.serialize(projectName), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListBuildsForProjectOutput(**_response)
if response.ids is not None:
results.extend(response.ids)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] @build_response_to_build
def start(
self,
projectName: str,
*,
secondarySourcesOverride: "builtins.list[ProjectSource] | None" = None,
secondarySourcesVersionOverride: "builtins.list[ProjectSourceVersion] | None" = None,
sourceVersion: "str | None" = None,
artifactsOverride: "ProjectArtifacts | None" = None,
secondaryArtifactsOverride: "builtins.list[ProjectArtifacts] | None" = None,
environmentVariablesOverride: "builtins.list[EnvironmentVariable] | None" = None,
sourceTypeOverride: "Literal['CODECOMMIT', 'CODEPIPELINE', 'GITHUB', 'GITLAB', 'GITLAB_SELF_MANAGED', 'S3', 'BITBUCKET', 'GITHUB_ENTERPRISE', 'NO_SOURCE'] | None" = None,
sourceLocationOverride: "str | None" = None,
sourceAuthOverride: "SourceAuth | None" = None,
gitCloneDepthOverride: "int | None" = None,
gitSubmodulesConfigOverride: "GitSubmodulesConfig | None" = None,
buildspecOverride: "str | None" = None,
insecureSslOverride: "bool | None" = None,
reportBuildStatusOverride: "bool | None" = None,
buildStatusConfigOverride: "BuildStatusConfig | None" = None,
environmentTypeOverride: "Literal['WINDOWS_CONTAINER', 'LINUX_CONTAINER', 'LINUX_GPU_CONTAINER', 'ARM_CONTAINER', 'WINDOWS_SERVER_2019_CONTAINER', 'WINDOWS_SERVER_2022_CONTAINER', 'LINUX_LAMBDA_CONTAINER', 'ARM_LAMBDA_CONTAINER', 'LINUX_EC2', 'ARM_EC2', 'WINDOWS_EC2', 'MAC_ARM'] | None" = None,
imageOverride: "str | None" = None,
computeTypeOverride: "Literal['BUILD_GENERAL1_SMALL', 'BUILD_GENERAL1_MEDIUM', 'BUILD_GENERAL1_LARGE', 'BUILD_GENERAL1_XLARGE', 'BUILD_GENERAL1_2XLARGE', 'BUILD_LAMBDA_1GB', 'BUILD_LAMBDA_2GB', 'BUILD_LAMBDA_4GB', 'BUILD_LAMBDA_8GB', 'BUILD_LAMBDA_10GB', 'ATTRIBUTE_BASED_COMPUTE', 'CUSTOM_INSTANCE_TYPE'] | None" = None,
certificateOverride: "str | None" = None,
cacheOverride: "ProjectCache | None" = None,
serviceRoleOverride: "str | None" = None,
privilegedModeOverride: "bool | None" = None,
timeoutInMinutesOverride: "int | None" = None,
queuedTimeoutInMinutesOverride: "int | None" = None,
encryptionKeyOverride: "str | None" = None,
idempotencyToken: "str | None" = None,
logsConfigOverride: "LogsConfig | None" = None,
registryCredentialOverride: "RegistryCredential | None" = None,
imagePullCredentialsTypeOverride: "Literal['CODEBUILD', 'SERVICE_ROLE'] | None" = None,
debugSessionEnabled: "bool | None" = None,
fleetOverride: "ProjectFleet | None" = None,
autoRetryLimitOverride: "int | None" = None,
) -> "Build":
"""
Starts running a build with the settings defined in the project. These setting
include: how to run a build, where to get the source code, which build
environment to use, which build commands to run, and where to store the build
output.
Args:
projectName: The name of the CodeBuild build project to start running a build.
Keyword Args:
secondarySourcesOverride: An array of ``ProjectSource`` objects.
secondarySourcesVersionOverride: An array of ``ProjectSourceVersion`` objects that specify one or more versions of
the project's secondary sources to be used for this build only.
sourceVersion: The version of the build input to be built, for this build only. If not specified, the latest version
is used. If specified, the contents depends on the source provider:
artifactsOverride: Build output artifact settings that override, for this build only, the latest ones already
defined in the build project.
secondaryArtifactsOverride: An array of ``ProjectArtifacts`` objects.
environmentVariablesOverride: A set of environment variables that overrides, for this build only, the latest ones
already defined in the build project.
sourceTypeOverride: A source input type, for this build, that overrides the source input defined in the build
project.
sourceLocationOverride: A location that overrides, for this build, the source location for the one defined in the
build project.
sourceAuthOverride: 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, GitHub, GitLab, or GitLab Self Managed.
gitCloneDepthOverride: The user-defined depth of history, with a minimum value of 0, that overrides, for this build
only, any previous depth of history defined in the build project.
gitSubmodulesConfigOverride: Information about the Git submodules configuration for this build of an CodeBuild build
project.
buildspecOverride: A buildspec file declaration that overrides the latest one defined in the build project, for this
build only. The buildspec defined on the project is not changed.
insecureSslOverride: Enable this flag to override the insecure SSL setting that is specified in the build project.
The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This
override applies only if the build's source is GitHub Enterprise.
reportBuildStatusOverride: Set to true to report to your source provider the status of a build's start and
completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self
Managed, or Bitbucket, an ``invalidInputException`` is thrown.
buildStatusConfigOverride: Contains information that defines how the build project reports the build status to the
source provider. This option is only used when the source provider is ``GITHUB``, ``GITHUB_ENTERPRISE``, or
``BITBUCKET``.
environmentTypeOverride: A container type for this build that overrides the one specified in the build project.
imageOverride: The name of an image for this build that overrides the one specified in the build project.
computeTypeOverride: The name of a compute type for this build that overrides the one specified in the build
project.
certificateOverride: The name of a certificate for this build that overrides the one specified in the build project.
cacheOverride: A ProjectCache object specified for this build that overrides the one defined in the build project.
serviceRoleOverride: The name of a service role for this build that overrides the one specified in the build
project.
privilegedModeOverride: Enable this flag to override privileged mode in the build project.
timeoutInMinutesOverride: The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this
build only, the latest setting already defined in the build project.
queuedTimeoutInMinutesOverride: The number of minutes a build is allowed to be queued before it times out.
encryptionKeyOverride: The Key Management Service customer master key (CMK) that overrides the one specified in the
build project. The CMK key encrypts the build output artifacts.
idempotencyToken: A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild
request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild
request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.
logsConfigOverride: Log settings for this build that override the log settings defined in the build project.
registryCredentialOverride: The credentials for access to a private registry.
imagePullCredentialsTypeOverride: The type of credentials CodeBuild uses to pull images in your build. There are two
valid values:
debugSessionEnabled: Specifies if session debugging is enabled for this build. For more information, see `Viewing a
running build in Session Manager <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html>`_.
fleetOverride: A ProjectFleet object specified for this build that overrides the one defined in the build project.
autoRetryLimitOverride: The maximum number of additional automatic retries after a failed build. For example, if the
auto-retry limit is set to 2, CodeBuild will call the ``RetryBuild`` API to automatically retry your build for up to
2 additional times.
"""
args: dict[str, Any] = dict(
projectName=self.serialize(projectName),
secondarySourcesOverride=self.serialize(secondarySourcesOverride),
secondarySourcesVersionOverride=self.serialize(
secondarySourcesVersionOverride
),
sourceVersion=self.serialize(sourceVersion),
artifactsOverride=self.serialize(artifactsOverride),
secondaryArtifactsOverride=self.serialize(secondaryArtifactsOverride),
environmentVariablesOverride=self.serialize(environmentVariablesOverride),
sourceTypeOverride=self.serialize(sourceTypeOverride),
sourceLocationOverride=self.serialize(sourceLocationOverride),
sourceAuthOverride=self.serialize(sourceAuthOverride),
gitCloneDepthOverride=self.serialize(gitCloneDepthOverride),
gitSubmodulesConfigOverride=self.serialize(gitSubmodulesConfigOverride),
buildspecOverride=self.serialize(buildspecOverride),
insecureSslOverride=self.serialize(insecureSslOverride),
reportBuildStatusOverride=self.serialize(reportBuildStatusOverride),
buildStatusConfigOverride=self.serialize(buildStatusConfigOverride),
environmentTypeOverride=self.serialize(environmentTypeOverride),
imageOverride=self.serialize(imageOverride),
computeTypeOverride=self.serialize(computeTypeOverride),
certificateOverride=self.serialize(certificateOverride),
cacheOverride=self.serialize(cacheOverride),
serviceRoleOverride=self.serialize(serviceRoleOverride),
privilegedModeOverride=self.serialize(privilegedModeOverride),
timeoutInMinutesOverride=self.serialize(timeoutInMinutesOverride),
queuedTimeoutInMinutesOverride=self.serialize(
queuedTimeoutInMinutesOverride
),
encryptionKeyOverride=self.serialize(encryptionKeyOverride),
idempotencyToken=self.serialize(idempotencyToken),
logsConfigOverride=self.serialize(logsConfigOverride),
registryCredentialOverride=self.serialize(registryCredentialOverride),
imagePullCredentialsTypeOverride=self.serialize(
imagePullCredentialsTypeOverride
),
debugSessionEnabled=self.serialize(debugSessionEnabled),
fleetOverride=self.serialize(fleetOverride),
autoRetryLimitOverride=self.serialize(autoRetryLimitOverride),
)
_response = self.client.start_build(
**{k: v for k, v in args.items() if v is not None}
)
response = StartBuildOutput(**_response)
results: "Build" = None
if response is not None:
results = response.build
self.sessionize(results)
return cast("Build", results)
[docs] @build_response_to_build
def stop(self, id: str) -> "Build":
"""
Attempts to stop running a build.
Args:
id: The ID of the build.
"""
args: dict[str, Any] = dict(id=self.serialize(id))
_response = self.client.stop_build(
**{k: v for k, v in args.items() if v is not None}
)
response = StopBuildOutput(**_response)
results: "Build" = None
if response is not None:
results = response.build
self.sessionize(results)
return cast("Build", results)
[docs] @build_response_to_build
def retry(
self, *, id: "str | None" = None, idempotencyToken: "str | None" = None
) -> "Build":
"""
Restarts a build.
Keyword Args:
id: Specifies the identifier of the build to restart.
idempotencyToken: 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, CodeBuild returns a parameter mismatch error.
"""
args: dict[str, Any] = dict(
id=self.serialize(id), idempotencyToken=self.serialize(idempotencyToken)
)
_response = self.client.retry_build(
**{k: v for k, v in args.items() if v is not None}
)
response = RetryBuildOutput(**_response)
results: "Build" = None
if response is not None:
results = response.build
self.sessionize(results)
return cast("Build", results)
[docs] def batch_delete(self, ids: "builtins.list[str]") -> "BatchDeleteBuildsOutput":
"""
Deletes one or more builds.
Args:
ids: The IDs of the builds to delete.
"""
args: dict[str, Any] = dict(ids=self.serialize(ids))
_response = self.client.batch_delete_builds(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchDeleteBuildsOutput(**_response)
results: "BatchDeleteBuildsOutput" = None
if response is not None:
results = response
self.sessionize(results)
return cast("BatchDeleteBuildsOutput", results)
[docs]class BuildBatchManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] @build_batch_response_to_build_batch
def create(
self,
model: "BuildBatch",
secondarySourcesOverride: "builtins.list[ProjectSource] | None" = None,
secondarySourcesVersionOverride: "builtins.list[ProjectSourceVersion] | None" = None,
artifactsOverride: "ProjectArtifacts | None" = None,
secondaryArtifactsOverride: "builtins.list[ProjectArtifacts] | None" = None,
environmentVariablesOverride: "builtins.list[EnvironmentVariable] | None" = None,
sourceTypeOverride: "Literal['CODECOMMIT', 'CODEPIPELINE', 'GITHUB', 'GITLAB', 'GITLAB_SELF_MANAGED', 'S3', 'BITBUCKET', 'GITHUB_ENTERPRISE', 'NO_SOURCE'] | None" = None,
sourceLocationOverride: "str | None" = None,
sourceAuthOverride: "SourceAuth | None" = None,
gitCloneDepthOverride: "int | None" = None,
gitSubmodulesConfigOverride: "GitSubmodulesConfig | None" = None,
buildspecOverride: "str | None" = None,
insecureSslOverride: "bool | None" = None,
reportBuildBatchStatusOverride: "bool | None" = None,
environmentTypeOverride: "Literal['WINDOWS_CONTAINER', 'LINUX_CONTAINER', 'LINUX_GPU_CONTAINER', 'ARM_CONTAINER', 'WINDOWS_SERVER_2019_CONTAINER', 'WINDOWS_SERVER_2022_CONTAINER', 'LINUX_LAMBDA_CONTAINER', 'ARM_LAMBDA_CONTAINER', 'LINUX_EC2', 'ARM_EC2', 'WINDOWS_EC2', 'MAC_ARM'] | None" = None,
imageOverride: "str | None" = None,
computeTypeOverride: "Literal['BUILD_GENERAL1_SMALL', 'BUILD_GENERAL1_MEDIUM', 'BUILD_GENERAL1_LARGE', 'BUILD_GENERAL1_XLARGE', 'BUILD_GENERAL1_2XLARGE', 'BUILD_LAMBDA_1GB', 'BUILD_LAMBDA_2GB', 'BUILD_LAMBDA_4GB', 'BUILD_LAMBDA_8GB', 'BUILD_LAMBDA_10GB', 'ATTRIBUTE_BASED_COMPUTE', 'CUSTOM_INSTANCE_TYPE'] | None" = None,
certificateOverride: "str | None" = None,
cacheOverride: "ProjectCache | None" = None,
serviceRoleOverride: "str | None" = None,
privilegedModeOverride: "bool | None" = None,
buildTimeoutInMinutesOverride: "int | None" = None,
queuedTimeoutInMinutesOverride: "int | None" = None,
encryptionKeyOverride: "str | None" = None,
idempotencyToken: "str | None" = None,
logsConfigOverride: "LogsConfig | None" = None,
registryCredentialOverride: "RegistryCredential | None" = None,
imagePullCredentialsTypeOverride: "Literal['CODEBUILD', 'SERVICE_ROLE'] | None" = None,
buildBatchConfigOverride: "ProjectBuildBatchConfig | None" = None,
) -> "BuildBatch":
"""
Starts a batch build for a project.
Args:
model: The :py:class:`BuildBatch` to create.
Keyword Args:
secondarySourcesOverride: An array of ``ProjectSource`` objects that override the secondary sources defined in the
batch build project.
secondarySourcesVersionOverride: An array of ``ProjectSourceVersion`` objects that override the secondary source
versions in the batch build project.
artifactsOverride: An array of ``ProjectArtifacts`` objects that contains information about the build output
artifact overrides for the build project.
secondaryArtifactsOverride: An array of ``ProjectArtifacts`` objects that override the secondary artifacts defined
in the batch build project.
environmentVariablesOverride: An array of ``EnvironmentVariable`` objects that override, or add to, the environment
variables defined in the batch build project.
sourceTypeOverride: The source input type that overrides the source input defined in the batch build project.
sourceLocationOverride: A location that overrides, for this batch build, the source location defined in the batch
build project.
sourceAuthOverride: A ``SourceAuth`` object that overrides the one defined in the batch build project. This override
applies only if the build project's source is BitBucket or GitHub.
gitCloneDepthOverride: The user-defined depth of history, with a minimum value of 0, that overrides, for this batch
build only, any previous depth of history defined in the batch build project.
gitSubmodulesConfigOverride: A ``GitSubmodulesConfig`` object that overrides the Git submodules configuration for
this batch build.
buildspecOverride: A buildspec file declaration that overrides, for this build only, the latest one already defined
in the build project.
insecureSslOverride: Enable this flag to override the insecure SSL setting that is specified in the batch build
project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source
code. This override applies only if the build's source is GitHub Enterprise.
reportBuildBatchStatusOverride: Set to ``true`` to report to your source provider the status of a batch build's
start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or
Bitbucket, an ``invalidInputException`` is thrown.
environmentTypeOverride: A container type for this batch build that overrides the one specified in the batch build
project.
imageOverride: The name of an image for this batch build that overrides the one specified in the batch build
project.
computeTypeOverride: The name of a compute type for this batch build that overrides the one specified in the batch
build project.
certificateOverride: The name of a certificate for this batch build that overrides the one specified in the batch
build project.
cacheOverride: A ``ProjectCache`` object that specifies cache overrides.
serviceRoleOverride: The name of a service role for this batch build that overrides the one specified in the batch
build project.
privilegedModeOverride: Enable this flag to override privileged mode in the batch build project.
buildTimeoutInMinutesOverride: Overrides the build timeout specified in the batch build project.
queuedTimeoutInMinutesOverride: The number of minutes a batch build is allowed to be queued before it times out.
encryptionKeyOverride: The Key Management Service customer master key (CMK) that overrides the one specified in the
batch build project. The CMK key encrypts the build output artifacts.
idempotencyToken: A unique, case sensitive identifier you provide to ensure the idempotency of the
``StartBuildBatch`` request. The token is included in the ``StartBuildBatch`` request and is valid for five minutes.
If you repeat the ``StartBuildBatch`` request with the same token, but change a parameter, CodeBuild returns a
parameter mismatch error.
logsConfigOverride: A ``LogsConfig`` object that override the log settings defined in the batch build project.
registryCredentialOverride: A ``RegistryCredential`` object that overrides credentials for access to a private
registry.
imagePullCredentialsTypeOverride: The type of credentials CodeBuild uses to pull images in your batch build. There
are two valid values:
buildBatchConfigOverride: A ``BuildBatchConfigOverride`` object that contains batch build configuration overrides.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
projectName=data.get("projectName"),
secondarySourcesOverride=self.serialize(secondarySourcesOverride),
secondarySourcesVersionOverride=self.serialize(
secondarySourcesVersionOverride
),
sourceVersion=data.get("sourceVersion"),
artifactsOverride=self.serialize(artifactsOverride),
secondaryArtifactsOverride=self.serialize(secondaryArtifactsOverride),
environmentVariablesOverride=self.serialize(environmentVariablesOverride),
sourceTypeOverride=self.serialize(sourceTypeOverride),
sourceLocationOverride=self.serialize(sourceLocationOverride),
sourceAuthOverride=self.serialize(sourceAuthOverride),
gitCloneDepthOverride=self.serialize(gitCloneDepthOverride),
gitSubmodulesConfigOverride=self.serialize(gitSubmodulesConfigOverride),
buildspecOverride=self.serialize(buildspecOverride),
insecureSslOverride=self.serialize(insecureSslOverride),
reportBuildBatchStatusOverride=self.serialize(
reportBuildBatchStatusOverride
),
environmentTypeOverride=self.serialize(environmentTypeOverride),
imageOverride=self.serialize(imageOverride),
computeTypeOverride=self.serialize(computeTypeOverride),
certificateOverride=self.serialize(certificateOverride),
cacheOverride=self.serialize(cacheOverride),
serviceRoleOverride=self.serialize(serviceRoleOverride),
privilegedModeOverride=self.serialize(privilegedModeOverride),
buildTimeoutInMinutesOverride=self.serialize(buildTimeoutInMinutesOverride),
queuedTimeoutInMinutesOverride=self.serialize(
queuedTimeoutInMinutesOverride
),
encryptionKeyOverride=self.serialize(encryptionKeyOverride),
idempotencyToken=self.serialize(idempotencyToken),
logsConfigOverride=self.serialize(logsConfigOverride),
registryCredentialOverride=self.serialize(registryCredentialOverride),
imagePullCredentialsTypeOverride=self.serialize(
imagePullCredentialsTypeOverride
),
buildBatchConfigOverride=self.serialize(buildBatchConfigOverride),
debugSessionEnabled=data.get("debugSessionEnabled"),
)
_response = self.client.start_build_batch(
**{k: v for k, v in args.items() if v is not None}
)
response = StartBuildBatchOutput(**_response)
self.sessionize(response.buildBatch)
return cast("BuildBatch", response.buildBatch)
[docs] def get(self, id: str) -> "BuildBatch | None":
"""
Retrieves information about one or more batch builds.
Args:
id: The build batch identifier.
"""
args: dict[str, Any] = dict(ids=self.serialize([[id]]))
_response = self.client.batch_get_build_batches(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetBuildBatchesOutput(**_response)
if response and response.buildBatches:
self.sessionize(response.buildBatches[0])
return response.buildBatches[0]
return None
[docs] @build_batch_ids_to_build_batches
def list(
self,
*,
filter: "BuildBatchFilter | None" = None,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Retrieves the identifiers of your build batches in the current region.
Keyword Args:
filter: A ``BuildBatchFilter`` object that specifies the filters for the search.
sortOrder: Specifies the sort order of the returned items. Valid values include:
"""
paginator = self.client.get_paginator("list_build_batches")
args: dict[str, Any] = dict(
filter=self.serialize(filter), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListBuildBatchesOutput(**_response)
if response.ids:
results.extend(response.ids)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @build_batch_ids_to_build_batches_with_project
def list_for_project(
self,
projectName: str,
*,
filter: "BuildBatchFilter | None" = None,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> "builtins.list[str]":
"""
Retrieves the identifiers of the build batches for a specific project.
Args:
projectName: The name of the project.
Keyword Args:
filter: A ``BuildBatchFilter`` object that specifies the filters for the search.
sortOrder: Specifies the sort order of the returned items. Valid values include:
"""
paginator = self.client.get_paginator("list_build_batches_for_project")
args: dict[str, Any] = dict(
projectName=self.serialize(projectName),
filter=self.serialize(filter),
sortOrder=self.serialize(sortOrder),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListBuildBatchesForProjectOutput(**_response)
if response.ids is not None:
results.extend(response.ids)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] def delete(self, id: str) -> None:
"""
Deletes a batch build.
Args:
id: The identifier of the batch build to delete.
"""
args: dict[str, Any] = dict(id=self.serialize(id))
self.client.delete_build_batch(
**{k: v for k, v in args.items() if v is not None}
)
[docs] @build_batch_response_to_build_batch
def stop(self, id: str) -> "BuildBatch":
"""
Stops a running batch build.
Args:
id: The identifier of the batch build to stop.
"""
args: dict[str, Any] = dict(id=self.serialize(id))
_response = self.client.stop_build_batch(
**{k: v for k, v in args.items() if v is not None}
)
response = StopBuildBatchOutput(**_response)
results: "BuildBatch" = None
if response is not None:
results = response.buildBatch
self.sessionize(results)
return cast("BuildBatch", results)
[docs] @build_batch_response_to_build_batch
def retry(
self,
*,
id: "str | None" = None,
idempotencyToken: "str | None" = None,
retryType: "Literal['RETRY_ALL_BUILDS', 'RETRY_FAILED_BUILDS'] | None" = None,
) -> "BuildBatch":
"""
Restarts a failed batch build. Only batch builds that have failed can be
retried.
Keyword Args:
id: Specifies the identifier of the batch build to restart.
idempotencyToken: A unique, case sensitive identifier you provide to ensure the idempotency of the
``RetryBuildBatch`` request. The token is included in the ``RetryBuildBatch`` request and is valid for five minutes.
If you repeat the ``RetryBuildBatch`` request with the same token, but change a parameter, CodeBuild returns a
parameter mismatch error.
retryType: Specifies the type of retry to perform.
"""
args: dict[str, Any] = dict(
id=self.serialize(id),
idempotencyToken=self.serialize(idempotencyToken),
retryType=self.serialize(retryType),
)
_response = self.client.retry_build_batch(
**{k: v for k, v in args.items() if v is not None}
)
response = RetryBuildBatchOutput(**_response)
results: "BuildBatch" = None
if response is not None:
results = response.buildBatch
self.sessionize(results)
return cast("BuildBatch", results)
[docs]class FleetManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] @fleet_response_to_fleet
def create(self, model: "Fleet") -> "Fleet":
"""
Creates a compute fleet.
Args:
model: The :py:class:`Fleet` to create.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
name=data.get("name"),
baseCapacity=data.get("baseCapacity"),
environmentType=data.get("environmentType"),
computeType=data.get("computeType"),
computeConfiguration=data.get("computeConfiguration"),
scalingConfiguration=data.get("scalingConfiguration"),
overflowBehavior=data.get("overflowBehavior"),
vpcConfig=data.get("vpcConfig"),
proxyConfiguration=data.get("proxyConfiguration"),
imageId=data.get("imageId"),
fleetServiceRole=data.get("fleetServiceRole"),
tags=data.get("tags"),
)
_response = self.client.create_fleet(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateFleetOutput(**_response)
self.sessionize(response.fleet)
return cast("Fleet", response.fleet)
[docs] @fleet_response_to_fleet
def update(self, model: "Fleet") -> "Fleet":
"""
Updates a compute fleet.
Args:
model: The :py:class:`Fleet` to update.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
arn=data.get("arn"),
baseCapacity=data.get("baseCapacity"),
environmentType=data.get("environmentType"),
computeType=data.get("computeType"),
computeConfiguration=data.get("computeConfiguration"),
scalingConfiguration=data.get("scalingConfiguration"),
overflowBehavior=data.get("overflowBehavior"),
vpcConfig=data.get("vpcConfig"),
proxyConfiguration=data.get("proxyConfiguration"),
imageId=data.get("imageId"),
fleetServiceRole=data.get("fleetServiceRole"),
tags=data.get("tags"),
)
_response = self.client.update_fleet(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateFleetOutput(**_response)
self.sessionize(response.fleet)
return cast("Fleet", response.fleet)
[docs] def delete(self, arn: str) -> None:
"""
Deletes a compute fleet. When you delete a compute fleet, its builds are not
deleted.
Args:
arn: The ARN of the compute fleet.
"""
args: dict[str, Any] = dict(arn=self.serialize(arn))
self.client.delete_fleet(**{k: v for k, v in args.items() if v is not None})
[docs] def get(self, name: str) -> "Fleet | None":
"""
Gets information about one or more compute fleets.
Args:
name: The fleet name to retrieve.
"""
args: dict[str, Any] = dict(names=self.serialize([[name]]))
_response = self.client.batch_get_fleets(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetFleetsOutput(**_response)
if response and response.fleets:
self.sessionize(response.fleets[0])
return response.fleets[0]
return None
[docs] @fleet_names_to_fleets
def list(
self,
*,
nextToken: "str | None" = None,
maxResults: "int | None" = None,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
sortBy: "Literal['NAME', 'CREATED_TIME', 'LAST_MODIFIED_TIME'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Gets a list of compute fleet names with each compute fleet name representing a
single compute fleet.
Keyword Args:
nextToken: During a previous call, if there are more than 100 items in the list, only the first 100 items are
returned, along with a unique string called a *nextToken*. To get the next batch of items in the list, call this
operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation
with each subsequent next token that is returned, until no more next tokens are returned.
maxResults: The maximum number of paginated compute fleets returned per response. Use ``nextToken`` to iterate pages
in the list of returned compute fleets.
sortOrder: The order in which to list compute fleets. Valid values include:
sortBy: The criterion to be used to list compute fleet names. Valid values include:
"""
args: dict[str, Any] = dict(
nextToken=self.serialize(nextToken),
maxResults=self.serialize(maxResults),
sortOrder=self.serialize(sortOrder),
sortBy=self.serialize(sortBy),
)
_response = self.client.list_fleets(
**{k: v for k, v in args.items() if v is not None}
)
response = ListFleetsOutput(**_response)
if response and response.fleets:
self.sessionize(response.fleets)
return PrimaryBoto3ModelQuerySet(response.fleets)
return PrimaryBoto3ModelQuerySet([])
[docs]class ReportGroupManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] @report_group_response_to_report_group
def create(self, model: "ReportGroup") -> "ReportGroup":
"""
Creates a report group. A report group contains a collection of reports.
Args:
model: The :py:class:`ReportGroup` to create.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
name=data.get("name"),
type=data.get("type"),
exportConfig=data.get("exportConfig"),
tags=data.get("tags"),
)
_response = self.client.create_report_group(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateReportGroupOutput(**_response)
self.sessionize(response.reportGroup)
return cast("ReportGroup", response.reportGroup)
[docs] @report_group_response_to_report_group
def update(self, model: "ReportGroup") -> "ReportGroup":
"""
Updates a report group.
Args:
model: The :py:class:`ReportGroup` to update.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
arn=data.get("arn"),
exportConfig=data.get("exportConfig"),
tags=data.get("tags"),
)
_response = self.client.update_report_group(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateReportGroupOutput(**_response)
self.sessionize(response.reportGroup)
return cast("ReportGroup", response.reportGroup)
[docs] def delete(self, arn: str, *, deleteReports: "bool | None" = None) -> None:
"""
Deletes a report group. Before you delete a report group, you must delete its
reports.
Args:
arn: The ARN of the report group to delete.
Keyword Args:
deleteReports: If ``true``, deletes any reports that belong to a report group before deleting the report group.
"""
args: dict[str, Any] = dict(
arn=self.serialize(arn), deleteReports=self.serialize(deleteReports)
)
self.client.delete_report_group(
**{k: v for k, v in args.items() if v is not None}
)
[docs] def get(self, arn: str) -> "ReportGroup | None":
"""
Returns an array of report groups.
Args:
arn: The ARN of the report group to retrieve.
"""
args: dict[str, Any] = dict(reportGroupArns=self.serialize([[arn]]))
_response = self.client.batch_get_report_groups(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetReportGroupsOutput(**_response)
if response and response.reportGroups:
self.sessionize(response.reportGroups[0])
return response.reportGroups[0]
return None
[docs] @report_group_arns_to_report_groups
def list(
self,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
sortBy: "Literal['NAME', 'CREATED_TIME', 'LAST_MODIFIED_TIME'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Gets a list ARNs for the report groups in the current Amazon Web Services
account.
Keyword Args:
sortOrder: Used to specify the order to sort the list of returned report groups. Valid values are ``ASCENDING`` and
``DESCENDING``.
sortBy: The criterion to be used to list build report groups. Valid values include:
"""
paginator = self.client.get_paginator("list_report_groups")
args: dict[str, Any] = dict(
sortOrder=self.serialize(sortOrder), sortBy=self.serialize(sortBy)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListReportGroupsOutput(**_response)
if response.reportGroups:
results.extend(response.reportGroups)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @report_group_arns_to_report_groups
def list_shared(
self,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
sortBy: "Literal['ARN', 'MODIFIED_TIME'] | None" = None,
) -> "builtins.list[str]":
"""
Gets a list of report groups that are shared with other Amazon Web Services
accounts or users.
Keyword Args:
sortOrder: The order in which to list shared report groups. Valid values include:
sortBy: The criterion to be used to list report groups shared with the current Amazon Web Services account or user.
Valid values include:
"""
paginator = self.client.get_paginator("list_shared_report_groups")
args: dict[str, Any] = dict(
sortOrder=self.serialize(sortOrder), sortBy=self.serialize(sortBy)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListSharedReportGroupsOutput(**_response)
if response.reportGroups is not None:
results.extend(response.reportGroups)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] def get_trend(
self,
reportGroupArn: str,
trendField: Literal[
"PASS_RATE",
"DURATION",
"TOTAL",
"LINE_COVERAGE",
"LINES_COVERED",
"LINES_MISSED",
"BRANCH_COVERAGE",
"BRANCHES_COVERED",
"BRANCHES_MISSED",
],
*,
numOfReports: "int | None" = None,
) -> "GetReportGroupTrendOutput":
"""
Analyzes and accumulates test report values for the specified test reports.
Args:
reportGroupArn: The ARN of the report group that contains the reports to analyze.
trendField: The test report value to accumulate. This must be one of the following values:
Keyword Args:
numOfReports: The number of reports to analyze. This operation always retrieves the most recent reports.
"""
args: dict[str, Any] = dict(
reportGroupArn=self.serialize(reportGroupArn),
trendField=self.serialize(trendField),
numOfReports=self.serialize(numOfReports),
)
_response = self.client.get_report_group_trend(
**{k: v for k, v in args.items() if v is not None}
)
response = GetReportGroupTrendOutput(**_response)
results: "GetReportGroupTrendOutput" = None
if response is not None:
results = response
self.sessionize(results)
return cast("GetReportGroupTrendOutput", results)
[docs]class ReportManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def get(self, arn: str) -> "Report | None":
"""
Returns an array of reports.
Args:
arn: The ARN of the report to retrieve.
"""
args: dict[str, Any] = dict(reportArns=self.serialize([[arn]]))
_response = self.client.batch_get_reports(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetReportsOutput(**_response)
if response and response.reports:
self.sessionize(response.reports[0])
return response.reports[0]
return None
[docs] @report_arns_to_reports
def list(
self,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
filter: "ReportFilter | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Returns a list of ARNs for the reports in the current Amazon Web Services
account.
Keyword Args:
sortOrder: Specifies the sort order for the list of returned reports. Valid values are:
filter: A ``ReportFilter`` object used to filter the returned reports.
"""
paginator = self.client.get_paginator("list_reports")
args: dict[str, Any] = dict(
sortOrder=self.serialize(sortOrder), filter=self.serialize(filter)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListReportsOutput(**_response)
if response.reports:
results.extend(response.reports)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @report_arns_to_reports_with_group
def list_for_report_group(
self,
reportGroupArn: str,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
filter: "ReportFilter | None" = None,
) -> "builtins.list[str]":
"""
Returns a list of ARNs for the reports that belong to a ``ReportGroup``.
Args:
reportGroupArn: The ARN of the report group for which you want to return report ARNs.
Keyword Args:
sortOrder: Use to specify whether the results are returned in ascending or descending order.
filter: A ``ReportFilter`` object used to filter the returned reports.
"""
paginator = self.client.get_paginator("list_reports_for_report_group")
args: dict[str, Any] = dict(
reportGroupArn=self.serialize(reportGroupArn),
sortOrder=self.serialize(sortOrder),
filter=self.serialize(filter),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListReportsForReportGroupOutput(**_response)
if response.reports is not None:
results.extend(response.reports)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] def delete(self, arn: str) -> None:
"""
Deletes a report.
Args:
arn: The ARN of the report to delete.
"""
args: dict[str, Any] = dict(arn=self.serialize(arn))
self.client.delete_report(**{k: v for k, v in args.items() if v is not None})
[docs]class WebhookManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] @webhook_response_with_project_name
def create(self, model: "Webhook") -> "Webhook":
"""
For an existing CodeBuild build project that has its source code stored in a
GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source
code every time a code change is pushed to the repository.
Args:
model: The :py:class:`Webhook` to create.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
projectName=data.get("projectName"),
branchFilter=data.get("branchFilter"),
filterGroups=data.get("filterGroups"),
buildType=data.get("buildType"),
manualCreation=data.get("manualCreation"),
scopeConfiguration=data.get("scopeConfiguration"),
pullRequestBuildPolicy=data.get("pullRequestBuildPolicy"),
)
_response = self.client.create_webhook(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateWebhookOutput(**_response)
self.sessionize(response.webhook)
return cast("Webhook", response.webhook)
[docs] @webhook_response_with_project_name
def update(self, model: "Webhook", rotateSecret: "bool | None" = None) -> "Webhook":
"""
Updates the webhook associated with an CodeBuild build project.
Args:
model: The :py:class:`Webhook` to update.
Keyword Args:
rotateSecret: A boolean value that specifies whether the associated GitHub repository's secret token should be
updated. If you use Bitbucket for your repository, ``rotateSecret`` is ignored.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
projectName=data.get("projectName"),
branchFilter=data.get("branchFilter"),
rotateSecret=self.serialize(rotateSecret),
filterGroups=data.get("filterGroups"),
buildType=data.get("buildType"),
pullRequestBuildPolicy=data.get("pullRequestBuildPolicy"),
)
_response = self.client.update_webhook(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateWebhookOutput(**_response)
self.sessionize(response.webhook)
return cast("Webhook", response.webhook)
[docs] def delete(self, projectName: str) -> None:
"""
For an existing CodeBuild build project that has its source code stored in a
GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code
every time a code change is pushed to the repository.
Args:
projectName: The name of the CodeBuild project.
"""
args: dict[str, Any] = dict(projectName=self.serialize(projectName))
self.client.delete_webhook(**{k: v for k, v in args.items() if v is not None})
[docs]class SourceCredentialsManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def import_credentials(
self,
token: str,
serverType: Literal[
"GITHUB", "BITBUCKET", "GITHUB_ENTERPRISE", "GITLAB", "GITLAB_SELF_MANAGED"
],
authType: Literal[
"OAUTH",
"BASIC_AUTH",
"PERSONAL_ACCESS_TOKEN",
"CODECONNECTIONS",
"SECRETS_MANAGER",
],
*,
username: "str | None" = None,
shouldOverwrite: "bool | None" = None,
) -> str:
"""
Imports the source repository credentials for an CodeBuild project that has its
source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed,
or Bitbucket repository.
Args:
token: For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access
token or the app password. For the ``authType`` CODECONNECTIONS, this is the ``connectionArn``. For the ``authType``
SECRETS_MANAGER, this is the ``secretArn``.
serverType: The source provider used for this project.
authType: The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or
Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild
console.
Keyword Args:
username: The Bitbucket username when the ``authType`` is BASIC_AUTH. This parameter is not valid for other types of
source providers or connections.
shouldOverwrite: Set to ``false`` to prevent overwriting the repository source credentials. Set to ``true`` to
overwrite the repository source credentials. The default value is ``true``.
"""
args: dict[str, Any] = dict(
token=self.serialize(token),
serverType=self.serialize(serverType),
authType=self.serialize(authType),
username=self.serialize(username),
shouldOverwrite=self.serialize(shouldOverwrite),
)
_response = self.client.import_source_credentials(
**{k: v for k, v in args.items() if v is not None}
)
response = ImportSourceCredentialsOutput(**_response)
results: str = None
if response is not None:
results = response.arn
self.sessionize(results)
return cast("str", results)
[docs] def list(
self,
) -> PrimaryBoto3ModelQuerySet:
"""
Returns a list of ``SourceCredentialsInfo`` objects.
"""
args: dict[str, Any] = dict()
_response = self.client.list_source_credentials(
**{k: v for k, v in args.items() if v is not None}
)
response = ListSourceCredentialsOutput(**_response)
if response and response.sourceCredentialsInfos:
self.sessionize(response.sourceCredentialsInfos)
return PrimaryBoto3ModelQuerySet(response.sourceCredentialsInfos)
return PrimaryBoto3ModelQuerySet([])
[docs] def delete(self, arn: str) -> None:
"""
Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
Args:
arn: The Amazon Resource Name (ARN) of the token.
"""
args: dict[str, Any] = dict(arn=self.serialize(arn))
self.client.delete_source_credentials(
**{k: v for k, v in args.items() if v is not None}
)
[docs]class SandboxManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def get(self, id: str) -> "Sandbox | None":
"""
Gets information about the sandbox status.
Args:
id: The sandbox identifier.
"""
args: dict[str, Any] = dict(ids=self.serialize([[id]]))
_response = self.client.batch_get_sandboxes(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetSandboxesOutput(**_response)
if response and response.sandboxes:
self.sessionize(response.sandboxes[0])
return response.sandboxes[0]
return None
[docs] @sandbox_ids_to_sandboxes
def list(
self, *, sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None
) -> PrimaryBoto3ModelQuerySet:
"""
Gets a list of sandboxes.
Keyword Args:
sortOrder: The order in which sandbox records should be retrieved.
"""
paginator = self.client.get_paginator("list_sandboxes")
args: dict[str, Any] = dict(sortOrder=self.serialize(sortOrder))
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListSandboxesOutput(**_response)
if response.ids:
results.extend(response.ids)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @sandbox_ids_to_sandboxes_with_project
def list_for_project(
self,
projectName: str,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> "builtins.list[str]":
"""
Gets a list of sandboxes for a given project.
Args:
projectName: The CodeBuild project name.
Keyword Args:
sortOrder: The order in which sandbox records should be retrieved.
"""
paginator = self.client.get_paginator("list_sandboxes_for_project")
args: dict[str, Any] = dict(
projectName=self.serialize(projectName), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[str]" = []
for _response in response_iterator:
response = ListSandboxesForProjectOutput(**_response)
if response.ids is not None:
results.extend(response.ids)
else:
break
self.sessionize(results)
return cast("builtins.list[str]", results)
[docs] @sandbox_response_to_sandbox
def start(
self, projectName: str, *, idempotencyToken: "str | None" = None
) -> "Sandbox":
"""
Starts a sandbox.
Args:
projectName: The CodeBuild project name.
Keyword Args:
idempotencyToken: A unique client token.
"""
args: dict[str, Any] = dict(
projectName=self.serialize(projectName),
idempotencyToken=self.serialize(idempotencyToken),
)
_response = self.client.start_sandbox(
**{k: v for k, v in args.items() if v is not None}
)
response = StartSandboxOutput(**_response)
results: "Sandbox" = None
if response is not None:
results = response.sandbox
self.sessionize(results)
return cast("Sandbox", results)
[docs] @sandbox_response_to_sandbox
def stop(self, id: str) -> "Sandbox":
"""
Stops a sandbox.
Args:
id: Information about the requested sandbox ID.
"""
args: dict[str, Any] = dict(id=self.serialize(id))
_response = self.client.stop_sandbox(
**{k: v for k, v in args.items() if v is not None}
)
response = StopSandboxOutput(**_response)
results: "Sandbox" = None
if response is not None:
results = response.sandbox
self.sessionize(results)
return cast("Sandbox", results)
[docs] def start_connection(self, sandboxId: str) -> "StartSandboxConnectionOutput":
"""
Starts a sandbox connection.
Args:
sandboxId: A ``sandboxId`` or ``sandboxArn``.
"""
args: dict[str, Any] = dict(sandboxId=self.serialize(sandboxId))
_response = self.client.start_sandbox_connection(
**{k: v for k, v in args.items() if v is not None}
)
response = StartSandboxConnectionOutput(**_response)
results: "StartSandboxConnectionOutput" = None
if response is not None:
results = response
self.sessionize(results)
return cast("StartSandboxConnectionOutput", results)
[docs]class CommandExecutionManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def get(self, sandboxId: str, id: str) -> "CommandExecution | None":
"""
Gets information about the command executions.
Args:
sandboxId: A ``sandboxId`` or ``sandboxArn``.
id: The command execution identifier.
"""
args: dict[str, Any] = dict(
sandboxId=self.serialize(sandboxId),
commandExecutionIds=self.serialize([[id]]),
)
_response = self.client.batch_get_command_executions(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetCommandExecutionsOutput(**_response)
if response and response.commandExecutions:
self.sessionize(response.commandExecutions[0])
return response.commandExecutions[0]
return None
[docs] def list_for_sandbox(
self,
sandboxId: str,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
) -> "builtins.list[CommandExecution]":
"""
Gets a list of command executions for a sandbox.
Args:
sandboxId: A ``sandboxId`` or ``sandboxArn``.
Keyword Args:
sortOrder: The order in which sandbox records should be retrieved.
"""
paginator = self.client.get_paginator("list_command_executions_for_sandbox")
args: dict[str, Any] = dict(
sandboxId=self.serialize(sandboxId), sortOrder=self.serialize(sortOrder)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[CommandExecution]" = []
for _response in response_iterator:
response = ListCommandExecutionsForSandboxOutput(**_response)
if response.commandExecutions is not None:
results.extend(response.commandExecutions)
else:
break
self.sessionize(results)
return cast("builtins.list[CommandExecution]", results)
[docs] @command_execution_response_to_command_execution
def start(
self, sandboxId: str, command: str, *, type: "Literal['SHELL'] | None" = None
) -> "CommandExecution":
"""
Starts a command execution.
Args:
sandboxId: A ``sandboxId`` or ``sandboxArn``.
command: The command that needs to be executed.
Keyword Args:
type: The command type.
"""
args: dict[str, Any] = dict(
sandboxId=self.serialize(sandboxId),
command=self.serialize(command),
type=self.serialize(type),
)
_response = self.client.start_command_execution(
**{k: v for k, v in args.items() if v is not None}
)
response = StartCommandExecutionOutput(**_response)
results: "CommandExecution" = None
if response is not None:
results = response.commandExecution
self.sessionize(results)
return cast("CommandExecution", results)
[docs]class CodeCoverageManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def list(
self,
reportArn: str,
*,
sortOrder: "Literal['ASCENDING', 'DESCENDING'] | None" = None,
sortBy: "Literal['LINE_COVERAGE_PERCENTAGE', 'FILE_PATH'] | None" = None,
minLineCoveragePercentage: "float | None" = None,
maxLineCoveragePercentage: "float | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Retrieves one or more code coverage reports.
Args:
reportArn: The ARN of the report for which test cases are returned.
Keyword Args:
sortOrder: Specifies if the results are sorted in ascending or descending order.
sortBy: Specifies how the results are sorted. Possible values are:
minLineCoveragePercentage: The minimum line coverage percentage to report.
maxLineCoveragePercentage: The maximum line coverage percentage to report.
"""
paginator = self.client.get_paginator("describe_code_coverages")
args: dict[str, Any] = dict(
reportArn=self.serialize(reportArn),
sortOrder=self.serialize(sortOrder),
sortBy=self.serialize(sortBy),
minLineCoveragePercentage=self.serialize(minLineCoveragePercentage),
maxLineCoveragePercentage=self.serialize(maxLineCoveragePercentage),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = DescribeCodeCoveragesOutput(**_response)
if response.codeCoverages:
results.extend(response.codeCoverages)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs]class CodeBuildTestCaseManager(Boto3ModelManager):
service_name: str = "codebuild"
[docs] def list(
self, reportArn: str, *, filter: "TestCaseFilter | None" = None
) -> PrimaryBoto3ModelQuerySet:
"""
Returns a list of details about test cases for a report.
Args:
reportArn: The ARN of the report for which test cases are returned.
Keyword Args:
filter: A ``TestCaseFilter`` object used to filter the returned reports.
"""
paginator = self.client.get_paginator("describe_test_cases")
args: dict[str, Any] = dict(
reportArn=self.serialize(reportArn), filter=self.serialize(filter)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = DescribeTestCasesOutput(**_response)
if response.testCases:
results.extend(response.testCases)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
# ==============
# Service Models
# ==============
[docs]class GitSubmodulesConfig(Boto3Model):
"""
Information about the Git submodules configuration for an CodeBuild build project.
"""
fetchSubmodules: bool
"""
Set to true to fetch Git submodules for your CodeBuild build project.
"""
[docs]class SourceAuth(Boto3Model):
"""
Information about the authorization settings for CodeBuild to access the source code
to be built.
"""
type: Literal["OAUTH", "CODECONNECTIONS", "SECRETS_MANAGER"]
"""
The authorization type to use.
Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
"""
resource: "str | None" = None
"""
The resource value that applies to the specified authorization type.
"""
[docs]class BuildStatusConfig(Boto3Model):
"""
Contains information that defines how the CodeBuild build project reports the build
status to the source provider.
"""
context: "str | None" = None
"""
Specifies the context of the build status CodeBuild sends to the source provider.
The usage of this parameter depends on the source provider.
"""
targetUrl: "str | None" = None
"""
Specifies the target url of the build status CodeBuild sends to the source provider.
The usage of this parameter depends on the source provider.
"""
[docs]class ProjectSource(Boto3Model):
"""
Information about the build input source code for the build project.
"""
type: Literal[
"CODECOMMIT",
"CODEPIPELINE",
"GITHUB",
"GITLAB",
"GITLAB_SELF_MANAGED",
"S3",
"BITBUCKET",
"GITHUB_ENTERPRISE",
"NO_SOURCE",
]
"""
The type of repository that contains the source code to be built.
Valid values include:
"""
location: "str | None" = None
"""
Information about the location of the source code to be built.
Valid values include:
"""
gitCloneDepth: "int | None" = None
"""
Information about the Git clone depth for the build project.
"""
gitSubmodulesConfig: "GitSubmodulesConfig | None" = None
"""
Information about the Git submodules configuration for the build project.
"""
buildspec: "str | None" = None
"""
The buildspec file declaration to use for the builds in this build project.
"""
auth: "SourceAuth | None" = None
"""
Information about the authorization settings for CodeBuild to access the source code
to be built.
"""
reportBuildStatus: "bool | None" = None
"""
Set to true to report the status of a build's start and finish to your source
provider.
This option is valid only when
your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, GitLab, GitLab Self Managed, or
Bitbucket. If this is set and you use a different source provider, an ``invalidInputException`` is thrown.
"""
buildStatusConfig: "BuildStatusConfig | None" = None
"""
Contains information that defines how the build project reports the build status to
the source provider.
This option is
only used when the source provider is ``GITHUB``, ``GITHUB_ENTERPRISE``, or ``BITBUCKET``.
"""
insecureSsl: "bool | None" = None
"""
Enable this flag to ignore SSL warnings while connecting to the project source code.
"""
sourceIdentifier: "str | None" = None
"""
An identifier for this project source.
The identifier can only contain alphanumeric characters and underscores, and must be
less than 128 characters in length.
"""
[docs]class ProjectSourceVersion(Boto3Model):
"""
A source identifier and its corresponding version.
"""
sourceIdentifier: str
"""
An identifier for a source in the build project.
The identifier can only contain alphanumeric characters and underscores, and must be
less than 128 characters in length.
"""
sourceVersion: str
"""
The source version for the corresponding source identifier.
If specified, must be one of:
"""
[docs]class ProjectArtifacts(Boto3Model):
"""
Information about the build output artifacts for the build project.
"""
type: Literal["CODEPIPELINE", "S3", "NO_ARTIFACTS"]
"""
The type of build output artifact.
Valid values include:
"""
location: "str | None" = None
"""
Information about the build output artifact location:
"""
path: "str | None" = None
"""
Along with ``namespaceType`` and ``name``, the pattern that CodeBuild uses to name
and store the output artifact:
"""
namespaceType: "Literal['NONE', 'BUILD_ID'] | None" = None
"""
Along with ``path`` and ``name``, the pattern that CodeBuild uses to determine the name and location to store the output
artifact:
"""
name: "str | None" = None
"""
Along with ``path`` and ``namespaceType``, the pattern that CodeBuild uses to name
and store the output artifact:
"""
packaging: "Literal['NONE', 'ZIP'] | None" = None
"""
The type of build output artifact to create:
"""
overrideArtifactName: "bool | None" = None
"""
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: "bool | None" = None
"""
Set to true if you do not want your output artifacts encrypted.
This option is valid only if your artifacts type is Amazon S3. If this is set with
another artifacts type, an invalidInputException is thrown.
"""
artifactIdentifier: "str | None" = None
"""
An identifier for this artifact definition.
"""
bucketOwnerAccess: "Literal['NONE', 'READ_ONLY', 'FULL'] | None" = None
"""
Specifies the bucket owner's access for objects that another account uploads to
their Amazon S3 bucket.
By default, only the account that uploads the objects to the bucket has access to
these objects. This property allows you to give the bucket owner access to these
objects.
"""
[docs]class ProjectCache(Boto3Model):
"""
Information about the cache for the build project.
"""
type: Literal["NO_CACHE", "S3", "LOCAL"]
"""
The type of cache used by the build project.
Valid values include:
"""
location: "str | None" = None
"""
Information about the cache location:
"""
modes: "builtins.list[Literal['LOCAL_DOCKER_LAYER_CACHE', 'LOCAL_SOURCE_CACHE', 'LOCAL_CUSTOM_CACHE']] | None" = Field(
default_factory=list
)
"""
An array of strings that specify the local cache modes.
You can use one or more local cache modes at the same time. This
is only used for ``LOCAL`` cache types.
"""
cacheNamespace: "str | None" = None
"""
Defines the scope of the cache.
You can use this namespace to share a cache across multiple projects. For more
information, see
`Cache sharing between projects <https://docs.aws.amazon.com/codebuild/latest/userguide/caching-s3.html#caching-s3-sharing>`_
in the *CodeBuild
User Guide*.
"""
[docs]class ComputeConfiguration(Boto3Model):
"""
Contains compute attributes.
These attributes only need be specified when your project's or fleet's ``computeType`` is
set to ``ATTRIBUTE_BASED_COMPUTE`` or ``CUSTOM_INSTANCE_TYPE``.
"""
vCpu: "int | None" = None
"""
The number of vCPUs of the instance type included in your fleet.
"""
memory: "int | None" = None
"""
The amount of memory of the instance type included in your fleet.
"""
disk: "int | None" = None
"""
The amount of disk space of the instance type included in your fleet.
"""
machineType: "Literal['GENERAL', 'NVME'] | None" = None
"""
The machine type of the instance type included in your fleet.
"""
instanceType: "str | None" = None
"""
The EC2 instance type to be launched in your fleet.
"""
[docs]class ProjectFleet(Boto3Model):
"""
Information about the compute fleet of the build project.
For more information, see
`Working with reserved capacity in CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html>`_.
"""
fleetArn: "str | None" = None
"""
Specifies the compute fleet ARN for the build project.
"""
[docs]class EnvironmentVariable(Boto3Model):
"""
Information about an environment variable for a build project or a build.
"""
name: str
"""
The name or key of the environment variable.
"""
value: str
"""
The value of the environment variable.
"""
type: "Literal['PLAINTEXT', 'PARAMETER_STORE', 'SECRETS_MANAGER'] | None" = None
"""
The type of environment variable.
Valid values include:
"""
[docs]class RegistryCredential(Boto3Model):
"""
Information about credentials that provide access to a private Docker registry. When
this is set:
* ``imagePullCredentialsType`` must be set to ``SERVICE_ROLE``.
* images cannot be curated or an Amazon ECR image.
For more information, see `Private Registry with Secrets Manager Sample for
CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html>`_.
"""
credential: str
"""
The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager.
"""
credentialProvider: Literal["SECRETS_MANAGER"]
"""
The service that created the credentials to access a private Docker registry.
The valid value, SECRETS_MANAGER, is for Secrets Manager.
"""
[docs]class DockerServerStatus(Boto3Model):
"""
Contains information about the status of the docker server.
"""
status: "str | None" = None
"""
The status of the docker server.
"""
message: "str | None" = None
"""
A message associated with the status of a docker server.
"""
[docs]class DockerServer(Boto3Model):
"""
Contains docker server information.
"""
computeType: Literal[
"BUILD_GENERAL1_SMALL",
"BUILD_GENERAL1_MEDIUM",
"BUILD_GENERAL1_LARGE",
"BUILD_GENERAL1_XLARGE",
"BUILD_GENERAL1_2XLARGE",
"BUILD_LAMBDA_1GB",
"BUILD_LAMBDA_2GB",
"BUILD_LAMBDA_4GB",
"BUILD_LAMBDA_8GB",
"BUILD_LAMBDA_10GB",
"ATTRIBUTE_BASED_COMPUTE",
"CUSTOM_INSTANCE_TYPE",
]
"""
Information about the compute resources the docker server uses.
Available values include:
"""
securityGroupIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of one or more security groups IDs.
"""
status: "DockerServerStatus | None" = None
"""
A DockerServerStatus object to use for this docker server.
"""
[docs]class ProjectEnvironment(Boto3Model):
"""
Information about the build environment of the build project.
"""
type: Literal[
"WINDOWS_CONTAINER",
"LINUX_CONTAINER",
"LINUX_GPU_CONTAINER",
"ARM_CONTAINER",
"WINDOWS_SERVER_2019_CONTAINER",
"WINDOWS_SERVER_2022_CONTAINER",
"LINUX_LAMBDA_CONTAINER",
"ARM_LAMBDA_CONTAINER",
"LINUX_EC2",
"ARM_EC2",
"WINDOWS_EC2",
"MAC_ARM",
]
"""
The type of build environment to use for related builds.
"""
image: str
"""
The image tag or image digest that identifies the Docker image to use for this build
project.
Use the following formats:
"""
computeType: Literal[
"BUILD_GENERAL1_SMALL",
"BUILD_GENERAL1_MEDIUM",
"BUILD_GENERAL1_LARGE",
"BUILD_GENERAL1_XLARGE",
"BUILD_GENERAL1_2XLARGE",
"BUILD_LAMBDA_1GB",
"BUILD_LAMBDA_2GB",
"BUILD_LAMBDA_4GB",
"BUILD_LAMBDA_8GB",
"BUILD_LAMBDA_10GB",
"ATTRIBUTE_BASED_COMPUTE",
"CUSTOM_INSTANCE_TYPE",
]
"""
Information about the compute resources the build project uses.
Available values include:
"""
computeConfiguration: "ComputeConfiguration | None" = None
"""
The compute configuration of the build project.
This is only required if ``computeType`` is set to
``ATTRIBUTE_BASED_COMPUTE``.
"""
fleet: "ProjectFleet | None" = None
"""
A ProjectFleet object to use for this build project.
"""
environmentVariables: "builtins.list[EnvironmentVariable] | None" = Field(
default_factory=list
)
"""
A set of environment variables to make available to builds for this build project.
"""
privilegedMode: "bool | None" = None
"""
Enables running the Docker daemon inside a Docker container.
Set to true only if the build project is used to build
Docker images. Otherwise, a build that attempts to interact with the Docker daemon fails. The default setting is
``false``.
"""
certificate: "str | None" = None
"""
The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-
encoded certificate for the build project.
For more information, see
`certificate <https://docs.aws.amazon.com/codebuild/latest/userguide/create-project-
cli.html#cli.environment.certificate>`_ in the *CodeBuild User Guide*.
"""
registryCredential: "RegistryCredential | None" = None
"""
The credentials for access to a private registry.
"""
imagePullCredentialsType: "Literal['CODEBUILD', 'SERVICE_ROLE'] | None" = None
"""
The type of credentials CodeBuild uses to pull images in your build.
There are two valid values:
"""
dockerServer: "DockerServer | None" = None
"""
A DockerServer object to use for this build project.
"""
[docs]class ScopeConfiguration(Boto3Model):
"""
Contains configuration information about the scope for a webhook.
"""
name: str
"""
The name of either the group, enterprise, or organization that will send webhook
events to CodeBuild, depending on the type of webhook.
"""
domain: "str | None" = None
"""
The domain of the GitHub Enterprise organization or the GitLab Self Managed group.
Note that this parameter is only required if your project's source type is
GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED.
"""
scope: Literal["GITHUB_ORGANIZATION", "GITHUB_GLOBAL", "GITLAB_GROUP"]
"""
The type of scope for a GitHub or GitLab webhook.
The scope default is GITHUB_ORGANIZATION.
"""
[docs]class PullRequestBuildPolicy(Boto3Model):
"""
A PullRequestBuildPolicy object that defines comment-based approval requirements for
triggering builds on pull requests.
This policy helps control when automated builds are executed based on contributor
permissions and approval workflows.
"""
requiresCommentApproval: Literal[
"DISABLED", "ALL_PULL_REQUESTS", "FORK_PULL_REQUESTS"
]
"""
Specifies when comment-based approval is required before triggering a build on pull
requests.
This setting determines whether builds run automatically or require explicit
approval through comments.
"""
approverRoles: "builtins.list[Literal['GITHUB_READ', 'GITHUB_TRIAGE', 'GITHUB_WRITE', 'GITHUB_MAINTAIN', 'GITHUB_ADMIN', 'GITLAB_GUEST', 'GITLAB_PLANNER', 'GITLAB_REPORTER', 'GITLAB_DEVELOPER', 'GITLAB_MAINTAINER', 'GITLAB_OWNER', 'BITBUCKET_READ', 'BITBUCKET_WRITE', 'BITBUCKET_ADMIN']] | None" = Field(
default_factory=list
)
"""
List of repository roles that have approval privileges for pull request builds when
comment approval is required.
Only
users with these roles can provide valid comment approvals. If a pull request contributor is one of these roles, their
pull request builds will trigger automatically. This field is only applicable when ``requiresCommentApproval`` is not
*DISABLED*.
"""
[docs]class Webhook(PrimaryBoto3Model):
"""
Information about a webhook that connects repository events to a build project in
CodeBuild.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = WebhookManager
filterGroups: "Any | None" = None
"""
An array of arrays of ``WebhookFilter`` objects used to determine which webhooks are
triggered.
At least one
``WebhookFilter`` in the array must specify ``EVENT`` as its ``type``.
"""
url: "str | None" = None
"""
The URL to the webhook.
"""
payloadUrl: "str | None" = None
"""
The CodeBuild endpoint where webhook events are sent.
"""
secret: "str | None" = None
"""
The secret token of the associated repository.
"""
branchFilter: "str | None" = None
"""
A regular expression used to determine which repository branches are built when a
webhook is triggered.
If the name of a
branch matches the regular expression, then it is built. If ``branchFilter`` is empty, then all branches are built.
"""
buildType: "Literal['BUILD', 'BUILD_BATCH', 'RUNNER_BUILDKITE_BUILD'] | None" = None
"""
Specifies the type of build this webhook will trigger.
"""
manualCreation: "bool | None" = None
"""
If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead
returns ``payloadUrl`` and ``secret`` values for the webhook.
The ``payloadUrl`` and ``secret`` values in the output can be used to manually create
a webhook within GitHub.
"""
lastModifiedSecret: "datetime | None" = None
"""
A timestamp that indicates the last time a repository's secret token was modified.
"""
scopeConfiguration: "ScopeConfiguration | None" = None
"""
The scope configuration for global or organization webhooks.
"""
status: "Literal['CREATING', 'CREATE_FAILED', 'ACTIVE', 'DELETING'] | None" = None
"""
The status of the webhook.
Valid values include:
"""
statusMessage: "str | None" = None
"""
A message associated with the status of a webhook.
"""
pullRequestBuildPolicy: "PullRequestBuildPolicy | None" = None
"""
A PullRequestBuildPolicy object that defines comment-based approval requirements for
triggering builds on pull requests.
This policy helps control when automated builds are executed based on contributor
permissions and approval workflows.
"""
projectName: str | None = None
"""
The owning project name when returned from create/update APIs.
"""
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`url` attribute.
"""
return hash(self.url)
@property
def pk(self) -> OrderedDict[str, Any]:
"""
Composite identity for webhook operations scoped to a project.
"""
return OrderedDict(
{
"projectName": self.projectName,
"url": self.url,
}
)
[docs]class VpcConfig(Boto3Model):
"""
Information about the VPC configuration that CodeBuild accesses.
"""
vpcId: "str | None" = None
"""
The ID of the Amazon VPC.
"""
subnets: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of one or more subnet IDs in your Amazon VPC.
"""
securityGroupIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of one or more security groups IDs in your Amazon VPC.
"""
[docs]class ProjectBadge(Boto3Model):
"""
Information about the build badge for the build project.
"""
badgeEnabled: "bool | None" = None
"""
Set this to true to generate a publicly accessible URL for your project's build
badge.
"""
badgeRequestUrl: "str | None" = None
"""
The publicly-accessible URL through which you can access the build badge for your
project.
"""
[docs]class CloudWatchLogsConfig(Boto3Model):
"""
Information about CloudWatch Logs for a build project.
"""
status: Literal["ENABLED", "DISABLED"]
"""
The current status of the logs in CloudWatch Logs for a build project.
Valid values are:
"""
groupName: "str | None" = None
"""
The group name of the logs in CloudWatch Logs.
For more information, see
`Working with Log Groups and Log Streams <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html>`_.
"""
streamName: "str | None" = None
"""
The prefix of the stream name of the CloudWatch Logs.
For more information, see
`Working with Log Groups and Log Streams <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html>`_.
"""
[docs]class S3LogsConfig(Boto3Model):
"""
Information about S3 logs for a build project.
"""
status: Literal["ENABLED", "DISABLED"]
"""
The current status of the S3 build logs.
Valid values are:
"""
location: "str | None" = None
"""
The ARN of an S3 bucket and the path prefix for S3 logs.
If your Amazon S3 bucket name is ``my-bucket``, and your path
prefix is ``build-log``, then acceptable formats are ``my-bucket/build-log`` or ``arn:aws:s3:::my-bucket/build-log``.
"""
encryptionDisabled: "bool | None" = None
"""
Set to true if you do not want your S3 build log output encrypted.
By default S3 build logs are encrypted.
"""
bucketOwnerAccess: "Literal['NONE', 'READ_ONLY', 'FULL'] | None" = None
"""
Specifies the bucket owner's access for objects that another account uploads to
their Amazon S3 bucket.
By default, only the account that uploads the objects to the bucket has access to
these objects. This property allows you to give the bucket owner access to these
objects.
"""
[docs]class LogsConfig(Boto3Model):
"""
Information about logs for a build project.
These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
"""
cloudWatchLogs: "CloudWatchLogsConfig | None" = None
"""
Information about CloudWatch Logs for a build project.
CloudWatch Logs are enabled by default.
"""
s3Logs: "S3LogsConfig | None" = None
"""
Information about logs built to an S3 bucket for a build project.
S3 logs are not enabled by default.
"""
[docs]class ProjectFileSystemLocation(Boto3Model):
"""
Information about a file system created by Amazon Elastic File System (EFS).
For more information, see
`What Is Amazon Elastic File System? <https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html>`_
"""
type: "Literal['EFS'] | None" = None
"""
The type of the file system.
The one supported type is ``EFS``.
"""
location: "str | None" = None
"""
A string that specifies the location of the file system created by Amazon EFS.
Its format is ``efs-dns-name:/directory-
path``. You can find the DNS name of file system when you view it in the Amazon EFS console. The directory path is a
path to a directory in the file system that CodeBuild mounts. For example, if the DNS name of a file system is ``fs-
abcd1234.efs.us-west-2.amazonaws.com``, and its mount directory is ``my-efs-mount-directory``, then the ``location`` is
``fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory``.
"""
mountPoint: "str | None" = None
"""
The location in the container where you mount the file system.
"""
identifier: "str | None" = None
"""
The name used to access a file system created by Amazon EFS.
CodeBuild creates an environment variable by appending the
``identifier`` in all capital letters to ``CODEBUILD_``. For example, if you specify ``my_efs`` for ``identifier``, a
new environment variable is create named ``CODEBUILD_MY_EFS``.
"""
mountOptions: "str | None" = None
"""
The mount options for a file system created by Amazon EFS.
The default mount options used by CodeBuild are
``nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2``. For more information, see `Recommended NFS Mount
Options <https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html>`_.
"""
[docs]class BatchRestrictions(Boto3Model):
"""
Specifies restrictions for the batch build.
"""
maximumBuildsAllowed: "int | None" = None
"""
Specifies the maximum number of builds allowed.
"""
computeTypesAllowed: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that specify the compute types that are allowed for the batch
build.
See
`Build environment compute types <https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html>`_
in the *CodeBuild User
Guide* for these values.
"""
fleetsAllowed: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that specify the fleets that are allowed for the batch build.
See
`Run builds on reserved capacity fleets <https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html>`_
in the *CodeBuild User Guide* for more
information.
"""
[docs]class ProjectBuildBatchConfig(Boto3Model):
"""
Contains configuration information about a batch build project.
"""
serviceRole: "str | None" = None
"""
Specifies the service role ARN for the batch build project.
"""
combineArtifacts: "bool | None" = None
"""
Specifies if the build artifacts for the batch build should be combined into a
single artifact location.
"""
restrictions: "BatchRestrictions | None" = None
"""
A ``BatchRestrictions`` object that specifies the restrictions for the batch build.
"""
timeoutInMins: "int | None" = None
"""
Specifies the maximum amount of time, in minutes, that the batch build must be
completed in.
"""
batchReportMode: "Literal['REPORT_INDIVIDUAL_BUILDS', 'REPORT_AGGREGATED_BATCH'] | None" = None
"""
Specifies how build status reports are sent to the source provider for the batch
build.
This property is only used when the source provider for your project is Bitbucket,
GitHub, or GitHub Enterprise, and your project is configured to report build
statuses to the source provider.
"""
[docs]class Project(TagsDictMixin, PrimaryBoto3Model):
"""
Information about a build project.
"""
tag_class: ClassVar[type[Boto3Model]] = Tag
manager_class: ClassVar[type[Boto3ModelManager]] = ProjectManager
projectName: str = Field(default=None, alias="name")
"""
The name of the build project.
"""
Tags: "builtins.list[Tag]" = Field(default_factory=list, alias="tags")
"""
A list of tag key and value pairs associated with this build project.
"""
Arn: str = Field(default=None, alias="arn")
"""
The Amazon Resource Name (ARN) of the build project.
"""
description: "str | None" = None
"""
A description that makes the build project easy to identify.
"""
source: "ProjectSource | None" = None
"""
Information about the build input source code for this build project.
"""
secondarySources: "builtins.list[ProjectSource] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSource`` objects.
"""
sourceVersion: "str | None" = None
"""
A version of the build input to be built for this project.
If not specified, the latest version is used. If specified,
it must be one of:
"""
secondarySourceVersions: "builtins.list[ProjectSourceVersion] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSourceVersion`` objects.
If ``secondarySourceVersions`` is specified at the build level, then they
take over these ``secondarySourceVersions`` (at the project level).
"""
artifacts: "ProjectArtifacts | None" = None
"""
Information about the build output artifacts for the build project.
"""
secondaryArtifacts: "builtins.list[ProjectArtifacts] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectArtifacts`` objects.
"""
cache: "ProjectCache | None" = None
"""
Information about the cache for the build project.
"""
environment: "ProjectEnvironment | None" = None
"""
Information about the build environment for this build project.
"""
serviceRole: "str | None" = None
"""
The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web
Services services on behalf of the Amazon Web Services account.
"""
timeoutInMinutes: "int | None" = None
"""
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing
out any related build that did not get marked as completed.
The default is 60 minutes.
"""
queuedTimeoutInMinutes: "int | None" = None
"""
The number of minutes a build is allowed to be queued before it times out.
"""
encryptionKey: "str | None" = None
"""
The Key Management Service customer master key (CMK) to be used for encrypting the
build output artifacts.
"""
created: datetime = Field(default=None, frozen=True)
"""
When the build project was created, expressed in Unix time format.
"""
lastModified: datetime = Field(default=None, frozen=True)
"""
When the build project's settings were last modified, expressed in Unix time format.
"""
webhook: Webhook = Field(default=None, frozen=True)
"""
Information about a webhook that connects repository events to a build project in
CodeBuild.
"""
vpcConfig: "VpcConfig | None" = None
"""
Information about the VPC configuration that CodeBuild accesses.
"""
badge: ProjectBadge = Field(default=None, frozen=True)
"""
Information about the build badge for the build project.
"""
logsConfig: "LogsConfig | None" = None
"""
Information about logs for the build project.
A project can create logs in CloudWatch Logs, an S3 bucket, or both.
"""
fileSystemLocations: "builtins.list[ProjectFileSystemLocation] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectFileSystemLocation`` objects for a CodeBuild build project.
A ``ProjectFileSystemLocation`` object
specifies the ``identifier``, ``location``, ``mountOptions``, ``mountPoint``, and ``type`` of a file system created
using Amazon Elastic File System.
"""
buildBatchConfig: "ProjectBuildBatchConfig | None" = None
"""
A ProjectBuildBatchConfig object that defines the batch build options for the
project.
"""
concurrentBuildLimit: "int | None" = None
"""
The maximum number of concurrent builds that are allowed for this project.
"""
projectVisibility: Literal["PUBLIC_READ", "PRIVATE"] = Field(
default=None, frozen=True
)
"""
Specifies the visibility of the project's builds.
Possible values are:
"""
publicProjectAlias: str = Field(default=None, frozen=True)
"""
Contains the project identifier used with the public build APIs.
"""
resourceAccessRole: str = Field(default=None, frozen=True)
"""
The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and
Amazon S3 artifacts for the project's builds.
"""
autoRetryLimit: "int | None" = None
"""
The maximum number of additional automatic retries after a failed build.
For example, if the auto-retry limit is set to
2, CodeBuild will call the ``RetryBuild`` API to automatically retry your build for up to 2 additional times.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`projectName` attribute.
Returns:
The primary key of the model instance.
"""
return self.projectName
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`projectName` attribute.
"""
return hash(self.projectName)
[docs]class PhaseContext(Boto3Model):
"""
Additional information about a build phase that has an error.
You can use this information for troubleshooting.
"""
statusCode: "str | None" = None
"""
The status code for the context of the build phase.
"""
message: "str | None" = None
"""
An explanation of the build phase's context.
This might include a command ID and an exit code.
"""
[docs]class BuildPhase(Boto3Model):
"""
Information about a stage for a build.
"""
phaseType: "Literal['SUBMITTED', 'QUEUED', 'PROVISIONING', 'DOWNLOAD_SOURCE', 'INSTALL', 'PRE_BUILD', 'BUILD', 'POST_BUILD', 'UPLOAD_ARTIFACTS', 'FINALIZING', 'COMPLETED'] | None" = None
"""
The name of the build phase.
Valid values include:
"""
phaseStatus: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The current status of the build phase.
Valid values include:
"""
startTime: "datetime | None" = None
"""
When the build phase started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the build phase ended, expressed in Unix time format.
"""
durationInSeconds: "int | None" = None
"""
How long, in seconds, between the starting and ending times of the build's phase.
"""
contexts: "builtins.list[PhaseContext] | None" = Field(default_factory=list)
"""
Additional information about a build phase, especially to help troubleshoot a failed
build.
"""
[docs]class BuildArtifacts(Boto3Model):
"""
Information about build output artifacts.
"""
location: "str | None" = None
"""
Information about the location of the build artifacts.
"""
sha256sum: "str | None" = None
"""
The SHA-256 hash of the build artifact.
"""
md5sum: "str | None" = None
"""
The MD5 hash of the build artifact.
"""
overrideArtifactName: "bool | None" = None
"""
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: "bool | None" = None
"""
Information that tells you if encryption for build artifacts is disabled.
"""
artifactIdentifier: "str | None" = None
"""
An identifier for this artifact definition.
"""
bucketOwnerAccess: "Literal['NONE', 'READ_ONLY', 'FULL'] | None" = None
"""
Specifies the bucket owner's access for objects that another account uploads to
their Amazon S3 bucket.
By default, only the account that uploads the objects to the bucket has access to
these objects. This property allows you to give the bucket owner access to these
objects.
"""
[docs]class LogsLocation(Boto3Model):
"""
Information about build logs in CloudWatch Logs.
"""
groupName: "str | None" = None
"""
The name of the CloudWatch Logs group for the build logs.
"""
streamName: "str | None" = None
"""
The name of the CloudWatch Logs stream for the build logs.
"""
deepLink: "str | None" = None
"""
The URL to an individual build log in CloudWatch Logs.
The log stream is created during the PROVISIONING phase of a
build and the ``deeplink`` will not be valid until it is created.
"""
s3DeepLink: "str | None" = None
"""
The URL to a build log in an S3 bucket.
"""
cloudWatchLogsArn: "str | None" = None
"""
The ARN of the CloudWatch Logs stream for a build execution.
Its format is
``arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}``. The CloudWatch
Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid until it is created. For
more information, see `Resources Defined by CloudWatch
Logs <https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatchlogs.html#amazoncloudwatchlogs-resources-
for-iam-policies>`_.
"""
s3LogsArn: "str | None" = None
"""
The ARN of S3 logs for a build project.
Its format is ``arn:${Partition}:s3:::${BucketName}/${ObjectName}``. For more
information, see `Resources Defined by Amazon
S3 <https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html#amazons3-resources-for-iam-policies>`_.
"""
cloudWatchLogs: "CloudWatchLogsConfig | None" = None
"""
Information about CloudWatch Logs for a build project.
"""
s3Logs: "S3LogsConfig | None" = None
"""
Information about S3 logs for a build project.
"""
[docs]class ExportedEnvironmentVariable(Boto3Model):
"""
Contains information about an exported environment variable.
Exported environment variables are used in conjunction with CodePipeline to export environment variables from the
current build stage to subsequent stages in the pipeline. For more information, see `Working with
variables <https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html>`_ in the *CodePipeline User
Guide*.
During a build, the value of a variable is available starting with the ``install`` phase. It can be updated between the
start of the ``install`` phase and the end of the ``post_build`` phase. After the ``post_build`` phase ends, the value
of exported variables cannot change.
"""
name: "str | None" = None
"""
The name of the exported environment variable.
"""
value: "str | None" = None
"""
The value assigned to the exported environment variable.
"""
[docs]class DebugSession(Boto3Model):
"""
Contains information about the debug session for a build.
For more information, see
`Viewing a running build in Session Manager <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html>`_.
"""
sessionEnabled: "bool | None" = None
"""
Specifies if session debugging is enabled for this build.
"""
sessionTarget: "str | None" = None
"""
Contains the identifier of the Session Manager session used for the build.
To work with the paused build, you open this session to examine, control, and resume
the build.
"""
[docs]class AutoRetryConfig(Boto3Model):
"""
Information about the auto-retry configuration for the build.
"""
autoRetryLimit: "int | None" = None
"""
The maximum number of additional automatic retries after a failed build.
For example, if the auto-retry limit is set to
2, CodeBuild will call the ``RetryBuild`` API to automatically retry your build for up to 2 additional times.
"""
autoRetryNumber: "int | None" = None
"""
The number of times that the build has been retried.
The initial build will have an auto-retry number of 0.
"""
nextAutoRetry: "str | None" = None
"""
The build ARN of the auto-retried build triggered by the current build.
The next auto-retry will be ``null`` for builds
that don't trigger an auto-retry.
"""
previousAutoRetry: "str | None" = None
"""
The build ARN of the build that triggered the current auto-retry build.
The previous auto-retry will be ``null`` for the
initial build.
"""
[docs]class Build(ReadonlyPrimaryBoto3Model):
"""
Information about a build.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = BuildManager
Arn: str = Field(default=None, alias="arn")
"""
The Amazon Resource Name (ARN) of the build.
"""
id: "str | None" = None
"""
The unique ID for the build.
"""
buildNumber: "int | None" = None
"""
The number of the build.
For each project, the ``buildNumber`` of its first build is ``1``. The ``buildNumber`` of each
subsequent build is incremented by ``1``. If a build is deleted, the ``buildNumber`` of other builds does not change.
"""
startTime: "datetime | None" = None
"""
When the build process started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the build process ended, expressed in Unix time format.
"""
currentPhase: "str | None" = None
"""
The current build phase.
"""
buildStatus: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The current status of the build.
Valid values include:
"""
sourceVersion: "str | None" = None
"""
Any version identifier for the version of the source code to be built.
If ``sourceVersion`` is specified at the project
level, then this ``sourceVersion`` (at the build level) takes precedence.
"""
resolvedSourceVersion: "str | None" = None
"""
An identifier for the version of this build's source code.
"""
projectName: "str | None" = None
"""
The name of the CodeBuild project.
"""
phases: "builtins.list[BuildPhase] | None" = Field(default_factory=list)
"""
Information about all previous build phases that are complete and information about
any current build phase that is not yet complete.
"""
source: "ProjectSource | None" = None
"""
Information about the source code to be built.
"""
secondarySources: "builtins.list[ProjectSource] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSource`` objects.
"""
secondarySourceVersions: "builtins.list[ProjectSourceVersion] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSourceVersion`` objects.
Each ``ProjectSourceVersion`` must be one of:
"""
artifacts: "BuildArtifacts | None" = None
"""
Information about the output artifacts for the build.
"""
secondaryArtifacts: "builtins.list[BuildArtifacts] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectArtifacts`` objects.
"""
cache: "ProjectCache | None" = None
"""
Information about the cache for the build.
"""
environment: "ProjectEnvironment | None" = None
"""
Information about the build environment for this build.
"""
serviceRole: "str | None" = None
"""
The name of a service role used for this build.
"""
logs: "LogsLocation | None" = None
"""
Information about the build's logs in CloudWatch Logs.
"""
timeoutInMinutes: "int | None" = None
"""
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing
out this build if it does not get marked as completed.
"""
queuedTimeoutInMinutes: "int | None" = None
"""
The number of minutes a build is allowed to be queued before it times out.
"""
buildComplete: "bool | None" = None
"""
Whether the build is complete.
True if complete; otherwise, false.
"""
initiator: "str | None" = None
"""
The entity that started the build.
Valid values include:
"""
vpcConfig: "VpcConfig | None" = None
"""
If your 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.
"""
networkInterface: "NetworkInterface | None" = None
"""
Describes a network interface.
"""
encryptionKey: "str | None" = None
"""
The Key Management Service customer master key (CMK) to be used for encrypting the
build output artifacts.
"""
exportedEnvironmentVariables: "builtins.list[ExportedEnvironmentVariable] | None" = Field(
default_factory=list
)
"""
A list of exported environment variables for this build.
"""
reportArns: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of the ARNs associated with this build's reports.
"""
fileSystemLocations: "builtins.list[ProjectFileSystemLocation] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectFileSystemLocation`` objects for a CodeBuild build project.
A ``ProjectFileSystemLocation`` object
specifies the ``identifier``, ``location``, ``mountOptions``, ``mountPoint``, and ``type`` of a file system created
using Amazon Elastic File System.
"""
debugSession: "DebugSession | None" = None
"""
Contains information about the debug session for this build.
"""
buildBatchArn: "str | None" = None
"""
The ARN of the batch build that this build is a member of, if applicable.
"""
autoRetryConfig: "AutoRetryConfig | None" = None
"""
Information about the auto-retry configuration for the build.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`id`
attribute.
Returns:
The primary key of the model instance.
"""
return self.id
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
@property
def name(self) -> str | None:
"""
Return the name of the model. This is the value of the :py:attr:`projectName`
attribute.
Returns:
The name of the model instance.
"""
return self.projectName
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
[docs]class BuildBatchPhase(Boto3Model):
"""
Contains information about a stage for a batch build.
"""
phaseType: "Literal['SUBMITTED', 'DOWNLOAD_BATCHSPEC', 'IN_PROGRESS', 'COMBINE_ARTIFACTS', 'SUCCEEDED', 'FAILED', 'STOPPED'] | None" = None
"""
The name of the batch build phase.
Valid values include:
"""
phaseStatus: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The current status of the batch build phase.
Valid values include:
"""
startTime: "datetime | None" = None
"""
When the batch build phase started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the batch build phase ended, expressed in Unix time format.
"""
durationInSeconds: "int | None" = None
"""
How long, in seconds, between the starting and ending times of the batch build's
phase.
"""
contexts: "builtins.list[PhaseContext] | None" = Field(default_factory=list)
"""
Additional information about the batch build phase.
Especially to help troubleshoot a failed batch build.
"""
[docs]class ResolvedArtifact(Boto3Model):
"""
Represents a resolved build artifact.
A resolved artifact is an artifact that is built and deployed to the destination,
such as Amazon S3.
"""
type: "Literal['CODEPIPELINE', 'S3', 'NO_ARTIFACTS'] | None" = None
"""
Specifies the type of artifact.
"""
location: "str | None" = None
"""
The location of the artifact.
"""
identifier: "str | None" = None
"""
The identifier of the artifact.
"""
[docs]class BuildSummary(Boto3Model):
"""
Contains summary information about a batch build group.
"""
arn: "str | None" = None
"""
The batch build ARN.
"""
requestedOn: "datetime | None" = None
"""
When the build was started, expressed in Unix time format.
"""
buildStatus: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The status of the build group.
"""
primaryArtifact: "ResolvedArtifact | None" = None
"""
A ``ResolvedArtifact`` object that represents the primary build artifacts for the
build group.
"""
secondaryArtifacts: "builtins.list[ResolvedArtifact] | None" = Field(
default_factory=list
)
"""
An array of ``ResolvedArtifact`` objects that represents the secondary build
artifacts for the build group.
"""
[docs]class BuildGroup(Boto3Model):
"""
Contains information about a batch build build group.
Build groups are used to combine builds that can run in parallel, while still being
able to set dependencies on other build groups.
"""
identifier: "str | None" = None
"""
Contains the identifier of the build group.
"""
dependsOn: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that contain the identifiers of the build groups that this build
group depends on.
"""
ignoreFailure: "bool | None" = None
"""
Specifies if failures in this build group can be ignored.
"""
currentBuildSummary: "BuildSummary | None" = None
"""
A ``BuildSummary`` object that contains a summary of the current build group.
"""
priorBuildSummaryList: "builtins.list[BuildSummary] | None" = Field(
default_factory=list
)
"""
An array of ``BuildSummary`` objects that contain summaries of previous build
groups.
"""
[docs]class BuildBatch(PrimaryBoto3Model):
"""
Contains information about a batch build.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = BuildBatchManager
Arn: str = Field(default=None, alias="arn")
"""
The ARN of the batch build.
"""
id: str = Field(default=None, frozen=True)
"""
The identifier of the batch build.
"""
startTime: datetime = Field(default=None, frozen=True)
"""
The date and time that the batch build started.
"""
endTime: datetime = Field(default=None, frozen=True)
"""
The date and time that the batch build ended.
"""
currentPhase: str = Field(default=None, frozen=True)
"""
The current phase of the batch build.
"""
buildBatchStatus: Literal[
"SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
] = Field(default=None, frozen=True)
"""
The status of the batch build.
"""
sourceVersion: "str | None" = None
"""
The identifier of the version of the source code to be built.
"""
resolvedSourceVersion: str = Field(default=None, frozen=True)
"""
The identifier of the resolved version of this batch build's source code.
"""
projectName: "str | None" = None
"""
The name of the batch build project.
"""
phases: "builtins.list[BuildBatchPhase]" = Field(default_factory=list, frozen=True)
"""
An array of ``BuildBatchPhase`` objects the specify the phases of the batch build.
"""
source: ProjectSource = Field(default=None, frozen=True)
"""
Information about the build input source code for the build project.
"""
secondarySources: "builtins.list[ProjectSource]" = Field(
default_factory=list, frozen=True
)
"""
An array of ``ProjectSource`` objects that define the sources for the batch build.
"""
secondarySourceVersions: "builtins.list[ProjectSourceVersion]" = Field(
default_factory=list, frozen=True
)
"""
An array of ``ProjectSourceVersion`` objects.
Each ``ProjectSourceVersion`` must be one of:
"""
artifacts: BuildArtifacts = Field(default=None, frozen=True)
"""
A ``BuildArtifacts`` object the defines the build artifacts for this batch build.
"""
secondaryArtifacts: "builtins.list[BuildArtifacts]" = Field(
default_factory=list, frozen=True
)
"""
An array of ``BuildArtifacts`` objects the define the build artifacts for this batch
build.
"""
cache: ProjectCache = Field(default=None, frozen=True)
"""
Information about the cache for the build project.
"""
environment: ProjectEnvironment = Field(default=None, frozen=True)
"""
Information about the build environment of the build project.
"""
serviceRole: str = Field(default=None, frozen=True)
"""
The name of a service role used for builds in the batch.
"""
logConfig: LogsConfig = Field(default=None, frozen=True)
"""
Information about logs for a build project.
These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
"""
buildTimeoutInMinutes: int = Field(default=None, frozen=True)
"""
Specifies the maximum amount of time, in minutes, that the build in a batch must be
completed in.
"""
queuedTimeoutInMinutes: int = Field(default=None, frozen=True)
"""
Specifies the amount of time, in minutes, that the batch build is allowed to be
queued before it times out.
"""
complete: bool = Field(default=None, frozen=True)
"""
Indicates if the batch build is complete.
"""
initiator: str = Field(default=None, frozen=True)
"""
The entity that started the batch build.
Valid values include:
"""
vpcConfig: VpcConfig = Field(default=None, frozen=True)
"""
Information about the VPC configuration that CodeBuild accesses.
"""
encryptionKey: str = Field(default=None, frozen=True)
"""
The Key Management Service customer master key (CMK) to be used for encrypting the
batch build output artifacts.
"""
buildBatchNumber: int = Field(default=None, frozen=True)
"""
The number of the batch build.
For each project, the ``buildBatchNumber`` of its first batch build is ``1``. The
``buildBatchNumber`` of each subsequent batch build is incremented by ``1``. If a batch build is deleted, the
``buildBatchNumber`` of other batch builds does not change.
"""
fileSystemLocations: "builtins.list[ProjectFileSystemLocation]" = Field(
default_factory=list, frozen=True
)
"""
An array of ``ProjectFileSystemLocation`` objects for the batch build project.
A ``ProjectFileSystemLocation`` object
specifies the ``identifier``, ``location``, ``mountOptions``, ``mountPoint``, and ``type`` of a file system created
using Amazon Elastic File System.
"""
buildBatchConfig: ProjectBuildBatchConfig = Field(default=None, frozen=True)
"""
Contains configuration information about a batch build project.
"""
buildGroups: "builtins.list[BuildGroup]" = Field(default_factory=list, frozen=True)
"""
An array of ``BuildGroup`` objects that define the build groups for the batch build.
"""
debugSessionEnabled: "bool | None" = None
"""
Specifies if session debugging is enabled for this batch build.
For more information, see
`Viewing a running build in Session Manager <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html>`_.
Batch session debugging
is not supported for matrix batch builds.
"""
reportArns: "builtins.list[str]" = Field(default_factory=list, frozen=True)
"""
An array that contains the ARNs of reports created by merging reports from builds
associated with this batch build.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`id`
attribute.
Returns:
The primary key of the model instance.
"""
return self.id
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
[docs]class FleetStatus(Boto3Model):
"""
The status of the compute fleet.
"""
statusCode: "Literal['CREATING', 'UPDATING', 'ROTATING', 'PENDING_DELETION', 'DELETING', 'CREATE_FAILED', 'UPDATE_ROLLBACK_FAILED', 'ACTIVE'] | None" = None
"""
The status code of the compute fleet.
Valid values include:
"""
context: "Literal['CREATE_FAILED', 'UPDATE_FAILED', 'ACTION_REQUIRED', 'PENDING_DELETION', 'INSUFFICIENT_CAPACITY'] | None" = None
"""
Additional information about a compute fleet.
Valid values include:
"""
message: "str | None" = None
"""
A message associated with the status of a compute fleet.
"""
[docs]class TargetTrackingScalingConfiguration(Boto3Model):
"""
Defines when a new instance is auto-scaled into the compute fleet.
"""
metricType: "Literal['FLEET_UTILIZATION_RATE'] | None" = None
"""
The metric type to determine auto-scaling.
"""
targetValue: "float | None" = None
"""
The value of ``metricType`` when to start scaling.
"""
[docs]class ScalingConfigurationOutput(Boto3Model):
"""
The scaling configuration output of a compute fleet.
"""
scalingType: "Literal['TARGET_TRACKING_SCALING'] | None" = None
"""
The scaling type for a compute fleet.
"""
targetTrackingScalingConfigs: "builtins.list[TargetTrackingScalingConfiguration] | None" = Field(
default_factory=list
)
"""
A list of ``TargetTrackingScalingConfiguration`` objects.
"""
maxCapacity: "int | None" = None
"""
The maximum number of instances in the fleet when auto-scaling.
"""
desiredCapacity: "int | None" = None
"""
The desired number of instances in the fleet when auto-scaling.
"""
[docs]class FleetProxyRule(Boto3Model):
"""
Information about the proxy rule for your reserved capacity instances.
"""
type: Literal["DOMAIN", "IP"]
"""
The type of proxy rule.
"""
effect: Literal["ALLOW", "DENY"]
"""
The behavior of the proxy rule.
"""
entities: "builtins.list[str]"
"""
The destination of the proxy rule.
"""
[docs]class ProxyConfiguration(Boto3Model):
"""
Information about the proxy configurations that apply network access control to your
reserved capacity instances.
"""
defaultBehavior: "Literal['ALLOW_ALL', 'DENY_ALL'] | None" = None
"""
The default behavior of outgoing traffic.
"""
orderedProxyRules: "builtins.list[FleetProxyRule] | None" = Field(
default_factory=list
)
"""
An array of ``FleetProxyRule`` objects that represent the specified destination
domains or IPs to allow or deny network access control to.
"""
[docs]class Fleet(TagsDictMixin, PrimaryBoto3Model):
"""
A set of dedicated instances for your build environment.
"""
tag_class: ClassVar[type[Boto3Model]] = Tag
manager_class: ClassVar[type[Boto3ModelManager]] = FleetManager
fleetName: str = Field(default=None, alias="name")
"""
The name of the compute fleet.
"""
Tags: "builtins.list[Tag]" = Field(default_factory=list, alias="tags")
"""
A list of tag key and value pairs associated with this compute fleet.
"""
Arn: str = Field(default=None, alias="arn")
"""
The ARN of the compute fleet.
"""
id: str = Field(default=None, frozen=True)
"""
The ID of the compute fleet.
"""
created: datetime = Field(default=None, frozen=True)
"""
The time at which the compute fleet was created.
"""
lastModified: datetime = Field(default=None, frozen=True)
"""
The time at which the compute fleet was last modified.
"""
status: FleetStatus = Field(default=None, frozen=True)
"""
The status of the compute fleet.
"""
baseCapacity: "int | None" = None
"""
The initial number of machines allocated to the compute fleet, which defines the
number of builds that can run in parallel.
"""
environmentType: "Literal['WINDOWS_CONTAINER', 'LINUX_CONTAINER', 'LINUX_GPU_CONTAINER', 'ARM_CONTAINER', 'WINDOWS_SERVER_2019_CONTAINER', 'WINDOWS_SERVER_2022_CONTAINER', 'LINUX_LAMBDA_CONTAINER', 'ARM_LAMBDA_CONTAINER', 'LINUX_EC2', 'ARM_EC2', 'WINDOWS_EC2', 'MAC_ARM'] | None" = None
"""
The environment type of the compute fleet.
"""
computeType: "Literal['BUILD_GENERAL1_SMALL', 'BUILD_GENERAL1_MEDIUM', 'BUILD_GENERAL1_LARGE', 'BUILD_GENERAL1_XLARGE', 'BUILD_GENERAL1_2XLARGE', 'BUILD_LAMBDA_1GB', 'BUILD_LAMBDA_2GB', 'BUILD_LAMBDA_4GB', 'BUILD_LAMBDA_8GB', 'BUILD_LAMBDA_10GB', 'ATTRIBUTE_BASED_COMPUTE', 'CUSTOM_INSTANCE_TYPE'] | None" = None
"""
Information about the compute resources the compute fleet uses.
Available values include:
"""
computeConfiguration: "ComputeConfiguration | None" = None
"""
The compute configuration of the compute fleet.
This is only required if ``computeType`` is set to
``ATTRIBUTE_BASED_COMPUTE`` or ``CUSTOM_INSTANCE_TYPE``.
"""
scalingConfiguration: "ScalingConfigurationOutput | None" = None
"""
The scaling configuration of the compute fleet.
"""
overflowBehavior: "Literal['QUEUE', 'ON_DEMAND'] | None" = None
"""
The compute fleet overflow behavior.
"""
vpcConfig: "VpcConfig | None" = None
"""
Information about the VPC configuration that CodeBuild accesses.
"""
proxyConfiguration: "ProxyConfiguration | None" = None
"""
The proxy configuration of the compute fleet.
"""
imageId: "str | None" = None
"""
The Amazon Machine Image (AMI) of the compute fleet.
"""
fleetServiceRole: "str | None" = None
"""
The service role associated with the compute fleet.
For more information, see `Allow a user to add a permission policy
for a fleet service role <https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-
based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html>`_ in the *CodeBuild
User Guide*.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`fleetName` attribute.
Returns:
The primary key of the model instance.
"""
return self.fleetName
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`fleetName` attribute.
"""
return hash(self.fleetName)
[docs]class S3ReportExportConfig(Boto3Model):
"""
Information about the S3 bucket where the raw data of a report are exported.
"""
bucket: "str | None" = None
"""
The name of the S3 bucket where the raw data of a report are exported.
"""
bucketOwner: "str | None" = None
"""
The Amazon Web Services account identifier of the owner of the Amazon S3 bucket.
This allows report data to be exported to an Amazon S3 bucket that is owned by an
account other than the account running the build.
"""
path: "str | None" = None
"""
The path to the exported report's raw data results.
"""
packaging: "Literal['ZIP', 'NONE'] | None" = None
"""
The type of build output artifact to create.
Valid values include:
"""
encryptionKey: "str | None" = None
"""
The encryption key for the report's encrypted raw data.
"""
encryptionDisabled: "bool | None" = None
"""
A boolean value that specifies if the results of a report are encrypted.
"""
[docs]class ReportExportConfig(Boto3Model):
"""
Information about the location where the run of a report is exported.
"""
exportConfigType: "Literal['S3', 'NO_EXPORT'] | None" = None
"""
The export configuration type.
Valid values are:
"""
s3Destination: "S3ReportExportConfig | None" = None
"""
A ``S3ReportExportConfig`` object that contains information about the S3 bucket
where the run of a report is exported.
"""
[docs]class ReportGroup(TagsDictMixin, PrimaryBoto3Model):
"""
A series of reports.
Each report contains information about the results from running a series of test
cases. You specify the test cases for a report group in the buildspec for a build
project using one or more paths to the test case files.
"""
tag_class: ClassVar[type[Boto3Model]] = Tag
manager_class: ClassVar[type[Boto3ModelManager]] = ReportGroupManager
reportGroupName: str = Field(default=None, alias="name")
"""
The name of the ``ReportGroup``.
"""
Tags: "builtins.list[Tag]" = Field(default_factory=list, alias="tags")
"""
A list of tag key and value pairs associated with this report group.
"""
Arn: str = Field(default=None, alias="arn")
"""
The ARN of the ``ReportGroup``.
"""
type: "Literal['TEST', 'CODE_COVERAGE'] | None" = None
"""
The type of the ``ReportGroup``.
This can be one of the following values:
"""
exportConfig: "ReportExportConfig | None" = None
"""
Information about the destination where the raw data of this ``ReportGroup`` is
exported.
"""
created: datetime = Field(default=None, frozen=True)
"""
The date and time this ``ReportGroup`` was created.
"""
lastModified: datetime = Field(default=None, frozen=True)
"""
The date and time this ``ReportGroup`` was last modified.
"""
status: Literal["ACTIVE", "DELETING"] = Field(default=None, frozen=True)
"""
The status of the report group.
This property is read-only.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The primary key of the model instance.
"""
return self.Arn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`Arn` attribute.
"""
return hash(self.Arn)
[docs]class TestReportSummary(Boto3Model):
"""
Information about a test report.
"""
total: int
"""
The number of test cases in this ``TestReportSummary``.
The total includes truncated test cases.
"""
statusCounts: dict[str, int]
"""
A map that contains the number of each type of status returned by the test results
in this ``TestReportSummary``.
"""
durationInNanoSeconds: int
"""
The number of nanoseconds it took to run all of the test cases in this report.
"""
[docs]class CodeCoverageReportSummary(Boto3Model):
"""
Contains a summary of a code coverage report.
Line coverage measures how many statements your tests cover. A statement is a single instruction, not including
comments, conditionals, etc.
Branch coverage determines if your tests cover every possible branch of a control structure, such as an ``if`` or
``case`` statement.
"""
lineCoveragePercentage: "float | None" = None
"""
The percentage of lines that are covered by your tests.
"""
linesCovered: "int | None" = None
"""
The number of lines that are covered by your tests.
"""
linesMissed: "int | None" = None
"""
The number of lines that are not covered by your tests.
"""
branchCoveragePercentage: "float | None" = None
"""
The percentage of branches that are covered by your tests.
"""
branchesCovered: "int | None" = None
"""
The number of conditional branches that are covered by your tests.
"""
branchesMissed: "int | None" = None
"""
The number of conditional branches that are not covered by your tests.
"""
[docs]class Report(ReadonlyPrimaryBoto3Model):
"""
Information about the results from running a series of test cases during the run of
a build project.
The test cases are specified in the buildspec for the build project using one or
more paths to the test case files. You can specify any type of tests you want, such
as unit tests, integration tests, and functional tests.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = ReportManager
reportName: str = Field(default=None, alias="name")
"""
The name of the report that was run.
"""
Arn: str = Field(default=None, alias="arn")
"""
The ARN of the report run.
"""
type: "Literal['TEST', 'CODE_COVERAGE'] | None" = None
"""
The type of the report that was run.
"""
reportGroupArn: "str | None" = None
"""
The ARN of the report group associated with this report.
"""
executionId: "str | None" = None
"""
The ARN of the build run that generated this report.
"""
status: "Literal['GENERATING', 'SUCCEEDED', 'FAILED', 'INCOMPLETE', 'DELETING'] | None" = None
"""
The status of this report.
"""
created: "datetime | None" = None
"""
The date and time this report run occurred.
"""
expired: "datetime | None" = None
"""
The date and time a report expires.
A report expires 30 days after it is created. An expired report is not available to
view in CodeBuild.
"""
exportConfig: "ReportExportConfig | None" = None
"""
Information about where the raw data used to generate this report was exported.
"""
truncated: "bool | None" = None
"""
A boolean that specifies if this report run is truncated.
The list of test cases is truncated after the maximum number of test cases is
reached.
"""
testSummary: "TestReportSummary | None" = None
"""
A ``TestReportSummary`` object that contains information about this test report.
"""
codeCoverageSummary: "CodeCoverageReportSummary | None" = None
"""
A ``CodeCoverageReportSummary`` object that contains a code coverage summary for
this report.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The primary key of the model instance.
"""
return self.Arn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`Arn` attribute.
"""
return hash(self.Arn)
[docs]class SourceCredentials(PrimaryBoto3Model):
"""
Information about the credentials for a GitHub, GitHub Enterprise, GitLab, GitLab
Self Managed, or Bitbucket repository.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = SourceCredentialsManager
Arn: str = Field(default=None, alias="arn")
"""
The Amazon Resource Name (ARN) of the token.
"""
serverType: "Literal['GITHUB', 'BITBUCKET', 'GITHUB_ENTERPRISE', 'GITLAB', 'GITLAB_SELF_MANAGED'] | None" = None
"""
The type of source provider.
The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or
BITBUCKET.
"""
authType: "Literal['OAUTH', 'BASIC_AUTH', 'PERSONAL_ACCESS_TOKEN', 'CODECONNECTIONS', 'SECRETS_MANAGER'] | None" = None
"""
The type of authentication used by the credentials.
Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or
SECRETS_MANAGER.
"""
resource: "str | None" = None
"""
The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The primary key of the model instance.
"""
return self.Arn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`Arn` attribute.
"""
return hash(self.Arn)
[docs]class SandboxSessionPhase(Boto3Model):
"""
Contains information about the sandbox phase.
"""
phaseType: "str | None" = None
"""
The name of the sandbox phase.
"""
phaseStatus: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The current status of the sandbox phase.
Valid values include:
"""
startTime: "datetime | None" = None
"""
When the sandbox phase started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the sandbox phase ended, expressed in Unix time format.
"""
durationInSeconds: "int | None" = None
"""
How long, in seconds, between the starting and ending times of the sandbox's phase.
"""
contexts: "builtins.list[PhaseContext] | None" = Field(default_factory=list)
"""
An array of ``PhaseContext`` objects.
"""
[docs]class SandboxSession(Boto3Model):
"""
Contains information about the sandbox session.
"""
id: "str | None" = None
"""
The ID of the sandbox session.
"""
status: "str | None" = None
"""
The status of the sandbox session.
"""
startTime: "datetime | None" = None
"""
When the sandbox session started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the sandbox session ended, expressed in Unix time format.
"""
currentPhase: "str | None" = None
"""
The current phase for the sandbox.
"""
phases: "builtins.list[SandboxSessionPhase] | None" = Field(default_factory=list)
"""
An array of ``SandboxSessionPhase`` objects.
"""
resolvedSourceVersion: "str | None" = None
"""
An identifier for the version of this sandbox's source code.
"""
logs: "LogsLocation | None" = None
"""
Information about build logs in CloudWatch Logs.
"""
networkInterface: "NetworkInterface | None" = None
"""
Describes a network interface.
"""
[docs]class Sandbox(PrimaryBoto3Model):
"""
Contains sandbox information.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = SandboxManager
Arn: str = Field(default=None, alias="arn")
"""
The ARN of the sandbox.
"""
id: "str | None" = None
"""
The ID of the sandbox.
"""
projectName: "str | None" = None
"""
The CodeBuild project name.
"""
requestTime: "datetime | None" = None
"""
When the sandbox process was initially requested, expressed in Unix time format.
"""
startTime: "datetime | None" = None
"""
When the sandbox process started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the sandbox process ended, expressed in Unix time format.
"""
status: "str | None" = None
"""
The status of the sandbox.
"""
source: "ProjectSource | None" = None
"""
Information about the build input source code for the build project.
"""
sourceVersion: "str | None" = None
"""
Any version identifier for the version of the sandbox to be built.
"""
secondarySources: "builtins.list[ProjectSource] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSource`` objects.
"""
secondarySourceVersions: "builtins.list[ProjectSourceVersion] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectSourceVersion`` objects.
"""
environment: "ProjectEnvironment | None" = None
"""
Information about the build environment of the build project.
"""
fileSystemLocations: "builtins.list[ProjectFileSystemLocation] | None" = Field(
default_factory=list
)
"""
An array of ``ProjectFileSystemLocation`` objects for a CodeBuild build project.
A ``ProjectFileSystemLocation`` object
specifies the ``identifier``, ``location``, ``mountOptions``, ``mountPoint``, and ``type`` of a file system created
using Amazon Elastic File System.
"""
timeoutInMinutes: "int | None" = None
"""
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing
out this sandbox if it does not get marked as completed.
"""
queuedTimeoutInMinutes: "int | None" = None
"""
The number of minutes a sandbox is allowed to be queued before it times out.
"""
vpcConfig: "VpcConfig | None" = None
"""
Information about the VPC configuration that CodeBuild accesses.
"""
logConfig: "LogsConfig | None" = None
"""
Information about logs for a build project.
These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
"""
encryptionKey: "str | None" = None
"""
The Key Management Service customer master key (CMK) to be used for encrypting the
sandbox output artifacts.
"""
serviceRole: "str | None" = None
"""
The name of a service role used for this sandbox.
"""
currentSession: "SandboxSession | None" = None
"""
The current session for the sandbox.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`id`
attribute.
Returns:
The primary key of the model instance.
"""
return self.id
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`Arn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.Arn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
[docs]class CommandExecution(ReadonlyPrimaryBoto3Model):
"""
Contains command execution information.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = CommandExecutionManager
id: "str | None" = None
"""
The ID of the command execution.
"""
sandboxId: "str | None" = None
"""
A ``sandboxId``.
"""
submitTime: "datetime | None" = None
"""
When the command execution process was initially submitted, expressed in Unix time
format.
"""
startTime: "datetime | None" = None
"""
When the command execution process started, expressed in Unix time format.
"""
endTime: "datetime | None" = None
"""
When the command execution process ended, expressed in Unix time format.
"""
status: "str | None" = None
"""
The status of the command execution.
"""
command: "str | None" = None
"""
The command that needs to be executed.
"""
type: "Literal['SHELL'] | None" = None
"""
The command type.
"""
exitCode: "str | None" = None
"""
The exit code to return upon completion.
"""
standardOutputContent: "str | None" = None
"""
The text written by the command to stdout.
"""
standardErrContent: "str | None" = None
"""
The text written by the command to stderr.
"""
logs: "LogsLocation | None" = None
"""
Information about build logs in CloudWatch Logs.
"""
sandboxArn: "str | None" = None
"""
A ``sandboxArn``.
"""
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
@property
def pk(self) -> OrderedDict[str, Any]:
"""
Composite primary key scoped to a sandbox.
"""
return OrderedDict(
{
"sandboxId": self.sandboxId,
"id": self.id,
}
)
[docs]class CodeCoverage(ReadonlyPrimaryBoto3Model):
"""
Contains code coverage report information.
Line coverage measures how many statements your tests cover. A statement is a single instruction, not including
comments, conditionals, etc.
Branch coverage determines if your tests cover every possible branch of a control structure, such as an ``if`` or
``case`` statement.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = CodeCoverageManager
id: "str | None" = None
"""
The identifier of the code coverage report.
"""
reportARN: "str | None" = None
"""
The ARN of the report.
"""
filePath: "str | None" = None
"""
The path of the test report file.
"""
lineCoveragePercentage: "float | None" = None
"""
The percentage of lines that are covered by your tests.
"""
linesCovered: "int | None" = None
"""
The number of lines that are covered by your tests.
"""
linesMissed: "int | None" = None
"""
The number of lines that are not covered by your tests.
"""
branchCoveragePercentage: "float | None" = None
"""
The percentage of branches that are covered by your tests.
"""
branchesCovered: "int | None" = None
"""
The number of conditional branches that are covered by your tests.
"""
branchesMissed: "int | None" = None
"""
The number of conditional branches that are not covered by your tests.
"""
expired: "datetime | None" = None
"""
The date and time that the tests were run.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`id`
attribute.
Returns:
The primary key of the model instance.
"""
return self.id
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
[docs]class CodeBuildTestCase(ReadonlyPrimaryBoto3Model):
"""
Information about a test case created using a framework such as NUnit or Cucumber.
A test case might be a unit test or a configuration test.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = CodeBuildTestCaseManager
Name: str = Field(default=None, alias="name")
"""
The name of the test case.
"""
reportArn: "str | None" = None
"""
The ARN of the report to which the test case belongs.
"""
testRawDataPath: "str | None" = None
"""
The path to the raw data file that contains the test result.
"""
prefix: "str | None" = None
"""
A string that is applied to a series of related test cases.
CodeBuild generates the prefix. The prefix depends on the framework used to generate
the tests.
"""
status: "str | None" = None
"""
The status returned by the test case after it was run.
Valid statuses are ``SUCCEEDED``, ``FAILED``, ``ERROR``,
``SKIPPED``, and ``UNKNOWN``.
"""
durationInNanoSeconds: "int | None" = None
"""
The number of nanoseconds it took to run this test case.
"""
message: "str | None" = None
"""
A message associated with a test case.
For example, an error message or stack trace.
"""
expired: "datetime | None" = None
"""
The date and time a test case expires.
A test case expires 30 days after it is created. An expired test case is not
available to view in CodeBuild.
"""
testSuiteName: "str | None" = None
"""
The name of the test suite that the test case is a part of.
"""
@property
def name(self) -> str | None:
"""
Return the name of the model. This is the value of the :py:attr:`Name`
attribute.
Returns:
The name of the model instance.
"""
return self.Name
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`testRawDataPath` attribute.
"""
return hash(self.testRawDataPath)
@property
def pk(self) -> OrderedDict[str, Any]:
"""
Composite identity for a test case within a report.
"""
return OrderedDict(
{
"reportArn": self.reportArn,
"name": self.Name,
}
)
[docs]class EnvironmentImage(Boto3Model):
"""
Information about a Docker image that is managed by CodeBuild.
"""
name: "str | None" = None
"""
The name of the Docker image.
"""
description: "str | None" = None
"""
The description of the Docker image.
"""
versions: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of environment image versions.
"""
[docs]class EnvironmentLanguage(Boto3Model):
"""
A set of Docker images that are related by programming language and are managed by
CodeBuild.
"""
language: "Literal['JAVA', 'PYTHON', 'NODE_JS', 'RUBY', 'GOLANG', 'DOCKER', 'ANDROID', 'DOTNET', 'BASE', 'PHP'] | None" = None
"""
The programming language for the Docker images.
"""
images: "builtins.list[EnvironmentImage] | None" = Field(default_factory=list)
"""
The list of Docker images that are related by the specified programming language.
"""
# =======================
# Request/Response Models
# =======================
[docs]class CreateProjectOutput(Boto3Model):
project: "Project | None" = None
"""
Information about the build project that was created.
"""
[docs]class UpdateProjectOutput(Boto3Model):
project: "Project | None" = None
"""
Information about the build project that was changed.
"""
[docs]class DeleteProjectOutput(Boto3Model):
pass
[docs]class BatchGetProjectsOutput(Boto3Model):
projects: "builtins.list[Project] | None" = Field(default_factory=list)
"""
Information about the requested build projects.
"""
projectsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
The names of build projects for which information could not be found.
"""
[docs]class ListProjectsOutput(Boto3Model):
nextToken: "str | None" = None
"""
If there are more than 100 items in the list, only the first 100 items are returned,
along with a unique string called a *nextToken*.
To get the next batch of items in the list, call this operation again, adding the
next token to the call.
"""
projects: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of build project names, with each build project name representing a single
build project.
"""
[docs]class ListSharedProjectsOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
projects: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of ARNs for the build projects shared with the current Amazon Web Services
account or user.
"""
[docs]class InvalidateProjectCacheOutput(Boto3Model):
pass
[docs]class UpdateProjectVisibilityOutput(Boto3Model):
projectArn: "str | None" = None
"""
The Amazon Resource Name (ARN) of the build project.
"""
publicProjectAlias: "str | None" = None
"""
Contains the project identifier used with the public build APIs.
"""
projectVisibility: "Literal['PUBLIC_READ', 'PRIVATE'] | None" = None
"""
Specifies the visibility of the project's builds.
Possible values are:
"""
[docs]class GetResourcePolicyOutput(Boto3Model):
policy: "str | None" = None
"""
The resource policy for the resource identified by the input ARN parameter.
"""
[docs]class PutResourcePolicyOutput(Boto3Model):
resourceArn: "str | None" = None
"""
The ARN of the ``Project`` or ``ReportGroup`` resource that is associated with a
resource policy.
"""
[docs]class DeleteResourcePolicyOutput(Boto3Model):
pass
[docs]class BatchGetBuildsOutput(Boto3Model):
builds: "builtins.list[Build] | None" = Field(default_factory=list)
"""
Information about the requested builds.
"""
buildsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IDs of builds for which information could not be found.
"""
[docs]class ListBuildsOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of build IDs, with each build ID representing a single build.
"""
nextToken: "str | None" = None
"""
If there are more than 100 items in the list, only the first 100 items are returned,
along with a unique string called a *nextToken*.
To get the next batch of items in the list, call this operation again, adding the
next token to the call.
"""
[docs]class ListBuildsForProjectOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of build identifiers for the specified build project, with each build ID
representing a single build.
"""
nextToken: "str | None" = None
"""
If there are more than 100 items in the list, only the first 100 items are returned,
along with a unique string called a *nextToken*.
To get the next batch of items in the list, call this operation again, adding the
next token to the call.
"""
[docs]class StartBuildOutput(Boto3Model):
build: "Build | None" = None
"""
Information about the build to be run.
"""
[docs]class StopBuildOutput(Boto3Model):
build: "Build | None" = None
"""
Information about the build.
"""
[docs]class RetryBuildOutput(Boto3Model):
build: "Build | None" = None
"""
Information about a build.
"""
[docs]class BuildNotDeleted(Boto3Model):
"""
Information about a build that could not be successfully deleted.
"""
id: "str | None" = None
"""
The ID of the build that could not be successfully deleted.
"""
statusCode: "str | None" = None
"""
Additional information about the build that could not be successfully deleted.
"""
[docs]class BatchDeleteBuildsOutput(Boto3Model):
buildsDeleted: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IDs of the builds that were successfully deleted.
"""
buildsNotDeleted: "builtins.list[BuildNotDeleted] | None" = Field(
default_factory=list
)
"""
Information about any builds that could not be successfully deleted.
"""
[docs]class StartBuildBatchOutput(Boto3Model):
buildBatch: "BuildBatch | None" = None
"""
A ``BuildBatch`` object that contains information about the batch build.
"""
[docs]class BatchGetBuildBatchesOutput(Boto3Model):
buildBatches: "builtins.list[BuildBatch] | None" = Field(default_factory=list)
"""
An array of ``BuildBatch`` objects that represent the retrieved batch builds.
"""
buildBatchesNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array that contains the identifiers of any batch builds that are not found.
"""
[docs]class BuildBatchFilter(Boto3Model):
"""
Specifies filters when retrieving batch builds.
"""
status: "Literal['SUCCEEDED', 'FAILED', 'FAULT', 'TIMED_OUT', 'IN_PROGRESS', 'STOPPED'] | None" = None
"""
The status of the batch builds to retrieve.
Only batch builds that have this status will be retrieved.
"""
[docs]class ListBuildBatchesOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that contains the batch build identifiers.
"""
nextToken: "str | None" = None
"""
If there are more items to return, this contains a token that is passed to a
subsequent call to ``ListBuildBatches`` to retrieve the next set of items.
"""
[docs]class ListBuildBatchesForProjectOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that contains the batch build identifiers.
"""
nextToken: "str | None" = None
"""
If there are more items to return, this contains a token that is passed to a
subsequent call to ``ListBuildBatchesForProject`` to retrieve the next set of items.
"""
[docs]class DeleteBuildBatchOutput(Boto3Model):
statusCode: "str | None" = None
"""
The status code.
"""
buildsDeleted: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of strings that contain the identifiers of the builds that were deleted.
"""
buildsNotDeleted: "builtins.list[BuildNotDeleted] | None" = Field(
default_factory=list
)
"""
An array of ``BuildNotDeleted`` objects that specify the builds that could not be
deleted.
"""
[docs]class StopBuildBatchOutput(Boto3Model):
buildBatch: "BuildBatch | None" = None
"""
Contains information about a batch build.
"""
[docs]class RetryBuildBatchOutput(Boto3Model):
buildBatch: "BuildBatch | None" = None
"""
Contains information about a batch build.
"""
[docs]class CreateFleetOutput(Boto3Model):
fleet: "Fleet | None" = None
"""
Information about the compute fleet.
"""
[docs]class UpdateFleetOutput(Boto3Model):
fleet: "Fleet | None" = None
"""
A ``Fleet`` object.
"""
[docs]class DeleteFleetOutput(Boto3Model):
pass
[docs]class BatchGetFleetsOutput(Boto3Model):
fleets: "builtins.list[Fleet] | None" = Field(default_factory=list)
"""
Information about the requested compute fleets.
"""
fleetsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
The names of compute fleets for which information could not be found.
"""
[docs]class ListFleetsOutput(Boto3Model):
nextToken: "str | None" = None
"""
If there are more than 100 items in the list, only the first 100 items are returned,
along with a unique string called a *nextToken*.
To get the next batch of items in the list, call this operation again, adding the
next token to the call.
"""
fleets: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of compute fleet names.
"""
[docs]class CreateReportGroupOutput(Boto3Model):
reportGroup: "ReportGroup | None" = None
"""
Information about the report group that was created.
"""
[docs]class UpdateReportGroupOutput(Boto3Model):
reportGroup: "ReportGroup | None" = None
"""
Information about the updated report group.
"""
[docs]class DeleteReportGroupOutput(Boto3Model):
pass
[docs]class BatchGetReportGroupsOutput(Boto3Model):
reportGroups: "builtins.list[ReportGroup] | None" = Field(default_factory=list)
"""
The array of report groups returned by ``BatchGetReportGroups``.
"""
reportGroupsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of ARNs passed to ``BatchGetReportGroups`` that are not associated with a
``ReportGroup``.
"""
[docs]class ListReportGroupsOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
reportGroups: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of ARNs for the report groups in the current Amazon Web Services account.
"""
[docs]class ListSharedReportGroupsOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
reportGroups: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of ARNs for the report groups shared with the current Amazon Web Services
account or user.
"""
[docs]class ReportGroupTrendStats(Boto3Model):
"""
Contains trend statistics for a set of reports.
The actual values depend on the type of trend being collected. For more information,
see .
"""
average: "str | None" = None
"""
Contains the average of all values analyzed.
"""
max: "str | None" = None
"""
Contains the maximum value analyzed.
"""
min: "str | None" = None
"""
Contains the minimum value analyzed.
"""
[docs]class ReportWithRawData(Boto3Model):
"""
Contains the unmodified data for the report.
For more information, see .
"""
reportArn: "str | None" = None
"""
The ARN of the report.
"""
data: "str | None" = None
"""
The value of the requested data field from the report.
"""
[docs]class GetReportGroupTrendOutput(Boto3Model):
stats: "ReportGroupTrendStats | None" = None
"""
Contains the accumulated trend data.
"""
rawData: "builtins.list[ReportWithRawData] | None" = Field(default_factory=list)
"""
An array that contains the raw data for each report.
"""
[docs]class BatchGetReportsOutput(Boto3Model):
reports: "builtins.list[Report] | None" = Field(default_factory=list)
"""
The array of ``Report`` objects returned by ``BatchGetReports``.
"""
reportsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
An array of ARNs passed to ``BatchGetReportGroups`` that are not associated with a
``Report``.
"""
[docs]class ReportFilter(Boto3Model):
"""
A filter used to return reports with the status specified by the input ``status``
parameter.
"""
status: "Literal['GENERATING', 'SUCCEEDED', 'FAILED', 'INCOMPLETE', 'DELETING'] | None" = None
"""
The status used to filter reports.
You can filter using one status only.
"""
[docs]class ListReportsOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
reports: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of returned ARNs for the reports in the current Amazon Web Services
account.
"""
[docs]class ListReportsForReportGroupOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
reports: "builtins.list[str] | None" = Field(default_factory=list)
"""
The list of report ARNs.
"""
[docs]class DeleteReportOutput(Boto3Model):
pass
[docs]class WebhookFilter(Boto3Model):
"""
A filter used to determine which webhooks trigger a build.
"""
type: Literal[
"EVENT",
"BASE_REF",
"HEAD_REF",
"ACTOR_ACCOUNT_ID",
"FILE_PATH",
"COMMIT_MESSAGE",
"WORKFLOW_NAME",
"TAG_NAME",
"RELEASE_NAME",
"REPOSITORY_NAME",
"ORGANIZATION_NAME",
]
"""
The type of webhook filter.
There are 11 webhook filter types: ``EVENT``, ``ACTOR_ACCOUNT_ID``, ``HEAD_REF``,
``BASE_REF``, ``FILE_PATH``, ``COMMIT_MESSAGE``, ``TAG_NAME``, ``RELEASE_NAME``, ``REPOSITORY_NAME``,
``ORGANIZATION_NAME``, and ``WORKFLOW_NAME``.
"""
pattern: str
"""
For a ``WebHookFilter`` that uses ``EVENT`` type, a comma-separated string that
specifies one or more events.
For
example, the webhook filter ``PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED`` allows all push, pull request created,
and pull request updated events to trigger a build.
"""
excludeMatchedPattern: "bool | None" = None
"""
Used to indicate that the ``pattern`` determines which webhook events do not trigger
a build.
If true, then a webhook
event that does not match the ``pattern`` triggers a build. If false, then a webhook event that matches the ``pattern``
triggers a build.
"""
[docs]class CreateWebhookOutput(Boto3Model):
webhook: "Webhook | None" = None
"""
Information about a webhook that connects repository events to a build project in
CodeBuild.
"""
[docs]class UpdateWebhookOutput(Boto3Model):
webhook: "Webhook | None" = None
"""
Information about a repository's webhook that is associated with a project in
CodeBuild.
"""
[docs]class DeleteWebhookOutput(Boto3Model):
pass
[docs]class ImportSourceCredentialsOutput(Boto3Model):
arn: "str | None" = None
"""
The Amazon Resource Name (ARN) of the token.
"""
[docs]class ListSourceCredentialsOutput(Boto3Model):
sourceCredentialsInfos: "builtins.list[SourceCredentials] | None" = Field(
default_factory=list
)
"""
A list of ``SourceCredentialsInfo`` objects.
Each ``SourceCredentialsInfo`` object includes the authentication type,
token ARN, and type of source provider for one set of credentials.
"""
[docs]class DeleteSourceCredentialsOutput(Boto3Model):
arn: "str | None" = None
"""
The Amazon Resource Name (ARN) of the token.
"""
[docs]class BatchGetSandboxesOutput(Boto3Model):
sandboxes: "builtins.list[Sandbox] | None" = Field(default_factory=list)
"""
Information about the requested sandboxes.
"""
sandboxesNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IDs of sandboxes for which information could not be found.
"""
[docs]class ListSandboxesOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
Information about the requested sandbox IDs.
"""
nextToken: "str | None" = None
"""
Information about the next token to get paginated results.
"""
[docs]class ListSandboxesForProjectOutput(Boto3Model):
ids: "builtins.list[str] | None" = Field(default_factory=list)
"""
Information about the requested sandbox IDs.
"""
nextToken: "str | None" = None
"""
Information about the next token to get paginated results.
"""
[docs]class StartSandboxOutput(Boto3Model):
sandbox: "Sandbox | None" = None
"""
Information about the requested sandbox.
"""
[docs]class StopSandboxOutput(Boto3Model):
sandbox: "Sandbox | None" = None
"""
Information about the requested sandbox.
"""
[docs]class SSMSession(Boto3Model):
"""
Contains information about the Session Manager session.
"""
sessionId: "str | None" = None
"""
The ID of the session.
"""
tokenValue: "str | None" = None
"""
An encrypted token value containing session and caller information.
"""
streamUrl: "str | None" = None
"""
A URL back to SSM Agent on the managed node that the Session Manager client uses to
send commands and receive output from the node.
"""
[docs]class StartSandboxConnectionOutput(Boto3Model):
ssmSession: "SSMSession | None" = None
"""
Information about the Session Manager session.
"""
[docs]class BatchGetCommandExecutionsOutput(Boto3Model):
commandExecutions: "builtins.list[CommandExecution] | None" = Field(
default_factory=list
)
"""
Information about the requested command executions.
"""
commandExecutionsNotFound: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IDs of command executions for which information could not be found.
"""
[docs]class ListCommandExecutionsForSandboxOutput(Boto3Model):
commandExecutions: "builtins.list[CommandExecution] | None" = Field(
default_factory=list
)
"""
Information about the requested command executions.
"""
nextToken: "str | None" = None
"""
Information about the next token to get paginated results.
"""
[docs]class StartCommandExecutionOutput(Boto3Model):
commandExecution: "CommandExecution | None" = None
"""
Information about the requested command executions.
"""
[docs]class DescribeCodeCoveragesOutput(Boto3Model):
nextToken: "str | None" = None
"""
If there are more items to return, this contains a token that is passed to a
subsequent call to ``DescribeCodeCoverages`` to retrieve the next set of items.
"""
codeCoverages: "builtins.list[CodeCoverage] | None" = Field(default_factory=list)
"""
An array of ``CodeCoverage`` objects that contain the results.
"""
[docs]class TestCaseFilter(Boto3Model):
"""
A filter used to return specific types of test cases.
In order to pass the filter, the report must meet all of the filter properties.
"""
status: "str | None" = None
"""
The status used to filter test cases.
A ``TestCaseFilter`` can have one status. Valid values are:
"""
keyword: "str | None" = None
"""
A keyword that is used to filter on the ``name`` or the ``prefix`` of the test
cases.
Only test cases where the keyword
is a substring of the ``name`` or the ``prefix`` will be returned.
"""
[docs]class DescribeTestCasesOutput(Boto3Model):
nextToken: "str | None" = None
"""
During a previous call, the maximum number of items that can be returned is the
value specified in ``maxResults``.
If there more items in the list, then a unique string called a *nextToken* is
returned. To get the next batch of items in the list, call this operation again,
adding the next token to the call. To get all of the items in the list, keep calling
this operation with each subsequent next token that is returned, until no more next
tokens are returned.
"""
testCases: "builtins.list[CodeBuildTestCase] | None" = Field(default_factory=list)
"""
The returned list of test cases.
"""
[docs]class ListCuratedEnvironmentImagesOutput(Boto3Model):
platforms: "builtins.list[CodeBuildEnvironmentPlatform] | None" = Field(
default_factory=list
)
"""
Information about supported platforms for Docker images that are managed by
CodeBuild.
"""