Class ServiceBindingDestinationOptions

java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.ServiceBindingDestinationOptions

@Beta public final class ServiceBindingDestinationOptions extends Object
Representation of parameters and context information for the ServiceBindingDestinationLoader API.
Since:
4.16.0
  • Method Details

    • forService

      @Nonnull public static ServiceBindingDestinationOptions.Builder forService(@Nonnull com.sap.cloud.environment.servicebinding.api.ServiceIdentifier identifier)
      Start building ServiceBindingDestinationOptions for any ServiceBinding that matches the given ServiceIdentifier. Use .build() to obtain the options object or configure further options via the other builder methods. Note: DefaultServiceBindingAccessor will be used internally.
      Parameters:
      identifier - The ServiceIdentifier that will be used to look up a ServiceBinding.
      Returns:
      A Builder to create ServiceBindingDestinationOptions.
      Throws:
      DestinationAccessException - in case not exactly one service binding was found.
      See Also:
    • forService

      @Nonnull public static ServiceBindingDestinationOptions.Builder forService(@Nonnull com.sap.cloud.environment.servicebinding.api.ServiceBinding serviceBinding)
      Start building ServiceBindingDestinationOptions for the given ServiceBinding. Use .build() to obtain the options object or configure further options via the other builder methods.
      Parameters:
      serviceBinding - The ServiceBinding that should be transformed into a destination.
      Returns:
      A Builder to create ServiceBindingDestinationOptions.
      Since:
      4.20.0
    • getOption

      @Nonnull public <T> io.vavr.control.Option<T> getOption(@Nonnull Class<? extends ServiceBindingDestinationOptions.OptionsEnhancer<T>> cls)
      Get additional options by their key.
      Type Parameters:
      T - The type of content that this option will represent.
      Parameters:
      cls - The ServiceBindingDestinationOptions.OptionsEnhancer that will provide the option data. See also ServiceBindingDestinationOptions.Options.
      Returns:
      an Option containing the additional option, if it was found.
      Since:
      4.20.0
      See Also:
    • getServiceBinding

      @Nonnull public com.sap.cloud.environment.servicebinding.api.ServiceBinding getServiceBinding()
      The ServiceBinding for which an HttpDestination will be created.
    • getOnBehalfOf

      @Nonnull public OnBehalfOf getOnBehalfOf()
      Gets the OnBehalfOf, which determines how the application will authenticate at the target system.

      If not set explicitly, OnBehalfOf.TECHNICAL_USER_CURRENT_TENANT will be returned.