InvitationAccepter

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

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var primaryGraph = new Aws.Detective.Graph("primaryGraph");

    var primaryMember = new Aws.Detective.Member("primaryMember", new()
    {
        AccountId = "ACCOUNT ID",
        EmailAddress = "EMAIL",
        GraphArn = primaryGraph.Id,
        Message = "Message of the invite",
    });

    var member = new Aws.Detective.InvitationAccepter("member", new()
    {
        GraphArn = primaryGraph.GraphArn,
    }, new CustomResourceOptions
    {
        Provider = "awsalternate",
        DependsOn = new[]
        {
            primaryMember,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/detective"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		primaryGraph, err := detective.NewGraph(ctx, "primaryGraph", nil)
		if err != nil {
			return err
		}
		primaryMember, err := detective.NewMember(ctx, "primaryMember", &detective.MemberArgs{
			AccountId:    pulumi.String("ACCOUNT ID"),
			EmailAddress: pulumi.String("EMAIL"),
			GraphArn:     primaryGraph.ID(),
			Message:      pulumi.String("Message of the invite"),
		})
		if err != nil {
			return err
		}
		_, err = detective.NewInvitationAccepter(ctx, "member", &detective.InvitationAccepterArgs{
			GraphArn: primaryGraph.GraphArn,
		}, pulumi.Provider("awsalternate"), pulumi.DependsOn([]pulumi.Resource{
			primaryMember,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
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 primaryGraph = new Graph("primaryGraph");

        var primaryMember = new Member("primaryMember", MemberArgs.builder()        
            .accountId("ACCOUNT ID")
            .emailAddress("EMAIL")
            .graphArn(primaryGraph.id())
            .message("Message of the invite")
            .build());

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

    }
}
import pulumi
import pulumi_aws as aws

primary_graph = aws.detective.Graph("primaryGraph")
primary_member = aws.detective.Member("primaryMember",
    account_id="ACCOUNT ID",
    email_address="EMAIL",
    graph_arn=primary_graph.id,
    message="Message of the invite")
member = aws.detective.InvitationAccepter("member", graph_arn=primary_graph.graph_arn,
opts=pulumi.ResourceOptions(provider="awsalternate",
    depends_on=[primary_member]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const primaryGraph = new aws.detective.Graph("primaryGraph", {});
const primaryMember = new aws.detective.Member("primaryMember", {
    accountId: "ACCOUNT ID",
    emailAddress: "EMAIL",
    graphArn: primaryGraph.id,
    message: "Message of the invite",
});
const member = new aws.detective.InvitationAccepter("member", {graphArn: primaryGraph.graphArn}, {
    provider: "awsalternate",
    dependsOn: [primaryMember],
});
resources:
  primaryGraph:
    type: aws:detective:Graph
  primaryMember:
    type: aws:detective:Member
    properties:
      accountId: ACCOUNT ID
      emailAddress: EMAIL
      graphArn: ${primaryGraph.id}
      message: Message of the invite
  member:
    type: aws:detective:InvitationAccepter
    properties:
      graphArn: ${primaryGraph.graphArn}
    options:
      provider: awsalternate
      dependson:
        - ${primaryMember}

Create InvitationAccepter Resource

new InvitationAccepter(name: string, args: InvitationAccepterArgs, opts?: CustomResourceOptions);
@overload
def InvitationAccepter(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       graph_arn: Optional[str] = None)
@overload
def InvitationAccepter(resource_name: str,
                       args: InvitationAccepterArgs,
                       opts: Optional[ResourceOptions] = 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.

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.

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

aws_detective_invitation_accepter can be imported using the graph ARN, e.g.

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.