次の方法で共有


PolicyAssignmentInner Class

public final class PolicyAssignmentInner
extends ProxyResource

The policy assignment.

Constructor Summary

Constructor Description
PolicyAssignmentInner()

Creates an instance of PolicyAssignmentInner class.

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 displayName property: The display name of the policy assignment.

EnforcementMode enforcementMode()

Get the enforcementMode property: The policy assignment enforcement mode.

static PolicyAssignmentInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyAssignmentInner from the JsonReader.

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

List<OverrideModel> overrides()

Get the overrides property: The policy property value override.

Map<String,ParameterValuesValue> parameters()

Get the parameters property: The parameter values for the assigned policy rule.

String policyDefinitionId()

Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.

List<ResourceSelector> resourceSelectors()

Get the resourceSelectors property: The resource selector list to filter policies by resource properties.

String scope()

Get the scope property: The scope for the policy assignment.

SystemData systemData()

Get the systemData property: The system metadata relating to this resource.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

PolicyAssignmentInner withDescription(String description)

Set the description property: This message will be part of response in case of policy violation.

PolicyAssignmentInner withDisplayName(String displayName)

Set the displayName property: The display name of the policy assignment.

PolicyAssignmentInner withEnforcementMode(EnforcementMode enforcementMode)

Set the enforcementMode property: The policy assignment enforcement mode.

PolicyAssignmentInner withIdentity(Identity identity)

Set the identity property: The managed identity associated with the policy assignment.

PolicyAssignmentInner withLocation(String location)

Set the location property: The location of the policy assignment.

PolicyAssignmentInner withMetadata(Object metadata)

Set the metadata property: The policy assignment metadata.

PolicyAssignmentInner withNonComplianceMessages(List<NonComplianceMessage> nonComplianceMessages)

Set the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.

PolicyAssignmentInner withNotScopes(List<String> notScopes)

Set the notScopes property: The policy's excluded scopes.

PolicyAssignmentInner withOverrides(List<OverrideModel> overrides)

Set the overrides property: The policy property value override.

PolicyAssignmentInner withParameters(Map<String,ParameterValuesValue> parameters)

Set the parameters property: The parameter values for the assigned policy rule.

PolicyAssignmentInner withPolicyDefinitionId(String policyDefinitionId)

Set the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.

PolicyAssignmentInner withResourceSelectors(List<ResourceSelector> resourceSelectors)

Set the resourceSelectors property: The resource selector list to filter policies by resource properties.

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:

the description value.

displayName

public String displayName()

Get the displayName property: The display name of the policy assignment.

Returns:

the displayName value.

enforcementMode

public EnforcementMode enforcementMode()

Get the enforcementMode property: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.

Returns:

the enforcementMode value.

fromJson

public static PolicyAssignmentInner fromJson(JsonReader jsonReader)

Reads an instance of PolicyAssignmentInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PolicyAssignmentInner 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.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

PolicyAssignmentInner.id()

Returns:

the id value.

identity

public Identity identity()

Get the identity property: The managed identity associated with the policy assignment.

Returns:

the identity value.

location

public String location()

Get the location property: The location of the policy assignment. Only required when utilizing managed identity.

Returns:

the location value.

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.

name

public String name()

Get the name property: The name of the resource.

Overrides:

PolicyAssignmentInner.name()

Returns:

the name value.

nonComplianceMessages

public List nonComplianceMessages()

Get the nonComplianceMessages property: The messages that describe why a resource is non-compliant with the policy.

Returns:

the nonComplianceMessages value.

notScopes

public List notScopes()

Get the notScopes property: The policy's excluded scopes.

Returns:

the notScopes value.

overrides

public List overrides()

Get the overrides property: The policy property value override.

Returns:

the overrides value.

parameters

public Map parameters()

Get the parameters property: The parameter values for the assigned policy rule. The keys are the parameter names.

Returns:

the parameters value.

policyDefinitionId

public String policyDefinitionId()

Get the policyDefinitionId property: The ID of the policy definition or policy set definition being assigned.

Returns:

the policyDefinitionId value.

resourceSelectors

public List resourceSelectors()

Get the resourceSelectors property: The resource selector list to filter policies by resource properties.

Returns:

the resourceSelectors value.

scope

public String scope()

Get the scope property: The scope for the policy assignment.

Returns:

the scope value.

systemData

public SystemData systemData()

Get the systemData property: The system metadata relating to this resource.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

PolicyAssignmentInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

PolicyAssignmentInner.type()

Returns:

the type value.

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:

description - the description value to set.

Returns:

the PolicyAssignmentInner object itself.

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.

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.

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.

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.

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.

withNonComplianceMessages

public PolicyAssignmentInner withNonComplianceMessages(List 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.

withNotScopes

public PolicyAssignmentInner withNotScopes(List notScopes)

Set the notScopes property: The policy's excluded scopes.

Parameters:

notScopes - the notScopes value to set.

Returns:

the PolicyAssignmentInner object itself.

withOverrides

public PolicyAssignmentInner withOverrides(List overrides)

Set the overrides property: The policy property value override.

Parameters:

overrides - the overrides value to set.

Returns:

the PolicyAssignmentInner object itself.

withParameters

public PolicyAssignmentInner withParameters(Map 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.

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.

withResourceSelectors

public PolicyAssignmentInner withResourceSelectors(List resourceSelectors)

Set the resourceSelectors property: The resource selector list to filter policies by resource properties.

Parameters:

resourceSelectors - the resourceSelectors value to set.

Returns:

the PolicyAssignmentInner object itself.

Applies to