AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

We recommend using Organizations instead of Security Hub invitations to manage your member accounts. For information, see Managing Security Hub administrator and member accounts with Organizations in the Security Hub User Guide.

Accepts the invitation to be a member account and be monitored by the Security Hub administrator account that the invitation was sent from.

This operation is only used by member accounts that are not added through Organizations.

When the member account accepts the invitation, permission is granted to the administrator account to view findings generated in the member account.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to AcceptAdministratorInvitationAsync.

Namespace: Amazon.SecurityHub
Assembly: AWSSDK.SecurityHub.dll
Version: 3.x.y.z

Syntax

C#
public abstract AcceptAdministratorInvitationResponse AcceptAdministratorInvitation(
         AcceptAdministratorInvitationRequest request
)

Parameters

request
Type: Amazon.SecurityHub.Model.AcceptAdministratorInvitationRequest

Container for the necessary parameters to execute the AcceptAdministratorInvitation service method.

Return Value


The response from the AcceptAdministratorInvitation service method, as returned by SecurityHub.

Exceptions

ExceptionCondition
InternalException Internal server error.
InvalidAccessException The account doesn't have permission to perform this action.
InvalidInputException The request was rejected because you supplied an invalid or out-of-range value for an input parameter.
LimitExceededException The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.
ResourceNotFoundException The request was rejected because we can't find the specified resource.

Examples

The following example demonstrates how an account can accept an invitation from the Security Hub administrator account to be a member account. This operation is applicable only to member accounts that are not added through AWS Organizations.

To accept an invitation be a member account


var client = new AmazonSecurityHubClient();
var response = client.AcceptAdministratorInvitation(new AcceptAdministratorInvitationRequest 
{
    AdministratorId = "123456789012",
    InvitationId = "7ab938c5d52d7904ad09f9e7c20cc4eb"
});


            

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also