disableSecurityHub method

Future<void> disableSecurityHub()

Disables Security Hub in your account only in the current Region. To disable Security Hub in all Regions, you must submit one request per Region where you have enabled Security Hub.

When you disable Security Hub for a master account, it doesn't disable Security Hub for any associated member accounts.

When you disable Security Hub, your existing findings and insights and any Security Hub configuration settings are deleted after 90 days and cannot be recovered. Any standards that were enabled are disabled, and your master and member account associations are removed.

If you want to save your existing findings, you must export them before you disable Security Hub.

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

Implementation

Future<void> disableSecurityHub() async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/accounts',
    exceptionFnMap: _exceptionFns,
  );
}