UNPKG

@pulumi/aws

Version:

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

96 lines 3.63 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.ResolverRuleAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Route53 Resolver rule association. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.route53.ResolverRuleAssociation("example", { * resolverRuleId: sys.id, * vpcId: foo.id, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `id` - (String) ID of the Route53 Resolver rule association. * * #### Optional * * * `account_id` (String) AWS Account where this resource is managed. * * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Route53 Resolver rule associations using the `id`. For example: * * console * * % pulumi import aws_route53_resolver_rule_association.example rslvr-rrassoc-97242eaf88example */ class ResolverRuleAssociation extends pulumi.CustomResource { /** * Get an existing ResolverRuleAssociation 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 ResolverRuleAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ResolverRuleAssociation. 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'] === ResolverRuleAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["resolverRuleId"] = state?.resolverRuleId; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.resolverRuleId === undefined && !opts.urn) { throw new Error("Missing required property 'resolverRuleId'"); } if (args?.vpcId === undefined && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["resolverRuleId"] = args?.resolverRuleId; resourceInputs["vpcId"] = args?.vpcId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ResolverRuleAssociation.__pulumiType, name, resourceInputs, opts); } } exports.ResolverRuleAssociation = ResolverRuleAssociation; /** @internal */ ResolverRuleAssociation.__pulumiType = 'aws:route53/resolverRuleAssociation:ResolverRuleAssociation'; //# sourceMappingURL=resolverRuleAssociation.js.map