@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
144 lines • 6.46 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.ConnectorProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AppFlow connector profile resource.
*
* For information about AppFlow flows, see the [Amazon AppFlow API Reference](https://docs.aws.amazon.com/appflow/1.0/APIReference/Welcome.html).
* For specific information about creating an AppFlow connector profile, see the
* [CreateConnectorProfile](https://docs.aws.amazon.com/appflow/1.0/APIReference/API_CreateConnectorProfile.html) page in the Amazon AppFlow API Reference.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.iam.getPolicy({
* name: "AmazonRedshiftAllCommandsFullAccess",
* });
* const exampleRole = new aws.iam.Role("example", {
* name: "example_role",
* managedPolicyArns: [test.arn],
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Action: "sts:AssumeRole",
* Effect: "Allow",
* Sid: "",
* Principal: {
* Service: "ec2.amazonaws.com",
* },
* }],
* }),
* });
* const exampleBucket = new aws.s3.Bucket("example", {bucket: "example-bucket"});
* const exampleCluster = new aws.redshift.Cluster("example", {
* clusterIdentifier: "example_cluster",
* databaseName: "example_db",
* masterUsername: "exampleuser",
* masterPassword: "examplePassword123!",
* nodeType: "dc1.large",
* clusterType: "single-node",
* });
* const exampleConnectorProfile = new aws.appflow.ConnectorProfile("example", {
* name: "example_profile",
* connectorType: "Redshift",
* connectionMode: "Public",
* connectorProfileConfig: {
* connectorProfileCredentials: {
* redshift: {
* password: exampleCluster.masterPassword,
* username: exampleCluster.masterUsername,
* },
* },
* connectorProfileProperties: {
* redshift: {
* bucketName: exampleBucket.name,
* databaseUrl: pulumi.interpolate`jdbc:redshift://${exampleCluster.endpoint}/${exampleCluster.databaseName}`,
* roleArn: exampleRole.arn,
* },
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AppFlow Connector Profile using the connector profile `name`. For example:
*
* ```sh
* $ pulumi import aws:appflow/connectorProfile:ConnectorProfile example example-profile
* ```
*/
class ConnectorProfile extends pulumi.CustomResource {
/**
* Get an existing ConnectorProfile 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 ConnectorProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ConnectorProfile. 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'] === ConnectorProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["connectionMode"] = state ? state.connectionMode : undefined;
resourceInputs["connectorLabel"] = state ? state.connectorLabel : undefined;
resourceInputs["connectorProfileConfig"] = state ? state.connectorProfileConfig : undefined;
resourceInputs["connectorType"] = state ? state.connectorType : undefined;
resourceInputs["credentialsArn"] = state ? state.credentialsArn : undefined;
resourceInputs["kmsArn"] = state ? state.kmsArn : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
if ((!args || args.connectionMode === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionMode'");
}
if ((!args || args.connectorProfileConfig === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectorProfileConfig'");
}
if ((!args || args.connectorType === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectorType'");
}
resourceInputs["connectionMode"] = args ? args.connectionMode : undefined;
resourceInputs["connectorLabel"] = args ? args.connectorLabel : undefined;
resourceInputs["connectorProfileConfig"] = args ? args.connectorProfileConfig : undefined;
resourceInputs["connectorType"] = args ? args.connectorType : undefined;
resourceInputs["kmsArn"] = args ? args.kmsArn : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["credentialsArn"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ConnectorProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.ConnectorProfile = ConnectorProfile;
/** @internal */
ConnectorProfile.__pulumiType = 'aws:appflow/connectorProfile:ConnectorProfile';
//# sourceMappingURL=connectorProfile.js.map