Skip to content

describe_archive async

describe_archive(
    archive_name: ArchiveName,
    *,
    config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
) -> DescribeArchiveResponse

Retrieves details about an archive.

Parameters:

  • archive_name (ArchiveName) –

    The name of the archive to retrieve.

Raises:

Source code in docs_src/capo_cloudwatch_events/_services/async_cloud_watch_events.py
async def describe_archive(
    self,
    archive_name: "capo_cloudwatch_events.types.archive_name.ArchiveName",
    *,
    config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
) -> (
    "capo_cloudwatch_events.types.describe_archive_response.DescribeArchiveResponse"
):
    """<p>Retrieves details about an archive.</p>

    Args:
        archive_name: <p>The name of the archive to retrieve.</p>

    Raises:
        capo_cloudwatch_events.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_cloudwatch_events.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The resource you are trying to create already exists.</p>
        capo_cloudwatch_events.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_cloudwatch_events.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch_events.types.describe_archive_request.DescribeArchiveRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch_events.types.describe_archive_response.DescribeArchiveResponse"
    ]:
        import capo_cloudwatch_events._operations.aws_events.describe_archive

        (
            output,
            http_response,
        ) = await capo_cloudwatch_events._operations.aws_events.describe_archive.async_describe_archive(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeArchive")
    )
    input_: capo_cloudwatch_events.types.describe_archive_request.DescribeArchiveRequest = {
        "archive_name": archive_name
    }

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