getMasterAccount method

Future<GetMasterAccountResponse> getMasterAccount()

This method is deprecated. Instead, use GetAdministratorAccount.

The Security Hub CSPM console continues to use GetMasterAccount. It will eventually change to use GetAdministratorAccount. Any IAM policies that specifically control access to this function must continue to use GetMasterAccount. You should also add GetAdministratorAccount to your policies to ensure that the correct permissions are in place after the console begins to use GetAdministratorAccount.

Provides the details for the Security Hub CSPM administrator account for the current member account.

Can be used by both member accounts that are managed using Organizations and accounts that were invited manually.

May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException. May throw ResourceNotFoundException.

Implementation

Future<GetMasterAccountResponse> getMasterAccount() async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/master',
    exceptionFnMap: _exceptionFns,
  );
  return GetMasterAccountResponse.fromJson(response);
}