@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
168 lines • 6.48 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
*
* ### Identity Schema
*
* #### Required
*
* - `arn` (String) Amazon Resource Name (ARN) of the RDS integration.
*
* Using `pulumi import`, import RDS (Relational Database) Integration using the `arn`. For example:
*
* console
*
* % pulumi import aws_rds_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, { ...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?.additionalEncryptionContext;
resourceInputs["arn"] = state?.arn;
resourceInputs["dataFilter"] = state?.dataFilter;
resourceInputs["integrationName"] = state?.integrationName;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["region"] = state?.region;
resourceInputs["sourceArn"] = state?.sourceArn;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["targetArn"] = state?.targetArn;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.integrationName === undefined && !opts.urn) {
throw new Error("Missing required property 'integrationName'");
}
if (args?.sourceArn === undefined && !opts.urn) {
throw new Error("Missing required property 'sourceArn'");
}
if (args?.targetArn === undefined && !opts.urn) {
throw new Error("Missing required property 'targetArn'");
}
resourceInputs["additionalEncryptionContext"] = args?.additionalEncryptionContext;
resourceInputs["dataFilter"] = args?.dataFilter;
resourceInputs["integrationName"] = args?.integrationName;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["region"] = args?.region;
resourceInputs["sourceArn"] = args?.sourceArn;
resourceInputs["tags"] = args?.tags;
resourceInputs["targetArn"] = args?.targetArn;
resourceInputs["timeouts"] = args?.timeouts;
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