delete_account_setting
(**kwargs)¶Disables an account setting for a specified user, role, or the root user for an account.
See also: AWS API Documentation
Request Syntax
response = client.delete_account_setting(
name='serviceLongArnFormat'|'taskLongArnFormat'|'containerInstanceLongArnFormat'|'awsvpcTrunking'|'containerInsights',
principalArn='string'
)
[REQUIRED]
The resource name to disable the account setting for. If serviceLongArnFormat
is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat
is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If containerInstanceLongArnFormat
is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If awsvpcTrunking
is specified, the ENI limit for your Amazon ECS container instances is affected.
dict
Response Syntax
{
'setting': {
'name': 'serviceLongArnFormat'|'taskLongArnFormat'|'containerInstanceLongArnFormat'|'awsvpcTrunking'|'containerInsights',
'value': 'string',
'principalArn': 'string'
}
}
Response Structure
(dict) --
setting (dict) --
The account setting for the specified principal ARN.
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.
Exceptions
ECS.Client.exceptions.ServerException
ECS.Client.exceptions.ClientException
ECS.Client.exceptions.InvalidParameterException
Examples
This example deletes the account setting for your user for the specified resource type.
response = client.delete_account_setting(
name='serviceLongArnFormat',
)
print(response)
Expected Output:
{
'setting': {
'name': 'serviceLongArnFormat',
'value': 'enabled',
'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName',
},
'ResponseMetadata': {
'...': '...',
},
}
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.
response = client.delete_account_setting(
name='containerInstanceLongArnFormat',
principalArn='arn:aws:iam::<aws_account_id>:user/principalName',
)
print(response)
Expected Output:
{
'setting': {
'name': 'containerInstanceLongArnFormat',
'value': 'enabled',
'principalArn': 'arn:aws:iam::<aws_account_id>:user/principalName',
},
'ResponseMetadata': {
'...': '...',
},
}