getComponent method
Future<GetComponentResponse>
getComponent({
- required String arn,
- RecipeOutputFormat? recipeOutputFormat,
Gets the recipe for a version of a component. Core devices can call this operation to identify the artifacts and requirements to install a component.
May throw ValidationException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalServerException.
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 {
ArgumentError.checkNotNull(arn, 'arn');
final $query = <String, List<String>>{
if (recipeOutputFormat != null)
'recipeOutputFormat': [recipeOutputFormat.toValue()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/greengrass/v2/components/${Uri.encodeComponent(arn)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetComponentResponse.fromJson(response);
}