putConfigurationAggregator method
- required String configurationAggregatorName,
- List<
AccountAggregationSource> ? accountAggregationSources, - OrganizationAggregationSource? organizationAggregationSource,
- List<
Tag> ? tags,
Creates and updates the configuration aggregator with the selected source accounts and regions. The source account can be individual account(s) or an organization.
If your source type is an organization, you must be signed in to the
master account and all features must be enabled in your organization. AWS
Config calls EnableAwsServiceAccess
API to enable integration
between AWS Config and AWS Organizations.
May throw InvalidParameterValueException. May throw LimitExceededException. May throw InvalidRoleException. May throw OrganizationAccessDeniedException. May throw NoAvailableOrganizationException. May throw OrganizationAllFeaturesNotEnabledException.
Parameter configurationAggregatorName
:
The name of the configuration aggregator.
Parameter accountAggregationSources
:
A list of AccountAggregationSource object.
Parameter organizationAggregationSource
:
An OrganizationAggregationSource object.
Parameter tags
:
An array of tag object.
Implementation
Future<PutConfigurationAggregatorResponse> putConfigurationAggregator({
required String configurationAggregatorName,
List<AccountAggregationSource>? accountAggregationSources,
OrganizationAggregationSource? organizationAggregationSource,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(
configurationAggregatorName, 'configurationAggregatorName');
_s.validateStringLength(
'configurationAggregatorName',
configurationAggregatorName,
1,
256,
isRequired: true,
);
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 (organizationAggregationSource != null)
'OrganizationAggregationSource': organizationAggregationSource,
if (tags != null) 'Tags': tags,
},
);
return PutConfigurationAggregatorResponse.fromJson(jsonResponse.body);
}