@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 4.97 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.VpcConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Managed Streaming for Kafka VPC Connection.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.msk.VpcConnection("test", {
* authentication: "SASL_IAM",
* targetClusterArn: "aws_msk_cluster.arn",
* vpcId: testAwsVpc.id,
* clientSubnets: testAwsSubnet.map(__item => __item.id),
* securityGroups: [testAwsSecurityGroup.id],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MSK configurations using the configuration ARN. For example:
*
* ```sh
* $ pulumi import aws:msk/vpcConnection:VpcConnection example arn:aws:kafka:eu-west-2:123456789012:vpc-connection/123456789012/example/38173259-79cd-4ee8-87f3-682ea6023f48-2
* ```
*/
class VpcConnection extends pulumi.CustomResource {
/**
* Get an existing VpcConnection 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 VpcConnection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VpcConnection. 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'] === VpcConnection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["authentication"] = state ? state.authentication : undefined;
resourceInputs["clientSubnets"] = state ? state.clientSubnets : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityGroups"] = state ? state.securityGroups : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["targetClusterArn"] = state ? state.targetClusterArn : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.authentication === undefined) && !opts.urn) {
throw new Error("Missing required property 'authentication'");
}
if ((!args || args.clientSubnets === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientSubnets'");
}
if ((!args || args.securityGroups === undefined) && !opts.urn) {
throw new Error("Missing required property 'securityGroups'");
}
if ((!args || args.targetClusterArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'targetClusterArn'");
}
if ((!args || args.vpcId === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["authentication"] = args ? args.authentication : undefined;
resourceInputs["clientSubnets"] = args ? args.clientSubnets : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroups"] = args ? args.securityGroups : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["targetClusterArn"] = args ? args.targetClusterArn : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcConnection.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcConnection = VpcConnection;
/** @internal */
VpcConnection.__pulumiType = 'aws:msk/vpcConnection:VpcConnection';
//# sourceMappingURL=vpcConnection.js.map