Class Member


  • public class Member
    extends com.pulumi.resources.CustomResource
    Provides a resource to manage a GuardDuty member. To accept invitations in member accounts, see the `aws.guardduty.InviteAccepter` resource. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.guardduty.Detector;
     import com.pulumi.aws.guardduty.DetectorArgs;
     import com.pulumi.aws.guardduty.Member;
     import com.pulumi.aws.guardduty.MemberArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 Detector("primary", DetectorArgs.builder()
                 .enable(true)
                 .build());
     
             var member = new Detector("member", DetectorArgs.builder()
                 .enable(true)
                 .build());
     
             var memberMember = new Member("memberMember", MemberArgs.builder()
                 .accountId(member.accountId())
                 .detectorId(primary.id())
                 .email("required@example.com")
                 .invite(true)
                 .invitationMessage("please accept guardduty invitation")
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import GuardDuty members using the primary GuardDuty detector ID and member AWS account ID. For example: ```sh $ pulumi import aws:guardduty/member:Member MyMember 00b00fd5aecc0ab60a708659477e9617:123456789012 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Member​(java.lang.String name)  
      Member​(java.lang.String name, MemberArgs args)  
      Member​(java.lang.String name, MemberArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> accountId()  
      com.pulumi.core.Output<java.lang.String> detectorId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disableEmailNotification()  
      com.pulumi.core.Output<java.lang.String> email()  
      static Member get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, MemberState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> invitationMessage()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> invite()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> relationshipStatus()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Member

        public Member​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Member

        public Member​(java.lang.String name,
                      MemberArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Member

        public Member​(java.lang.String name,
                      MemberArgs args,
                      @Nullable
                      com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • accountId

        public com.pulumi.core.Output<java.lang.String> accountId()
        Returns:
        AWS account ID for member account.
      • detectorId

        public com.pulumi.core.Output<java.lang.String> detectorId()
        Returns:
        Detector ID of the GuardDuty account where you want to create member accounts.
      • disableEmailNotification

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disableEmailNotification()
        Returns:
        Boolean whether an email notification is sent to the accounts. Defaults to `false`.
      • email

        public com.pulumi.core.Output<java.lang.String> email()
        Returns:
        Email address for member account.
      • invitationMessage

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> invitationMessage()
        Returns:
        Message for invitation.
      • invite

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> invite()
        Returns:
        Boolean whether to invite the account to GuardDuty as a member. Defaults to `false`. To detect if an invitation needs to be (re-)sent, the this provider state value is `true` based on a `relationshipStatus` of `Disabled`, `Enabled`, `Invited`, or `EmailVerificationInProgress`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • relationshipStatus

        public com.pulumi.core.Output<java.lang.String> relationshipStatus()
        Returns:
        Status of the relationship between the member account and its primary account. More information can be found in [Amazon GuardDuty API Reference](https://docs.aws.amazon.com/guardduty/latest/ug/get-members.html).
      • get

        public static Member get​(java.lang.String name,
                                 com.pulumi.core.Output<java.lang.String> id,
                                 @Nullable
                                 MemberState state,
                                 @Nullable
                                 com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.