Class PolicyAssignmentInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner
-
public final class PolicyAssignmentInner extends com.azure.core.management.ProxyResourceThe policy assignment.
-
-
Constructor Summary
Constructors Constructor Description PolicyAssignmentInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescription()Get the description property: This message will be part of response in case of policy violation.StringdisplayName()Get the displayName property: The display name of the policy assignment.EnforcementModeenforcementMode()Get the enforcementMode property: The policy assignment enforcement mode.Identityidentity()Get the identity property: The managed identity associated with the policy assignment.Stringlocation()Get the location property: The location of the policy assignment.Objectmetadata()Get the metadata property: The policy assignment metadata.List<NonComplianceMessage>nonComplianceMessages()Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.List<String>notScopes()Get the notScopes property: The policy's excluded scopes.Map<String,ParameterValuesValue>parameters()Get the parameters property: The parameter values for the assigned policy rule.StringpolicyDefinitionId()Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.Stringscope()Get the scope property: The scope for the policy assignment.com.azure.core.management.SystemDatasystemData()Get the systemData property: The system metadata relating to this resource.voidvalidate()Validates the instance.PolicyAssignmentInnerwithDescription(String description)Set the description property: This message will be part of response in case of policy violation.PolicyAssignmentInnerwithDisplayName(String displayName)Set the displayName property: The display name of the policy assignment.PolicyAssignmentInnerwithEnforcementMode(EnforcementMode enforcementMode)Set the enforcementMode property: The policy assignment enforcement mode.PolicyAssignmentInnerwithIdentity(Identity identity)Set the identity property: The managed identity associated with the policy assignment.PolicyAssignmentInnerwithLocation(String location)Set the location property: The location of the policy assignment.PolicyAssignmentInnerwithMetadata(Object metadata)Set the metadata property: The policy assignment metadata.PolicyAssignmentInnerwithNonComplianceMessages(List<NonComplianceMessage> nonComplianceMessages)Set the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.PolicyAssignmentInnerwithNotScopes(List<String> notScopes)Set the notScopes property: The policy's excluded scopes.PolicyAssignmentInnerwithParameters(Map<String,ParameterValuesValue> parameters)Set the parameters property: The parameter values for the assigned policy rule.PolicyAssignmentInnerwithPolicyDefinitionId(String policyDefinitionId)Set the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.
-
-
-
Method Detail
-
location
public String location()
Get the location property: The location of the policy assignment. Only required when utilizing managed identity.- Returns:
- the location value.
-
withLocation
public PolicyAssignmentInner withLocation(String location)
Set the location property: The location of the policy assignment. Only required when utilizing managed identity.- Parameters:
location- the location value to set.- Returns:
- the PolicyAssignmentInner object itself.
-
identity
public Identity identity()
Get the identity property: The managed identity associated with the policy assignment.- Returns:
- the identity value.
-
withIdentity
public PolicyAssignmentInner withIdentity(Identity identity)
Set the identity property: The managed identity associated with the policy assignment.- Parameters:
identity- the identity value to set.- Returns:
- the PolicyAssignmentInner object itself.
-
systemData
public com.azure.core.management.SystemData systemData()
Get the systemData property: The system metadata relating to this resource.- Returns:
- the systemData value.
-
displayName
public String displayName()
Get the displayName property: The display name of the policy assignment.- Returns:
- the displayName value.
-
withDisplayName
public PolicyAssignmentInner withDisplayName(String displayName)
Set the displayName property: The display name of the policy assignment.- Parameters:
displayName- the displayName value to set.- Returns:
- the PolicyAssignmentInner object itself.
-
policyDefinitionId
public String policyDefinitionId()
Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.- Returns:
- the policyDefinitionId value.
-
withPolicyDefinitionId
public PolicyAssignmentInner withPolicyDefinitionId(String policyDefinitionId)
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 PolicyAssignmentInner object itself.
-
scope
public String scope()
Get the scope property: The scope for the policy assignment.- Returns:
- the scope value.
-
notScopes
public List<String> notScopes()
Get the notScopes property: The policy's excluded scopes.- Returns:
- the notScopes value.
-
withNotScopes
public PolicyAssignmentInner withNotScopes(List<String> notScopes)
Set the notScopes property: The policy's excluded scopes.- Parameters:
notScopes- the notScopes value to set.- Returns:
- the PolicyAssignmentInner object itself.
-
parameters
public Map<String,ParameterValuesValue> parameters()
Get the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.- Returns:
- the parameters value.
-
withParameters
public PolicyAssignmentInner withParameters(Map<String,ParameterValuesValue> parameters)
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 PolicyAssignmentInner object itself.
-
description
public String description()
Get the description property: This message will be part of response in case of policy violation.- Returns:
- the description value.
-
withDescription
public PolicyAssignmentInner withDescription(String description)
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 PolicyAssignmentInner object itself.
-
metadata
public Object 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
public PolicyAssignmentInner withMetadata(Object metadata)
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 PolicyAssignmentInner object itself.
-
enforcementMode
public EnforcementMode enforcementMode()
Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.- Returns:
- the enforcementMode value.
-
withEnforcementMode
public PolicyAssignmentInner withEnforcementMode(EnforcementMode enforcementMode)
Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.- Parameters:
enforcementMode- the enforcementMode value to set.- Returns:
- the PolicyAssignmentInner object itself.
-
nonComplianceMessages
public List<NonComplianceMessage> nonComplianceMessages()
Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.- Returns:
- the nonComplianceMessages value.
-
withNonComplianceMessages
public PolicyAssignmentInner 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 PolicyAssignmentInner object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-