Class DenySettings

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

public final class DenySettings extends Object implements com.azure.json.JsonSerializable<DenySettings>
Defines how resources deployed by the Deployment stack are locked.
  • Constructor Details

    • DenySettings

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

    • mode

      public DenySettingsMode mode()
      Get the mode property: denySettings Mode that defines denied actions.
      Returns:
      the mode value.
    • withMode

      public DenySettings withMode(DenySettingsMode mode)
      Set the mode property: denySettings Mode that defines denied actions.
      Parameters:
      mode - the mode value to set.
      Returns:
      the DenySettings object itself.
    • excludedPrincipals

      public List<String> excludedPrincipals()
      Get the excludedPrincipals property: List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
      Returns:
      the excludedPrincipals value.
    • withExcludedPrincipals

      public DenySettings withExcludedPrincipals(List<String> excludedPrincipals)
      Set the excludedPrincipals property: List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
      Parameters:
      excludedPrincipals - the excludedPrincipals value to set.
      Returns:
      the DenySettings object itself.
    • excludedActions

      public List<String> excludedActions()
      Get the excludedActions property: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
      Returns:
      the excludedActions value.
    • withExcludedActions

      public DenySettings withExcludedActions(List<String> excludedActions)
      Set the excludedActions property: List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
      Parameters:
      excludedActions - the excludedActions value to set.
      Returns:
      the DenySettings object itself.
    • applyToChildScopes

      public Boolean applyToChildScopes()
      Get the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.
      Returns:
      the applyToChildScopes value.
    • withApplyToChildScopes

      public DenySettings withApplyToChildScopes(Boolean applyToChildScopes)
      Set the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.
      Parameters:
      applyToChildScopes - the applyToChildScopes value to set.
      Returns:
      the DenySettings 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<DenySettings>
      Throws:
      IOException
    • fromJson

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