UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

106 lines 4.59 kB
"use strict"; // *** 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, { ...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?.arn; resourceInputs["authentication"] = state?.authentication; resourceInputs["clientSubnets"] = state?.clientSubnets; resourceInputs["region"] = state?.region; resourceInputs["securityGroups"] = state?.securityGroups; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["targetClusterArn"] = state?.targetClusterArn; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.authentication === undefined && !opts.urn) { throw new Error("Missing required property 'authentication'"); } if (args?.clientSubnets === undefined && !opts.urn) { throw new Error("Missing required property 'clientSubnets'"); } if (args?.securityGroups === undefined && !opts.urn) { throw new Error("Missing required property 'securityGroups'"); } if (args?.targetClusterArn === undefined && !opts.urn) { throw new Error("Missing required property 'targetClusterArn'"); } if (args?.vpcId === undefined && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["authentication"] = args?.authentication; resourceInputs["clientSubnets"] = args?.clientSubnets; resourceInputs["region"] = args?.region; resourceInputs["securityGroups"] = args?.securityGroups; resourceInputs["tags"] = args?.tags; resourceInputs["targetClusterArn"] = args?.targetClusterArn; resourceInputs["vpcId"] = args?.vpcId; 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