@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
162 lines • 6.8 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.Integration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS RDS (Relational Database) zero-ETL integration. You can refer to the [User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.setting-up.html).
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.redshiftserverless.Namespace("example", {namespaceName: "redshift-example"});
* const exampleWorkgroup = new aws.redshiftserverless.Workgroup("example", {
* namespaceName: example.namespaceName,
* workgroupName: "example-workspace",
* baseCapacity: 8,
* publiclyAccessible: false,
* subnetIds: [
* example1.id,
* example2.id,
* example3.id,
* ],
* configParameters: [{
* parameterKey: "enable_case_sensitive_identifier",
* parameterValue: "true",
* }],
* });
* const exampleIntegration = new aws.rds.Integration("example", {
* integrationName: "example",
* sourceArn: exampleAwsRdsCluster.arn,
* targetArn: example.arn,
* });
* ```
*
* ### Use own KMS key
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.getCallerIdentity({});
* const keyPolicy = current.then(current => aws.iam.getPolicyDocument({
* statements: [
* {
* actions: ["kms:*"],
* resources: ["*"],
* principals: [{
* type: "AWS",
* identifiers: [`arn:aws:iam::${current.accountId}:root`],
* }],
* },
* {
* actions: ["kms:CreateGrant"],
* resources: ["*"],
* principals: [{
* type: "Service",
* identifiers: ["redshift.amazonaws.com"],
* }],
* },
* ],
* }));
* const example = new aws.kms.Key("example", {
* deletionWindowInDays: 10,
* policy: keyPolicy.then(keyPolicy => keyPolicy.json),
* });
* const exampleIntegration = new aws.rds.Integration("example", {
* integrationName: "example",
* sourceArn: exampleAwsRdsCluster.arn,
* targetArn: exampleAwsRedshiftserverlessNamespace.arn,
* kmsKeyId: example.arn,
* additionalEncryptionContext: {
* example: "test",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import RDS (Relational Database) Integration using the `arn`. For example:
*
* ```sh
* $ pulumi import aws:rds/integration:Integration example arn:aws:rds:us-west-2:123456789012:integration:abcdefgh-0000-1111-2222-123456789012
* ```
*/
class Integration extends pulumi.CustomResource {
/**
* Get an existing Integration 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 Integration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Integration. 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'] === Integration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalEncryptionContext"] = state ? state.additionalEncryptionContext : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["dataFilter"] = state ? state.dataFilter : undefined;
resourceInputs["integrationName"] = state ? state.integrationName : undefined;
resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["sourceArn"] = state ? state.sourceArn : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["targetArn"] = state ? state.targetArn : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
}
else {
const args = argsOrState;
if ((!args || args.integrationName === undefined) && !opts.urn) {
throw new Error("Missing required property 'integrationName'");
}
if ((!args || args.sourceArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'sourceArn'");
}
if ((!args || args.targetArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'targetArn'");
}
resourceInputs["additionalEncryptionContext"] = args ? args.additionalEncryptionContext : undefined;
resourceInputs["dataFilter"] = args ? args.dataFilter : undefined;
resourceInputs["integrationName"] = args ? args.integrationName : undefined;
resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["sourceArn"] = args ? args.sourceArn : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["targetArn"] = args ? args.targetArn : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Integration.__pulumiType, name, resourceInputs, opts);
}
}
exports.Integration = Integration;
/** @internal */
Integration.__pulumiType = 'aws:rds/integration:Integration';
//# sourceMappingURL=integration.js.map