start_build_batch
async
¶
start_build_batch(
project_name: NonEmptyString,
*,
config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
secondary_sources_override: Optional[ProjectSources] = None,
secondary_sources_version_override: Optional[ProjectSecondarySourceVersions] = None,
source_version: Optional[String] = None,
artifacts_override: Optional[ProjectArtifacts] = None,
secondary_artifacts_override: Optional[ProjectArtifactsList] = None,
environment_variables_override: Optional[EnvironmentVariables] = None,
source_type_override: Optional[SourceType] = None,
source_location_override: Optional[String] = None,
source_auth_override: Optional[SourceAuth] = None,
git_clone_depth_override: Optional[GitCloneDepth] = None,
git_submodules_config_override: Optional[GitSubmodulesConfig] = None,
buildspec_override: Optional[String] = None,
insecure_ssl_override: Optional[WrapperBoolean] = None,
report_build_batch_status_override: Optional[WrapperBoolean] = None,
environment_type_override: Optional[EnvironmentType] = None,
image_override: Optional[NonEmptyString] = None,
compute_type_override: Optional[ComputeType] = None,
certificate_override: Optional[String] = None,
cache_override: Optional[ProjectCache] = None,
service_role_override: Optional[NonEmptyString] = None,
privileged_mode_override: Optional[WrapperBoolean] = None,
build_timeout_in_minutes_override: Optional[BuildTimeOut] = None,
queued_timeout_in_minutes_override: Optional[TimeOut] = None,
encryption_key_override: Optional[NonEmptyString] = None,
idempotency_token: Optional[String] = None,
logs_config_override: Optional[LogsConfig] = None,
registry_credential_override: Optional[RegistryCredential] = None,
image_pull_credentials_type_override: Optional[ImagePullCredentialsType] = None,
build_batch_config_override: Optional[ProjectBuildBatchConfig] = None,
debug_session_enabled: Optional[WrapperBoolean] = None,
) -> StartBuildBatchOutput
Starts a batch build for a project.
Parameters:
-
project_name(NonEmptyString) –The name of the project.
-
secondary_sources_override(Optional[ProjectSources], default:None) –An array of
ProjectSourceobjects that override the secondary sources defined in the batch build project. -
secondary_sources_version_override(Optional[ProjectSecondarySourceVersions], default:None) –An array of
ProjectSourceVersionobjects that override the secondary source versions in the batch build project. -
source_version(Optional[String], default:None) –The version of the batch 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:
- CodeCommit
-
The commit ID, branch, or Git tag to use.
- GitHub
-
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID(for examplepr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. - Bitbucket
-
The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
- Amazon S3
-
The version ID of the object that represents the build input ZIP file to use.
If
sourceVersionis specified at the project level, then thissourceVersion(at the build level) takes precedence.For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
-
artifacts_override(Optional[ProjectArtifacts], default:None) –An array of
ProjectArtifactsobjects that contains information about the build output artifact overrides for the build project. -
secondary_artifacts_override(Optional[ProjectArtifactsList], default:None) –An array of
ProjectArtifactsobjects that override the secondary artifacts defined in the batch build project. -
environment_variables_override(Optional[EnvironmentVariables], default:None) –An array of
EnvironmentVariableobjects that override, or add to, the environment variables defined in the batch build project. -
source_type_override(Optional[SourceType], default:None) –The source input type that overrides the source input defined in the batch build project.
-
source_location_override(Optional[String], default:None) –A location that overrides, for this batch build, the source location defined in the batch build project.
-
source_auth_override(Optional[SourceAuth], default:None) –A
SourceAuthobject that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub. -
git_clone_depth_override(Optional[GitCloneDepth], default:None) –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.
-
git_submodules_config_override(Optional[GitSubmodulesConfig], default:None) –A
GitSubmodulesConfigobject that overrides the Git submodules configuration for this batch build. -
buildspec_override(Optional[String], default:None) –A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.
If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in
CODEBUILD_SRC_DIRenvironment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example,arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location. -
insecure_ssl_override(Optional[WrapperBoolean], default:None) –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.
-
report_build_batch_status_override(Optional[WrapperBoolean], default:None) –Set to
trueto 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, aninvalidInputExceptionis thrown.The status of a build triggered by a webhook is always reported to your source provider.
-
environment_type_override(Optional[EnvironmentType], default:None) –A container type for this batch build that overrides the one specified in the batch build project.
-
image_override(Optional[NonEmptyString], default:None) –The name of an image for this batch build that overrides the one specified in the batch build project.
-
compute_type_override(Optional[ComputeType], default:None) –The name of a compute type for this batch build that overrides the one specified in the batch build project.
-
certificate_override(Optional[String], default:None) –The name of a certificate for this batch build that overrides the one specified in the batch build project.
-
cache_override(Optional[ProjectCache], default:None) –A
ProjectCacheobject that specifies cache overrides. -
service_role_override(Optional[NonEmptyString], default:None) –The name of a service role for this batch build that overrides the one specified in the batch build project.
-
privileged_mode_override(Optional[WrapperBoolean], default:None) –Enable this flag to override privileged mode in the batch build project.
-
build_timeout_in_minutes_override(Optional[BuildTimeOut], default:None) –Overrides the build timeout specified in the batch build project.
-
queued_timeout_in_minutes_override(Optional[TimeOut], default:None) –The number of minutes a batch build is allowed to be queued before it times out.
-
encryption_key_override(Optional[NonEmptyString], default:None) –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.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/). -
idempotency_token(Optional[String], default:None) –A unique, case sensitive identifier you provide to ensure the idempotency of the
StartBuildBatchrequest. The token is included in theStartBuildBatchrequest and is valid for five minutes. If you repeat theStartBuildBatchrequest with the same token, but change a parameter, CodeBuild returns a parameter mismatch error. -
logs_config_override(Optional[LogsConfig], default:None) –A
LogsConfigobject that override the log settings defined in the batch build project. -
registry_credential_override(Optional[RegistryCredential], default:None) –A
RegistryCredentialobject that overrides credentials for access to a private registry. -
image_pull_credentials_type_override(Optional[ImagePullCredentialsType], default:None) –The type of credentials CodeBuild uses to pull images in your batch build. There are two valid values:
- CODEBUILD
-
Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.
- SERVICE_ROLE
-
Specifies that CodeBuild uses your build project's service role.
When using a cross-account or private registry image, you must use
SERVICE_ROLEcredentials. When using an CodeBuild curated image, you must useCODEBUILDcredentials. -
build_batch_config_override(Optional[ProjectBuildBatchConfig], default:None) –A
BuildBatchConfigOverrideobject that contains batch build configuration overrides. -
debug_session_enabled(Optional[WrapperBoolean], default:None) –Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
Raises:
-
InvalidInputException–The input value that was provided is not valid.
-
ResourceNotFoundException–The specified Amazon Web Services resource cannot be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codebuild/_services/async_code_build.py
3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 | |