@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
119 lines • 4.68 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Connection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.codestarconnections.Connection("example", {
* name: "example-connection",
* providerType: "Bitbucket",
* });
* const examplePipeline = new aws.codepipeline.Pipeline("example", {
* artifactStores: [{}],
* stages: [
* {
* name: "Source",
* actions: [{
* name: "Source",
* category: "Source",
* owner: "AWS",
* provider: "CodeStarSourceConnection",
* version: "1",
* outputArtifacts: ["source_output"],
* configuration: {
* ConnectionArn: example.arn,
* FullRepositoryId: "my-organization/test",
* BranchName: "main",
* },
* }],
* },
* {
* actions: [{}],
* name: "Build",
* },
* {
* actions: [{}],
* name: "Deploy",
* },
* ],
* name: "tf-test-pipeline",
* roleArn: codepipelineRole.arn,
* });
* ```
*
* ## 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
* ```
*/
class Connection extends pulumi.CustomResource {
/**
* Get an existing Connection resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Connection(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Connection. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Connection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["connectionStatus"] = state?.connectionStatus;
resourceInputs["hostArn"] = state?.hostArn;
resourceInputs["name"] = state?.name;
resourceInputs["providerType"] = state?.providerType;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["hostArn"] = args?.hostArn;
resourceInputs["name"] = args?.name;
resourceInputs["providerType"] = args?.providerType;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["connectionStatus"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Connection.__pulumiType, name, resourceInputs, opts);
}
}
exports.Connection = Connection;
/** @internal */
Connection.__pulumiType = 'aws:codestarconnections/connection:Connection';
//# sourceMappingURL=connection.js.map
;