UNPKG

@pulumi/aws

Version:

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

107 lines 4.77 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.Member = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an [Amazon Detective Member](https://docs.aws.amazon.com/detective/latest/APIReference/API_CreateMembers.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.detective.Graph("example", {}); * const exampleMember = new aws.detective.Member("example", { * accountId: "AWS ACCOUNT ID", * emailAddress: "EMAIL", * graphArn: example.graphArn, * message: "Message of the invitation", * disableEmailNotification: true, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_detective_member` using the ARN of the graph followed by the account ID of the member account. For example: * * ```sh * $ pulumi import aws:detective/member:Member example arn:aws:detective:us-east-1:123456789101:graph:231684d34gh74g4bae1dbc7bd807d02d/123456789012 * ``` */ class Member extends pulumi.CustomResource { /** * Get an existing Member 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 Member(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Member. 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'] === Member.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state?.accountId; resourceInputs["administratorId"] = state?.administratorId; resourceInputs["disableEmailNotification"] = state?.disableEmailNotification; resourceInputs["disabledReason"] = state?.disabledReason; resourceInputs["emailAddress"] = state?.emailAddress; resourceInputs["graphArn"] = state?.graphArn; resourceInputs["invitedTime"] = state?.invitedTime; resourceInputs["message"] = state?.message; resourceInputs["region"] = state?.region; resourceInputs["status"] = state?.status; resourceInputs["updatedTime"] = state?.updatedTime; resourceInputs["volumeUsageInBytes"] = state?.volumeUsageInBytes; } else { const args = argsOrState; if (args?.accountId === undefined && !opts.urn) { throw new Error("Missing required property 'accountId'"); } if (args?.emailAddress === undefined && !opts.urn) { throw new Error("Missing required property 'emailAddress'"); } if (args?.graphArn === undefined && !opts.urn) { throw new Error("Missing required property 'graphArn'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["disableEmailNotification"] = args?.disableEmailNotification; resourceInputs["emailAddress"] = args?.emailAddress; resourceInputs["graphArn"] = args?.graphArn; resourceInputs["message"] = args?.message; resourceInputs["region"] = args?.region; resourceInputs["administratorId"] = undefined /*out*/; resourceInputs["disabledReason"] = undefined /*out*/; resourceInputs["invitedTime"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedTime"] = undefined /*out*/; resourceInputs["volumeUsageInBytes"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Member.__pulumiType, name, resourceInputs, opts); } } exports.Member = Member; /** @internal */ Member.__pulumiType = 'aws:detective/member:Member'; //# sourceMappingURL=member.js.map