@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
91 lines • 3.92 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.SharedDirectoryAccepter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Accepts a shared directory in a consumer account.
*
* > **NOTE:** Destroying this resource removes the shared directory from the consumer account only.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.directoryservice.SharedDirectory("example", {
* directoryId: exampleAwsDirectoryServiceDirectory.id,
* notes: "example",
* target: {
* id: receiver.accountId,
* },
* });
* const exampleSharedDirectoryAccepter = new aws.directoryservice.SharedDirectoryAccepter("example", {sharedDirectoryId: example.sharedDirectoryId});
* ```
*
* ## Import
*
* Using `pulumi import`, import Directory Service Shared Directories using the shared directory ID. For example:
*
* ```sh
* $ pulumi import aws:directoryservice/sharedDirectoryAccepter:SharedDirectoryAccepter example d-9267633ece
* ```
*/
class SharedDirectoryAccepter extends pulumi.CustomResource {
/**
* Get an existing SharedDirectoryAccepter 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 SharedDirectoryAccepter(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of SharedDirectoryAccepter. 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'] === SharedDirectoryAccepter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["method"] = state?.method;
resourceInputs["notes"] = state?.notes;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["ownerDirectoryId"] = state?.ownerDirectoryId;
resourceInputs["region"] = state?.region;
resourceInputs["sharedDirectoryId"] = state?.sharedDirectoryId;
}
else {
const args = argsOrState;
if (args?.sharedDirectoryId === undefined && !opts.urn) {
throw new Error("Missing required property 'sharedDirectoryId'");
}
resourceInputs["region"] = args?.region;
resourceInputs["sharedDirectoryId"] = args?.sharedDirectoryId;
resourceInputs["method"] = undefined /*out*/;
resourceInputs["notes"] = undefined /*out*/;
resourceInputs["ownerAccountId"] = undefined /*out*/;
resourceInputs["ownerDirectoryId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SharedDirectoryAccepter.__pulumiType, name, resourceInputs, opts);
}
}
exports.SharedDirectoryAccepter = SharedDirectoryAccepter;
/** @internal */
SharedDirectoryAccepter.__pulumiType = 'aws:directoryservice/sharedDirectoryAccepter:SharedDirectoryAccepter';
//# sourceMappingURL=sharedDirectoryAccepter.js.map