UNPKG

@pulumi/aws

Version:

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

149 lines 6.26 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.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, Object.assign(Object.assign({}, 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 ? state.allowAssociationToShareableServiceNetwork : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["portRanges"] = state ? state.portRanges : undefined; resourceInputs["protocol"] = state ? state.protocol : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["resourceConfigurationDefinition"] = state ? state.resourceConfigurationDefinition : undefined; resourceInputs["resourceConfigurationGroupId"] = state ? state.resourceConfigurationGroupId : undefined; resourceInputs["resourceGatewayIdentifier"] = state ? state.resourceGatewayIdentifier : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["timeouts"] = state ? state.timeouts : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; resourceInputs["allowAssociationToShareableServiceNetwork"] = args ? args.allowAssociationToShareableServiceNetwork : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["portRanges"] = args ? args.portRanges : undefined; resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["resourceConfigurationDefinition"] = args ? args.resourceConfigurationDefinition : undefined; resourceInputs["resourceConfigurationGroupId"] = args ? args.resourceConfigurationGroupId : undefined; resourceInputs["resourceGatewayIdentifier"] = args ? args.resourceGatewayIdentifier : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeouts"] = args ? args.timeouts : undefined; resourceInputs["type"] = args ? args.type : undefined; 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