Skip to content

list_effective_deployments async

list_effective_deployments(
    core_device_thing_name: CoreDeviceThingName,
    *,
    config_overrides: Optional[AsyncGreengrassV2ClientConfig] = None,
    max_results: Optional[DefaultMaxResults] = None,
    next_token: Optional[NextTokenString] = None,
) -> ListEffectiveDeploymentsResponse

Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.

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.

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/async_greengrass_v2.py
async def list_effective_deployments(
    self,
    core_device_thing_name: "capo_greengrassv2.types.core_device_thing_name.CoreDeviceThingName",
    *,
    config_overrides: Optional[AsyncGreengrassV2ClientConfig] = None,
    max_results: Optional[
        "capo_greengrassv2.types.default_max_results.DefaultMaxResults"
    ] = None,
    next_token: Optional[
        "capo_greengrassv2.types.next_token_string.NextTokenString"
    ] = None,
) -> "capo_greengrassv2.types.list_effective_deployments_response.ListEffectiveDeploymentsResponse":
    """<p>Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.</p>

    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>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_greengrassv2.types.list_effective_deployments_request.ListEffectiveDeploymentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_greengrassv2.types.list_effective_deployments_response.ListEffectiveDeploymentsResponse"
    ]:
        import capo_greengrassv2._operations.greengrass_v2.list_effective_deployments

        (
            output,
            http_response,
        ) = await capo_greengrassv2._operations.greengrass_v2.list_effective_deployments.async_list_effective_deployments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEffectiveDeployments")
    )
    input_: capo_greengrassv2.types.list_effective_deployments_request.ListEffectiveDeploymentsRequest = {
        "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

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output