deleteAccountSetting method

Future<DeleteAccountSettingResponse> deleteAccountSetting({
  1. required SettingName name,
  2. String? principalArn,
})

Disables an account setting for a specified user, role, or the root user for an account.

May throw AccessDeniedException. May throw ClientException. May throw InvalidParameterException. May throw ServerException.

Parameter name : 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.

Parameter principalArn : 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.

Implementation

Future<DeleteAccountSettingResponse> deleteAccountSetting({
  required SettingName name,
  String? principalArn,
}) async {
  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.value,
      if (principalArn != null) 'principalArn': principalArn,
    },
  );

  return DeleteAccountSettingResponse.fromJson(jsonResponse.body);
}