1. Packages
  2. AWS
  3. API Docs
  4. macie2
  5. InvitationAccepter
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.macie2.InvitationAccepter

Explore with Pulumi AI

Provides a resource to manage an Amazon Macie Invitation Accepter.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const primary = new aws.macie2.Account("primary", {});
const member = new aws.macie2.Account("member", {});
const primaryMember = new aws.macie2.Member("primary", {
    accountId: "ACCOUNT ID",
    email: "EMAIL",
    invite: true,
    invitationMessage: "Message of the invite",
}, {
    dependsOn: [primary],
});
const memberInvitationAccepter = new aws.macie2.InvitationAccepter("member", {administratorAccountId: "ADMINISTRATOR ACCOUNT ID"}, {
    dependsOn: [primaryMember],
});
Copy
import pulumi
import pulumi_aws as aws

primary = aws.macie2.Account("primary")
member = aws.macie2.Account("member")
primary_member = aws.macie2.Member("primary",
    account_id="ACCOUNT ID",
    email="EMAIL",
    invite=True,
    invitation_message="Message of the invite",
    opts = pulumi.ResourceOptions(depends_on=[primary]))
member_invitation_accepter = aws.macie2.InvitationAccepter("member", administrator_account_id="ADMINISTRATOR ACCOUNT ID",
opts = pulumi.ResourceOptions(depends_on=[primary_member]))
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		primary, err := macie2.NewAccount(ctx, "primary", nil)
		if err != nil {
			return err
		}
		_, err = macie2.NewAccount(ctx, "member", nil)
		if err != nil {
			return err
		}
		primaryMember, err := macie2.NewMember(ctx, "primary", &macie2.MemberArgs{
			AccountId:         pulumi.String("ACCOUNT ID"),
			Email:             pulumi.String("EMAIL"),
			Invite:            pulumi.Bool(true),
			InvitationMessage: pulumi.String("Message of the invite"),
		}, pulumi.DependsOn([]pulumi.Resource{
			primary,
		}))
		if err != nil {
			return err
		}
		_, err = macie2.NewInvitationAccepter(ctx, "member", &macie2.InvitationAccepterArgs{
			AdministratorAccountId: pulumi.String("ADMINISTRATOR ACCOUNT ID"),
		}, 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.Macie2.Account("primary");

    var member = new Aws.Macie2.Account("member");

    var primaryMember = new Aws.Macie2.Member("primary", new()
    {
        AccountId = "ACCOUNT ID",
        Email = "EMAIL",
        Invite = true,
        InvitationMessage = "Message of the invite",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            primary,
        },
    });

    var memberInvitationAccepter = new Aws.Macie2.InvitationAccepter("member", new()
    {
        AdministratorAccountId = "ADMINISTRATOR ACCOUNT ID",
    }, 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.macie2.Account;
import com.pulumi.aws.macie2.Member;
import com.pulumi.aws.macie2.MemberArgs;
import com.pulumi.aws.macie2.InvitationAccepter;
import com.pulumi.aws.macie2.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 Account("primary");

        var member = new Account("member");

        var primaryMember = new Member("primaryMember", MemberArgs.builder()
            .accountId("ACCOUNT ID")
            .email("EMAIL")
            .invite(true)
            .invitationMessage("Message of the invite")
            .build(), CustomResourceOptions.builder()
                .dependsOn(primary)
                .build());

        var memberInvitationAccepter = new InvitationAccepter("memberInvitationAccepter", InvitationAccepterArgs.builder()
            .administratorAccountId("ADMINISTRATOR ACCOUNT ID")
            .build(), CustomResourceOptions.builder()
                .dependsOn(primaryMember)
                .build());

    }
}
Copy
resources:
  primary:
    type: aws:macie2:Account
  member:
    type: aws:macie2:Account
  primaryMember:
    type: aws:macie2:Member
    name: primary
    properties:
      accountId: ACCOUNT ID
      email: EMAIL
      invite: true
      invitationMessage: Message of the invite
    options:
      dependsOn:
        - ${primary}
  memberInvitationAccepter:
    type: aws:macie2:InvitationAccepter
    name: member
    properties:
      administratorAccountId: ADMINISTRATOR ACCOUNT ID
    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,
                       administrator_account_id: 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:macie2: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 awsInvitationAccepterResource = new Aws.Macie2.InvitationAccepter("awsInvitationAccepterResource", new()
{
    AdministratorAccountId = "string",
});
Copy
example, err := macie2.NewInvitationAccepter(ctx, "awsInvitationAccepterResource", &macie2.InvitationAccepterArgs{
	AdministratorAccountId: pulumi.String("string"),
})
Copy
var awsInvitationAccepterResource = new InvitationAccepter("awsInvitationAccepterResource", InvitationAccepterArgs.builder()
    .administratorAccountId("string")
    .build());
