All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.codebuild.PipelineProject Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.codebuild;

/**
 * A convenience class for CodeBuild Projects that are used in CodePipeline.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.27.0 (build 07d848a)", date = "2021-04-12T10:04:58.488Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.codebuild.$Module.class, fqn = "@aws-cdk/aws-codebuild.PipelineProject")
public class PipelineProject extends software.amazon.awscdk.services.codebuild.Project {

    protected PipelineProject(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected PipelineProject(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     * @param props
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public PipelineProject(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.PipelineProjectProps props) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props });
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public PipelineProject(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
    }

    /**
     * A fluent builder for {@link software.amazon.awscdk.services.codebuild.PipelineProject}.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param scope This parameter is required.
         * @param id This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
            return new Builder(scope, id);
        }

        private final software.constructs.Construct scope;
        private final java.lang.String id;
        private software.amazon.awscdk.services.codebuild.PipelineProjectProps.Builder props;

        private Builder(final software.constructs.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
        }

        /**
         * Whether to allow the CodeBuild to send all network traffic.
         * 

* If set to false, you must individually add traffic rules to allow the * CodeBuild project to connect to network targets. *

* Only used if 'vpc' is supplied. *

* Default: true *

* @return {@code this} * @param allowAllOutbound Whether to allow the CodeBuild to send all network traffic. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder allowAllOutbound(final java.lang.Boolean allowAllOutbound) { this.props().allowAllOutbound(allowAllOutbound); return this; } /** * Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. *

* For more information, see Build Badges Sample * in the AWS CodeBuild User Guide. *

* Default: false *

* @return {@code this} * @param badge Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder badge(final java.lang.Boolean badge) { this.props().badge(badge); return this; } /** * Filename or contents of buildspec in JSON format. *

* Default: - Empty buildspec. *

* @return {@code this} * @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example * @param buildSpec Filename or contents of buildspec in JSON format. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder buildSpec(final software.amazon.awscdk.services.codebuild.BuildSpec buildSpec) { this.props().buildSpec(buildSpec); return this; } /** * Caching strategy to use. *

* Default: Cache.none *

* @return {@code this} * @param cache Caching strategy to use. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder cache(final software.amazon.awscdk.services.codebuild.Cache cache) { this.props().cache(cache); return this; } /** * Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. *

* Default: true *

* @return {@code this} * @param checkSecretsInPlainTextEnvVariables Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder checkSecretsInPlainTextEnvVariables(final java.lang.Boolean checkSecretsInPlainTextEnvVariables) { this.props().checkSecretsInPlainTextEnvVariables(checkSecretsInPlainTextEnvVariables); return this; } /** * A description of the project. *

* Use the description to identify the purpose * of the project. *

* Default: - No description. *

* @return {@code this} * @param description A description of the project. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder description(final java.lang.String description) { this.props().description(description); return this; } /** * Encryption key to use to read and write artifacts. *

* Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used. *

* @return {@code this} * @param encryptionKey Encryption key to use to read and write artifacts. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder encryptionKey(final software.amazon.awscdk.services.kms.IKey encryptionKey) { this.props().encryptionKey(encryptionKey); return this; } /** * Build environment to use for the build. *

* Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0 *

* @return {@code this} * @param environment Build environment to use for the build. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder environment(final software.amazon.awscdk.services.codebuild.BuildEnvironment environment) { this.props().environment(environment); return this; } /** * Additional environment variables to add to the build environment. *

* Default: - No additional environment variables are specified. *

* @return {@code this} * @param environmentVariables Additional environment variables to add to the build environment. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder environmentVariables(final java.util.Map environmentVariables) { this.props().environmentVariables(environmentVariables); return this; } /** * An 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. *

* Default: - no file system locations *

* @return {@code this} * @param fileSystemLocations An ProjectFileSystemLocation objects for a CodeBuild build project. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder fileSystemLocations(final java.util.List fileSystemLocations) { this.props().fileSystemLocations(fileSystemLocations); return this; } /** * Add permissions to this project's role to create and use test report groups with name starting with the name of this project. *

* That is the standard report group that gets created when a simple name * (in contrast to an ARN) * is used in the 'reports' section of the buildspec of this project. * This is usually harmless, but you can turn these off if you don't plan on using test * reports in this project. *

* Default: true *

* @return {@code this} * @see https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html * @param grantReportGroupPermissions Add permissions to this project's role to create and use test report groups with name starting with the name of this project. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder grantReportGroupPermissions(final java.lang.Boolean grantReportGroupPermissions) { this.props().grantReportGroupPermissions(grantReportGroupPermissions); return this; } /** * Information about logs for the build project. *

* A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. *

* Default: - no log configuration is set *

* @return {@code this} * @param logging Information about logs for the build project. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder logging(final software.amazon.awscdk.services.codebuild.LoggingOptions logging) { this.props().logging(logging); return this; } /** * The physical, human-readable name of the CodeBuild Project. *

* Default: - Name is automatically generated. *

* @return {@code this} * @param projectName The physical, human-readable name of the CodeBuild Project. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder projectName(final java.lang.String projectName) { this.props().projectName(projectName); return this; } /** * The number of minutes after which AWS CodeBuild stops the build if it's still in queue. *

* For valid values, see the timeoutInMinutes field in the AWS * CodeBuild User Guide. *

* Default: - no queue timeout is set *

* @return {@code this} * @param queuedTimeout The number of minutes after which AWS CodeBuild stops the build if it's still in queue. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder queuedTimeout(final software.amazon.awscdk.core.Duration queuedTimeout) { this.props().queuedTimeout(queuedTimeout); return this; } /** * Service Role to assume while running the build. *

* Default: - A role will be created. *

* @return {@code this} * @param role Service Role to assume while running the build. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder role(final software.amazon.awscdk.services.iam.IRole role) { this.props().role(role); return this; } /** * What security group to associate with the codebuild project's network interfaces. *

* If no security group is identified, one will be created automatically. *

* Only used if 'vpc' is supplied. *

* Default: - Security group will be automatically created. *

* @return {@code this} * @param securityGroups What security group to associate with the codebuild project's network interfaces. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder securityGroups(final java.util.List securityGroups) { this.props().securityGroups(securityGroups); return this; } /** * Where to place the network interfaces within the VPC. *

* Only used if 'vpc' is supplied. *

* Default: - All private subnets. *

* @return {@code this} * @param subnetSelection Where to place the network interfaces within the VPC. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder subnetSelection(final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) { this.props().subnetSelection(subnetSelection); return this; } /** * The number of minutes after which AWS CodeBuild stops the build if it's not complete. *

* For valid values, see the timeoutInMinutes field in the AWS * CodeBuild User Guide. *

* Default: Duration.hours(1) *

* @return {@code this} * @param timeout The number of minutes after which AWS CodeBuild stops the build if it's not complete. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder timeout(final software.amazon.awscdk.core.Duration timeout) { this.props().timeout(timeout); return this; } /** * VPC network to place codebuild network interfaces. *

* Specify this if the codebuild project needs to access resources in a VPC. *

* Default: - No VPC is specified. *

* @return {@code this} * @param vpc VPC network to place codebuild network interfaces. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder vpc(final software.amazon.awscdk.services.ec2.IVpc vpc) { this.props().vpc(vpc); return this; } /** * @returns a newly built instance of {@link software.amazon.awscdk.services.codebuild.PipelineProject}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.awscdk.services.codebuild.PipelineProject build() { return new software.amazon.awscdk.services.codebuild.PipelineProject( this.scope, this.id, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.codebuild.PipelineProjectProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.codebuild.PipelineProjectProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy