updateOrganizationConfiguration method
Configures the delegated administrator account with the provided values.
You must provide a value for either
autoEnableOrganizationMembers or autoEnable, but
not both.
Specifying both EKS Runtime Monitoring
(EKS_RUNTIME_MONITORING) and Runtime Monitoring
(RUNTIME_MONITORING) will cause an error. You can add only
one of these two features because Runtime Monitoring already includes the
threat detection for Amazon EKS resources. For more information, see Runtime
Monitoring.
There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.
May throw BadRequestException.
May throw InternalServerErrorException.
Parameter detectorId :
The ID of the detector that configures the delegated administrator.
To find the detectorId in the current Region, see the
Settings page in the GuardDuty console, or run the ListDetectors
API.
Parameter autoEnable :
Represents whether to automatically enable member accounts in the
organization. This applies to only new member accounts, not the existing
member accounts. When a new account joins the organization, the chosen
features will be enabled for them by default.
Even though this is still supported, we recommend using
AutoEnableOrganizationMembers to achieve the similar results.
You must provide a value for either
autoEnableOrganizationMembers or autoEnable.
Parameter autoEnableOrganizationMembers :
Indicates the auto-enablement configuration of GuardDuty for the member
accounts in the organization. You must provide a value for either
autoEnableOrganizationMembers or autoEnable.
Use one of the following configuration values for
autoEnableOrganizationMembers:
-
NEW: Indicates that when a new account joins the organization, they will have GuardDuty enabled automatically. -
ALL: Indicates that all accounts in the organization have GuardDuty enabled automatically. This includesNEWaccounts that join the organization and accounts that may have been suspended or removed from the organization in GuardDuty.It may take up to 24 hours to update the configuration for all the member accounts.
-
NONE: Indicates that GuardDuty will not be automatically enabled for any account in the organization. The administrator must manage GuardDuty for each account in the organization individually.When you update the auto-enable setting from
ALLorNEWtoNONE, this action doesn't disable the corresponding option for your existing accounts. This configuration will apply to the new accounts that join the organization. After you update the auto-enable settings, no new account will have the corresponding option as enabled.
Parameter dataSources :
Describes which data sources will be updated.
Parameter features :
A list of features that will be configured for the organization.
Implementation
Future<void> updateOrganizationConfiguration({
required String detectorId,
bool? autoEnable,
AutoEnableMembers? autoEnableOrganizationMembers,
OrganizationDataSourceConfigurations? dataSources,
List<OrganizationFeatureConfiguration>? features,
}) async {
final $payload = <String, dynamic>{
if (autoEnable != null) 'autoEnable': autoEnable,
if (autoEnableOrganizationMembers != null)
'autoEnableOrganizationMembers': autoEnableOrganizationMembers.value,
if (dataSources != null) 'dataSources': dataSources,
if (features != null) 'features': features,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/detector/${Uri.encodeComponent(detectorId)}/admin',
exceptionFnMap: _exceptionFns,
);
}