listCentralizationRulesForOrganization method
Lists all centralization rules in your organization. This operation can only be called by the organization's management account or a delegated administrator account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter allRegions :
A flag determining whether to return organization centralization rules
from all regions or only the current region.
Parameter maxResults :
The maximum number of organization centralization rules to return in a
single call.
Parameter nextToken :
The token for the next set of results. A previous call generates this
token.
Parameter ruleNamePrefix :
A string to filter organization centralization rules whose names begin
with the specified prefix.
Implementation
Future<ListCentralizationRulesForOrganizationOutput>
listCentralizationRulesForOrganization({
bool? allRegions,
int? maxResults,
String? nextToken,
String? ruleNamePrefix,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
if (allRegions != null) 'AllRegions': allRegions,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (ruleNamePrefix != null) 'RuleNamePrefix': ruleNamePrefix,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListCentralizationRulesForOrganization',
exceptionFnMap: _exceptionFns,
);
return ListCentralizationRulesForOrganizationOutput.fromJson(response);
}