@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
122 lines • 4.72 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.ResolverEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Route 53 Resolver endpoint resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = new aws.route53.ResolverEndpoint("foo", {
* name: "foo",
* direction: "INBOUND",
* resolverEndpointType: "IPV4",
* securityGroupIds: [
* sg1.id,
* sg2.id,
* ],
* ipAddresses: [
* {
* subnetId: sn1.id,
* },
* {
* subnetId: sn2.id,
* ip: "10.0.64.4",
* },
* ],
* protocols: [
* "Do53",
* "DoH",
* ],
* tags: {
* Environment: "Prod",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Route 53 Resolver endpoints using the Route 53 Resolver endpoint ID. For example:
*
* ```sh
* $ pulumi import aws:route53/resolverEndpoint:ResolverEndpoint foo rslvr-in-abcdef01234567890
* ```
*/
class ResolverEndpoint extends pulumi.CustomResource {
/**
* Get an existing ResolverEndpoint 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 ResolverEndpoint(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ResolverEndpoint. 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'] === ResolverEndpoint.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["direction"] = state?.direction;
resourceInputs["hostVpcId"] = state?.hostVpcId;
resourceInputs["ipAddresses"] = state?.ipAddresses;
resourceInputs["name"] = state?.name;
resourceInputs["protocols"] = state?.protocols;
resourceInputs["region"] = state?.region;
resourceInputs["resolverEndpointType"] = state?.resolverEndpointType;
resourceInputs["securityGroupIds"] = state?.securityGroupIds;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.direction === undefined && !opts.urn) {
throw new Error("Missing required property 'direction'");
}
if (args?.ipAddresses === undefined && !opts.urn) {
throw new Error("Missing required property 'ipAddresses'");
}
if (args?.securityGroupIds === undefined && !opts.urn) {
throw new Error("Missing required property 'securityGroupIds'");
}
resourceInputs["direction"] = args?.direction;
resourceInputs["ipAddresses"] = args?.ipAddresses;
resourceInputs["name"] = args?.name;
resourceInputs["protocols"] = args?.protocols;
resourceInputs["region"] = args?.region;
resourceInputs["resolverEndpointType"] = args?.resolverEndpointType;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["hostVpcId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ResolverEndpoint.__pulumiType, name, resourceInputs, opts);
}
}
exports.ResolverEndpoint = ResolverEndpoint;
/** @internal */
ResolverEndpoint.__pulumiType = 'aws:route53/resolverEndpoint:ResolverEndpoint';
//# sourceMappingURL=resolverEndpoint.js.map