aws.inspector2.MemberAssociation
Explore with Pulumi AI
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.
Constructor 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:
- Account
Id string - ID of the account to associate
- Account
Id string - ID of the account to associate
- account
Id String - ID of the account to associate
- account
Id string - ID of the account to associate
- account_
id str - ID of the account to associate
- account
Id 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:
- Delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- Id string
- The provider-assigned unique ID for this managed resource.
- Relationship
Status string - Status of the member relationship
- Updated
At string - Date and time of the last update of the relationship
- Delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- Id string
- The provider-assigned unique ID for this managed resource.
- Relationship
Status string - Status of the member relationship
- Updated
At string - Date and time of the last update of the relationship
- delegated
Admin StringAccount Id - Account ID of the delegated administrator account
- id String
- The provider-assigned unique ID for this managed resource.
- relationship
Status String - Status of the member relationship
- updated
At String - Date and time of the last update of the relationship
- delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- id string
- The provider-assigned unique ID for this managed resource.
- relationship
Status string - Status of the member relationship
- updated
At string - Date and time of the last update of the relationship
- delegated_
admin_ straccount_ id - 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
- delegated
Admin StringAccount Id - Account ID of the delegated administrator account
- id String
- The provider-assigned unique ID for this managed resource.
- relationship
Status String - Status of the member relationship
- updated
At 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.
- Account
Id string - ID of the account to associate
- Delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- Relationship
Status string - Status of the member relationship
- Updated
At string - Date and time of the last update of the relationship
- Account
Id string - ID of the account to associate
- Delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- Relationship
Status string - Status of the member relationship
- Updated
At string - Date and time of the last update of the relationship
- account
Id String - ID of the account to associate
- delegated
Admin StringAccount Id - Account ID of the delegated administrator account
- relationship
Status String - Status of the member relationship
- updated
At String - Date and time of the last update of the relationship
- account
Id string - ID of the account to associate
- delegated
Admin stringAccount Id - Account ID of the delegated administrator account
- relationship
Status string - Status of the member relationship
- updated
At string - Date and time of the last update of the relationship
- account_
id str - ID of the account to associate
- delegated_
admin_ straccount_ id - 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
- account
Id String - ID of the account to associate
- delegated
Admin StringAccount Id - Account ID of the delegated administrator account
- relationship
Status String - Status of the member relationship
- updated
At 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.