getComponent method
Returns an existing component for an Amplify app.
May throw InternalServerException.
May throw InvalidParameterException.
May throw ResourceNotFoundException.
Parameter appId :
The unique ID of the Amplify app.
Parameter environmentName :
The name of the backend environment that is part of the Amplify app.
Parameter id :
The unique ID of the component.
Implementation
Future<GetComponentResponse> getComponent({
required String appId,
required String environmentName,
required String id,
}) async {
final response = await _protocol.sendRaw(
payload: null,
method: 'GET',
requestUri:
'/app/${Uri.encodeComponent(appId)}/environment/${Uri.encodeComponent(environmentName)}/components/${Uri.encodeComponent(id)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return GetComponentResponse(
component: Component.fromJson($json),
);
}