updateBillingView method

Future<UpdateBillingViewResponse> updateBillingView({
  1. required String arn,
  2. Expression? dataFilterExpression,
  3. String? description,
  4. String? name,
})

An API to update the attributes of the billing view.

May throw AccessDeniedException. May throw BillingViewHealthStatusException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter arn : The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.

Parameter dataFilterExpression : See Expression. Billing view only supports LINKED_ACCOUNT, Tags, and CostCategories.

Parameter description : The description of the billing view.

Parameter name : The name of the billing view.

Implementation

Future<UpdateBillingViewResponse> updateBillingView({
  required String arn,
  Expression? dataFilterExpression,
  String? description,
  String? name,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSBilling.UpdateBillingView'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'arn': arn,
      if (dataFilterExpression != null)
        'dataFilterExpression': dataFilterExpression,
      if (description != null) 'description': description,
      if (name != null) 'name': name,
    },
  );

  return UpdateBillingViewResponse.fromJson(jsonResponse.body);
}