Skip to content

get_upload

get_upload(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> GetUploadResult

Gets information about an upload.

Parameters:

Raises:

Examples:

To get information about a specific upload The following example gets information about a specific upload.

>>> client.get_upload(arn='arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456')
Source code in docs_src/capo_device_farm/_services/device_farm.py
def get_upload(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> "capo_device_farm.types.get_upload_result.GetUploadResult":
    """<p>Gets information about an upload.</p>

    Args:
        arn: <p>The upload's ARN.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get information about a specific upload
        The following example gets information about a specific upload.

        >>> client.get_upload(arn='arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456')
    """

    def _handler(
        req: "OperationRequest[capo_device_farm.types.get_upload_request.GetUploadRequest]",
    ) -> OperationResponse[
        "capo_device_farm.types.get_upload_result.GetUploadResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.get_upload

        output, http_response = (
            capo_device_farm._operations.device_farm_20150623.get_upload.get_upload(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_device_farm.types.get_upload_result.GetUploadResult",
    ) -> dict[str, Any]:
        import capo_device_farm.types.get_upload_result

        return capo_device_farm.types.get_upload_result.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetUpload", redact_output=_redact_output),
    )
    input_: capo_device_farm.types.get_upload_request.GetUploadRequest = {
        "arn": arn
    }

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