listAccountSettings method
Lists the account settings for a specified principal.
May throw ServerException. May throw ClientException. May throw InvalidParameterException.
Parameter effectiveSettings
:
Specifies 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 are 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 is not 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 is possible the number of results
to be fewer than maxResults
.
Parameter principalArn
:
The ARN of the principal, which can be an IAM user, IAM role, or the root
user. If this field is omitted, the account settings are listed only for
the authenticated user.
Parameter value
:
The value of the account settings with which to filter results. 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.toValue(),
if (nextToken != null) 'nextToken': nextToken,
if (principalArn != null) 'principalArn': principalArn,
if (value != null) 'value': value,
},
);
return ListAccountSettingsResponse.fromJson(jsonResponse.body);
}