Class ActionOnUnmanage

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

public final class ActionOnUnmanage extends Object implements com.azure.json.JsonSerializable<ActionOnUnmanage>
Defines the behavior of resources that are no longer managed after the stack is updated or deleted.
  • Constructor Details

    • ActionOnUnmanage

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

    • resources

      Get the resources property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Returns:
      the resources value.
    • withResources

      public ActionOnUnmanage withResources(DeploymentStacksDeleteDetachEnum resources)
      Set the resources property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Parameters:
      resources - the resources value to set.
      Returns:
      the ActionOnUnmanage object itself.
    • resourceGroups

      public DeploymentStacksDeleteDetachEnum resourceGroups()
      Get the resourceGroups property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Returns:
      the resourceGroups value.
    • withResourceGroups

      public ActionOnUnmanage withResourceGroups(DeploymentStacksDeleteDetachEnum resourceGroups)
      Set the resourceGroups property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Parameters:
      resourceGroups - the resourceGroups value to set.
      Returns:
      the ActionOnUnmanage object itself.
    • managementGroups

      public DeploymentStacksDeleteDetachEnum managementGroups()
      Get the managementGroups property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Returns:
      the managementGroups value.
    • withManagementGroups

      public ActionOnUnmanage withManagementGroups(DeploymentStacksDeleteDetachEnum managementGroups)
      Set the managementGroups property: Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.
      Parameters:
      managementGroups - the managementGroups value to set.
      Returns:
      the ActionOnUnmanage 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<ActionOnUnmanage>
      Throws:
      IOException
    • fromJson

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