Skip to content

get_database

get_database(
    *,
    config_overrides: Optional[SsmSapClientConfig] = None,
    application_id: Optional[ApplicationId] = None,
    component_id: Optional[ComponentId] = None,
    database_id: Optional[DatabaseId] = None,
    database_arn: Optional[SsmSapArn] = None,
) -> GetDatabaseOutput

Gets the SAP HANA database of an application registered with AWS Systems Manager for SAP.

Parameters:

Raises:

Source code in docs_src/capo_ssm_sap/_services/ssm_sap.py
def get_database(
    self,
    *,
    config_overrides: Optional[SsmSapClientConfig] = None,
    application_id: Optional[
        "capo_ssm_sap.types.application_id.ApplicationId"
    ] = None,
    component_id: Optional["capo_ssm_sap.types.component_id.ComponentId"] = None,
    database_id: Optional["capo_ssm_sap.types.database_id.DatabaseId"] = None,
    database_arn: Optional["capo_ssm_sap.types.ssm_sap_arn.SsmSapArn"] = None,
) -> "capo_ssm_sap.types.get_database_output.GetDatabaseOutput":
    """<p>Gets the SAP HANA database of an application registered with AWS Systems Manager for SAP.</p>

    Args:
        application_id: <p>The ID of the application.</p>
        component_id: <p>The ID of the component.</p>
        database_id: <p>The ID of the database.</p>
        database_arn: <p>The Amazon Resource Name (ARN) of the database.</p>

    Raises:
        capo_ssm_sap.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_ssm_sap.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service. </p>
        capo_ssm_sap.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_sap.types.get_database_input.GetDatabaseInput]",
    ) -> OperationResponse[
        "capo_ssm_sap.types.get_database_output.GetDatabaseOutput"
    ]:
        import capo_ssm_sap._operations.ssm_sap.get_database

        output, http_response = (
            capo_ssm_sap._operations.ssm_sap.get_database.get_database(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ssm_sap.types.get_database_output.GetDatabaseOutput",
    ) -> dict[str, Any]:
        import capo_ssm_sap.types.get_database_output

        return capo_ssm_sap.types.get_database_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetDatabase", redact_output=_redact_output),
    )
    input_: capo_ssm_sap.types.get_database_input.GetDatabaseInput = {}
    if application_id is not None:
        input_["application_id"] = application_id
    if component_id is not None:
        input_["component_id"] = component_id
    if database_id is not None:
        input_["database_id"] = database_id
    if database_arn is not None:
        input_["database_arn"] = database_arn

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