1. Packages
  2. AWS
  3. API Docs
  4. securityhub
  5. Member
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.securityhub.Member

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Provides a Security Hub member resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.securityhub.Account("example", {});
    const exampleMember = new aws.securityhub.Member("example", {
        accountId: "123456789012",
        email: "example@example.com",
        invite: true,
    }, {
        dependsOn: [example],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.securityhub.Account("example")
    example_member = aws.securityhub.Member("example",
        account_id="123456789012",
        email="example@example.com",
        invite=True,
        opts = pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := securityhub.NewAccount(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		_, err = securityhub.NewMember(ctx, "example", &securityhub.MemberArgs{
    			AccountId: pulumi.String("123456789012"),
    			Email:     pulumi.String("example@example.com"),
    			Invite:    pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		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 example = new Aws.SecurityHub.Account("example");
    
        var exampleMember = new Aws.SecurityHub.Member("example", new()
        {
            AccountId = "123456789012",
            Email = "example@example.com",
            Invite = true,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.securityhub.Account;
    import com.pulumi.aws.securityhub.Member;
    import com.pulumi.aws.securityhub.MemberArgs;
    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 example = new Account("example");
    
            var exampleMember = new Member("exampleMember", MemberArgs.builder()
                .accountId("123456789012")
                .email("example@example.com")
                .invite(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:securityhub:Account
      exampleMember:
        type: aws:securityhub:Member
        name: example
        properties:
          accountId: '123456789012'
          email: example@example.com
          invite: true
        options:
          dependson:
            - ${example}
    

    Create Member Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Member(name: string, args: MemberArgs, opts?: CustomResourceOptions);
    @overload
    def Member(resource_name: str,
               args: MemberArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Member(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               account_id: Optional[str] = None,
               email: Optional[str] = None,
               invite: Optional[bool] = None)
    func NewMember(ctx *Context, name string, args MemberArgs, opts ...ResourceOption) (*Member, error)
    public Member(string name, MemberArgs args, CustomResourceOptions? opts = null)
    public Member(String name, MemberArgs args)
    public Member(String name, MemberArgs args, CustomResourceOptions options)
    
    type: aws:securityhub:Member
    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 MemberArgs
    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 MemberArgs
    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 MemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MemberArgs
    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 examplememberResourceResourceFromSecurityhubmember = new Aws.SecurityHub.Member("examplememberResourceResourceFromSecurityhubmember", new()
    {
        AccountId = "string",
        Email = "string",
        Invite = false,
    });
    
    example, err := securityhub.NewMember(ctx, "examplememberResourceResourceFromSecurityhubmember", &securityhub.MemberArgs{
    	AccountId: pulumi.String("string"),
    	Email:     pulumi.String("string"),
    	Invite:    pulumi.Bool(false),
    })
    
    var examplememberResourceResourceFromSecurityhubmember = new Member("examplememberResourceResourceFromSecurityhubmember", MemberArgs.builder()
        .accountId("string")
        .email("string")
        .invite(false)
        .build());
    
    examplemember_resource_resource_from_securityhubmember = aws.securityhub.Member("examplememberResourceResourceFromSecurityhubmember",
        account_id="string",
        email="string",
        invite=False)
    
    const examplememberResourceResourceFromSecurityhubmember = new aws.securityhub.Member("examplememberResourceResourceFromSecurityhubmember", {
        accountId: "string",
        email: "string",
        invite: false,
    });
    
    type: aws:securityhub:Member
    properties:
        accountId: string
        email: string
        invite: false
    

    Member 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 Member resource accepts the following input properties:

    AccountId string
    The ID of the member AWS account.
    Email string
    The email of the member AWS account.
    Invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    AccountId string
    The ID of the member AWS account.
    Email string
    The email of the member AWS account.
    Invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    accountId String
    The ID of the member AWS account.
    email String
    The email of the member AWS account.
    invite Boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    accountId string
    The ID of the member AWS account.
    email string
    The email of the member AWS account.
    invite boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    account_id str
    The ID of the member AWS account.
    email str
    The email of the member AWS account.
    invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    accountId String
    The ID of the member AWS account.
    email String
    The email of the member AWS account.
    invite Boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Member resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    MasterId string
    The ID of the master Security Hub AWS account.
    MemberStatus string
    The status of the member account relationship.
    Id string
    The provider-assigned unique ID for this managed resource.
    MasterId string
    The ID of the master Security Hub AWS account.
    MemberStatus string
    The status of the member account relationship.
    id String
    The provider-assigned unique ID for this managed resource.
    masterId String
    The ID of the master Security Hub AWS account.
    memberStatus String
    The status of the member account relationship.
    id string
    The provider-assigned unique ID for this managed resource.
    masterId string
    The ID of the master Security Hub AWS account.
    memberStatus string
    The status of the member account relationship.
    id str
    The provider-assigned unique ID for this managed resource.
    master_id str
    The ID of the master Security Hub AWS account.
    member_status str
    The status of the member account relationship.
    id String
    The provider-assigned unique ID for this managed resource.
    masterId String
    The ID of the master Security Hub AWS account.
    memberStatus String
    The status of the member account relationship.

    Look up Existing Member Resource

    Get an existing Member 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?: MemberState, opts?: CustomResourceOptions): Member
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            email: Optional[str] = None,
            invite: Optional[bool] = None,
            master_id: Optional[str] = None,
            member_status: Optional[str] = None) -> Member
    func GetMember(ctx *Context, name string, id IDInput, state *MemberState, opts ...ResourceOption) (*Member, error)
    public static Member Get(string name, Input<string> id, MemberState? state, CustomResourceOptions? opts = null)
    public static Member get(String name, Output<String> id, MemberState 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:
    AccountId string
    The ID of the member AWS account.
    Email string
    The email of the member AWS account.
    Invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    MasterId string
    The ID of the master Security Hub AWS account.
    MemberStatus string
    The status of the member account relationship.
    AccountId string
    The ID of the member AWS account.
    Email string
    The email of the member AWS account.
    Invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    MasterId string
    The ID of the master Security Hub AWS account.
    MemberStatus string
    The status of the member account relationship.
    accountId String
    The ID of the member AWS account.
    email String
    The email of the member AWS account.
    invite Boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    masterId String
    The ID of the master Security Hub AWS account.
    memberStatus String
    The status of the member account relationship.
    accountId string
    The ID of the member AWS account.
    email string
    The email of the member AWS account.
    invite boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    masterId string
    The ID of the master Security Hub AWS account.
    memberStatus string
    The status of the member account relationship.
    account_id str
    The ID of the member AWS account.
    email str
    The email of the member AWS account.
    invite bool
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    master_id str
    The ID of the master Security Hub AWS account.
    member_status str
    The status of the member account relationship.
    accountId String
    The ID of the member AWS account.
    email String
    The email of the member AWS account.
    invite Boolean
    Boolean whether to invite the account to Security Hub as a member. Defaults to false.
    masterId String
    The ID of the master Security Hub AWS account.
    memberStatus String
    The status of the member account relationship.

    Import

    Using pulumi import, import Security Hub members using their account ID. For example:

    $ pulumi import aws:securityhub/member:Member 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
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi