Skip to content

get_ops_metadata

get_ops_metadata(
    ops_metadata_arn: OpsMetadataArn,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    max_results: Optional[GetOpsMetadataMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> GetOpsMetadataResult

View operational metadata related to an application in Application Manager.

Parameters:

  • ops_metadata_arn (OpsMetadataArn) –

    The Amazon Resource Name (ARN) of an OpsMetadata Object to view.

  • max_results (Optional[GetOpsMetadataMaxResults], 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.

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

    A token to start the list. Use this token to get the next set of results.

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def get_ops_metadata(
    self,
    ops_metadata_arn: "capo_ssm.types.ops_metadata_arn.OpsMetadataArn",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    max_results: Optional[
        "capo_ssm.types.get_ops_metadata_max_results.GetOpsMetadataMaxResults"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.get_ops_metadata_result.GetOpsMetadataResult":
    """<p>View operational metadata related to an application in Application Manager.</p>

    Args:
        ops_metadata_arn: <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</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>
        next_token: <p>A token to start the list. Use this token 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.ops_metadata_invalid_argument_exception.OpsMetadataInvalidArgumentException: <p>One of the arguments passed is invalid. </p>
        capo_ssm.errors.ops_metadata_not_found_exception.OpsMetadataNotFoundException: <p>The OpsMetadata object doesn't exist. </p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.get_ops_metadata_request.GetOpsMetadataRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.get_ops_metadata_result.GetOpsMetadataResult"
    ]:
        import capo_ssm._operations.amazon_ssm.get_ops_metadata

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetOpsMetadata")
    )
    input_: capo_ssm.types.get_ops_metadata_request.GetOpsMetadataRequest = {
        "ops_metadata_arn": ops_metadata_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    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