Dela via


ResourceManagerModelFactory.PolicyAssignmentData Method

Definition

Initializes a new instance of PolicyAssignmentData.

public static Azure.ResourceManager.Resources.PolicyAssignmentData PolicyAssignmentData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, Azure.Core.AzureLocation? location = default, Azure.ResourceManager.Models.ManagedServiceIdentity managedIdentity = default, string displayName = default, string policyDefinitionId = default, string scope = default, System.Collections.Generic.IEnumerable<string> excludedScopes = default, System.Collections.Generic.IDictionary<string,Azure.ResourceManager.Resources.Models.ArmPolicyParameterValue> parameters = default, string description = default, BinaryData metadata = default, Azure.ResourceManager.Resources.Models.EnforcementMode? enforcementMode = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.NonComplianceMessage> nonComplianceMessages = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.ResourceSelector> resourceSelectors = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Models.PolicyOverride> overrides = default);
static member PolicyAssignmentData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * Nullable<Azure.Core.AzureLocation> * Azure.ResourceManager.Models.ManagedServiceIdentity * string * string * string * seq<string> * System.Collections.Generic.IDictionary<string, Azure.ResourceManager.Resources.Models.ArmPolicyParameterValue> * string * BinaryData * Nullable<Azure.ResourceManager.Resources.Models.EnforcementMode> * seq<Azure.ResourceManager.Resources.Models.NonComplianceMessage> * seq<Azure.ResourceManager.Resources.Models.ResourceSelector> * seq<Azure.ResourceManager.Resources.Models.PolicyOverride> -> Azure.ResourceManager.Resources.PolicyAssignmentData
Public Shared Function PolicyAssignmentData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional location As Nullable(Of AzureLocation) = Nothing, Optional managedIdentity As ManagedServiceIdentity = Nothing, Optional displayName As String = Nothing, Optional policyDefinitionId As String = Nothing, Optional scope As String = Nothing, Optional excludedScopes As IEnumerable(Of String) = Nothing, Optional parameters As IDictionary(Of String, ArmPolicyParameterValue) = Nothing, Optional description As String = Nothing, Optional metadata As BinaryData = Nothing, Optional enforcementMode As Nullable(Of EnforcementMode) = Nothing, Optional nonComplianceMessages As IEnumerable(Of NonComplianceMessage) = Nothing, Optional resourceSelectors As IEnumerable(Of ResourceSelector) = Nothing, Optional overrides As IEnumerable(Of PolicyOverride) = Nothing) As PolicyAssignmentData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

location
Nullable<AzureLocation>

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

managedIdentity
ManagedServiceIdentity

The managed identity associated with the policy assignment. Current supported identity types: None, SystemAssigned, UserAssigned.

displayName
String

The display name of the policy assignment.

policyDefinitionId
String

The ID of the policy definition or policy set definition being assigned.

scope
String

The scope for the policy assignment.

excludedScopes
IEnumerable<String>

The policy's excluded scopes.

parameters
IDictionary<String,ArmPolicyParameterValue>

The parameter values for the assigned policy rule. The keys are the parameter names.

description
String

This message will be part of response in case of policy violation.

metadata
BinaryData

The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.

enforcementMode
Nullable<EnforcementMode>

The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.

nonComplianceMessages
IEnumerable<NonComplianceMessage>

The messages that describe why a resource is non-compliant with the policy.

resourceSelectors
IEnumerable<ResourceSelector>

The resource selector list to filter policies by resource properties.

overrides
IEnumerable<PolicyOverride>

The policy property value override.

Returns

A new PolicyAssignmentData instance for mocking.

Applies to