1. Packages
  2. AWS Classic
  3. API Docs
  4. macie2
  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.macie2.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 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],
    });
    
    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]))
    
    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
    	})
    }
    
    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,
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    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 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 awsInvitationAccepterResource = new Aws.Macie2.InvitationAccepter("awsInvitationAccepterResource", new()
    {
        AdministratorAccountId = "string",
    });
    
    example, err := macie2.NewInvitationAccepter(ctx, "awsInvitationAccepterResource", &macie2.InvitationAccepterArgs{
    	AdministratorAccountId: pulumi.String("string"),
    })
    
    var awsInvitationAccepterResource = new InvitationAccepter("awsInvitationAccepterResource", InvitationAccepterArgs.builder()
        .administratorAccountId("string")
        .build());
    
    aws_invitation_accepter_resource = aws.macie2.InvitationAccepter("awsInvitationAccepterResource", administrator_account_id="string")
    
    const awsInvitationAccepterResource = new aws.macie2.InvitationAccepter("awsInvitationAccepterResource", {administratorAccountId: "string"});
    
    type: aws:macie2:InvitationAccepter
    properties:
        administratorAccountId: 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:

    AdministratorAccountId string
    The AWS account ID for the account that sent the invitation.
    AdministratorAccountId string
    The AWS account ID for the account that sent the invitation.
    administratorAccountId String
    The AWS account ID for the account that sent the invitation.
    administratorAccountId string
    The AWS account ID for the account that sent the invitation.
    administrator_account_id str
    The AWS account ID for the account that sent the invitation.
    administratorAccountId 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)
    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:
    AdministratorAccountId string
    The AWS account ID for the account that sent the invitation.
    InvitationId string
    The unique identifier for the invitation.
    AdministratorAccountId string
    The AWS account ID for the account that sent the invitation.
    InvitationId string
    The unique identifier for the invitation.
    administratorAccountId String
    The AWS account ID for the account that sent the invitation.
    invitationId String
    The unique identifier for the invitation.
    administratorAccountId string
    The AWS account ID for the account that sent the invitation.
    invitationId string
    The unique identifier for the invitation.
    administrator_account_id str
    The AWS account ID for the account that sent the invitation.
    invitation_id str
    The unique identifier for the invitation.
    administratorAccountId 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
    

    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