ArmResourcesPolicyModelFactory.PolicyAssignmentData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static Azure.ResourceManager.Resources.Policy.PolicyAssignmentData PolicyAssignmentData(Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, string displayName = default, string policyDefinitionId = default, string definitionVersion = default, string latestDefinitionVersion = default, string effectiveDefinitionVersion = default, string scope = default, System.Collections.Generic.IEnumerable<string> notScopes = default, System.Collections.Generic.IDictionary<string,Azure.ResourceManager.Resources.Policy.Models.PolicyParameterValue> parameters = default, string description = default, BinaryData metadata = default, Azure.ResourceManager.Resources.Policy.Models.PolicyEnforcementMode? enforcementMode = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Policy.Models.PolicyNonComplianceMessage> nonComplianceMessages = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Policy.Models.PolicyResourceSelector> resourceSelectors = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.Policy.Models.PolicyOverride> overrides = default, Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentType? assignmentType = default, string instanceId = default, Azure.ResourceManager.Resources.Policy.Models.PolicySelfServeExemptionSettings selfServeExemptionSettings = default, Azure.Core.AzureLocation? location = default, Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentIdentity identity = default);
static member PolicyAssignmentData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * string * string * string * string * string * string * seq<string> * System.Collections.Generic.IDictionary<string, Azure.ResourceManager.Resources.Policy.Models.PolicyParameterValue> * string * BinaryData * Nullable<Azure.ResourceManager.Resources.Policy.Models.PolicyEnforcementMode> * seq<Azure.ResourceManager.Resources.Policy.Models.PolicyNonComplianceMessage> * seq<Azure.ResourceManager.Resources.Policy.Models.PolicyResourceSelector> * seq<Azure.ResourceManager.Resources.Policy.Models.PolicyOverride> * Nullable<Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentType> * string * Azure.ResourceManager.Resources.Policy.Models.PolicySelfServeExemptionSettings * Nullable<Azure.Core.AzureLocation> * Azure.ResourceManager.Resources.Policy.Models.PolicyAssignmentIdentity -> Azure.ResourceManager.Resources.Policy.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 displayName As String = Nothing, Optional policyDefinitionId As String = Nothing, Optional definitionVersion As String = Nothing, Optional latestDefinitionVersion As String = Nothing, Optional effectiveDefinitionVersion As String = Nothing, Optional scope As String = Nothing, Optional notScopes As IEnumerable(Of String) = Nothing, Optional parameters As IDictionary(Of String, PolicyParameterValue) = Nothing, Optional description As String = Nothing, Optional metadata As BinaryData = Nothing, Optional enforcementMode As Nullable(Of PolicyEnforcementMode) = Nothing, Optional nonComplianceMessages As IEnumerable(Of PolicyNonComplianceMessage) = Nothing, Optional resourceSelectors As IEnumerable(Of PolicyResourceSelector) = Nothing, Optional overrides As IEnumerable(Of PolicyOverride) = Nothing, Optional assignmentType As Nullable(Of PolicyAssignmentType) = Nothing, Optional instanceId As String = Nothing, Optional selfServeExemptionSettings As PolicySelfServeExemptionSettings = Nothing, Optional location As Nullable(Of AzureLocation) = Nothing, Optional identity As PolicyAssignmentIdentity = Nothing) As PolicyAssignmentData
Parameters
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- name
- String
The name of the resource.
- resourceType
- ResourceType
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
- systemData
- SystemData
Azure Resource Manager metadata containing createdBy and modifiedBy information.
- displayName
- String
The display name of the policy assignment.
- policyDefinitionId
- String
The ID of the policy definition or policy set definition being assigned.
- definitionVersion
- String
The version of the policy definition to use.
- latestDefinitionVersion
- String
The latest version of the policy definition available. This is only present if requested via the $expand query parameter.
- effectiveDefinitionVersion
- String
The effective version of the policy definition in use. This is only present if requested via the $expand query parameter.
- scope
- String
The scope for the policy assignment.
- notScopes
- IEnumerable<String>
The policy's excluded scopes.
- parameters
- IDictionary<String,PolicyParameterValue>
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<PolicyEnforcementMode>
The policy assignment enforcement mode. Possible values are Default, DoNotEnforce, and Enroll.
- nonComplianceMessages
- IEnumerable<PolicyNonComplianceMessage>
The messages that describe why a resource is non-compliant with the policy.
- resourceSelectors
- IEnumerable<PolicyResourceSelector>
The resource selector list to filter policies by resource properties.
- overrides
- IEnumerable<PolicyOverride>
The policy property value override.
- assignmentType
- Nullable<PolicyAssignmentType>
The type of policy assignment. Possible values are NotSpecified, System, SystemHidden, and Custom. Immutable.
- instanceId
- String
The instance ID of the policy assignment. This ID only and always changes when the assignment is deleted and recreated.
- selfServeExemptionSettings
- PolicySelfServeExemptionSettings
The self-serve exemption settings for the policy assignment.
- location
- Nullable<AzureLocation>
The location of the policy assignment. Only required when utilizing managed identity.
- identity
- PolicyAssignmentIdentity
The managed identity associated with the policy assignment.
Returns
A new PolicyAssignmentData instance for mocking.