Try AWS Native preview for resources not in the classic version.
aws.securityhub.InviteAccepter
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
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,
});
const invitee = new aws.securityhub.Account("invitee", {});
const inviteeInviteAccepter = new aws.securityhub.InviteAccepter("invitee", {masterId: exampleMember.masterId}, {
dependsOn: [invitee],
});
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)
invitee = aws.securityhub.Account("invitee")
invitee_invite_accepter = aws.securityhub.InviteAccepter("invitee", master_id=example_member.master_id,
opts = pulumi.ResourceOptions(depends_on=[invitee]))
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 {
_, err := securityhub.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
exampleMember, err := securityhub.NewMember(ctx, "example", &securityhub.MemberArgs{
AccountId: pulumi.String("123456789012"),
Email: pulumi.String("example@example.com"),
Invite: pulumi.Bool(true),
})
if err != nil {
return err
}
invitee, err := securityhub.NewAccount(ctx, "invitee", nil)
if err != nil {
return err
}
_, err = securityhub.NewInviteAccepter(ctx, "invitee", &securityhub.InviteAccepterArgs{
MasterId: exampleMember.MasterId,
}, pulumi.DependsOn([]pulumi.Resource{
invitee,
}))
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,
});
var invitee = new Aws.SecurityHub.Account("invitee");
var inviteeInviteAccepter = new Aws.SecurityHub.InviteAccepter("invitee", new()
{
MasterId = exampleMember.MasterId,
}, new CustomResourceOptions
{
DependsOn =
{
invitee,
},
});
});
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.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 example = new Account("example");
var exampleMember = new Member("exampleMember", MemberArgs.builder()
.accountId("123456789012")
.email("example@example.com")
.invite(true)
.build());
var invitee = new Account("invitee");
var inviteeInviteAccepter = new InviteAccepter("inviteeInviteAccepter", InviteAccepterArgs.builder()
.masterId(exampleMember.masterId())
.build(), CustomResourceOptions.builder()
.dependsOn(invitee)
.build());
}
}
resources:
example:
type: aws:securityhub:Account
exampleMember:
type: aws:securityhub:Member
name: example
properties:
accountId: '123456789012'
email: example@example.com
invite: true
invitee:
type: aws:securityhub:Account
inviteeInviteAccepter:
type: aws:securityhub:InviteAccepter
name: invitee
properties:
masterId: ${exampleMember.masterId}
options:
dependson:
- ${invitee}
Create InviteAccepter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InviteAccepter(name: string, args: InviteAccepterArgs, opts?: CustomResourceOptions);
@overload
def InviteAccepter(resource_name: str,
args: InviteAccepterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InviteAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
master_id: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsInviteAccepterResource = new Aws.SecurityHub.InviteAccepter("awsInviteAccepterResource", new()
{
MasterId = "string",
});
example, err := securityhub.NewInviteAccepter(ctx, "awsInviteAccepterResource", &securityhub.InviteAccepterArgs{
MasterId: pulumi.String("string"),
})
var awsInviteAccepterResource = new InviteAccepter("awsInviteAccepterResource", InviteAccepterArgs.builder()
.masterId("string")
.build());
aws_invite_accepter_resource = aws.securityhub.InviteAccepter("awsInviteAccepterResource", master_id="string")
const awsInviteAccepterResource = new aws.securityhub.InviteAccepter("awsInviteAccepterResource", {masterId: "string"});
type: aws:securityhub:InviteAccepter
properties:
masterId: string
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
Using pulumi import
, import Security Hub invite acceptance using the account ID. For example:
$ pulumi import aws:securityhub/inviteAccepter:InviteAccepter 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.
Try AWS Native preview for resources not in the classic version.