AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.securityhub.InviteAccepter
Explore with Pulumi AI
Note: AWS accounts can only be associated with a single Security Hub master account. Destroying this resource will disassociate the member account from the master account.
Accepts a Security Hub invitation.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleAccount = new Aws.SecurityHub.Account("exampleAccount");
var exampleMember = new Aws.SecurityHub.Member("exampleMember", new()
{
AccountId = "123456789012",
Email = "example@example.com",
Invite = true,
});
var inviteeAccount = new Aws.SecurityHub.Account("inviteeAccount", new()
{
}, new CustomResourceOptions
{
Provider = "aws.invitee",
});
var inviteeInviteAccepter = new Aws.SecurityHub.InviteAccepter("inviteeInviteAccepter", new()
{
MasterId = exampleMember.MasterId,
}, new CustomResourceOptions
{
Provider = "aws.invitee",
DependsOn = new[]
{
inviteeAccount,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/securityhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityhub.NewAccount(ctx, "exampleAccount", nil)
if err != nil {
return err
}
exampleMember, err := securityhub.NewMember(ctx, "exampleMember", &securityhub.MemberArgs{
AccountId: pulumi.String("123456789012"),
Email: pulumi.String("example@example.com"),
Invite: pulumi.Bool(true),
})
if err != nil {
return err
}
inviteeAccount, err := securityhub.NewAccount(ctx, "inviteeAccount", nil, pulumi.Provider("aws.invitee"))
if err != nil {
return err
}
_, err = securityhub.NewInviteAccepter(ctx, "inviteeInviteAccepter", &securityhub.InviteAccepterArgs{
MasterId: exampleMember.MasterId,
}, pulumi.Provider("aws.invitee"), pulumi.DependsOn([]pulumi.Resource{
inviteeAccount,
}))
if err != nil {
return err
}
return nil
})
}
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.aws.securityhub.AccountArgs;
import com.pulumi.aws.securityhub.InviteAccepter;
import com.pulumi.aws.securityhub.InviteAccepterArgs;
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 exampleAccount = new Account("exampleAccount");
var exampleMember = new Member("exampleMember", MemberArgs.builder()
.accountId("123456789012")
.email("example@example.com")
.invite(true)
.build());
var inviteeAccount = new Account("inviteeAccount", AccountArgs.Empty, CustomResourceOptions.builder()
.provider("aws.invitee")
.build());
var inviteeInviteAccepter = new InviteAccepter("inviteeInviteAccepter", InviteAccepterArgs.builder()
.masterId(exampleMember.masterId())
.build(), CustomResourceOptions.builder()
.provider("aws.invitee")
.dependsOn(inviteeAccount)
.build());
}
}
import pulumi
import pulumi_aws as aws
example_account = aws.securityhub.Account("exampleAccount")
example_member = aws.securityhub.Member("exampleMember",
account_id="123456789012",
email="example@example.com",
invite=True)
invitee_account = aws.securityhub.Account("inviteeAccount", opts=pulumi.ResourceOptions(provider="aws.invitee"))
invitee_invite_accepter = aws.securityhub.InviteAccepter("inviteeInviteAccepter", master_id=example_member.master_id,
opts=pulumi.ResourceOptions(provider="aws.invitee",
depends_on=[invitee_account]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleAccount = new aws.securityhub.Account("exampleAccount", {});
const exampleMember = new aws.securityhub.Member("exampleMember", {
accountId: "123456789012",
email: "example@example.com",
invite: true,
});
const inviteeAccount = new aws.securityhub.Account("inviteeAccount", {}, {
provider: "aws.invitee",
});
const inviteeInviteAccepter = new aws.securityhub.InviteAccepter("inviteeInviteAccepter", {masterId: exampleMember.masterId}, {
provider: "aws.invitee",
dependsOn: [inviteeAccount],
});
resources:
exampleAccount:
type: aws:securityhub:Account
exampleMember:
type: aws:securityhub:Member
properties:
accountId: '123456789012'
email: example@example.com
invite: true
inviteeAccount:
type: aws:securityhub:Account
options:
provider: aws.invitee
inviteeInviteAccepter:
type: aws:securityhub:InviteAccepter
properties:
masterId: ${exampleMember.masterId}
options:
provider: aws.invitee
dependson:
- ${inviteeAccount}
Create InviteAccepter Resource
new InviteAccepter(name: string, args: InviteAccepterArgs, opts?: CustomResourceOptions);
@overload
def InviteAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
master_id: Optional[str] = None)
@overload
def InviteAccepter(resource_name: str,
args: InviteAccepterArgs,
opts: Optional[ResourceOptions] = None)
func NewInviteAccepter(ctx *Context, name string, args InviteAccepterArgs, opts ...ResourceOption) (*InviteAccepter, error)
public InviteAccepter(string name, InviteAccepterArgs args, CustomResourceOptions? opts = null)
public InviteAccepter(String name, InviteAccepterArgs args)
public InviteAccepter(String name, InviteAccepterArgs args, CustomResourceOptions options)
type: aws:securityhub:InviteAccepter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InviteAccepterArgs
- 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 InviteAccepterArgs
- 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 InviteAccepterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InviteAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InviteAccepterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
InviteAccepter 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 InviteAccepter resource accepts the following input properties:
- Master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- Master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- master
Id String The account ID of the master Security Hub account whose invitation you're accepting.
- master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- master_
id str The account ID of the master Security Hub account whose invitation you're accepting.
- master
Id String The account ID of the master Security Hub account whose invitation you're accepting.
Outputs
All input properties are implicitly available as output properties. Additionally, the InviteAccepter resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Invitation
Id string The ID of the invitation.
- Id string
The provider-assigned unique ID for this managed resource.
- Invitation
Id string The ID of the invitation.
- id String
The provider-assigned unique ID for this managed resource.
- invitation
Id String The ID of the invitation.
- id string
The provider-assigned unique ID for this managed resource.
- invitation
Id string The ID of the invitation.
- id str
The provider-assigned unique ID for this managed resource.
- invitation_
id str The ID of the invitation.
- id String
The provider-assigned unique ID for this managed resource.
- invitation
Id String The ID of the invitation.
Look up Existing InviteAccepter Resource
Get an existing InviteAccepter 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?: InviteAccepterState, opts?: CustomResourceOptions): InviteAccepter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
invitation_id: Optional[str] = None,
master_id: Optional[str] = None) -> InviteAccepter
func GetInviteAccepter(ctx *Context, name string, id IDInput, state *InviteAccepterState, opts ...ResourceOption) (*InviteAccepter, error)
public static InviteAccepter Get(string name, Input<string> id, InviteAccepterState? state, CustomResourceOptions? opts = null)
public static InviteAccepter get(String name, Output<String> id, InviteAccepterState 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.
- Invitation
Id string The ID of the invitation.
- Master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- Invitation
Id string The ID of the invitation.
- Master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- invitation
Id String The ID of the invitation.
- master
Id String The account ID of the master Security Hub account whose invitation you're accepting.
- invitation
Id string The ID of the invitation.
- master
Id string The account ID of the master Security Hub account whose invitation you're accepting.
- invitation_
id str The ID of the invitation.
- master_
id str The account ID of the master Security Hub account whose invitation you're accepting.
- invitation
Id String The ID of the invitation.
- master
Id String The account ID of the master Security Hub account whose invitation you're accepting.
Import
Security Hub invite acceptance can be imported using the account ID, e.g.,
$ pulumi import aws:securityhub/inviteAccepter:InviteAccepter example 123456789012
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.