Skip to content

list_installed_components

list_installed_components(
    core_device_thing_name: CoreDeviceThingName,
    *,
    config_overrides: Optional[GreengrassV2ClientConfig] = None,
    max_results: Optional[DefaultMaxResults] = None,
    next_token: Optional[NextTokenString] = None,
    topology_filter: Optional[InstalledComponentTopologyFilter] = None,
) -> ListInstalledComponentsResponse

Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL.

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

Core devices send status updates at the following times:

  • When the IoT Greengrass Core software starts

  • When the core device receives a deployment from the Amazon Web Services Cloud

  • When the status of any component on the core device becomes BROKEN

  • At a regular interval that you can configure, which defaults to 24 hours

  • For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment

Parameters:

  • core_device_thing_name (CoreDeviceThingName) –

    The name of the core device. This is also the name of the IoT thing.

  • max_results (Optional[DefaultMaxResults], default: None ) –

    The maximum number of results to be returned per paginated request.

  • next_token (Optional[NextTokenString], default: None ) –

    The token to be used for the next set of paginated results.

  • topology_filter (Optional[InstalledComponentTopologyFilter], default: None ) –

    The filter for the list of components. Choose from the following options:

    • ALL – The list includes all components installed on the core device.

    • ROOT – The list includes only root components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components.

    Default: ROOT

Raises:

  • AccessDeniedException –

    You don't have permission to perform the action.

  • InternalServerException –

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

  • ResourceNotFoundException –

    The requested resource can't be found.

  • 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.

  • ValidationException –

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

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_greengrassv2/_services/greengrass_v2.py
def list_installed_components(
    self,
    core_device_thing_name: "capo_greengrassv2.types.core_device_thing_name.CoreDeviceThingName",
    *,
    config_overrides: Optional[GreengrassV2ClientConfig] = None,
    max_results: Optional[
        "capo_greengrassv2.types.default_max_results.DefaultMaxResults"
    ] = None,
    next_token: Optional[
        "capo_greengrassv2.types.next_token_string.NextTokenString"
    ] = None,
    topology_filter: Optional[
        "capo_greengrassv2.types.installed_component_topology_filter.InstalledComponentTopologyFilter"
    ] = None,
) -> "capo_greengrassv2.types.list_installed_components_response.ListInstalledComponentsResponse":
    """<p>Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the <code>topologyFilter</code> parameter to <code>ALL</code>.</p> <note> <p>IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.</p> <p>Core devices send status updates at the following times:</p> <ul> <li> <p>When the IoT Greengrass Core software starts</p> </li> <li> <p>When the core device receives a deployment from the Amazon Web Services Cloud</p> </li> <li> <p>When the status of any component on the core device becomes <code>BROKEN</code> </p> </li> <li> <p>At a <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#greengrass-nucleus-component-configuration-fss">regular interval that you can configure</a>, which defaults to 24 hours</p> </li> <li> <p>For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment</p> </li> </ul> </note>

    Args:
        core_device_thing_name: <p>The name of the core device. This is also the name of the IoT thing.</p>
        max_results: <p>The maximum number of results to be returned per paginated request.</p>
        next_token: <p>The token to be used for the next set of paginated results.</p>
        topology_filter: <p>The filter for the list of components. Choose from the following options:</p> <ul> <li> <p> <code>ALL</code> – The list includes all components installed on the core device.</p> </li> <li> <p> <code>ROOT</code> – The list includes only <i>root</i> components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components.</p> </li> </ul> <p>Default: <code>ROOT</code> </p>

    Raises:
        capo_greengrassv2.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_greengrassv2.errors.internal_server_exception.InternalServerException: <p>IoT Greengrass can't process your request right now. Try again later.</p>
        capo_greengrassv2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_greengrassv2.errors.throttling_exception.ThrottlingException: <p>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.</p>
        capo_greengrassv2.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_greengrassv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_greengrassv2.types.list_installed_components_request.ListInstalledComponentsRequest]",
    ) -> OperationResponse[
        "capo_greengrassv2.types.list_installed_components_response.ListInstalledComponentsResponse"
    ]:
        import capo_greengrassv2._operations.greengrass_v2.list_installed_components

        output, http_response = (
            capo_greengrassv2._operations.greengrass_v2.list_installed_components.list_installed_components(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInstalledComponents")
    )
    input_: capo_greengrassv2.types.list_installed_components_request.ListInstalledComponentsRequest = {
        "core_device_thing_name": core_device_thing_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if topology_filter is not None:
        input_["topology_filter"] = topology_filter

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output