describeCostCategoryDefinition method

Future<DescribeCostCategoryDefinitionResponse> describeCostCategoryDefinition({
  1. required String costCategoryArn,
  2. String? effectiveOn,
})

Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a cost category that's defined in the account.

You have the option to use EffectiveOn to return a cost category that's active on a specific date. If there's no EffectiveOn specified, you see a Cost Category that's effective on the current date. If cost category is still effective, EffectiveEnd is omitted in the response.

May throw LimitExceededException. May throw ResourceNotFoundException.

Parameter costCategoryArn : The unique identifier for your cost category.

Parameter effectiveOn : The date when the cost category was effective.

Implementation

Future<DescribeCostCategoryDefinitionResponse>
    describeCostCategoryDefinition({
  required String costCategoryArn,
  String? effectiveOn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSInsightsIndexService.DescribeCostCategoryDefinition'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CostCategoryArn': costCategoryArn,
      if (effectiveOn != null) 'EffectiveOn': effectiveOn,
    },
  );

  return DescribeCostCategoryDefinitionResponse.fromJson(jsonResponse.body);
}