putAccountSettingDefault method

Future<PutAccountSettingDefaultResponse> putAccountSettingDefault({
  1. required SettingName name,
  2. required String value,
})

Modifies an account setting for all IAM users on an account for whom no individual account setting has been specified. Account settings are set on a per-Region basis.

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

Parameter name : The resource name for which to modify 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. If containerInsights is specified, the default setting for CloudWatch Container Insights for your clusters is affected.

Parameter value : The account setting value for the specified principal ARN. Accepted values are enabled and disabled.

Implementation

Future<PutAccountSettingDefaultResponse> putAccountSettingDefault({
  required SettingName name,
  required String value,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(value, 'value');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AmazonEC2ContainerServiceV20141113.PutAccountSettingDefault'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name.toValue(),
      'value': value,
    },
  );

  return PutAccountSettingDefaultResponse.fromJson(jsonResponse.body);
}