• Tries to build a destination from a service binding with the given name. Throws an error if no services are bound at all, no service with the given name can be found, or the service type is not supported. The last error can be circumvent by using the second parameter to provide a custom function that transforms a service binding to a destination.

    Parameters

    • serviceInstanceName: string

      The name of the service.

    • Optionaloptions: DestinationForServiceBindingOptions & { jwt?: JwtPayload } & CachingOptions

      Options to customize the behavior of this function.

      • Optionaljwt?: JwtPayload

        The JWT used to fetch destinations. The use of JwtPayload is deprecated since v3.4.0 and will be removed in the next major version update. Use string instead.

    Returns Promise<Destination>

    A destination.

    Since v3.4.0. Use getDestinationFromServiceBinding instead.

    Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.