1. Packages
  2. AWS
  3. API Docs
  4. detective
  5. InvitationAccepter
AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi

aws.detective.InvitationAccepter

Explore with Pulumi AI

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.graphArn,
    message: "Message of the invite",
});
const member = new aws.detective.InvitationAccepter("member", {graphArn: primary.graphArn}, {
    dependsOn: [primaryMember],
});
Copy
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.graph_arn,
    message="Message of the invite")
member = aws.detective.InvitationAccepter("member", graph_arn=primary.graph_arn,
opts = pulumi.ResourceOptions(depends_on=[primary_member]))
Copy
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.GraphArn,
			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
	})
}
Copy
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.GraphArn,
        Message = "Message of the invite",
    });

    var member = new Aws.Detective.InvitationAccepter("member", new()
    {
        GraphArn = primary.GraphArn,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            primaryMember,
        },
    });

});
Copy
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.graphArn())
            .message("Message of the invite")
            .build());

        var member = new InvitationAccepter("member", InvitationAccepterArgs.builder()
            .graphArn(primary.graphArn())
            .build(), CustomResourceOptions.builder()
                .dependsOn(primaryMember)
                .build());

    }
}
Copy
resources:
  primary:
    type: aws:detective:Graph
  primaryMember:
    type: aws:detective:Member
    name: primary
    properties:
      accountId: ACCOUNT ID
      emailAddress: EMAIL
      graphArn: ${primary.graphArn}
      message: Message of the invite
  member:
    type: aws:detective:InvitationAccepter
    properties:
      graphArn: ${primary.graphArn}
    options:
      dependsOn:
        - ${primaryMember}
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. InvitationAccepterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. InvitationAccepterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InvitationAccepterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
example, err := detective.NewInvitationAccepter(ctx, "invitationAccepterResource", &detective.InvitationAccepterArgs{
	GraphArn: pulumi.String("string"),
})
Copy
var invitationAccepterResource = new com.pulumi.aws.detective.InvitationAccepter("invitationAccepterResource", com.pulumi.aws.detective.InvitationAccepterArgs.builder()
    .graphArn("string")
    .build());
Copy
invitation_accepter_resource = aws.detective.InvitationAccepter("invitationAccepterResource", graph_arn="string")
Copy
const invitationAccepterResource = new aws.detective.InvitationAccepter("invitationAccepterResource", {graphArn: "string"});
Copy
type: aws:detective:InvitationAccepter
properties:
    graphArn: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The InvitationAccepter resource accepts the following input properties:

GraphArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the behavior graph that the member account is accepting the invitation for.
GraphArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn
This property is required.
Changes to this property will trigger replacement.
String
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the behavior graph that the member account is accepting the invitation for.
graph_arn
This property is required.
Changes to this property will trigger replacement.
str
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: aws:detective:InvitationAccepter    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
ARN of the behavior graph that the member account is accepting the invitation for.
GraphArn Changes to this property will trigger replacement. string
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn Changes to this property will trigger replacement. String
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn Changes to this property will trigger replacement. string
ARN of the behavior graph that the member account is accepting the invitation for.
graph_arn Changes to this property will trigger replacement. str
ARN of the behavior graph that the member account is accepting the invitation for.
graphArn Changes to this property will trigger replacement. 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
Copy

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.