UNPKG

@pulumi/aws

Version:

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

87 lines 4.21 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.MulticastDomainAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Associates the specified subnet and transit gateway attachment with the specified transit gateway multicast domain. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.TransitGateway("example", {multicastSupport: "enable"}); * const exampleVpcAttachment = new aws.ec2transitgateway.VpcAttachment("example", { * subnetIds: [exampleAwsSubnet.id], * transitGatewayId: example.id, * vpcId: exampleAwsVpc.id, * }); * const exampleMulticastDomain = new aws.ec2transitgateway.MulticastDomain("example", {transitGatewayId: example.id}); * const exampleMulticastDomainAssociation = new aws.ec2transitgateway.MulticastDomainAssociation("example", { * subnetId: exampleAwsSubnet.id, * transitGatewayAttachmentId: exampleVpcAttachment.id, * transitGatewayMulticastDomainId: exampleMulticastDomain.id, * }); * ``` */ class MulticastDomainAssociation extends pulumi.CustomResource { /** * Get an existing MulticastDomainAssociation 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 MulticastDomainAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of MulticastDomainAssociation. 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'] === MulticastDomainAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["region"] = state?.region; resourceInputs["subnetId"] = state?.subnetId; resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId; resourceInputs["transitGatewayMulticastDomainId"] = state?.transitGatewayMulticastDomainId; } else { const args = argsOrState; if (args?.subnetId === undefined && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } if (args?.transitGatewayAttachmentId === undefined && !opts.urn) { throw new Error("Missing required property 'transitGatewayAttachmentId'"); } if (args?.transitGatewayMulticastDomainId === undefined && !opts.urn) { throw new Error("Missing required property 'transitGatewayMulticastDomainId'"); } resourceInputs["region"] = args?.region; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId; resourceInputs["transitGatewayMulticastDomainId"] = args?.transitGatewayMulticastDomainId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MulticastDomainAssociation.__pulumiType, name, resourceInputs, opts); } } exports.MulticastDomainAssociation = MulticastDomainAssociation; /** @internal */ MulticastDomainAssociation.__pulumiType = 'aws:ec2transitgateway/multicastDomainAssociation:MulticastDomainAssociation'; //# sourceMappingURL=multicastDomainAssociation.js.map