Skip to content

describe_document async

describe_document(
    name: DocumentARN,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    document_version: Optional[DocumentVersion] = None,
    version_name: Optional[DocumentVersionName] = None,
) -> DescribeDocumentResult

Describes the specified Amazon Web Services Systems Manager document (SSM document).

Parameters:

  • name (DocumentARN) –

    The name of the SSM document.

    If you're calling a shared SSM document from a different Amazon Web Services account, Name is the full Amazon Resource Name (ARN) of the document.

  • document_version (Optional[DocumentVersion], default: None ) –

    The document version for which you want information. Can be a specific version or the default version.

  • version_name (Optional[DocumentVersionName], default: None ) –

    An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def describe_document(
    self,
    name: "capo_ssm.types.document_arn.DocumentARN",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    document_version: Optional[
        "capo_ssm.types.document_version.DocumentVersion"
    ] = None,
    version_name: Optional[
        "capo_ssm.types.document_version_name.DocumentVersionName"
    ] = None,
) -> "capo_ssm.types.describe_document_result.DescribeDocumentResult":
    """<p>Describes the specified Amazon Web Services Systems Manager document (SSM document).</p>

    Args:
        name: <p>The name of the SSM document.</p> <note> <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p> </note>
        document_version: <p>The document version for which you want information. Can be a specific version or the default version.</p>
        version_name: <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_document.InvalidDocument: <p>The specified SSM document doesn't exist.</p>
        capo_ssm.errors.invalid_document_version.InvalidDocumentVersion: <p>The document version isn't valid or doesn't exist.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.describe_document_request.DescribeDocumentRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.describe_document_result.DescribeDocumentResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_document

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.describe_document.async_describe_document(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDocument")
    )
    input_: capo_ssm.types.describe_document_request.DescribeDocumentRequest = {
        "name": name
    }
    if document_version is not None:
        input_["document_version"] = document_version
    if version_name is not None:
        input_["version_name"] = version_name

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