list_account_settings
async
¶
list_account_settings(
*,
config_overrides: Optional[AsyncECSClientConfig] = 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.
>>> await 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.
>>> await 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/async_ecs.py
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 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 | |