list_account_settings
¶
list_account_settings(
*,
config_overrides: Optional[ECSClientConfig] = None,
name: Optional[SettingName] = None,
value: Optional[String] = None,
principal_arn: Optional[String] = None,
effective_settings: Optional[Boolean] = None,
next_token: Optional[String] = None,
max_results: Optional[Integer] = None,
) -> ListAccountSettingsResponse
Lists the account settings for a specified principal.
Parameters:
-
name(Optional[SettingName], default:None) –The name of the account setting you want to list the settings for.
-
value(Optional[String], default:None) –The value of the account settings to filter results with. You must also specify an account setting name to use this parameter.
-
principal_arn(Optional[String], default:None) –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.
Federated users assume the account setting of the root user and can't have explicit account settings set for them.
-
effective_settings(Optional[Boolean], default:None) –Determines whether to return the effective settings. If
true, the account settings for the root user or the default setting for theprincipalArnare returned. Iffalse, the account settings for theprincipalArnare returned if they're set. Otherwise, no account settings are returned. -
next_token(Optional[String], default:None) –The
nextTokenvalue returned from aListAccountSettingsrequest indicating that more results are available to fulfill the request and further calls will be needed. IfmaxResultswas provided, it's possible the number of results to be fewer thanmaxResults.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.
-
max_results(Optional[Integer], default:None) –The maximum number of account setting results returned by
ListAccountSettingsin paginated output. When this parameter is used,ListAccountSettingsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListAccountSettingsrequest with the returnednextTokenvalue. This value can be between 1 and 10. If this parameter isn't used, thenListAccountSettingsreturns up to 10 results and anextTokenvalue if applicable.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ServerException–These errors are usually caused by a server issue.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To view your effective account settings This example displays the effective account settings for your account.
>>> client.list_account_settings(effective_settings=True)
To view the effective account settings for a specific IAM user or IAM role
This example displays the effective account settings for the specified user or role.
>>> client.list_account_settings(effective_settings=True, principal_arn='arn:aws:iam::<aws_account_id>:user/principalName')
Source code in docs_src/capo_ecs/_services/ecs.py
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | |