listAccountSettings method
Lists the account settings for a specified principal.
May throw AccessDeniedException.
May throw ClientException.
May throw InvalidParameterException.
May throw ServerException.
Parameter effectiveSettings :
Determines whether to return the effective settings. If true,
the account settings for the root user or the default setting for the
principalArn are returned. If false, the account
settings for the principalArn are returned if they're set.
Otherwise, no account settings are returned.
Parameter maxResults :
The maximum number of account setting results returned by
ListAccountSettings in paginated output. When this parameter
is used, ListAccountSettings only returns
maxResults results in a single page along with a
nextToken response element. The remaining results of the
initial request can be seen by sending another
ListAccountSettings request with the returned
nextToken value. This value can be between 1 and 10. If this
parameter isn't used, then ListAccountSettings returns up to
10 results and a nextToken value if applicable.
Parameter name :
The name of the account setting you want to list the settings for.
Parameter nextToken :
The nextToken value returned from a
ListAccountSettings request indicating that more results are
available to fulfill the request and further calls will be needed. If
maxResults was provided, it's possible the number of results
to be fewer than maxResults.
Parameter principalArn :
The ARN of the principal, which can be a user, role, or the root user. If
this field is omitted, the account settings are listed only for the
authenticated user.
In order to use this parameter, you must be the root user, or the principal.
Parameter value :
The value of the account settings to filter results with. You must also
specify an account setting name to use this parameter.
Implementation
Future<ListAccountSettingsResponse> listAccountSettings({
bool? effectiveSettings,
int? maxResults,
SettingName? name,
String? nextToken,
String? principalArn,
String? value,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.ListAccountSettings'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (effectiveSettings != null) 'effectiveSettings': effectiveSettings,
if (maxResults != null) 'maxResults': maxResults,
if (name != null) 'name': name.value,
if (nextToken != null) 'nextToken': nextToken,
if (principalArn != null) 'principalArn': principalArn,
if (value != null) 'value': value,
},
);
return ListAccountSettingsResponse.fromJson(jsonResponse.body);
}