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

public final class RampUpRule extends Object implements com.azure.json.JsonSerializable<RampUpRule>
Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of RampUpRule class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to.
    Get the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified.
    Get the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage.
    Get the changeStep property: In auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or <code>MaxReroutePercentage</code>.
    static RampUpRule
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RampUpRule from the JsonReader.
    Get the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay.
    Get the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay.
    Get the name property: Name of the routing rule.
    Get the reroutePercentage property: Percentage of the traffic which will be redirected to <code>ActionHostName</code>.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withActionHostname(String actionHostname)
    Set the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to.
    withChangeDecisionCallbackUrl(String changeDecisionCallbackUrl)
    Set the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified.
    withChangeIntervalInMinutes(Integer changeIntervalInMinutes)
    Set the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage.
    withChangeStep(Double changeStep)
    Set the changeStep property: In auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or <code>MaxReroutePercentage</code>.
    withMaxReroutePercentage(Double maxReroutePercentage)
    Set the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay.
    withMinReroutePercentage(Double minReroutePercentage)
    Set the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay.
    Set the name property: Name of the routing rule.
    withReroutePercentage(Double reroutePercentage)
    Set the reroutePercentage property: Percentage of the traffic which will be redirected to <code>ActionHostName</code>.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • RampUpRule

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

    • actionHostname

      public String actionHostname()
      Get the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
      Returns:
      the actionHostname value.
    • withActionHostname

      public RampUpRule withActionHostname(String actionHostname)
      Set the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
      Parameters:
      actionHostname - the actionHostname value to set.
      Returns:
      the RampUpRule object itself.
    • reroutePercentage

      public Double reroutePercentage()
      Get the reroutePercentage property: Percentage of the traffic which will be redirected to <code>ActionHostName</code>.
      Returns:
      the reroutePercentage value.
    • withReroutePercentage

      public RampUpRule withReroutePercentage(Double reroutePercentage)
      Set the reroutePercentage property: Percentage of the traffic which will be redirected to <code>ActionHostName</code>.
      Parameters:
      reroutePercentage - the reroutePercentage value to set.
      Returns:
      the RampUpRule object itself.
    • changeStep

      public Double changeStep()
      Get the changeStep property: In auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>.
      Returns:
      the changeStep value.
    • withChangeStep

      public RampUpRule withChangeStep(Double changeStep)
      Set the changeStep property: In auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>.
      Parameters:
      changeStep - the changeStep value to set.
      Returns:
      the RampUpRule object itself.
    • changeIntervalInMinutes

      public Integer changeIntervalInMinutes()
      Get the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage.
      Returns:
      the changeIntervalInMinutes value.
    • withChangeIntervalInMinutes

      public RampUpRule withChangeIntervalInMinutes(Integer changeIntervalInMinutes)
      Set the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage.
      Parameters:
      changeIntervalInMinutes - the changeIntervalInMinutes value to set.
      Returns:
      the RampUpRule object itself.
    • minReroutePercentage

      public Double minReroutePercentage()
      Get the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay.
      Returns:
      the minReroutePercentage value.
    • withMinReroutePercentage

      public RampUpRule withMinReroutePercentage(Double minReroutePercentage)
      Set the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay.
      Parameters:
      minReroutePercentage - the minReroutePercentage value to set.
      Returns:
      the RampUpRule object itself.
    • maxReroutePercentage

      public Double maxReroutePercentage()
      Get the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay.
      Returns:
      the maxReroutePercentage value.
    • withMaxReroutePercentage

      public RampUpRule withMaxReroutePercentage(Double maxReroutePercentage)
      Set the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay.
      Parameters:
      maxReroutePercentage - the maxReroutePercentage value to set.
      Returns:
      the RampUpRule object itself.
    • changeDecisionCallbackUrl

      public String changeDecisionCallbackUrl()
      Get the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts. https://www.siteextensions.net/packages/TiPCallback/.
      Returns:
      the changeDecisionCallbackUrl value.
    • withChangeDecisionCallbackUrl

      public RampUpRule withChangeDecisionCallbackUrl(String changeDecisionCallbackUrl)
      Set the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts. https://www.siteextensions.net/packages/TiPCallback/.
      Parameters:
      changeDecisionCallbackUrl - the changeDecisionCallbackUrl value to set.
      Returns:
      the RampUpRule object itself.
    • name

      public String name()
      Get the name property: Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.
      Returns:
      the name value.
    • withName

      public RampUpRule withName(String name)
      Set the name property: Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.
      Parameters:
      name - the name value to set.
      Returns:
      the RampUpRule 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<RampUpRule>
      Throws:
      IOException
    • fromJson

      public static RampUpRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RampUpRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RampUpRule 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 RampUpRule.