aws_sdk_codebuild/client/create_project.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateProject`](crate::operation::create_project::builders::CreateProjectFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_name):<br>required: **true**<br><p>The name of the build project.</p><br>
7 /// - [`description(impl Into<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_description):<br>required: **false**<br><p>A description that makes the build project easy to identify.</p><br>
8 /// - [`source(ProjectSource)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::source) / [`set_source(Option<ProjectSource>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_source):<br>required: **true**<br><p>Information about the build input source code for the build project.</p><br>
9 /// - [`secondary_sources(ProjectSource)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::secondary_sources) / [`set_secondary_sources(Option<Vec::<ProjectSource>>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_secondary_sources):<br>required: **false**<br><p>An array of <code>ProjectSource</code> objects.</p><br>
10 /// - [`source_version(impl Into<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::source_version) / [`set_source_version(Option<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_source_version):<br>required: **false**<br><p>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:</p> <ul> <li> <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li> <li> <p>For 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 <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). 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.</p></li> <li> <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li> <li> <p>For 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.</p></li> <li> <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li> </ul> <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p><br>
11 /// - [`secondary_source_versions(ProjectSourceVersion)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::secondary_source_versions) / [`set_secondary_source_versions(Option<Vec::<ProjectSourceVersion>>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_secondary_source_versions):<br>required: **false**<br><p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take precedence over these <code>secondarySourceVersions</code> (at the project level).</p><br>
12 /// - [`artifacts(ProjectArtifacts)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::artifacts) / [`set_artifacts(Option<ProjectArtifacts>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_artifacts):<br>required: **true**<br><p>Information about the build output artifacts for the build project.</p><br>
13 /// - [`secondary_artifacts(ProjectArtifacts)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::secondary_artifacts) / [`set_secondary_artifacts(Option<Vec::<ProjectArtifacts>>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_secondary_artifacts):<br>required: **false**<br><p>An array of <code>ProjectArtifacts</code> objects.</p><br>
14 /// - [`cache(ProjectCache)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::cache) / [`set_cache(Option<ProjectCache>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_cache):<br>required: **false**<br><p>Stores recently used information so that it can be quickly accessed at a later time.</p><br>
15 /// - [`environment(ProjectEnvironment)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::environment) / [`set_environment(Option<ProjectEnvironment>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_environment):<br>required: **true**<br><p>Information about the build environment for the build project.</p><br>
16 /// - [`service_role(impl Into<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::service_role) / [`set_service_role(Option<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_service_role):<br>required: **true**<br><p>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.</p><br>
17 /// - [`timeout_in_minutes(i32)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::timeout_in_minutes) / [`set_timeout_in_minutes(Option<i32>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_timeout_in_minutes):<br>required: **false**<br><p>How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before it times out any build that has not been marked as completed. The default is 60 minutes.</p><br>
18 /// - [`queued_timeout_in_minutes(i32)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::queued_timeout_in_minutes) / [`set_queued_timeout_in_minutes(Option<i32>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_queued_timeout_in_minutes):<br>required: **false**<br><p>The number of minutes a build is allowed to be queued before it times out.</p><br>
19 /// - [`encryption_key(impl Into<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::encryption_key) / [`set_encryption_key(Option<String>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_encryption_key):<br>required: **false**<br><p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note> <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p><br>
20 /// - [`tags(Tag)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_tags):<br>required: **false**<br><p>A list of tag key and value pairs associated with this build project.</p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p><br>
21 /// - [`vpc_config(VpcConfig)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::vpc_config) / [`set_vpc_config(Option<VpcConfig>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_vpc_config):<br>required: **false**<br><p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p><note> <p>If you're using compute fleets during project creation, do not provide vpcConfig.</p> </note><br>
22 /// - [`badge_enabled(bool)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::badge_enabled) / [`set_badge_enabled(Option<bool>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_badge_enabled):<br>required: **false**<br><p>Set this to true to generate a publicly accessible URL for your project's build badge.</p><br>
23 /// - [`logs_config(LogsConfig)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::logs_config) / [`set_logs_config(Option<LogsConfig>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_logs_config):<br>required: **false**<br><p>Information about logs for the build project. These can be logs in CloudWatch Logs, logs uploaded to a specified S3 bucket, or both.</p><br>
24 /// - [`file_system_locations(ProjectFileSystemLocation)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::file_system_locations) / [`set_file_system_locations(Option<Vec::<ProjectFileSystemLocation>>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_file_system_locations):<br>required: **false**<br><p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p><br>
25 /// - [`build_batch_config(ProjectBuildBatchConfig)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::build_batch_config) / [`set_build_batch_config(Option<ProjectBuildBatchConfig>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_build_batch_config):<br>required: **false**<br><p>A <code>ProjectBuildBatchConfig</code> object that defines the batch build options for the project.</p><br>
26 /// - [`concurrent_build_limit(i32)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::concurrent_build_limit) / [`set_concurrent_build_limit(Option<i32>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_concurrent_build_limit):<br>required: **false**<br><p>The maximum number of concurrent builds that are allowed for this project.</p> <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p><br>
27 /// - [`auto_retry_limit(i32)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::auto_retry_limit) / [`set_auto_retry_limit(Option<i32>)`](crate::operation::create_project::builders::CreateProjectFluentBuilder::set_auto_retry_limit):<br>required: **false**<br><p>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 <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p><br>
28 /// - On success, responds with [`CreateProjectOutput`](crate::operation::create_project::CreateProjectOutput) with field(s):
29 /// - [`project(Option<Project>)`](crate::operation::create_project::CreateProjectOutput::project): <p>Information about the build project that was created.</p>
30 /// - On failure, responds with [`SdkError<CreateProjectError>`](crate::operation::create_project::CreateProjectError)
31 pub fn create_project(&self) -> crate::operation::create_project::builders::CreateProjectFluentBuilder {
32 crate::operation::create_project::builders::CreateProjectFluentBuilder::new(self.handle.clone())
33 }
34}