enableOrganizationAdminAccount method

Future<EnableOrganizationAdminAccountResponse> enableOrganizationAdminAccount({
  1. required String adminAccountId,
  2. SecurityHubFeature? feature,
})

Designates the Security Hub CSPM administrator account for an organization. Can only be called by the organization management account.

May throw AccessDeniedException. May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException.

Parameter adminAccountId : The Amazon Web Services account identifier of the account to designate as the Security Hub CSPM administrator account.

Parameter feature : The feature for which the delegated admin account is enabled. Defaults to Security Hub CSPM if not specified.

Implementation

Future<EnableOrganizationAdminAccountResponse>
    enableOrganizationAdminAccount({
  required String adminAccountId,
  SecurityHubFeature? feature,
}) async {
  final $payload = <String, dynamic>{
    'AdminAccountId': adminAccountId,
    if (feature != null) 'Feature': feature.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/organization/admin/enable',
    exceptionFnMap: _exceptionFns,
  );
  return EnableOrganizationAdminAccountResponse.fromJson(response);
}