resolveComponentCandidates method

Future<ResolveComponentCandidatesResponse> resolveComponentCandidates({
  1. List<ComponentCandidate>? componentCandidates,
  2. ComponentPlatform? platform,
})

Retrieves a list of components that meet the component, version, and platform requirements of a deployment. Greengrass core devices call this operation when they receive a deployment to identify the components to install.

This operation identifies components that meet all dependency requirements for a deployment. If the requirements conflict, then this operation returns an error and the deployment fails. For example, this occurs if component A requires version >2.0.0 and component B requires version <2.0.0 of a component dependency.

When you specify the component candidates to resolve, IoT Greengrass compares each component's digest from the core device with the component's digest in the Amazon Web Services Cloud. If the digests don't match, then IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.

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

Parameter componentCandidates : The list of components to resolve.

Parameter platform : The platform to use to resolve compatible components.

Implementation

Future<ResolveComponentCandidatesResponse> resolveComponentCandidates({
  List<ComponentCandidate>? componentCandidates,
  ComponentPlatform? platform,
}) async {
  final $payload = <String, dynamic>{
    if (componentCandidates != null)
      'componentCandidates': componentCandidates,
    if (platform != null) 'platform': platform,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/greengrass/v2/resolveComponentCandidates',
    exceptionFnMap: _exceptionFns,
  );
  return ResolveComponentCandidatesResponse.fromJson(response);
}