@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
149 lines • 5.78 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.ResourceConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS VPC Lattice Resource Configuration.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.ResourceConfiguration("example", {
* name: "Example",
* resourceGatewayIdentifier: exampleAwsVpclatticeResourceGateway.id,
* portRanges: ["80"],
* protocol: "TCP",
* resourceConfigurationDefinition: {
* dnsResource: {
* domainName: "example.com",
* ipAddressType: "IPV4",
* },
* },
* tags: {
* Environment: "Example",
* },
* });
* ```
*
* ### IP Address Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.ResourceConfiguration("example", {
* name: "Example",
* resourceGatewayIdentifier: exampleAwsVpclatticeResourceGateway.id,
* portRanges: ["80"],
* protocol: "TCP",
* resourceConfigurationDefinition: {
* ipResource: {
* ipAddress: "10.0.0.1",
* },
* },
* tags: {
* Environment: "Example",
* },
* });
* ```
*
* ### ARN Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.vpclattice.ResourceConfiguration("test", {
* name: "Example",
* resourceGatewayIdentifier: testAwsVpclatticeResourceGateway.id,
* type: "ARN",
* resourceConfigurationDefinition: {
* arnResource: {
* arn: example.arn,
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC Lattice Resource Configuration using the `id`. For example:
*
* ```sh
* $ pulumi import aws:vpclattice/resourceConfiguration:ResourceConfiguration example rcfg-1234567890abcdef1
* ```
*/
class ResourceConfiguration extends pulumi.CustomResource {
/**
* Get an existing ResourceConfiguration 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 ResourceConfiguration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ResourceConfiguration. 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'] === ResourceConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowAssociationToShareableServiceNetwork"] = state?.allowAssociationToShareableServiceNetwork;
resourceInputs["arn"] = state?.arn;
resourceInputs["name"] = state?.name;
resourceInputs["portRanges"] = state?.portRanges;
resourceInputs["protocol"] = state?.protocol;
resourceInputs["region"] = state?.region;
resourceInputs["resourceConfigurationDefinition"] = state?.resourceConfigurationDefinition;
resourceInputs["resourceConfigurationGroupId"] = state?.resourceConfigurationGroupId;
resourceInputs["resourceGatewayIdentifier"] = state?.resourceGatewayIdentifier;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["type"] = state?.type;
}
else {
const args = argsOrState;
resourceInputs["allowAssociationToShareableServiceNetwork"] = args?.allowAssociationToShareableServiceNetwork;
resourceInputs["name"] = args?.name;
resourceInputs["portRanges"] = args?.portRanges;
resourceInputs["protocol"] = args?.protocol;
resourceInputs["region"] = args?.region;
resourceInputs["resourceConfigurationDefinition"] = args?.resourceConfigurationDefinition;
resourceInputs["resourceConfigurationGroupId"] = args?.resourceConfigurationGroupId;
resourceInputs["resourceGatewayIdentifier"] = args?.resourceGatewayIdentifier;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["type"] = args?.type;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ResourceConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.ResourceConfiguration = ResourceConfiguration;
/** @internal */
ResourceConfiguration.__pulumiType = 'aws:vpclattice/resourceConfiguration:ResourceConfiguration';
//# sourceMappingURL=resourceConfiguration.js.map