ECS / Client / list_account_settings
list_account_settings#
- ECS.Client.list_account_settings(**kwargs)#
- Lists the account settings for a specified principal. - See also: AWS API Documentation - Request Syntax- response = client.list_account_settings( name='serviceLongArnFormat'|'taskLongArnFormat'|'containerInstanceLongArnFormat'|'awsvpcTrunking'|'containerInsights'|'fargateFIPSMode'|'tagResourceAuthorization'|'fargateTaskRetirementWaitPeriod', value='string', principalArn='string', effectiveSettings=True|False, nextToken='string', maxResults=123 ) - Parameters:
- name (string) – The name of the account setting you want to list the settings for. 
- value (string) – The value of the account settings to filter results with. You must also specify an account setting name to use this parameter. 
- principalArn (string) – - 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. - Note- Federated users assume the account setting of the root user and can’t have explicit account settings set for them. 
- effectiveSettings (boolean) – Determines whether to return the effective settings. If - true, the account settings for the root user or the default setting for the- principalArnare returned. If- false, the account settings for the- principalArnare returned if they’re set. Otherwise, no account settings are returned.
- nextToken (string) – - The - nextTokenvalue returned from a- ListAccountSettingsrequest indicating that more results are available to fulfill the request and further calls will be needed. If- maxResultswas provided, it’s possible the number of results to be fewer than- maxResults.- Note- This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes. 
- maxResults (integer) – The maximum number of account setting results returned by - ListAccountSettingsin paginated output. When this parameter is used,- ListAccountSettingsonly returns- maxResultsresults in a single page along with a- nextTokenresponse element. The remaining results of the initial request can be seen by sending another- ListAccountSettingsrequest with the returned- nextTokenvalue. This value can be between 1 and 10. If this parameter isn’t used, then- ListAccountSettingsreturns up to 10 results and a- nextTokenvalue if applicable.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'settings': [ { 'name': 'serviceLongArnFormat'|'taskLongArnFormat'|'containerInstanceLongArnFormat'|'awsvpcTrunking'|'containerInsights'|'fargateFIPSMode'|'tagResourceAuthorization'|'fargateTaskRetirementWaitPeriod', 'value': 'string', 'principalArn': 'string' }, ], 'nextToken': 'string' } - Response Structure- (dict) – - settings (list) – - The account settings for the resource. - (dict) – - The current account setting for a resource. - name (string) – - The Amazon ECS resource name. 
- value (string) – - Determines whether the account setting is on or off for the specified resource. 
- principalArn (string) – - The ARN of the principal. It can be a user, role, or the root user. If this field is omitted, the authenticated user is assumed. 
 
 
- nextToken (string) – - The - nextTokenvalue to include in a future- ListAccountSettingsrequest. When the results of a- ListAccountSettingsrequest exceed- maxResults, this value can be used to retrieve the next page of results. This value is- nullwhen there are no more results to return.
 
 
 - Exceptions- ECS.Client.exceptions.ServerException
- ECS.Client.exceptions.ClientException
- ECS.Client.exceptions.InvalidParameterException
 - Examples- This example displays the effective account settings for your account. - response = client.list_account_settings( effectiveSettings=True, ) print(response) - Expected Output: - { 'settings': [ { 'name': 'containerInstanceLongArnFormat', 'value': 'disabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, { 'name': 'serviceLongArnFormat', 'value': 'enabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, { 'name': 'taskLongArnFormat', 'value': 'disabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, ], 'ResponseMetadata': { '...': '...', }, } - This example displays the effective account settings for the specified user or role. - response = client.list_account_settings( effectiveSettings=True, principalArn='arn:aws:iam::<aws_account_id>:user/principalName', ) print(response) - Expected Output: - { 'settings': [ { 'name': 'containerInstanceLongArnFormat', 'value': 'disabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, { 'name': 'serviceLongArnFormat', 'value': 'enabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, { 'name': 'taskLongArnFormat', 'value': 'disabled', 'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName', }, ], 'ResponseMetadata': { '...': '...', }, }