describeComponentConfigurationRecommendation method

Future<DescribeComponentConfigurationRecommendationResponse> describeComponentConfigurationRecommendation({
  1. required String componentName,
  2. required String resourceGroupName,
  3. required Tier tier,
  4. RecommendationType? recommendationType,
  5. String? workloadName,
})

Describes the recommended monitoring configuration of the component.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter componentName : The name of the component.

Parameter resourceGroupName : The name of the resource group.

Parameter tier : The tier of the application component.

Parameter recommendationType : The recommended configuration type.

Parameter workloadName : The name of the workload. The name of the workload is required when the tier of the application component is SAP_ASE_SINGLE_NODE or SAP_ASE_HIGH_AVAILABILITY.

Implementation

Future<DescribeComponentConfigurationRecommendationResponse>
    describeComponentConfigurationRecommendation({
  required String componentName,
  required String resourceGroupName,
  required Tier tier,
  RecommendationType? recommendationType,
  String? workloadName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'EC2WindowsBarleyService.DescribeComponentConfigurationRecommendation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ComponentName': componentName,
      'ResourceGroupName': resourceGroupName,
      'Tier': tier.value,
      if (recommendationType != null)
        'RecommendationType': recommendationType.value,
      if (workloadName != null) 'WorkloadName': workloadName,
    },
  );

  return DescribeComponentConfigurationRecommendationResponse.fromJson(
      jsonResponse.body);
}