delete_account_setting
¶
delete_account_setting(
name: SettingName,
*,
config_overrides: Optional[ECSClientConfig] = None,
principal_arn: Optional[String] = None,
) -> DeleteAccountSettingResponse
Disables an account setting for a specified user, role, or the root user for an account.
Parameters:
-
name(SettingName) –The resource name to disable the account setting for. If
serviceLongArnFormatis specified, the ARN for your Amazon ECS services is affected. IftaskLongArnFormatis specified, the ARN and resource ID for your Amazon ECS tasks is affected. IfcontainerInstanceLongArnFormatis specified, the ARN and resource ID for your Amazon ECS container instances is affected. IfawsvpcTrunkingis specified, the ENI limit for your Amazon ECS container instances is affected. -
principal_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the principal. It can be a user, role, or the root user. If you specify the root user, it disables the account setting for all users, roles, and the root user of the account unless a user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.
In order to use this parameter, you must be the root user, or the principal.
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 delete your account setting This example deletes the account setting for your user for the specified resource type.
>>> client.delete_account_setting(name='serviceLongArnFormat')
To delete the account settings for a specific IAM user or IAM role
This example deletes the account setting for a specific IAM user or IAM role for the specified resource type. Only the root user can view or modify the account settings for another user.
>>> client.delete_account_setting(name='containerInstanceLongArnFormat', principal_arn='arn:aws:iam::<aws_account_id>:user/principalName')