java.lang.Object
com.azure.resourcemanager.appcontainers.models.Template
All Implemented Interfaces:
com.azure.json.JsonSerializable<Template>

public final class Template extends Object implements com.azure.json.JsonSerializable<Template>
Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created.
  • Constructor Details

    • Template

      public Template()
      Creates an instance of Template class.
  • Method Details

    • revisionSuffix

      public String revisionSuffix()
      Get the revisionSuffix property: User friendly suffix that is appended to the revision name.
      Returns:
      the revisionSuffix value.
    • withRevisionSuffix

      public Template withRevisionSuffix(String revisionSuffix)
      Set the revisionSuffix property: User friendly suffix that is appended to the revision name.
      Parameters:
      revisionSuffix - the revisionSuffix value to set.
      Returns:
      the Template object itself.
    • terminationGracePeriodSeconds

      public Long terminationGracePeriodSeconds()
      Get the terminationGracePeriodSeconds property: Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
      Returns:
      the terminationGracePeriodSeconds value.
    • withTerminationGracePeriodSeconds

      public Template withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds)
      Set the terminationGracePeriodSeconds property: Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
      Parameters:
      terminationGracePeriodSeconds - the terminationGracePeriodSeconds value to set.
      Returns:
      the Template object itself.
    • initContainers

      public List<InitContainer> initContainers()
      Get the initContainers property: List of specialized containers that run before app containers.
      Returns:
      the initContainers value.
    • withInitContainers

      public Template withInitContainers(List<InitContainer> initContainers)
      Set the initContainers property: List of specialized containers that run before app containers.
      Parameters:
      initContainers - the initContainers value to set.
      Returns:
      the Template object itself.
    • containers

      public List<Container> containers()
      Get the containers property: List of container definitions for the Container App.
      Returns:
      the containers value.
    • withContainers

      public Template withContainers(List<Container> containers)
      Set the containers property: List of container definitions for the Container App.
      Parameters:
      containers - the containers value to set.
      Returns:
      the Template object itself.
    • scale

      public Scale scale()
      Get the scale property: Scaling properties for the Container App.
      Returns:
      the scale value.
    • withScale

      public Template withScale(Scale scale)
      Set the scale property: Scaling properties for the Container App.
      Parameters:
      scale - the scale value to set.
      Returns:
      the Template object itself.
    • volumes

      public List<Volume> volumes()
      Get the volumes property: List of volume definitions for the Container App.
      Returns:
      the volumes value.
    • withVolumes

      public Template withVolumes(List<Volume> volumes)
      Set the volumes property: List of volume definitions for the Container App.
      Parameters:
      volumes - the volumes value to set.
      Returns:
      the Template object itself.
    • serviceBinds

      public List<ServiceBind> serviceBinds()
      Get the serviceBinds property: List of container app services bound to the app.
      Returns:
      the serviceBinds value.
    • withServiceBinds

      public Template withServiceBinds(List<ServiceBind> serviceBinds)
      Set the serviceBinds property: List of container app services bound to the app.
      Parameters:
      serviceBinds - the serviceBinds value to set.
      Returns:
      the Template object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<Template>
      Throws:
      IOException
    • fromJson

      public static Template fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Template from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Template if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the Template.