Skip to content

list_document_metadata_history

list_document_metadata_history(
    name: DocumentName,
    metadata: DocumentMetadataEnum,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    document_version: Optional[DocumentVersion] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListDocumentMetadataHistoryResponse

Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see Amazon Web Services Systems Manager Change Manager availability change.

Information about approval reviews for a version of a change template in Change Manager.

Parameters:

  • name (DocumentName) –

    The name of the change template.

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

    The version of the change template.

  • metadata (DocumentMetadataEnum) –

    The type of data for which details are being requested. Currently, the only supported value is DocumentReviews.

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

    The token for the next set of items to return. (You received this token from a previous call.)

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

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def list_document_metadata_history(
    self,
    name: "capo_ssm.types.document_name.DocumentName",
    metadata: "capo_ssm.types.document_metadata_enum.DocumentMetadataEnum",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    document_version: Optional[
        "capo_ssm.types.document_version.DocumentVersion"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ssm.types.max_results.MaxResults"] = None,
) -> "capo_ssm.types.list_document_metadata_history_response.ListDocumentMetadataHistoryResponse":
    """<important> <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p> </important> <p>Information about approval reviews for a version of a change template in Change Manager.</p>

    Args:
        name: <p>The name of the change template.</p>
        document_version: <p>The version of the change template.</p>
        metadata: <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</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.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.list_document_metadata_history_request.ListDocumentMetadataHistoryRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.list_document_metadata_history_response.ListDocumentMetadataHistoryResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.list_document_metadata_history

        output, http_response = (
            capo_ssm._operations.amazon_ssm.list_document_metadata_history.list_document_metadata_history(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDocumentMetadataHistory")
    )
    input_: capo_ssm.types.list_document_metadata_history_request.ListDocumentMetadataHistoryRequest = {
        "name": name,
        "metadata": metadata,
    }
    if document_version is not None:
        input_["document_version"] = document_version
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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