Skip to content

register_application async

register_application(
    application_id: ApplicationId,
    application_type: ApplicationType,
    instances: InstanceList,
    *,
    config_overrides: Optional[AsyncSsmSapClientConfig] = None,
    sap_instance_number: Optional[SAPInstanceNumber] = None,
    sid: Optional[SID] = None,
    tags: Optional[TagMap] = None,
    credentials: Optional[ApplicationCredentialList] = None,
    database_arn: Optional[SsmSapArn] = None,
    components_info: Optional[ComponentInfoList] = None,
) -> RegisterApplicationOutput

Register an SAP application with AWS Systems Manager for SAP. You must meet the following requirements before registering.

The SAP application you want to register with AWS Systems Manager for SAP is running on Amazon EC2.

AWS Systems Manager Agent must be setup on an Amazon EC2 instance along with the required IAM permissions.

Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets Manager to manage SAP applications and components.

Parameters:

  • application_id (ApplicationId) –

    The ID of the application.

  • application_type (ApplicationType) –

    The type of the application.

  • instances (InstanceList) –

    The Amazon EC2 instances on which your SAP application is running.

  • sap_instance_number (Optional[SAPInstanceNumber], default: None ) –

    The SAP instance number of the application.

  • sid (Optional[SID], default: None ) –

    The System ID of the application.

  • tags (Optional[TagMap], default: None ) –

    The tags to be attached to the SAP application.

  • credentials (Optional[ApplicationCredentialList], default: None ) –

    The credentials of the SAP application.

  • database_arn (Optional[SsmSapArn], default: None ) –

    The Amazon Resource Name of the SAP HANA database.

  • components_info (Optional[ComponentInfoList], default: None ) –

    This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.

    This is an array of ApplicationComponent objects. You may input 0 to 5 items.

Raises:

Source code in docs_src/capo_ssm_sap/_services/async_ssm_sap.py
async def register_application(
    self,
    application_id: "capo_ssm_sap.types.application_id.ApplicationId",
    application_type: "capo_ssm_sap.types.application_type.ApplicationType",
    instances: "capo_ssm_sap.types.instance_list.InstanceList",
    *,
    config_overrides: Optional[AsyncSsmSapClientConfig] = None,
    sap_instance_number: Optional[
        "capo_ssm_sap.types.sap_instance_number.SAPInstanceNumber"
    ] = None,
    sid: Optional["capo_ssm_sap.types.sid.SID"] = None,
    tags: Optional["capo_ssm_sap.types.tag_map.TagMap"] = None,
    credentials: Optional[
        "capo_ssm_sap.types.application_credential_list.ApplicationCredentialList"
    ] = None,
    database_arn: Optional["capo_ssm_sap.types.ssm_sap_arn.SsmSapArn"] = None,
    components_info: Optional[
        "capo_ssm_sap.types.component_info_list.ComponentInfoList"
    ] = None,
) -> "capo_ssm_sap.types.register_application_output.RegisterApplicationOutput":
    """<p>Register an SAP application with AWS Systems Manager for SAP. You must meet the following requirements before registering. </p> <p>The SAP application you want to register with AWS Systems Manager for SAP is running on Amazon EC2.</p> <p>AWS Systems Manager Agent must be setup on an Amazon EC2 instance along with the required IAM permissions.</p> <p>Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets Manager to manage SAP applications and components.</p>

    Args:
        application_id: <p>The ID of the application.</p>
        application_type: <p>The type of the application.</p>
        instances: <p>The Amazon EC2 instances on which your SAP application is running.</p>
        sap_instance_number: <p>The SAP instance number of the application.</p>
        sid: <p>The System ID of the application.</p>
        tags: <p>The tags to be attached to the SAP application.</p>
        credentials: <p>The credentials of the SAP application.</p>
        database_arn: <p>The Amazon Resource Name of the SAP HANA database.</p>
        components_info: <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p> <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</p>

    Raises:
        capo_ssm_sap.errors.conflict_exception.ConflictException: <p>A conflict has occurred.</p>
        capo_ssm_sap.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_ssm_sap.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource is not available.</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.register_application_input.RegisterApplicationInput]",
    ) -> AsyncOperationResponse[
        "capo_ssm_sap.types.register_application_output.RegisterApplicationOutput"
    ]:
        import capo_ssm_sap._operations.ssm_sap.register_application

        (
            output,
            http_response,
        ) = await capo_ssm_sap._operations.ssm_sap.register_application.async_register_application(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_ssm_sap.types.register_application_input.RegisterApplicationInput",
    ) -> dict[str, Any]:
        import capo_ssm_sap.types.register_application_input

        return capo_ssm_sap.types.register_application_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("RegisterApplication", redact_input=_redact_input),
    )
    input_: capo_ssm_sap.types.register_application_input.RegisterApplicationInput = {
        "application_id": application_id,
        "application_type": application_type,
        "instances": instances,
    }
    if sap_instance_number is not None:
        input_["sap_instance_number"] = sap_instance_number
    if sid is not None:
        input_["sid"] = sid
    if tags is not None:
        input_["tags"] = tags
    if credentials is not None:
        input_["credentials"] = credentials
    if database_arn is not None:
        input_["database_arn"] = database_arn
    if components_info is not None:
        input_["components_info"] = components_info

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