inviteMembers

Invites other Amazon Web Services accounts to become member accounts for the Security Hub administrator account that the invitation is sent from.

This operation is only used to invite accounts that do not belong to an organization. Organization accounts do not receive invitations.

Before you can use this action to invite a member, you must first use the CreateMembers action to create the member account in Security Hub.

When the account owner enables Security Hub and accepts the invitation to become a member account, the administrator account can view the findings generated from the member account.

Samples


fun main() { 
   //sampleStart 
   // The following example invites the specified AWS accounts to become member accounts associated with
// the calling Security Hub administrator account. You only use this operation to invite accounts that don
// t belong to an AWS Organizations organization.
val resp = securityHubClient.inviteMembers {
    accountIds = listOf<String>(
        "111122223333",
        "444455556666"
    )
} 
   //sampleEnd
}