deleteAccountSetting method
- required SettingName name,
- String? principalArn,
Disables an account setting for a specified IAM user, IAM role, or the root user for an account.
May throw ServerException. May throw ClientException. May throw InvalidParameterException.
Parameter name
:
The resource name for which to disable the account setting. 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.
Parameter principalArn
:
The ARN of the principal, which can be an IAM user, IAM role, or the root
user. If you specify the root user, it disables the account setting for
all IAM users, IAM roles, and the root user of the account unless an IAM
user or role explicitly overrides these settings. If this field is
omitted, the setting is changed only for the authenticated user.
Implementation
Future<DeleteAccountSettingResponse> deleteAccountSetting({
required SettingName name,
String? principalArn,
}) async {
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.DeleteAccountSetting'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name.toValue(),
if (principalArn != null) 'principalArn': principalArn,
},
);
return DeleteAccountSettingResponse.fromJson(jsonResponse.body);
}