async def get_database(
self,
*,
config_overrides: Optional[AsyncSsmSapClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ssm_sap.types.get_database_input.GetDatabaseInput]",
) -> AsyncOperationResponse[
"capo_ssm_sap.types.get_database_output.GetDatabaseOutput"
]:
import capo_ssm_sap._operations.ssm_sap.get_database
(
output,
http_response,
) = await capo_ssm_sap._operations.ssm_sap.get_database.async_get_database(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output