@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
120 lines • 5.61 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.HostedTransitVirtualInterface = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Direct Connect hosted transit virtual interface resource.
* This resource represents the allocator's side of the hosted virtual interface.
* A hosted virtual interface is a virtual interface that is owned by another AWS account.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.directconnect.HostedTransitVirtualInterface("example", {
* connectionId: exampleAwsDxConnection.id,
* name: "tf-transit-vif-example",
* vlan: 4094,
* addressFamily: "ipv4",
* bgpAsn: 65352,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Direct Connect hosted transit virtual interfaces using the VIF `id`. For example:
*
* ```sh
* $ pulumi import aws:directconnect/hostedTransitVirtualInterface:HostedTransitVirtualInterface test dxvif-33cc44dd
* ```
*/
class HostedTransitVirtualInterface extends pulumi.CustomResource {
/**
* Get an existing HostedTransitVirtualInterface 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 HostedTransitVirtualInterface(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of HostedTransitVirtualInterface. 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'] === HostedTransitVirtualInterface.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addressFamily"] = state?.addressFamily;
resourceInputs["amazonAddress"] = state?.amazonAddress;
resourceInputs["amazonSideAsn"] = state?.amazonSideAsn;
resourceInputs["arn"] = state?.arn;
resourceInputs["awsDevice"] = state?.awsDevice;
resourceInputs["bgpAsn"] = state?.bgpAsn;
resourceInputs["bgpAuthKey"] = state?.bgpAuthKey;
resourceInputs["connectionId"] = state?.connectionId;
resourceInputs["customerAddress"] = state?.customerAddress;
resourceInputs["jumboFrameCapable"] = state?.jumboFrameCapable;
resourceInputs["mtu"] = state?.mtu;
resourceInputs["name"] = state?.name;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["region"] = state?.region;
resourceInputs["vlan"] = state?.vlan;
}
else {
const args = argsOrState;
if (args?.addressFamily === undefined && !opts.urn) {
throw new Error("Missing required property 'addressFamily'");
}
if (args?.bgpAsn === undefined && !opts.urn) {
throw new Error("Missing required property 'bgpAsn'");
}
if (args?.connectionId === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionId'");
}
if (args?.ownerAccountId === undefined && !opts.urn) {
throw new Error("Missing required property 'ownerAccountId'");
}
if (args?.vlan === undefined && !opts.urn) {
throw new Error("Missing required property 'vlan'");
}
resourceInputs["addressFamily"] = args?.addressFamily;
resourceInputs["amazonAddress"] = args?.amazonAddress;
resourceInputs["bgpAsn"] = args?.bgpAsn;
resourceInputs["bgpAuthKey"] = args?.bgpAuthKey;
resourceInputs["connectionId"] = args?.connectionId;
resourceInputs["customerAddress"] = args?.customerAddress;
resourceInputs["mtu"] = args?.mtu;
resourceInputs["name"] = args?.name;
resourceInputs["ownerAccountId"] = args?.ownerAccountId;
resourceInputs["region"] = args?.region;
resourceInputs["vlan"] = args?.vlan;
resourceInputs["amazonSideAsn"] = undefined /*out*/;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["awsDevice"] = undefined /*out*/;
resourceInputs["jumboFrameCapable"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HostedTransitVirtualInterface.__pulumiType, name, resourceInputs, opts);
}
}
exports.HostedTransitVirtualInterface = HostedTransitVirtualInterface;
/** @internal */
HostedTransitVirtualInterface.__pulumiType = 'aws:directconnect/hostedTransitVirtualInterface:HostedTransitVirtualInterface';
//# sourceMappingURL=hostedTransitVirtualInterface.js.map