Class PolicyAssignmentProperties
java.lang.Object
com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentProperties
The policy assignment properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: This message will be part of response in case of policy violation.Get the displayName property: The display name of the policy assignment.Get the enforcementMode property: The policy assignment enforcement mode.metadata()Get the metadata property: The policy assignment metadata.Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.Get the notScopes property: The policy's excluded scopes.Get the parameters property: The parameter values for the assigned policy rule.Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.scope()Get the scope property: The scope for the policy assignment.voidvalidate()Validates the instance.withDescription(String description) Set the description property: This message will be part of response in case of policy violation.withDisplayName(String displayName) Set the displayName property: The display name of the policy assignment.withEnforcementMode(EnforcementMode enforcementMode) Set the enforcementMode property: The policy assignment enforcement mode.withMetadata(Object metadata) Set the metadata property: The policy assignment metadata.withNonComplianceMessages(List<NonComplianceMessage> nonComplianceMessages) Set the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.withNotScopes(List<String> notScopes) Set the notScopes property: The policy's excluded scopes.withParameters(Map<String, ParameterValuesValue> parameters) Set the parameters property: The parameter values for the assigned policy rule.withPolicyDefinitionId(String policyDefinitionId) Set the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.
-
Constructor Details
-
PolicyAssignmentProperties
public PolicyAssignmentProperties()
-
-
Method Details
-
displayName
Get the displayName property: The display name of the policy assignment.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: The display name of the policy assignment.- Parameters:
displayName- the displayName value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
policyDefinitionId
Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.- Returns:
- the policyDefinitionId value.
-
withPolicyDefinitionId
Set the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.- Parameters:
policyDefinitionId- the policyDefinitionId value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
scope
Get the scope property: The scope for the policy assignment.- Returns:
- the scope value.
-
notScopes
Get the notScopes property: The policy's excluded scopes.- Returns:
- the notScopes value.
-
withNotScopes
Set the notScopes property: The policy's excluded scopes.- Parameters:
notScopes- the notScopes value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
parameters
Get the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.- Parameters:
parameters- the parameters value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
description
Get the description property: This message will be part of response in case of policy violation.- Returns:
- the description value.
-
withDescription
Set the description property: This message will be part of response in case of policy violation.- Parameters:
description- the description value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
metadata
Get the metadata property: The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.- Returns:
- the metadata value.
-
withMetadata
Set the metadata property: The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.- Parameters:
metadata- the metadata value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
enforcementMode
Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.- Returns:
- the enforcementMode value.
-
withEnforcementMode
Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.- Parameters:
enforcementMode- the enforcementMode value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
nonComplianceMessages
Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.- Returns:
- the nonComplianceMessages value.
-
withNonComplianceMessages
public PolicyAssignmentProperties withNonComplianceMessages(List<NonComplianceMessage> nonComplianceMessages) Set the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.- Parameters:
nonComplianceMessages- the nonComplianceMessages value to set.- Returns:
- the PolicyAssignmentProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-