updateOrganizationConfiguration method
- required bool autoEnable,
- AutoEnableStandards? autoEnableStandards,
- OrganizationConfiguration? organizationConfiguration,
Updates the configuration of your organization in Security Hub CSPM. Only the Security Hub CSPM administrator account can invoke this operation.
May throw AccessDeniedException.
May throw InternalException.
May throw InvalidAccessException.
May throw InvalidInputException.
May throw LimitExceededException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
Parameter autoEnable :
Whether to automatically enable Security Hub CSPM in new member accounts
when they join the organization.
If set to true, then Security Hub CSPM is automatically
enabled in new accounts. If set to false, then Security Hub
CSPM isn't enabled in new accounts automatically. The default value is
false.
If the ConfigurationType of your organization is set to
CENTRAL, then this field is set to false and
can't be changed in the home Region and linked Regions. However, in that
case, the delegated administrator can create a configuration policy in
which Security Hub CSPM is enabled and associate the policy with new
organization accounts.
Parameter autoEnableStandards :
Whether to automatically enable Security Hub CSPM default
standards in new member accounts when they join the organization.
The default value of this parameter is equal to DEFAULT.
If equal to DEFAULT, then Security Hub CSPM default standards
are automatically enabled for new member accounts. If equal to
NONE, then default standards are not automatically enabled
for new member accounts.
If the ConfigurationType of your organization is set to
CENTRAL, then this field is set to NONE and
can't be changed in the home Region and linked Regions. However, in that
case, the delegated administrator can create a configuration policy in
which specific security standards are enabled and associate the policy
with new organization accounts.
Implementation
Future<void> updateOrganizationConfiguration({
required bool autoEnable,
AutoEnableStandards? autoEnableStandards,
OrganizationConfiguration? organizationConfiguration,
}) async {
final $payload = <String, dynamic>{
'AutoEnable': autoEnable,
if (autoEnableStandards != null)
'AutoEnableStandards': autoEnableStandards.value,
if (organizationConfiguration != null)
'OrganizationConfiguration': organizationConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/organization/configuration',
exceptionFnMap: _exceptionFns,
);
}