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

io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStack Maven / Gradle / Ivy

Go to download

This repository contains the infrastructure as code to wrap your AWS CDK project with CI/CD around it.

There is a newer version: 0.2.12
Show newest version
package io.github.cdklabs.cdk.cicd.wrapper;

/**
 * Stack that sets up a CodeStar connection and provides the pipeline input and environment variables.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-03T16:35:59.281Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.cicd.wrapper.$Module.class, fqn = "@cdklabs/cdk-cicd-wrapper.CodeStarConnectRepositoryStack")
public class CodeStarConnectRepositoryStack extends software.amazon.awscdk.Stack implements io.github.cdklabs.cdk.cicd.wrapper.IRepositoryStack {

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

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

    /**
     * Constructs a new instance of the CodeStarConnectRepositoryStack.
     * 

* @param scope The scope in which the stack is created. This parameter is required. * @param id The ID of the stack. This parameter is required. * @param props The properties for the stack. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public CodeStarConnectRepositoryStack(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStackProps 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"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * The environment variables to be used by the pipeline. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getPipelineEnvVars() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "pipelineEnvVars", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * The pipeline input (file set producer) for this stack. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.pipelines.IFileSetProducer getPipelineInput() { return software.amazon.jsii.Kernel.get(this, "pipelineInput", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.pipelines.IFileSetProducer.class)); } /** * The branch of the repository. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getRepositoryBranch() { return software.amazon.jsii.Kernel.get(this, "repositoryBranch", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * A fluent builder for {@link io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStack}. */ @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 The scope in which the stack is created. This parameter is required. * @param id The ID of the stack. 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 final io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStackProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStackProps.Builder(); } /** * Include runtime versioning information in this Stack. *

* Default: `analyticsReporting` setting of containing `App`, or value of * 'aws:cdk:version-reporting' context key *

* @return {@code this} * @param analyticsReporting Include runtime versioning information in this Stack. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder analyticsReporting(final java.lang.Boolean analyticsReporting) { this.props.analyticsReporting(analyticsReporting); return this; } /** * Enable this flag to allow native cross region stack references. *

* Enabling this will create a CloudFormation custom resource * in both the producing stack and consuming stack in order to perform the export/import *

* This feature is currently experimental *

* Default: false *

* @return {@code this} * @param crossRegionReferences Enable this flag to allow native cross region stack references. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder crossRegionReferences(final java.lang.Boolean crossRegionReferences) { this.props.crossRegionReferences(crossRegionReferences); return this; } /** * The description of the repository (optional). *

* @return {@code this} * @param description The description of the repository (optional). 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; } /** * The AWS environment (account/region) where this stack will be deployed. *

* Set the region/account fields of env to either a concrete value to * select the indicated environment (recommended for production stacks), or to * the values of environment variables * CDK_DEFAULT_REGION/CDK_DEFAULT_ACCOUNT to let the target environment * depend on the AWS credentials/configuration that the CDK CLI is executed * under (recommended for development stacks). *

* If the Stack is instantiated inside a Stage, any undefined * region/account fields from env will default to the same field on the * encompassing Stage, if configured there. *

* If either region or account are not set nor inherited from Stage, the * Stack will be considered "environment-agnostic"". Environment-agnostic * stacks can be deployed to any environment but may not be able to take * advantage of all features of the CDK. For example, they will not be able to * use environmental context lookups such as ec2.Vpc.fromLookup and will not * automatically translate Service Principals to the right format based on the * environment's AWS partition, and other such enhancements. *

* Default: - The environment of the containing `Stage` if available, * otherwise create the stack will be environment-agnostic. *

* Example: *

*

         * // Use a concrete account and region to deploy this stack to:
         * // `.account` and `.region` will simply return these values.
         * new Stack(app, 'Stack1', {
         *   env: {
         *     account: '123456789012',
         *     region: 'us-east-1'
         *   },
         * });
         * // Use the CLI's current credentials to determine the target environment:
         * // `.account` and `.region` will reflect the account+region the CLI
         * // is configured to use (based on the user CLI credentials)
         * new Stack(app, 'Stack2', {
         *   env: {
         *     account: process.env.CDK_DEFAULT_ACCOUNT,
         *     region: process.env.CDK_DEFAULT_REGION
         *   },
         * });
         * // Define multiple stacks stage associated with an environment
         * const myStage = new Stage(app, 'MyStage', {
         *   env: {
         *     account: '123456789012',
         *     region: 'us-east-1'
         *   }
         * });
         * // both of these stacks will use the stage's account/region:
         * // `.account` and `.region` will resolve to the concrete values as above
         * new MyStack(myStage, 'Stack1');
         * new YourStack(myStage, 'Stack2');
         * // Define an environment-agnostic stack:
         * // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
         * // which will only resolve to actual values by CloudFormation during deployment.
         * new MyStack(app, 'Stack1');
         * 
*

* @return {@code this} * @param env The AWS environment (account/region) where this stack will be deployed. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder env(final software.amazon.awscdk.Environment env) { this.props.env(env); return this; } /** * Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. *

* Default: - no permissions boundary is applied *

* @return {@code this} * @param permissionsBoundary Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder permissionsBoundary(final software.amazon.awscdk.PermissionsBoundary permissionsBoundary) { this.props.permissionsBoundary(permissionsBoundary); return this; } /** * Name to deploy the stack with. *

* Default: - Derived from construct path. *

* @return {@code this} * @param stackName Name to deploy the stack with. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder stackName(final java.lang.String stackName) { this.props.stackName(stackName); return this; } /** * Enable this flag to suppress indentation in generated CloudFormation templates. *

* If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation * context key will be used. If that is not specified, then the * default value false will be used. *

* Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set. *

* @return {@code this} * @param suppressTemplateIndentation Enable this flag to suppress indentation in generated CloudFormation templates. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder suppressTemplateIndentation(final java.lang.Boolean suppressTemplateIndentation) { this.props.suppressTemplateIndentation(suppressTemplateIndentation); return this; } /** * Synthesis method to use while deploying this stack. *

* The Stack Synthesizer controls aspects of synthesis and deployment, * like how assets are referenced and what IAM roles to use. For more * information, see the README of the main CDK package. *

* If not specified, the defaultStackSynthesizer from App will be used. * If that is not specified, DefaultStackSynthesizer is used if * @aws-cdk/core:newStyleStackSynthesis is set to true or the CDK major * version is v2. In CDK v1 LegacyStackSynthesizer is the default if no * other synthesizer is specified. *

* Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise. *

* @return {@code this} * @param synthesizer Synthesis method to use while deploying this stack. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder synthesizer(final software.amazon.awscdk.IStackSynthesizer synthesizer) { this.props.synthesizer(synthesizer); return this; } /** * Stack tags that will be applied to all the taggable resources and the stack itself. *

* Default: {} *

* @return {@code this} * @param tags Stack tags that will be applied to all the taggable resources and the stack itself. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder tags(final java.util.Map tags) { this.props.tags(tags); return this; } /** * Whether to enable termination protection for this stack. *

* Default: false *

* @return {@code this} * @param terminationProtection Whether to enable termination protection for this stack. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder terminationProtection(final java.lang.Boolean terminationProtection) { this.props.terminationProtection(terminationProtection); return this; } /** * The branch for the repository. *

* @return {@code this} * @param branch The branch for the repository. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder branch(final java.lang.String branch) { this.props.branch(branch); return this; } /** * The name of the repository. *

* @return {@code this} * @param name The name of the repository. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder name(final java.lang.String name) { this.props.name(name); return this; } /** * The type of the repository. *

* @return {@code this} * @param repositoryType The type of the repository. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder repositoryType(final java.lang.String repositoryType) { this.props.repositoryType(repositoryType); return this; } /** * Enforce full clone for the repository. *

* @return {@code this} * @param codeBuildCloneOutput Enforce full clone for the repository. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder codeBuildCloneOutput(final java.lang.Boolean codeBuildCloneOutput) { this.props.codeBuildCloneOutput(codeBuildCloneOutput); return this; } /** * The Amazon Resource Name (ARN) of the CodeStar connection. *

* @return {@code this} * @param codeStarConnectionArn The Amazon Resource Name (ARN) of the CodeStar connection. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder codeStarConnectionArn(final java.lang.String codeStarConnectionArn) { this.props.codeStarConnectionArn(codeStarConnectionArn); return this; } /** * The name of the application. *

* @return {@code this} * @param applicationName The name of the application. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder applicationName(final java.lang.String applicationName) { this.props.applicationName(applicationName); return this; } /** * The qualifier for the application. *

* @return {@code this} * @param applicationQualifier The qualifier for the application. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder applicationQualifier(final java.lang.String applicationQualifier) { this.props.applicationQualifier(applicationQualifier); return this; } /** * @return a newly built instance of {@link io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStack}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStack build() { return new io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectRepositoryStack( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy