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