@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
83 lines • 3.5 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.InvitationAccepter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage an [Amazon Detective Invitation Accepter](https://docs.aws.amazon.com/detective/latest/APIReference/API_AcceptInvitation.html). Ensure that the accepter is configured to use the AWS account you wish to _accept_ the invitation from the primary graph owner account.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const primary = new aws.detective.Graph("primary", {});
* const primaryMember = new aws.detective.Member("primary", {
* accountId: "ACCOUNT ID",
* emailAddress: "EMAIL",
* graphArn: primary.graphArn,
* message: "Message of the invite",
* });
* const member = new aws.detective.InvitationAccepter("member", {graphArn: primary.graphArn}, {
* dependsOn: [primaryMember],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_detective_invitation_accepter` using the graph ARN. For example:
*
* ```sh
* $ pulumi import aws:detective/invitationAccepter:InvitationAccepter example arn:aws:detective:us-east-1:123456789101:graph:231684d34gh74g4bae1dbc7bd807d02d
* ```
*/
class InvitationAccepter extends pulumi.CustomResource {
/**
* Get an existing InvitationAccepter 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 InvitationAccepter(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of InvitationAccepter. 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'] === InvitationAccepter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["graphArn"] = state?.graphArn;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.graphArn === undefined && !opts.urn) {
throw new Error("Missing required property 'graphArn'");
}
resourceInputs["graphArn"] = args?.graphArn;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(InvitationAccepter.__pulumiType, name, resourceInputs, opts);
}
}
exports.InvitationAccepter = InvitationAccepter;
/** @internal */
InvitationAccepter.__pulumiType = 'aws:detective/invitationAccepter:InvitationAccepter';
//# sourceMappingURL=invitationAccepter.js.map