Skip to content

get_case

get_case(
    case_id: CaseId,
    domain_id: DomainId,
    fields: FieldIdentifierList,
    *,
    config_overrides: Optional[ConnectCasesClientConfig] = None,
    next_token: Optional[NextToken] = None,
) -> GetCaseResponse

Returns information about a specific case if it exists.

Parameters:

  • case_id (CaseId) –

    A unique identifier of the case.

  • domain_id (DomainId) –

    The unique identifier of the Cases domain.

  • fields (FieldIdentifierList) –

    A list of unique field identifiers.

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

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • InternalServerException –

    We couldn't process your request because of an issue with the server. Try again later.

  • ResourceNotFoundException –

    We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.

  • ThrottlingException –

    The rate has been exceeded for this API. Please try again after a few minutes.

  • ValidationException –

    The request isn't valid. Check the syntax and try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_connectcases/_services/connect_cases.py
def get_case(
    self,
    case_id: "capo_connectcases.types.case_id.CaseId",
    domain_id: "capo_connectcases.types.domain_id.DomainId",
    fields: "capo_connectcases.types.field_identifier_list.FieldIdentifierList",
    *,
    config_overrides: Optional[ConnectCasesClientConfig] = None,
    next_token: Optional["capo_connectcases.types.next_token.NextToken"] = None,
) -> "capo_connectcases.types.get_case_response.GetCaseResponse":
    """<p>Returns information about a specific case if it exists. </p>

    Args:
        case_id: <p>A unique identifier of the case.</p>
        domain_id: <p>The unique identifier of the Cases domain. </p>
        fields: <p>A list of unique field identifiers. </p>
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>

    Raises:
        capo_connectcases.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_connectcases.errors.internal_server_exception.InternalServerException: <p>We couldn't process your request because of an issue with the server. Try again later.</p>
        capo_connectcases.errors.resource_not_found_exception.ResourceNotFoundException: <p>We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.</p>
        capo_connectcases.errors.throttling_exception.ThrottlingException: <p>The rate has been exceeded for this API. Please try again after a few minutes.</p>
        capo_connectcases.errors.validation_exception.ValidationException: <p>The request isn't valid. Check the syntax and try again.</p>
        capo_connectcases.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connectcases.types.get_case_request.GetCaseRequest]",
    ) -> OperationResponse[
        "capo_connectcases.types.get_case_response.GetCaseResponse"
    ]:
        import capo_connectcases._operations.amazon_connect_cases.get_case

        output, http_response = (
            capo_connectcases._operations.amazon_connect_cases.get_case.get_case(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCase")
    )
    input_: capo_connectcases.types.get_case_request.GetCaseRequest = {
        "case_id": case_id,
        "domain_id": domain_id,
        "fields": fields,
    }
    if next_token is not None:
        input_["next_token"] = next_token

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