@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
115 lines • 5.5 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.VpcEncryptionControl = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a VPC Encryption Control.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const exampleVpc = new aws.ec2.Vpc("example", {cidrBlock: "10.1.0.0/16"});
* const example = new aws.ec2.VpcEncryptionControl("example", {
* vpcId: exampleVpc.id,
* mode: "monitor",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC Encryption Control using the `id`. For example:
*
* ```sh
* $ pulumi import aws:ec2/vpcEncryptionControl:VpcEncryptionControl example vpcec-12345678901234567
* ```
*/
class VpcEncryptionControl extends pulumi.CustomResource {
/**
* Get an existing VpcEncryptionControl 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 VpcEncryptionControl(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcEncryptionControl. 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'] === VpcEncryptionControl.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["egressOnlyInternetGatewayExclusion"] = state?.egressOnlyInternetGatewayExclusion;
resourceInputs["elasticFileSystemExclusion"] = state?.elasticFileSystemExclusion;
resourceInputs["internetGatewayExclusion"] = state?.internetGatewayExclusion;
resourceInputs["lambdaExclusion"] = state?.lambdaExclusion;
resourceInputs["mode"] = state?.mode;
resourceInputs["natGatewayExclusion"] = state?.natGatewayExclusion;
resourceInputs["region"] = state?.region;
resourceInputs["resourceExclusions"] = state?.resourceExclusions;
resourceInputs["state"] = state?.state;
resourceInputs["stateMessage"] = state?.stateMessage;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["virtualPrivateGatewayExclusion"] = state?.virtualPrivateGatewayExclusion;
resourceInputs["vpcId"] = state?.vpcId;
resourceInputs["vpcLatticeExclusion"] = state?.vpcLatticeExclusion;
resourceInputs["vpcPeeringExclusion"] = state?.vpcPeeringExclusion;
}
else {
const args = argsOrState;
if (args?.mode === undefined && !opts.urn) {
throw new Error("Missing required property 'mode'");
}
if (args?.vpcId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["egressOnlyInternetGatewayExclusion"] = args?.egressOnlyInternetGatewayExclusion;
resourceInputs["elasticFileSystemExclusion"] = args?.elasticFileSystemExclusion;
resourceInputs["internetGatewayExclusion"] = args?.internetGatewayExclusion;
resourceInputs["lambdaExclusion"] = args?.lambdaExclusion;
resourceInputs["mode"] = args?.mode;
resourceInputs["natGatewayExclusion"] = args?.natGatewayExclusion;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["virtualPrivateGatewayExclusion"] = args?.virtualPrivateGatewayExclusion;
resourceInputs["vpcId"] = args?.vpcId;
resourceInputs["vpcLatticeExclusion"] = args?.vpcLatticeExclusion;
resourceInputs["vpcPeeringExclusion"] = args?.vpcPeeringExclusion;
resourceInputs["resourceExclusions"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["stateMessage"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "aws:ec2/encryptionControl:EncryptionControl" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(VpcEncryptionControl.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcEncryptionControl = VpcEncryptionControl;
/** @internal */
VpcEncryptionControl.__pulumiType = 'aws:ec2/vpcEncryptionControl:VpcEncryptionControl';
//# sourceMappingURL=vpcEncryptionControl.js.map