putConfigurationAggregator method
Creates and updates the configuration aggregator with the selected source accounts and regions. The source account can be individual account(s) or an organization.
accountIds that are passed will be replaced with existing
accounts. If you want to add additional accounts into the aggregator, call
DescribeConfigurationAggregators to get the previous accounts
and then append new ones.
If your source type is an organization, you must be signed in to the
management account or a registered delegated administrator and all the
features must be enabled in your organization. If the caller is a
management account, Config calls EnableAwsServiceAccess API
to enable integration between Config and Organizations. If the caller is a
registered delegated administrator, Config calls
ListDelegatedAdministrators API to verify whether the caller
is a valid delegated administrator.
To register a delegated administrator, see Register a Delegated Administrator in the Config developer guide.
PutConfigurationAggregator is an idempotent API. Subsequent
requests won’t create a duplicate resource if one was already created. If
a following request has different tags values, Config will
ignore these differences and treat it as an idempotent request of the
previous. In this case, tags will not be updated, even if
they are different.
Use TagResource and UntagResource to update tags after creation.
May throw InvalidParameterValueException.
May throw InvalidRoleException.
May throw LimitExceededException.
May throw NoAvailableOrganizationException.
May throw OrganizationAccessDeniedException.
May throw OrganizationAllFeaturesNotEnabledException.
Parameter configurationAggregatorName :
The name of the configuration aggregator.
Parameter accountAggregationSources :
A list of AccountAggregationSource object.
Parameter aggregatorFilters :
An object to filter configuration recorders in an aggregator. Either
ResourceType or ServicePrincipal is required.
Parameter organizationAggregationSource :
An OrganizationAggregationSource object.
Parameter tags :
An array of tag object.
Implementation
Future<PutConfigurationAggregatorResponse> putConfigurationAggregator({
required String configurationAggregatorName,
List<AccountAggregationSource>? accountAggregationSources,
AggregatorFilters? aggregatorFilters,
OrganizationAggregationSource? organizationAggregationSource,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StarlingDoveService.PutConfigurationAggregator'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConfigurationAggregatorName': configurationAggregatorName,
if (accountAggregationSources != null)
'AccountAggregationSources': accountAggregationSources,
if (aggregatorFilters != null) 'AggregatorFilters': aggregatorFilters,
if (organizationAggregationSource != null)
'OrganizationAggregationSource': organizationAggregationSource,
if (tags != null) 'Tags': tags,
},
);
return PutConfigurationAggregatorResponse.fromJson(jsonResponse.body);
}