Skip to content

get_case_attachment_download_url

get_case_attachment_download_url(
    case_id: CaseId,
    attachment_id: AttachmentId,
    *,
    config_overrides: Optional[SecurityIRClientConfig] = None,
) -> GetCaseAttachmentDownloadUrlResponse

Returns a Pre-Signed URL for uploading attachments into a case.

Parameters:

  • case_id (CaseId) –

    Required element for GetCaseAttachmentDownloadUrl to identify the case ID for downloading an attachment from.

  • attachment_id (AttachmentId) –

    Required element for GetCaseAttachmentDownloadUrl to identify the attachment ID for downloading an attachment.

Raises:

Examples:

Invoke GetCaseAttachmentDownloadUrl

>>> client.get_case_attachment_download_url(case_id='8403556009', attachment_id='3C5A6B89-1DEF-4C2D-A5B6-123456789ABC')
Source code in docs_src/capo_security_ir/_services/security_ir.py
def get_case_attachment_download_url(
    self,
    case_id: "capo_security_ir.types.case_id.CaseId",
    attachment_id: "capo_security_ir.types.attachment_id.AttachmentId",
    *,
    config_overrides: Optional[SecurityIRClientConfig] = None,
) -> "capo_security_ir.types.get_case_attachment_download_url_response.GetCaseAttachmentDownloadUrlResponse":
    """<p>Returns a Pre-Signed URL for uploading attachments into a case.</p>

    Args:
        case_id: <p>Required element for GetCaseAttachmentDownloadUrl to identify the case ID for downloading an attachment from. </p>
        attachment_id: <p>Required element for GetCaseAttachmentDownloadUrl to identify the attachment ID for downloading an attachment. </p>

    Raises:
        capo_security_ir.errors.access_denied_exception.AccessDeniedException: <p/>
        capo_security_ir.errors.conflict_exception.ConflictException: <p/>
        capo_security_ir.errors.internal_server_exception.InternalServerException: <p/>
        capo_security_ir.errors.invalid_token_exception.InvalidTokenException: <p/>
        capo_security_ir.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
        capo_security_ir.errors.security_incident_response_not_active_exception.SecurityIncidentResponseNotActiveException: <p/>
        capo_security_ir.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p/>
        capo_security_ir.errors.throttling_exception.ThrottlingException: <p/>
        capo_security_ir.errors.validation_exception.ValidationException: <p/>
        capo_security_ir.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke GetCaseAttachmentDownloadUrl

        >>> client.get_case_attachment_download_url(case_id='8403556009', attachment_id='3C5A6B89-1DEF-4C2D-A5B6-123456789ABC')
    """

    def _handler(
        req: "OperationRequest[capo_security_ir.types.get_case_attachment_download_url_request.GetCaseAttachmentDownloadUrlRequest]",
    ) -> OperationResponse[
        "capo_security_ir.types.get_case_attachment_download_url_response.GetCaseAttachmentDownloadUrlResponse"
    ]:
        import capo_security_ir._operations.security_incident_response.get_case_attachment_download_url

        output, http_response = (
            capo_security_ir._operations.security_incident_response.get_case_attachment_download_url.get_case_attachment_download_url(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_security_ir.types.get_case_attachment_download_url_response.GetCaseAttachmentDownloadUrlResponse",
    ) -> dict[str, Any]:
        import capo_security_ir.types.get_case_attachment_download_url_response

        return capo_security_ir.types.get_case_attachment_download_url_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetCaseAttachmentDownloadUrl", redact_output=_redact_output
        ),
    )
    input_: capo_security_ir.types.get_case_attachment_download_url_request.GetCaseAttachmentDownloadUrlRequest = {
        "case_id": case_id,
        "attachment_id": attachment_id,
    }

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