1. Packages
  2. AWS Classic
  3. API Docs
  4. detective
  5. InvitationAccepter

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.detective.InvitationAccepter

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a resource to manage an Amazon Detective Invitation Accepter. 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

    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.id,
        message: "Message of the invite",
    });
    const member = new aws.detective.InvitationAccepter("member", {graphArn: primary.graphArn}, {
        dependsOn: [primaryMember],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    primary = aws.detective.Graph("primary")
    primary_member = aws.detective.Member("primary",
        account_id="ACCOUNT ID",
        email_address="EMAIL",
        graph_arn=primary.id,
        message="Message of the invite")
    member = aws.detective.InvitationAccepter("member", graph_arn=primary.graph_arn,
    opts = pulumi.ResourceOptions(depends_on=[primary_member]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/detective"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := detective.NewGraph(ctx, "primary", nil)
    		if err != nil {
    			return err
    		}
    		primaryMember, err := detective.NewMember(ctx, "primary", &detective.MemberArgs{
    			AccountId:    pulumi.String("ACCOUNT ID"),
    			EmailAddress: pulumi.String("EMAIL"),
    			GraphArn:     primary.ID(),
    			Message:      pulumi.String("Message of the invite"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = detective.NewInvitationAccepter(ctx, "member", &detective.InvitationAccepterArgs{
    			GraphArn: primary.GraphArn,
    		}, pulumi.DependsOn([]pulumi.Resource{
    			primaryMember,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var primary = new Aws.Detective.Graph("primary");
    
        var primaryMember = new Aws.Detective.Member("primary", new()
        {
            AccountId = "ACCOUNT ID",
            EmailAddress = "EMAIL",
            GraphArn = primary.Id,
            Message = "Message of the invite",
        });
    
        var member = new Aws.Detective.InvitationAccepter("member", new()
        {
            GraphArn = primary.GraphArn,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                primaryMember,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.detective.Graph;
    import com.pulumi.aws.detective.Member;
    import com.pulumi.aws.detective.MemberArgs;
    import com.pulumi.aws.detective.InvitationAccepter;
    import com.pulumi.aws.detective.InvitationAccepterArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var primary = new Graph("primary");
    
            var primaryMember = new Member("primaryMember", MemberArgs.builder()
                .accountId("ACCOUNT ID")
                .emailAddress("EMAIL")
                .graphArn(primary.id())
                .message("Message of the invite")
                .build());
    
            var member = new InvitationAccepter("member", InvitationAccepterArgs.builder()
                .graphArn(primary.graphArn())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(primaryMember)
                    .build());
    
        }
    }
    
    resources:
      primary:
        type: aws:detective:Graph
      primaryMember:
        type: aws:detective:Member
        name: primary
        properties:
          accountId: ACCOUNT ID
          emailAddress: EMAIL
          graphArn: ${primary.id}
          message: Message of the invite
      member:
        type: aws:detective:InvitationAccepter
        properties:
          graphArn: ${primary.graphArn}
        options:
          dependson:
            - ${primaryMember}
    

    Create InvitationAccepter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new InvitationAccepter(name: string, args: InvitationAccepterArgs, opts?: CustomResourceOptions);
    @overload
    def InvitationAccepter(resource_name: str,
                           args: InvitationAccepterArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def InvitationAccepter(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           graph_arn: Optional[str] = None)
    func NewInvitationAccepter(ctx *Context, name string, args InvitationAccepterArgs, opts ...ResourceOption) (*InvitationAccepter, error)
    public InvitationAccepter(string name, InvitationAccepterArgs args, CustomResourceOptions? opts = null)
    public InvitationAccepter(String name, InvitationAccepterArgs args)
    public InvitationAccepter(String name, InvitationAccepterArgs args, CustomResourceOptions options)
    
    type: aws:detective:InvitationAccepter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InvitationAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InvitationAccepterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InvitationAccepterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InvitationAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InvitationAccepterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var invitationAccepterResource = new Aws.Detective.InvitationAccepter("invitationAccepterResource", new()
    {
        GraphArn = "string",
    });
    
    example, err := detective.NewInvitationAccepter(ctx, "invitationAccepterResource", &detective.InvitationAccepterArgs{
    	GraphArn: pulumi.String("string"),
    })
    
    var invitationAccepterResource = new InvitationAccepter("invitationAccepterResource", InvitationAccepterArgs.builder()
        .graphArn("string")
        .build());
    
    invitation_accepter_resource = aws.detective.InvitationAccepter("invitationAccepterResource", graph_arn="string")
    
    const invitationAccepterResource = new aws.detective.InvitationAccepter("invitationAccepterResource", {graphArn: "string"});
    
    type: aws:detective:InvitationAccepter
    properties:
        graphArn: string
    

    InvitationAccepter Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The InvitationAccepter resource accepts the following input properties:

    GraphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    GraphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn String
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    graph_arn str
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn String
    ARN of the behavior graph that the member account is accepting the invitation for.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the InvitationAccepter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing InvitationAccepter Resource

    Get an existing InvitationAccepter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InvitationAccepterState, opts?: CustomResourceOptions): InvitationAccepter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            graph_arn: Optional[str] = None) -> InvitationAccepter
    func GetInvitationAccepter(ctx *Context, name string, id IDInput, state *InvitationAccepterState, opts ...ResourceOption) (*InvitationAccepter, error)
    public static InvitationAccepter Get(string name, Input<string> id, InvitationAccepterState? state, CustomResourceOptions? opts = null)
    public static InvitationAccepter get(String name, Output<String> id, InvitationAccepterState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    GraphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    GraphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn String
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn string
    ARN of the behavior graph that the member account is accepting the invitation for.
    graph_arn str
    ARN of the behavior graph that the member account is accepting the invitation for.
    graphArn String
    ARN of the behavior graph that the member account is accepting the invitation for.

    Import

    Using pulumi import, import aws_detective_invitation_accepter using the graph ARN. For example:

    $ pulumi import aws:detective/invitationAccepter:InvitationAccepter example arn:aws:detective:us-east-1:123456789101:graph:231684d34gh74g4bae1dbc7bd807d02d
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi