GreengrassV2 / Client / resolve_component_candidates

resolve_component_candidates#

GreengrassV2.Client.resolve_component_candidates(**kwargs)#

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.

Warning

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

See also: AWS API Documentation

Request Syntax

response = client.resolve_component_candidates(
    platform={
        'name': 'string',
        'attributes': {
            'string': 'string'
        }
    },
    componentCandidates=[
        {
            'componentName': 'string',
            'componentVersion': 'string',
            'versionRequirements': {
                'string': 'string'
            }
        },
    ]
)
Parameters:
  • platform (dict) –

    The platform to use to resolve compatible components.

    • name (string) –

      The friendly name of the platform. This name helps you identify the platform.

      If you omit this parameter, IoT Greengrass creates a friendly name from the os and architecture of the platform.

    • attributes (dict) –

      A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os and architecture by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide.

      • (string) –

        • (string) –

  • componentCandidates (list) –

    The list of components to resolve.

    • (dict) –

      Contains information about a component that is a candidate to deploy to a Greengrass core device.

      • componentName (string) –

        The name of the component.

      • componentVersion (string) –

        The version of the component.

      • versionRequirements (dict) –

        The version requirements for the component’s dependencies. Greengrass core devices get the version requirements from component recipes.

        IoT Greengrass V2 uses semantic version constraints. For more information, see Semantic Versioning.

        • (string) –

          • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'resolvedComponentVersions': [
        {
            'arn': 'string',
            'componentName': 'string',
            'componentVersion': 'string',
            'recipe': b'bytes',
            'vendorGuidance': 'ACTIVE'|'DISCONTINUED'|'DELETED',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • resolvedComponentVersions (list) –

      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.

      • (dict) –

        Contains information about a component version that is compatible to run on a Greengrass core device.

        • arn (string) –

          The ARN of the component version.

        • componentName (string) –

          The name of the component.

        • componentVersion (string) –

          The version of the component.

        • recipe (bytes) –

          The recipe of the component version.

        • vendorGuidance (string) –

          The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:

          • ACTIVE – This component version is available and recommended for use.

          • DISCONTINUED – This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.

          • DELETED – This component version has been deleted by its publisher, so you can’t deploy it. If you have any existing deployments that specify this component version, those deployments will fail.

        • message (string) –

          A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.

Exceptions