Skip to content

describe_communications async

describe_communications(
    case_id: CaseId,
    *,
    config_overrides: Optional[AsyncSupportClientConfig] = None,
    before_time: Optional[BeforeTime] = None,
    after_time: Optional[AfterTime] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    dry_run: Optional[NullableBooleanType] = None,
) -> DescribeCommunicationsResponse

Returns communications and attachments for one or more support cases. Use the afterTime and beforeTime parameters to filter by date. You can use the caseId parameter to restrict the results to a specific case.

Case data is available for 24 months after creation. If a case was created more than 24 months ago, a request for data might cause an error.

You can use the maxResults and nextToken parameters to control the pagination of the results. Set maxResults to the number of cases that you want to display on each page, and use nextToken to specify the resumption of pagination.

  • You must have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan to use the Amazon Web Services Support API. If you're in an Amazon Web Services Region that doesn't offer one of these Amazon Web Services Support plans, or if you haven't transitioned to one of these plans, you can use the Amazon Web Services Support API with a Business, Enterprise On-Ramp, or Enterprise Support plan.

  • If you call the Amazon Web Services Support API from an account that doesn't have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan, the SubscriptionRequiredException error message appears. For information about changing your support plan, see Amazon Web Services Support.

Each Communication returned by this operation includes attachment information in two fields:

  • attachmentSet: returns only attachments that are 5 MB or smaller. Attachments larger than 5 MB are not included in this field.

  • attachments: returns all attachments regardless of size.

Amazon Web Services recommends that you use the attachments field and download each attachment with GetAttachmentDownloadLink, which supports attachments of any size. The attachmentSet field and DescribeAttachment return only attachments that are 5 MB or smaller.

Parameters:

  • case_id (CaseId) –

    The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-exen-2025-c4c1d2bf33c5cf47

  • before_time (Optional[BeforeTime], default: None ) –

    The end date for a filtered date search on support case communications. Case communications are available for 24 months after creation.

  • after_time (Optional[AfterTime], default: None ) –

    The start date for a filtered date search on support case communications. Case communications are available for 24 months after creation.

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

    A resumption point for pagination.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return before paginating.

  • dry_run (Optional[NullableBooleanType], default: None ) –

    Specifies whether to validate the request without actually returning communications. When set to true, the request is validated but no communications are returned, and the operation returns a DryRunOperationException. When omitted or set to false, the request runs normally.

Raises:

Source code in docs_src/capo_support/_services/async_support.py
async def describe_communications(
    self,
    case_id: "capo_support.types.case_id.CaseId",
    *,
    config_overrides: Optional[AsyncSupportClientConfig] = None,
    before_time: Optional["capo_support.types.before_time.BeforeTime"] = None,
    after_time: Optional["capo_support.types.after_time.AfterTime"] = None,
    next_token: Optional["capo_support.types.next_token.NextToken"] = None,
    max_results: Optional["capo_support.types.max_results.MaxResults"] = None,
    dry_run: Optional[
        "capo_support.types.nullable_boolean_type.NullableBooleanType"
    ] = None,
) -> "capo_support.types.describe_communications_response.DescribeCommunicationsResponse":
    """<p>Returns communications and attachments for one or more support cases. Use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter by date. You can use the <code>caseId</code> parameter to restrict the results to a specific case.</p> <p>Case data is available for 24 months after creation. If a case was created more than 24 months ago, a request for data might cause an error.</p> <p>You can use the <code>maxResults</code> and <code>nextToken</code> parameters to control the pagination of the results. Set <code>maxResults</code> to the number of cases that you want to display on each page, and use <code>nextToken</code> to specify the resumption of pagination.</p> <note> <ul> <li> <p>You must have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan to use the Amazon Web Services Support API. If you're in an Amazon Web Services Region that doesn't offer one of these Amazon Web Services Support plans, or if you haven't transitioned to one of these plans, you can use the Amazon Web Services Support API with a Business, Enterprise On-Ramp, or Enterprise Support plan.</p> </li> <li> <p>If you call the Amazon Web Services Support API from an account that doesn't have an Amazon Web Services Business Support+, Amazon Web Services Enterprise Support, or Amazon Web Services Unified Operations plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">Amazon Web Services Support</a>.</p> </li> </ul> </note> <important> <p>Each <a>Communication</a> returned by this operation includes attachment information in two fields:</p> <ul> <li> <p> <code>attachmentSet</code>: returns only attachments that are 5 MB or smaller. Attachments larger than 5 MB are not included in this field.</p> </li> <li> <p> <code>attachments</code>: returns all attachments regardless of size.</p> </li> </ul> <p>Amazon Web Services recommends that you use the <code>attachments</code> field and download each attachment with <a>GetAttachmentDownloadLink</a>, which supports attachments of any size. The <code>attachmentSet</code> field and <a>DescribeAttachment</a> return only attachments that are 5 MB or smaller.</p> </important>

    Args:
        case_id: <p>The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-exen-2025-c4c1d2bf33c5cf47</i> </p>
        before_time: <p>The end date for a filtered date search on support case communications. Case communications are available for 24 months after creation.</p>
        after_time: <p>The start date for a filtered date search on support case communications. Case communications are available for 24 months after creation.</p>
        next_token: <p>A resumption point for pagination.</p>
        max_results: <p>The maximum number of results to return before paginating.</p>
        dry_run: <p>Specifies whether to validate the request without actually returning communications. When set to <code>true</code>, the request is validated but no communications are returned, and the operation returns a <code>DryRunOperationException</code>. When omitted or set to <code>false</code>, the request runs normally.</p>

    Raises:
        capo_support.errors.case_id_not_found.CaseIdNotFound: <p>The requested <code>caseId</code> couldn't be located.</p>
        capo_support.errors.dry_run_operation_exception.DryRunOperationException: <p>The request was valid, but the operation wasn't performed because <code>dryRun</code> was set to <code>true</code>.</p>
        capo_support.errors.internal_server_error.InternalServerError: <p>An internal server error occurred.</p>
        capo_support.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_support.types.describe_communications_request.DescribeCommunicationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_support.types.describe_communications_response.DescribeCommunicationsResponse"
    ]:
        import capo_support._operations.aws_support_20130415.describe_communications

        (
            output,
            http_response,
        ) = await capo_support._operations.aws_support_20130415.describe_communications.async_describe_communications(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeCommunications")
    )
    input_: capo_support.types.describe_communications_request.DescribeCommunicationsRequest = {
        "case_id": case_id
    }
    if before_time is not None:
        input_["before_time"] = before_time
    if after_time is not None:
        input_["after_time"] = after_time
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if dry_run is not None:
        input_["dry_run"] = dry_run

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