ResolveComponentCandidates - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ResolveComponentCandidates

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, Amazon 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 Amazon IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.

Important

To use this operation, you must use the data plane API endpoint and authenticate with an Amazon IoT device certificate. For more information, see Amazon IoT Greengrass endpoints and quotas.

Request Syntax

POST /greengrass/v2/resolveComponentCandidates HTTP/1.1 Content-type: application/json { "componentCandidates": [ { "componentName": "string", "componentVersion": "string", "versionRequirements": { "string" : "string" } } ], "platform": { "attributes": { "string" : "string" }, "name": "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

componentCandidates

The list of components to resolve.

Type: Array of ComponentCandidate objects

Required: No

platform

The platform to use to resolve compatible components.

Type: ComponentPlatform object

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "resolvedComponentVersions": [ { "arn": "string", "componentName": "string", "componentVersion": "string", "message": "string", "recipe": blob, "vendorGuidance": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

resolvedComponentVersions

A list of components that meet the requirements that you specify in the request. This list includes each component's recipe that you can use to install the component.

Type: Array of ResolvedComponentVersion objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403

ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

HTTP Status Code: 409

InternalServerException

Amazon IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404

ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429

ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: