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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.Get the excludedActions property: List of role-based management operations that are excluded from the denySettings.Get the excludedPrincipals property: List of AAD principal IDs excluded from the lock.static DenySettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DenySettings from the JsonReader.mode()Get the mode property: denySettings Mode that defines denied actions.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withApplyToChildScopes(Boolean applyToChildScopes) Set the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.withExcludedActions(List<String> excludedActions) Set the excludedActions property: List of role-based management operations that are excluded from the denySettings.withExcludedPrincipals(List<String> excludedPrincipals) Set the excludedPrincipals property: List of AAD principal IDs excluded from the lock.withMode(DenySettingsMode mode) Set the mode property: denySettings Mode that defines denied actions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DenySettings
public DenySettings()Creates an instance of DenySettings class.
-
-
Method Details
-
mode
Get the mode property: denySettings Mode that defines denied actions.- Returns:
- the mode value.
-
withMode
Set the mode property: denySettings Mode that defines denied actions.- Parameters:
mode- the mode value to set.- Returns:
- the DenySettings object itself.
-
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
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
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
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
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DenySettings>- Throws:
IOException
-
fromJson
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.
-