@@ -41,6 +41,89 @@ def __init__(self, **kwargs):
41
41
self .count = kwargs .get ('count' , None )
42
42
43
43
44
+ class ComponentEventDetails (Model ):
45
+ """Component event details.
46
+
47
+ :param additional_properties: Unmatched properties from the message are
48
+ deserialized this collection
49
+ :type additional_properties: dict[str, object]
50
+ :param id: Component Id.
51
+ :type id: str
52
+ :param type: Component type.
53
+ :type type: str
54
+ :param name: Component name.
55
+ :type name: str
56
+ :param timestamp: Timestamp for component policy event record.
57
+ :type timestamp: datetime
58
+ :param tenant_id: Tenant ID for the policy event record.
59
+ :type tenant_id: str
60
+ :param principal_oid: Principal object ID for the user who initiated the
61
+ resource component operation that triggered the policy event.
62
+ :type principal_oid: str
63
+ :param policy_definition_action: Policy definition action, i.e. effect.
64
+ :type policy_definition_action: str
65
+ """
66
+
67
+ _attribute_map = {
68
+ 'additional_properties' : {'key' : '' , 'type' : '{object}' },
69
+ 'id' : {'key' : 'id' , 'type' : 'str' },
70
+ 'type' : {'key' : 'type' , 'type' : 'str' },
71
+ 'name' : {'key' : 'name' , 'type' : 'str' },
72
+ 'timestamp' : {'key' : 'timestamp' , 'type' : 'iso-8601' },
73
+ 'tenant_id' : {'key' : 'tenantId' , 'type' : 'str' },
74
+ 'principal_oid' : {'key' : 'principalOid' , 'type' : 'str' },
75
+ 'policy_definition_action' : {'key' : 'policyDefinitionAction' , 'type' : 'str' },
76
+ }
77
+
78
+ def __init__ (self , ** kwargs ):
79
+ super (ComponentEventDetails , self ).__init__ (** kwargs )
80
+ self .additional_properties = kwargs .get ('additional_properties' , None )
81
+ self .id = kwargs .get ('id' , None )
82
+ self .type = kwargs .get ('type' , None )
83
+ self .name = kwargs .get ('name' , None )
84
+ self .timestamp = kwargs .get ('timestamp' , None )
85
+ self .tenant_id = kwargs .get ('tenant_id' , None )
86
+ self .principal_oid = kwargs .get ('principal_oid' , None )
87
+ self .policy_definition_action = kwargs .get ('policy_definition_action' , None )
88
+
89
+
90
+ class ComponentStateDetails (Model ):
91
+ """Component state details.
92
+
93
+ :param additional_properties: Unmatched properties from the message are
94
+ deserialized this collection
95
+ :type additional_properties: dict[str, object]
96
+ :param id: Component Id.
97
+ :type id: str
98
+ :param type: Component type.
99
+ :type type: str
100
+ :param name: Component name.
101
+ :type name: str
102
+ :param timestamp: Component compliance evaluation timestamp.
103
+ :type timestamp: datetime
104
+ :param compliance_state: Component compliance state.
105
+ :type compliance_state: str
106
+ """
107
+
108
+ _attribute_map = {
109
+ 'additional_properties' : {'key' : '' , 'type' : '{object}' },
110
+ 'id' : {'key' : 'id' , 'type' : 'str' },
111
+ 'type' : {'key' : 'type' , 'type' : 'str' },
112
+ 'name' : {'key' : 'name' , 'type' : 'str' },
113
+ 'timestamp' : {'key' : 'timestamp' , 'type' : 'iso-8601' },
114
+ 'compliance_state' : {'key' : 'complianceState' , 'type' : 'str' },
115
+ }
116
+
117
+ def __init__ (self , ** kwargs ):
118
+ super (ComponentStateDetails , self ).__init__ (** kwargs )
119
+ self .additional_properties = kwargs .get ('additional_properties' , None )
120
+ self .id = kwargs .get ('id' , None )
121
+ self .type = kwargs .get ('type' , None )
122
+ self .name = kwargs .get ('name' , None )
123
+ self .timestamp = kwargs .get ('timestamp' , None )
124
+ self .compliance_state = kwargs .get ('compliance_state' , None )
125
+
126
+
44
127
class ErrorDefinition (Model ):
45
128
"""Error definition.
46
129
@@ -459,11 +542,17 @@ class PolicyEvent(Model):
459
542
definition inside the policy set, if the policy assignment is for a policy
460
543
set.
461
544
:type policy_definition_reference_id: str
545
+ :param compliance_state: Compliance state of the resource.
546
+ :type compliance_state: str
462
547
:param tenant_id: Tenant ID for the policy event record.
463
548
:type tenant_id: str
464
549
:param principal_oid: Principal object ID for the user who initiated the
465
550
resource operation that triggered the policy event.
466
551
:type principal_oid: str
552
+ :param components: Components events records populated only when URL
553
+ contains $expand=components clause.
554
+ :type components:
555
+ list[~azure.mgmt.policyinsights.models.ComponentEventDetails]
467
556
"""
468
557
469
558
_attribute_map = {
@@ -495,8 +584,10 @@ class PolicyEvent(Model):
495
584
'policy_set_definition_parameters' : {'key' : 'policySetDefinitionParameters' , 'type' : 'str' },
496
585
'management_group_ids' : {'key' : 'managementGroupIds' , 'type' : 'str' },
497
586
'policy_definition_reference_id' : {'key' : 'policyDefinitionReferenceId' , 'type' : 'str' },
587
+ 'compliance_state' : {'key' : 'complianceState' , 'type' : 'str' },
498
588
'tenant_id' : {'key' : 'tenantId' , 'type' : 'str' },
499
589
'principal_oid' : {'key' : 'principalOid' , 'type' : 'str' },
590
+ 'components' : {'key' : 'components' , 'type' : '[ComponentEventDetails]' },
500
591
}
501
592
502
593
def __init__ (self , ** kwargs ):
@@ -529,38 +620,10 @@ def __init__(self, **kwargs):
529
620
self .policy_set_definition_parameters = kwargs .get ('policy_set_definition_parameters' , None )
530
621
self .management_group_ids = kwargs .get ('management_group_ids' , None )
531
622
self .policy_definition_reference_id = kwargs .get ('policy_definition_reference_id' , None )
623
+ self .compliance_state = kwargs .get ('compliance_state' , None )
532
624
self .tenant_id = kwargs .get ('tenant_id' , None )
533
625
self .principal_oid = kwargs .get ('principal_oid' , None )
534
-
535
-
536
- class PolicyEventsQueryResults (Model ):
537
- """Query results.
538
-
539
- :param odatacontext: OData context string; used by OData clients to
540
- resolve type information based on metadata.
541
- :type odatacontext: str
542
- :param odatacount: OData entity count; represents the number of policy
543
- event records returned.
544
- :type odatacount: int
545
- :param value: Query results.
546
- :type value: list[~azure.mgmt.policyinsights.models.PolicyEvent]
547
- """
548
-
549
- _validation = {
550
- 'odatacount' : {'minimum' : 0 },
551
- }
552
-
553
- _attribute_map = {
554
- 'odatacontext' : {'key' : '@odata\\ .context' , 'type' : 'str' },
555
- 'odatacount' : {'key' : '@odata\\ .count' , 'type' : 'int' },
556
- 'value' : {'key' : 'value' , 'type' : '[PolicyEvent]' },
557
- }
558
-
559
- def __init__ (self , ** kwargs ):
560
- super (PolicyEventsQueryResults , self ).__init__ (** kwargs )
561
- self .odatacontext = kwargs .get ('odatacontext' , None )
562
- self .odatacount = kwargs .get ('odatacount' , None )
563
- self .value = kwargs .get ('value' , None )
626
+ self .components = kwargs .get ('components' , None )
564
627
565
628
566
629
class PolicyGroupSummary (Model ):
@@ -741,6 +804,10 @@ class PolicyState(Model):
741
804
~azure.mgmt.policyinsights.models.PolicyEvaluationDetails
742
805
:param policy_definition_group_names: Policy definition group names.
743
806
:type policy_definition_group_names: list[str]
807
+ :param components: Components state compliance records populated only when
808
+ URL contains $expand=components clause.
809
+ :type components:
810
+ list[~azure.mgmt.policyinsights.models.ComponentStateDetails]
744
811
:ivar policy_definition_version: Evaluated policy definition version.
745
812
:vartype policy_definition_version: str
746
813
:ivar policy_set_definition_version: Evaluated policy set definition
@@ -788,6 +855,7 @@ class PolicyState(Model):
788
855
'compliance_state' : {'key' : 'complianceState' , 'type' : 'str' },
789
856
'policy_evaluation_details' : {'key' : 'policyEvaluationDetails' , 'type' : 'PolicyEvaluationDetails' },
790
857
'policy_definition_group_names' : {'key' : 'policyDefinitionGroupNames' , 'type' : '[str]' },
858
+ 'components' : {'key' : 'components' , 'type' : '[ComponentStateDetails]' },
791
859
'policy_definition_version' : {'key' : 'policyDefinitionVersion' , 'type' : 'str' },
792
860
'policy_set_definition_version' : {'key' : 'policySetDefinitionVersion' , 'type' : 'str' },
793
861
'policy_assignment_version' : {'key' : 'policyAssignmentVersion' , 'type' : 'str' },
@@ -826,41 +894,12 @@ def __init__(self, **kwargs):
826
894
self .compliance_state = kwargs .get ('compliance_state' , None )
827
895
self .policy_evaluation_details = kwargs .get ('policy_evaluation_details' , None )
828
896
self .policy_definition_group_names = kwargs .get ('policy_definition_group_names' , None )
897
+ self .components = kwargs .get ('components' , None )
829
898
self .policy_definition_version = None
830
899
self .policy_set_definition_version = None
831
900
self .policy_assignment_version = None
832
901
833
902
834
- class PolicyStatesQueryResults (Model ):
835
- """Query results.
836
-
837
- :param odatacontext: OData context string; used by OData clients to
838
- resolve type information based on metadata.
839
- :type odatacontext: str
840
- :param odatacount: OData entity count; represents the number of policy
841
- state records returned.
842
- :type odatacount: int
843
- :param value: Query results.
844
- :type value: list[~azure.mgmt.policyinsights.models.PolicyState]
845
- """
846
-
847
- _validation = {
848
- 'odatacount' : {'minimum' : 0 },
849
- }
850
-
851
- _attribute_map = {
852
- 'odatacontext' : {'key' : '@odata\\ .context' , 'type' : 'str' },
853
- 'odatacount' : {'key' : '@odata\\ .count' , 'type' : 'int' },
854
- 'value' : {'key' : 'value' , 'type' : '[PolicyState]' },
855
- }
856
-
857
- def __init__ (self , ** kwargs ):
858
- super (PolicyStatesQueryResults , self ).__init__ (** kwargs )
859
- self .odatacontext = kwargs .get ('odatacontext' , None )
860
- self .odatacount = kwargs .get ('odatacount' , None )
861
- self .value = kwargs .get ('value' , None )
862
-
863
-
864
903
class PolicyTrackedResource (Model ):
865
904
"""Policy tracked resource record.
866
905
@@ -991,8 +1030,11 @@ class QueryOptions(Model):
991
1030
:type to: datetime
992
1031
:param apply: OData apply expression for aggregations.
993
1032
:type apply: str
1033
+ :param skip_token: Skiptoken is only provided if a previous response
1034
+ returned a partial result as a part of nextLink element.
1035
+ :type skip_token: str
994
1036
:param expand: The $expand query parameter. For example, to expand
995
- policyEvaluationDetails, use $expand=policyEvaluationDetails
1037
+ components use $expand=components
996
1038
:type expand: str
997
1039
"""
998
1040
@@ -1004,6 +1046,7 @@ class QueryOptions(Model):
1004
1046
'from_property' : {'key' : '' , 'type' : 'iso-8601' },
1005
1047
'to' : {'key' : '' , 'type' : 'iso-8601' },
1006
1048
'apply' : {'key' : '' , 'type' : 'str' },
1049
+ 'skip_token' : {'key' : '' , 'type' : 'str' },
1007
1050
'expand' : {'key' : '' , 'type' : 'str' },
1008
1051
}
1009
1052
@@ -1016,6 +1059,7 @@ def __init__(self, **kwargs):
1016
1059
self .from_property = kwargs .get ('from_property' , None )
1017
1060
self .to = kwargs .get ('to' , None )
1018
1061
self .apply = kwargs .get ('apply' , None )
1062
+ self .skip_token = kwargs .get ('skip_token' , None )
1019
1063
self .expand = kwargs .get ('expand' , None )
1020
1064
1021
1065
0 commit comments