Skip to content

describe_device_ec2_instances async

describe_device_ec2_instances(
    managed_device_id: ManagedDeviceId,
    instance_ids: InstanceIdsList,
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
) -> DescribeDeviceEc2Output

Checks the current state of the Amazon EC2 instances. The output is similar to describeDevice, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields.

Parameters:

  • managed_device_id (ManagedDeviceId) –

    The ID of the managed device.

  • instance_ids (InstanceIdsList) –

    A list of instance IDs associated with the managed device.

Raises:

Source code in docs_src/capo_snow_device_management/_services/async_snow_device_management.py
async def describe_device_ec2_instances(
    self,
    managed_device_id: "capo_snow_device_management.types.managed_device_id.ManagedDeviceId",
    instance_ids: "capo_snow_device_management.types.instance_ids_list.InstanceIdsList",
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
) -> "capo_snow_device_management.types.describe_device_ec2_output.DescribeDeviceEc2Output":
    """<p>Checks the current state of the Amazon EC2 instances. The output is similar to <code>describeDevice</code>, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields. </p>

    Args:
        managed_device_id: <p>The ID of the managed device.</p>
        instance_ids: <p>A list of instance IDs associated with the managed device.</p>

    Raises:
        capo_snow_device_management.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_snow_device_management.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_snow_device_management.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist.</p>
        capo_snow_device_management.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_snow_device_management.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_snow_device_management.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_snow_device_management.types.describe_device_ec2_input.DescribeDeviceEc2Input]",
    ) -> AsyncOperationResponse[
        "capo_snow_device_management.types.describe_device_ec2_output.DescribeDeviceEc2Output"
    ]:
        import capo_snow_device_management._operations.snow_device_management.describe_device_ec2_instances

        (
            output,
            http_response,
        ) = await capo_snow_device_management._operations.snow_device_management.describe_device_ec2_instances.async_describe_device_ec2_instances(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDeviceEc2Instances")
    )
    input_: capo_snow_device_management.types.describe_device_ec2_input.DescribeDeviceEc2Input = {
        "managed_device_id": managed_device_id,
        "instance_ids": instance_ids,
    }

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