Class ConnectionStringReference<T extends ResourceWithConnectionString<?>>

java.lang.Object
com.azure.runtime.host.resources.references.ConnectionStringReference<T>
All Implemented Interfaces:
ManifestExpressionProvider, ValueProvider, ValueWithReferences

public class ConnectionStringReference<T extends ResourceWithConnectionString<?>> extends Object implements ManifestExpressionProvider, ValueProvider, ValueWithReferences
Represents a reference to a connection string.
  • Constructor Details

    • ConnectionStringReference

      public ConnectionStringReference(T resource, boolean optional)
      Initializes a new instance of the ConnectionStringReference class.
      Parameters:
      resource - The resource that the connection string is referencing.
      optional - A flag indicating whether the connection string is optional.
  • Method Details

    • getResource

      public T getResource()
      Gets the resource that the connection string is referencing.
      Returns:
      The resource.
    • isOptional

      public boolean isOptional()
      Gets a flag indicating whether the connection string is optional.
      Returns:
      True if optional, false otherwise.
    • getValueExpression

      public String getValueExpression()
      Description copied from interface: ManifestExpressionProvider
      Gets the expression that represents a value in manifest.
      Specified by:
      getValueExpression in interface ManifestExpressionProvider
      Returns:
      The expression that represents a value in manifest.
    • getReferences

      public List<Object> getReferences()
      Description copied from interface: ValueWithReferences
      A read-only list of the referenced objects of the value.
      Specified by:
      getReferences in interface ValueWithReferences
      Returns:
      A read-only list of the referenced objects.
    • getValue

      public String getValue()
      Specified by:
      getValue in interface ValueProvider