Compartilhar via


DenySettings Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.models.DenySettings

Implements

public final class DenySettings
implements JsonSerializable<DenySettings>

Defines how resources deployed by the Deployment stack are locked.

Constructor Summary

Constructor Description
DenySettings()

Creates an instance of DenySettings class.

Method Summary

Modifier and Type Method and Description
Boolean applyToChildScopes()

Get the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.

List<String> excludedActions()

Get the excludedActions property: List of role-based management operations that are excluded from the denySettings.

List<String> excludedPrincipals()

Get the excludedPrincipals property: List of AAD principal IDs excluded from the lock.

static DenySettings fromJson(JsonReader jsonReader)

Reads an instance of DenySettings from the JsonReader.

DenySettingsMode mode()

Get the mode property: denySettings Mode that defines denied actions.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DenySettings withApplyToChildScopes(Boolean applyToChildScopes)

Set the applyToChildScopes property: DenySettings will be applied to child resource scopes of every managed resource with a deny assignment.

DenySettings withExcludedActions(List<String> excludedActions)

Set the excludedActions property: List of role-based management operations that are excluded from the denySettings.

DenySettings withExcludedPrincipals(List<String> excludedPrincipals)

Set the excludedPrincipals property: List of AAD principal IDs excluded from the lock.

DenySettings withMode(DenySettingsMode mode)

Set the mode property: denySettings Mode that defines denied actions.

Methods inherited from java.lang.Object

Constructor Details

DenySettings

public DenySettings()

Creates an instance of DenySettings class.

Method Details

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.

excludedActions

public List 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.

excludedPrincipals

public List excludedPrincipals()

Get the excludedPrincipals property: List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.

Returns:

the excludedPrincipals value.

fromJson

public static DenySettings fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

mode

public DenySettingsMode mode()

Get the mode property: denySettings Mode that defines denied actions.

Returns:

the mode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

withExcludedActions

public DenySettings withExcludedActions(List 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.

withExcludedPrincipals

public DenySettings withExcludedPrincipals(List 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.

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.

Applies to