1. Packages
  2. AWS Classic
  3. API Docs
  4. inspector2
  5. MemberAssociation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

aws.inspector2.MemberAssociation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

    Resource for associating accounts to existing Inspector instances.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.inspector2.MemberAssociation("example", {accountId: "123456789012"});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.inspector2.MemberAssociation("example", account_id="123456789012")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := inspector2.NewMemberAssociation(ctx, "example", &inspector2.MemberAssociationArgs{
    			AccountId: pulumi.String("123456789012"),
    		})
    		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.Inspector2.MemberAssociation("example", new()
        {
            AccountId = "123456789012",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.inspector2.MemberAssociation;
    import com.pulumi.aws.inspector2.MemberAssociationArgs;
    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 MemberAssociation("example", MemberAssociationArgs.builder()        
                .accountId("123456789012")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:inspector2:MemberAssociation
        properties:
          accountId: '123456789012'
    

    Create MemberAssociation Resource

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

    Constructor syntax

    new MemberAssociation(name: string, args: MemberAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def MemberAssociation(resource_name: str,
                          args: MemberAssociationArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MemberAssociation(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          account_id: Optional[str] = None)
    func NewMemberAssociation(ctx *Context, name string, args MemberAssociationArgs, opts ...ResourceOption) (*MemberAssociation, error)
    public MemberAssociation(string name, MemberAssociationArgs args, CustomResourceOptions? opts = null)
    public MemberAssociation(String name, MemberAssociationArgs args)
    public MemberAssociation(String name, MemberAssociationArgs args, CustomResourceOptions options)
    
    type: aws:inspector2:MemberAssociation
    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 MemberAssociationArgs
    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 MemberAssociationArgs
    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 MemberAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MemberAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MemberAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var memberAssociationResource = new Aws.Inspector2.MemberAssociation("memberAssociationResource", new()
    {
        AccountId = "string",
    });
    
    example, err := inspector2.NewMemberAssociation(ctx, "memberAssociationResource", &inspector2.MemberAssociationArgs{
    	AccountId: pulumi.String("string"),
    })
    
    var memberAssociationResource = new MemberAssociation("memberAssociationResource", MemberAssociationArgs.builder()        
        .accountId("string")
        .build());
    
    member_association_resource = aws.inspector2.MemberAssociation("memberAssociationResource", account_id="string")
    
    const memberAssociationResource = new aws.inspector2.MemberAssociation("memberAssociationResource", {accountId: "string"});
    
    type: aws:inspector2:MemberAssociation
    properties:
        accountId: string
    

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

    AccountId string
    ID of the account to associate
    AccountId string
    ID of the account to associate
    accountId String
    ID of the account to associate
    accountId string
    ID of the account to associate
    account_id str
    ID of the account to associate
    accountId String
    ID of the account to associate

    Outputs

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

    DelegatedAdminAccountId string
    Account ID of the delegated administrator account
    Id string
    The provider-assigned unique ID for this managed resource.
    RelationshipStatus string
    Status of the member relationship
    UpdatedAt string
    Date and time of the last update of the relationship
    DelegatedAdminAccountId string
    Account ID of the delegated administrator account
    Id string
    The provider-assigned unique ID for this managed resource.
    RelationshipStatus string
    Status of the member relationship
    UpdatedAt string
    Date and time of the last update of the relationship
    delegatedAdminAccountId String
    Account ID of the delegated administrator account
    id String
    The provider-assigned unique ID for this managed resource.
    relationshipStatus String
    Status of the member relationship
    updatedAt String
    Date and time of the last update of the relationship
    delegatedAdminAccountId string
    Account ID of the delegated administrator account
    id string
    The provider-assigned unique ID for this managed resource.
    relationshipStatus string
    Status of the member relationship
    updatedAt string
    Date and time of the last update of the relationship
    delegated_admin_account_id str
    Account ID of the delegated administrator account
    id str
    The provider-assigned unique ID for this managed resource.
    relationship_status str
    Status of the member relationship
    updated_at str
    Date and time of the last update of the relationship
    delegatedAdminAccountId String
    Account ID of the delegated administrator account
    id String
    The provider-assigned unique ID for this managed resource.
    relationshipStatus String
    Status of the member relationship
    updatedAt String
    Date and time of the last update of the relationship

    Look up Existing MemberAssociation Resource

    Get an existing MemberAssociation 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?: MemberAssociationState, opts?: CustomResourceOptions): MemberAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            delegated_admin_account_id: Optional[str] = None,
            relationship_status: Optional[str] = None,
            updated_at: Optional[str] = None) -> MemberAssociation
    func GetMemberAssociation(ctx *Context, name string, id IDInput, state *MemberAssociationState, opts ...ResourceOption) (*MemberAssociation, error)
    public static MemberAssociation Get(string name, Input<string> id, MemberAssociationState? state, CustomResourceOptions? opts = null)
    public static MemberAssociation get(String name, Output<String> id, MemberAssociationState 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
    ID of the account to associate
    DelegatedAdminAccountId string
    Account ID of the delegated administrator account
    RelationshipStatus string
    Status of the member relationship
    UpdatedAt string
    Date and time of the last update of the relationship
    AccountId string
    ID of the account to associate
    DelegatedAdminAccountId string
    Account ID of the delegated administrator account
    RelationshipStatus string
    Status of the member relationship
    UpdatedAt string
    Date and time of the last update of the relationship
    accountId String
    ID of the account to associate
    delegatedAdminAccountId String
    Account ID of the delegated administrator account
    relationshipStatus String
    Status of the member relationship
    updatedAt String
    Date and time of the last update of the relationship
    accountId string
    ID of the account to associate
    delegatedAdminAccountId string
    Account ID of the delegated administrator account
    relationshipStatus string
    Status of the member relationship
    updatedAt string
    Date and time of the last update of the relationship
    account_id str
    ID of the account to associate
    delegated_admin_account_id str
    Account ID of the delegated administrator account
    relationship_status str
    Status of the member relationship
    updated_at str
    Date and time of the last update of the relationship
    accountId String
    ID of the account to associate
    delegatedAdminAccountId String
    Account ID of the delegated administrator account
    relationshipStatus String
    Status of the member relationship
    updatedAt String
    Date and time of the last update of the relationship

    Import

    Using pulumi import, import Amazon Inspector Member Association using the account_id. For example:

    $ pulumi import aws:inspector2/memberAssociation:MemberAssociation 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.33.1 published on Thursday, May 2, 2024 by Pulumi