Copy
aws_invitation_accepter_resource = aws.macie2.InvitationAccepter("awsInvitationAccepterResource", administrator_account_id="string")
Copy
const awsInvitationAccepterResource = new aws.macie2.InvitationAccepter("awsInvitationAccepterResource", {administratorAccountId: "string"});
Copy
type: aws:macie2:InvitationAccepter
properties:
    administratorAccountId: 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:

AdministratorAccountId
This property is required.
Changes to this property will trigger replacement.
string
The AWS account ID for the account that sent the invitation.
AdministratorAccountId
This property is required.
Changes to this property will trigger replacement.
string
The AWS account ID for the account that sent the invitation.
administratorAccountId
This property is required.
Changes to this property will trigger replacement.
String
The AWS account ID for the account that sent the invitation.
administratorAccountId
This property is required.
Changes to this property will trigger replacement.
string
The AWS account ID for the account that sent the invitation.
administrator_account_id
This property is required.
Changes to this property will trigger replacement.
str
The AWS account ID for the account that sent the invitation.
administratorAccountId
This property is required.
Changes to this property will trigger replacement.
String
The AWS account ID for the account that sent the invitation.

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.
InvitationId string
The unique identifier for the invitation.
Id string
The provider-assigned unique ID for this managed resource.
InvitationId string
The unique identifier for the invitation.
id String
The provider-assigned unique ID for this managed resource.
invitationId String
The unique identifier for the invitation.
id string
The provider-assigned unique ID for this managed resource.
invitationId string
The unique identifier for the invitation.
id str
The provider-assigned unique ID for this managed resource.
invitation_id str
The unique identifier for the invitation.
id String
The provider-assigned unique ID for this managed resource.
invitationId String
The unique identifier for the invitation.

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,
        administrator_account_id: Optional[str] = None,
        invitation_id: 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:macie2: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:
AdministratorAccountId Changes to this property will trigger replacement. string
The AWS account ID for the account that sent the invitation.
InvitationId string
The unique identifier for the invitation.
AdministratorAccountId Changes to this property will trigger replacement. string
The AWS account ID for the account that sent the invitation.
InvitationId string
The unique identifier for the invitation.
administratorAccountId Changes to this property will trigger replacement. String
The AWS account ID for the account that sent the invitation.
invitationId String
The unique identifier for the invitation.
administratorAccountId Changes to this property will trigger replacement. string
The AWS account ID for the account that sent the invitation.
invitationId string
The unique identifier for the invitation.
administrator_account_id Changes to this property will trigger replacement. str
The AWS account ID for the account that sent the invitation.
invitation_id str
The unique identifier for the invitation.
administratorAccountId Changes to this property will trigger replacement. String
The AWS account ID for the account that sent the invitation.
invitationId String
The unique identifier for the invitation.

Import

Using pulumi import, import aws_macie2_invitation_accepter using the admin account ID. For example:

$ pulumi import aws:macie2/invitationAccepter:InvitationAccepter example 123456789012
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.