PolicyAssignmentInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. resourcemanager. resources. fluent. models. PolicyAssignmentInner
- com.
- com.
public final class PolicyAssignmentInner
extends ProxyResource
The policy assignment.
Constructor Summary
Constructor | Description |
---|---|
PolicyAssignmentInner() |
Creates an instance of Policy |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
description()
Get the description property: This message will be part of response in case of policy violation. |
String |
displayName()
Get the display |
Enforcement |
enforcementMode()
Get the enforcement |
static
Policy |
fromJson(JsonReader jsonReader)
Reads an instance of Policy |
String |
id()
Get the id property: Fully qualified resource Id for the resource. |
Identity |
identity()
Get the identity property: The managed identity associated with the policy assignment. |
String |
location()
Get the location property: The location of the policy assignment. |
Object |
metadata()
Get the metadata property: The policy assignment metadata. |
String |
name()
Get the name property: The name of the resource. |
List<Non |
nonComplianceMessages()
Get the non |
List<String> |
notScopes()
Get the not |
List<Override |
overrides()
Get the overrides property: The policy property value override. |
Map<String,Parameter |
parameters()
Get the parameters property: The parameter values for the assigned policy rule. |
String |
policyDefinitionId()
Get the policy |
List<Resource |
resourceSelectors()
Get the resource |
String |
scope()
Get the scope property: The scope for the policy assignment. |
System |
systemData()
Get the system |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of the resource. |
void |
validate()
Validates the instance. |
Policy |
withDescription(String description)
Set the description property: This message will be part of response in case of policy violation. |
Policy |
withDisplayName(String displayName)
Set the display |
Policy |
withEnforcementMode(EnforcementMode enforcementMode)
Set the enforcement |
Policy |
withIdentity(Identity identity)
Set the identity property: The managed identity associated with the policy assignment. |
Policy |
withLocation(String location)
Set the location property: The location of the policy assignment. |
Policy |
withMetadata(Object metadata)
Set the metadata property: The policy assignment metadata. |
Policy |
withNonComplianceMessages(List<NonComplianceMessage> nonComplianceMessages)
Set the non |
Policy |
withNotScopes(List<String> notScopes)
Set the not |
Policy |
withOverrides(List<OverrideModel> overrides)
Set the overrides property: The policy property value override. |
Policy |
withParameters(Map<String,ParameterValuesValue> parameters)
Set the parameters property: The parameter values for the assigned policy rule. |
Policy |
withPolicyDefinitionId(String policyDefinitionId)
Set the policy |
Policy |
withResourceSelectors(List<ResourceSelector> resourceSelectors)
Set the resource |
Methods inherited from ProxyResource
Methods inherited from java.lang.Object
Constructor Details
PolicyAssignmentInner
public PolicyAssignmentInner()
Creates an instance of PolicyAssignmentInner class.
Method Details
description
public String description()
Get the description property: This message will be part of response in case of policy violation.
Returns:
displayName
public String displayName()
Get the displayName property: The display name of the policy assignment.
Returns:
enforcementMode
public EnforcementMode enforcementMode()
Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.
Returns:
fromJson
public static PolicyAssignmentInner fromJson(JsonReader jsonReader)
Reads an instance of PolicyAssignmentInner from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
PolicyAssignmentInner.id()Returns:
identity
public Identity identity()
Get the identity property: The managed identity associated with the policy assignment.
Returns:
location
public String location()
Get the location property: The location of the policy assignment. Only required when utilizing managed identity.
Returns:
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:
name
public String name()
Get the name property: The name of the resource.
Overrides:
PolicyAssignmentInner.name()Returns:
nonComplianceMessages
public List
Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.
Returns:
notScopes
public List
Get the notScopes property: The policy's excluded scopes.
Returns:
overrides
public List
Get the overrides property: The policy property value override.
Returns:
parameters
public Map
Get the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.
Returns:
policyDefinitionId
public String policyDefinitionId()
Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.
Returns:
resourceSelectors
public List
Get the resourceSelectors property: The resource selector list to filter policies by resource properties.
Returns:
scope
public String scope()
Get the scope property: The scope for the policy assignment.
Returns:
systemData
public SystemData systemData()
Get the systemData property: The system metadata relating to this resource.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
PolicyAssignmentInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
PolicyAssignmentInner.type()Returns:
validate
public void validate()
Validates the instance.
withDescription
public PolicyAssignmentInner withDescription(String description)
Set the description property: This message will be part of response in case of policy violation.
Parameters:
Returns:
withDisplayName
public PolicyAssignmentInner withDisplayName(String displayName)
Set the displayName property: The display name of the policy assignment.
Parameters:
Returns:
withEnforcementMode
public PolicyAssignmentInner withEnforcementMode(EnforcementMode enforcementMode)
Set the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.
Parameters:
Returns:
withIdentity
public PolicyAssignmentInner withIdentity(Identity identity)
Set the identity property: The managed identity associated with the policy assignment.
Parameters:
Returns:
withLocation
public PolicyAssignmentInner withLocation(String location)
Set the location property: The location of the policy assignment. Only required when utilizing managed identity.
Parameters:
Returns:
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:
Returns:
withNonComplianceMessages
public PolicyAssignmentInner withNonComplianceMessages(List
Set the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.
Parameters:
Returns:
withNotScopes
public PolicyAssignmentInner withNotScopes(List
Set the notScopes property: The policy's excluded scopes.
Parameters:
Returns:
withOverrides
public PolicyAssignmentInner withOverrides(List
Set the overrides property: The policy property value override.
Parameters:
Returns:
withParameters
public PolicyAssignmentInner withParameters(Map
Set the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.
Parameters:
Returns:
withPolicyDefinitionId
public PolicyAssignmentInner withPolicyDefinitionId(String policyDefinitionId)
Set the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.
Parameters:
Returns:
withResourceSelectors
public PolicyAssignmentInner withResourceSelectors(List
Set the resourceSelectors property: The resource selector list to filter policies by resource properties.
Parameters:
Returns:
Applies to
Azure SDK for Java