你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ArmPolicyInsightsModelFactory.PolicyEvent 方法

定义

初始化 PolicyEvent 的新实例。

public static Azure.ResourceManager.PolicyInsights.Models.PolicyEvent PolicyEvent (string odataId = default, string odataContext = default, DateTimeOffset? timestamp = default, Azure.Core.ResourceIdentifier resourceId = default, Azure.Core.ResourceIdentifier policyAssignmentId = default, Azure.Core.ResourceIdentifier policyDefinitionId = default, string effectiveParameters = default, bool? isCompliant = default, string subscriptionId = default, string resourceTypeString = default, Azure.Core.AzureLocation? resourceLocation = default, string resourceGroup = default, string resourceTags = default, string policyAssignmentName = default, string policyAssignmentOwner = default, string policyAssignmentParameters = default, string policyAssignmentScope = default, string policyDefinitionName = default, string policyDefinitionAction = default, string policyDefinitionCategory = default, Azure.Core.ResourceIdentifier policySetDefinitionId = default, string policySetDefinitionName = default, string policySetDefinitionOwner = default, string policySetDefinitionCategory = default, string policySetDefinitionParameters = default, string managementGroupIds = default, string policyDefinitionReferenceId = default, string complianceState = default, Guid? tenantId = default, string principalOid = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.PolicyInsights.Models.ComponentEventDetails> components = default, System.Collections.Generic.IReadOnlyDictionary<string,BinaryData> additionalProperties = default);
static member PolicyEvent : string * string * Nullable<DateTimeOffset> * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * string * Nullable<bool> * string * string * Nullable<Azure.Core.AzureLocation> * string * string * string * string * string * string * string * string * string * Azure.Core.ResourceIdentifier * string * string * string * string * string * string * string * Nullable<Guid> * string * seq<Azure.ResourceManager.PolicyInsights.Models.ComponentEventDetails> * System.Collections.Generic.IReadOnlyDictionary<string, BinaryData> -> Azure.ResourceManager.PolicyInsights.Models.PolicyEvent
Public Shared Function PolicyEvent (Optional odataId As String = Nothing, Optional odataContext As String = Nothing, Optional timestamp As Nullable(Of DateTimeOffset) = Nothing, Optional resourceId As ResourceIdentifier = Nothing, Optional policyAssignmentId As ResourceIdentifier = Nothing, Optional policyDefinitionId As ResourceIdentifier = Nothing, Optional effectiveParameters As String = Nothing, Optional isCompliant As Nullable(Of Boolean) = Nothing, Optional subscriptionId As String = Nothing, Optional resourceTypeString As String = Nothing, Optional resourceLocation As Nullable(Of AzureLocation) = Nothing, Optional resourceGroup As String = Nothing, Optional resourceTags As String = Nothing, Optional policyAssignmentName As String = Nothing, Optional policyAssignmentOwner As String = Nothing, Optional policyAssignmentParameters As String = Nothing, Optional policyAssignmentScope As String = Nothing, Optional policyDefinitionName As String = Nothing, Optional policyDefinitionAction As String = Nothing, Optional policyDefinitionCategory As String = Nothing, Optional policySetDefinitionId As ResourceIdentifier = Nothing, Optional policySetDefinitionName As String = Nothing, Optional policySetDefinitionOwner As String = Nothing, Optional policySetDefinitionCategory As String = Nothing, Optional policySetDefinitionParameters As String = Nothing, Optional managementGroupIds As String = Nothing, Optional policyDefinitionReferenceId As String = Nothing, Optional complianceState As String = Nothing, Optional tenantId As Nullable(Of Guid) = Nothing, Optional principalOid As String = Nothing, Optional components As IEnumerable(Of ComponentEventDetails) = Nothing, Optional additionalProperties As IReadOnlyDictionary(Of String, BinaryData) = Nothing) As PolicyEvent

参数

odataId
String

OData 实体 ID;始终设置为 null,因为策略事件记录没有实体 ID。

odataContext
String

OData 上下文字符串;OData 客户端用于基于元数据解析类型信息。

timestamp
Nullable<DateTimeOffset>

策略事件记录的时间戳。

resourceId
ResourceIdentifier

资源 ID。

policyAssignmentId
ResourceIdentifier

策略分配 ID。

policyDefinitionId
ResourceIdentifier

策略定义 ID。

effectiveParameters
String

策略分配的有效参数。

isCompliant
Nullable<Boolean>

指示资源是否符合对其评估的策略分配的标志。

subscriptionId
String

订阅 ID。

resourceTypeString
String

资源类型。

resourceLocation
Nullable<AzureLocation>

资源位置。

resourceGroup
String

资源组名称。

resourceTags
String

资源标记列表。

policyAssignmentName
String

策略分配名称。

policyAssignmentOwner
String

策略分配所有者。

policyAssignmentParameters
String

策略分配参数。

policyAssignmentScope
String

策略分配范围。

policyDefinitionName
String

策略定义名称。

policyDefinitionAction
String

策略定义操作,即效果。

policyDefinitionCategory
String

策略定义类别。

policySetDefinitionId
ResourceIdentifier

策略集定义 ID(如果策略分配针对策略集)。

policySetDefinitionName
String

策略集定义名称(如果策略分配针对策略集)。

policySetDefinitionOwner
String

策略集定义所有者(如果策略分配针对策略集)。

policySetDefinitionCategory
String

策略集定义类别(如果策略分配针对策略集)。

policySetDefinitionParameters
String

策略集定义参数(如果策略分配适用于策略集)。

managementGroupIds
String

以逗号分隔的管理组 ID 列表,表示资源所在的管理组的层次结构。

policyDefinitionReferenceId
String

如果策略分配针对策略集,则策略集中策略定义的引用 ID。

complianceState
String

资源的符合性状态。

tenantId
Nullable<Guid>

策略事件记录的租户 ID。

principalOid
String

启动触发策略事件的资源操作的用户的主体对象 ID。

components
IEnumerable<ComponentEventDetails>

仅当 URL 包含 $expand=components 子句时,组件事件才会记录填充。

additionalProperties
IReadOnlyDictionary<String,BinaryData>

其他属性。

返回

用于模拟的新 PolicyEvent 实例。

适用于