getComponent method

Future<GetComponentResponse> getComponent({
  1. required String arn,
  2. RecipeOutputFormat? recipeOutputFormat,
})

Gets the recipe for a version of a component.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter arn : The ARN of the component version.

Parameter recipeOutputFormat : The format of the recipe.

Implementation

Future<GetComponentResponse> getComponent({
  required String arn,
  RecipeOutputFormat? recipeOutputFormat,
}) async {
  final $query = <String, List<String>>{
    if (recipeOutputFormat != null)
      'recipeOutputFormat': [recipeOutputFormat.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/greengrass/v2/components/${Uri.encodeComponent(arn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetComponentResponse.fromJson(response);
}