@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
107 lines • 4.61 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.ProfilesResourceAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Route 53 Profiles Resource Association.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.route53.ProfilesProfile("example", {name: "example"});
* const exampleVpc = new aws.ec2.Vpc("example", {cidr: "10.0.0.0/16"});
* const exampleZone = new aws.route53.Zone("example", {
* name: "example.com",
* vpcs: [{
* vpcId: exampleVpc.id,
* }],
* });
* const exampleProfilesResourceAssociation = new aws.route53.ProfilesResourceAssociation("example", {
* name: "example",
* profileId: example.id,
* resourceArn: exampleZone.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Route 53 Profiles Resource Association using the `id`. For example:
*
* ```sh
* $ pulumi import aws:route53/profilesResourceAssociation:ProfilesResourceAssociation example rpa-id-12345678
* ```
*/
class ProfilesResourceAssociation extends pulumi.CustomResource {
/**
* Get an existing ProfilesResourceAssociation 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 ProfilesResourceAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ProfilesResourceAssociation. 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'] === ProfilesResourceAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state?.name;
resourceInputs["ownerId"] = state?.ownerId;
resourceInputs["profileId"] = state?.profileId;
resourceInputs["region"] = state?.region;
resourceInputs["resourceArn"] = state?.resourceArn;
resourceInputs["resourceProperties"] = state?.resourceProperties;
resourceInputs["resourceType"] = state?.resourceType;
resourceInputs["status"] = state?.status;
resourceInputs["statusMessage"] = state?.statusMessage;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.profileId === undefined && !opts.urn) {
throw new Error("Missing required property 'profileId'");
}
if (args?.resourceArn === undefined && !opts.urn) {
throw new Error("Missing required property 'resourceArn'");
}
resourceInputs["name"] = args?.name;
resourceInputs["profileId"] = args?.profileId;
resourceInputs["region"] = args?.region;
resourceInputs["resourceArn"] = args?.resourceArn;
resourceInputs["resourceProperties"] = args?.resourceProperties;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["ownerId"] = undefined /*out*/;
resourceInputs["resourceType"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["statusMessage"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProfilesResourceAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProfilesResourceAssociation = ProfilesResourceAssociation;
/** @internal */
ProfilesResourceAssociation.__pulumiType = 'aws:route53/profilesResourceAssociation:ProfilesResourceAssociation';
//# sourceMappingURL=profilesResourceAssociation.js.map