@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
160 lines • 6.53 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
*
* ### Identity Schema
*
* #### Required
*
* * `name` (String) Name of the Appflow connector profile.
*
* #### Optional
*
* * `account_id` (String) AWS Account where this resource is managed.
*
* * `region` (String) Region where this resource is managed.
*
* Using `pulumi import`, import AppFlow Connector Profile using the connector profile `name`. For example:
*
* console
*
* % pulumi import aws_appflow_connector_profile.example example-profile
*
* [1]: https://docs.aws.amazon.com/appflow/1.0/APIReference/Welcome.html
*
* [2]: https://docs.aws.amazon.com/appflow/1.0/APIReference/API_CreateConnectorProfile.html
*/
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, { ...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?.arn;
resourceInputs["connectionMode"] = state?.connectionMode;
resourceInputs["connectorLabel"] = state?.connectorLabel;
resourceInputs["connectorProfileConfig"] = state?.connectorProfileConfig;
resourceInputs["connectorType"] = state?.connectorType;
resourceInputs["credentialsArn"] = state?.credentialsArn;
resourceInputs["kmsArn"] = state?.kmsArn;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.connectionMode === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionMode'");
}
if (args?.connectorProfileConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'connectorProfileConfig'");
}
if (args?.connectorType === undefined && !opts.urn) {
throw new Error("Missing required property 'connectorType'");
}
resourceInputs["connectionMode"] = args?.connectionMode;
resourceInputs["connectorLabel"] = args?.connectorLabel;
resourceInputs["connectorProfileConfig"] = args?.connectorProfileConfig;
resourceInputs["connectorType"] = args?.connectorType;
resourceInputs["kmsArn"] = args?.kmsArn;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
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