
com.pulumi.aws.codestarconnections.Connection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.codestarconnections;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.codestarconnections.ConnectionArgs;
import com.pulumi.aws.codestarconnections.inputs.ConnectionState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a CodeStar Connection.
*
* > **NOTE:** The `aws.codestarconnections.Connection` resource is created in the state `PENDING`. Authentication with the connection provider must be completed in the AWS Console. See the [AWS documentation](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-update.html) for details.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.codestarconnections.Connection;
* import com.pulumi.aws.codestarconnections.ConnectionArgs;
* import com.pulumi.aws.codepipeline.Pipeline;
* import com.pulumi.aws.codepipeline.PipelineArgs;
* import com.pulumi.aws.codepipeline.inputs.PipelineArtifactStoreArgs;
* import com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new Connection("example", ConnectionArgs.builder()
* .name("example-connection")
* .providerType("Bitbucket")
* .build());
*
* var examplePipeline = new Pipeline("examplePipeline", PipelineArgs.builder()
* .artifactStores()
* .stages(
* PipelineStageArgs.builder()
* .name("Source")
* .actions(PipelineStageActionArgs.builder()
* .name("Source")
* .category("Source")
* .owner("AWS")
* .provider("CodeStarSourceConnection")
* .version("1")
* .outputArtifacts("source_output")
* .configuration(Map.ofEntries(
* Map.entry("ConnectionArn", example.arn()),
* Map.entry("FullRepositoryId", "my-organization/test"),
* Map.entry("BranchName", "main")
* ))
* .build())
* .build(),
* PipelineStageArgs.builder()
* .actions()
* .name("Build")
* .build(),
* PipelineStageArgs.builder()
* .actions()
* .name("Deploy")
* .build())
* .name("tf-test-pipeline")
* .roleArn(codepipelineRole.arn())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import CodeStar connections using the ARN. For example:
*
* ```sh
* $ pulumi import aws:codestarconnections/connection:Connection test-connection arn:aws:codestar-connections:us-west-1:0123456789:connection/79d4d357-a2ee-41e4-b350-2fe39ae59448
* ```
*
*/
@ResourceType(type="aws:codestarconnections/connection:Connection")
public class Connection extends com.pulumi.resources.CustomResource {
/**
* The codestar connection ARN.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The codestar connection ARN.
*
*/
public Output arn() {
return this.arn;
}
/**
* The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
*
*/
@Export(name="connectionStatus", refs={String.class}, tree="[0]")
private Output connectionStatus;
/**
* @return The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
*
*/
public Output connectionStatus() {
return this.connectionStatus;
}
/**
* The Amazon Resource Name (ARN) of the host associated with the connection. Conflicts with `provider_type`
*
*/
@Export(name="hostArn", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> hostArn;
/**
* @return The Amazon Resource Name (ARN) of the host associated with the connection. Conflicts with `provider_type`
*
*/
public Output> hostArn() {
return Codegen.optional(this.hostArn);
}
/**
* The name of the connection to be created. The name must be unique in the calling AWS account. Changing `name` will create a new resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the connection to be created. The name must be unique in the calling AWS account. Changing `name` will create a new resource.
*
*/
public Output name() {
return this.name;
}
/**
* The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, `GitHubEnterpriseServer`, `GitLab` or `GitLabSelfManaged`. Changing `provider_type` will create a new resource. Conflicts with `host_arn`
*
*/
@Export(name="providerType", refs={String.class}, tree="[0]")
private Output providerType;
/**
* @return The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, `GitHubEnterpriseServer`, `GitLab` or `GitLabSelfManaged`. Changing `provider_type` will create a new resource. Conflicts with `host_arn`
*
*/
public Output providerType() {
return this.providerType;
}
/**
* Map of key-value resource tags to associate with the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Map of key-value resource tags to associate with the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy