@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
105 lines • 5.23 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.VpcIpamResourceDiscoveryAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an association between an Amazon IP Address Manager (IPAM) and a IPAM Resource Discovery. IPAM Resource Discoveries are resources meant for multi-organization customers. If you wish to use a single IPAM across multiple orgs, a resource discovery can be created and shared from a subordinate organization to the management organizations IPAM delegated admin account.
*
* Once an association is created between two organizations via IPAM & a IPAM Resource Discovery, IPAM Pools can be shared via Resource Access Manager (RAM) to accounts in the subordinate organization; these RAM shares must be accepted by the end user account. Pools can then also discover and monitor IPAM resources in the subordinate organization.
*
* ## Example Usage
*
* Basic usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.ec2.VpcIpamResourceDiscoveryAssociation("test", {
* ipamId: testAwsVpcIpam.id,
* ipamResourceDiscoveryId: testAwsVpcIpamResourceDiscovery.id,
* tags: {
* Name: "test",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import IPAMs using the IPAM resource discovery association `id`. For example:
*
* ```sh
* $ pulumi import aws:ec2/vpcIpamResourceDiscoveryAssociation:VpcIpamResourceDiscoveryAssociation example ipam-res-disco-assoc-0178368ad2146a492
* ```
*/
class VpcIpamResourceDiscoveryAssociation extends pulumi.CustomResource {
/**
* Get an existing VpcIpamResourceDiscoveryAssociation 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 VpcIpamResourceDiscoveryAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcIpamResourceDiscoveryAssociation. 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'] === VpcIpamResourceDiscoveryAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["ipamArn"] = state?.ipamArn;
resourceInputs["ipamId"] = state?.ipamId;
resourceInputs["ipamRegion"] = state?.ipamRegion;
resourceInputs["ipamResourceDiscoveryId"] = state?.ipamResourceDiscoveryId;
resourceInputs["isDefault"] = state?.isDefault;
resourceInputs["ownerId"] = state?.ownerId;
resourceInputs["region"] = state?.region;
resourceInputs["state"] = state?.state;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.ipamId === undefined && !opts.urn) {
throw new Error("Missing required property 'ipamId'");
}
if (args?.ipamResourceDiscoveryId === undefined && !opts.urn) {
throw new Error("Missing required property 'ipamResourceDiscoveryId'");
}
resourceInputs["ipamId"] = args?.ipamId;
resourceInputs["ipamResourceDiscoveryId"] = args?.ipamResourceDiscoveryId;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["ipamArn"] = undefined /*out*/;
resourceInputs["ipamRegion"] = undefined /*out*/;
resourceInputs["isDefault"] = undefined /*out*/;
resourceInputs["ownerId"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcIpamResourceDiscoveryAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcIpamResourceDiscoveryAssociation = VpcIpamResourceDiscoveryAssociation;
/** @internal */
VpcIpamResourceDiscoveryAssociation.__pulumiType = 'aws:ec2/vpcIpamResourceDiscoveryAssociation:VpcIpamResourceDiscoveryAssociation';
//# sourceMappingURL=vpcIpamResourceDiscoveryAssociation.js.map