From 6dc28a6ce6dffa0a309ee7f784ecbdbcf2b122d4 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Mon, 10 May 2021 11:05:53 -0700 Subject: [PATCH] EG prep for release --- .../azure/eventgrid/_event_mappings.py | 6 + .../eventgrid/_generated/models/__init__.py | 9 + .../eventgrid/_generated/models/_models.py | 138 +++++++++++++++ .../_generated/models/_models_py3.py | 162 ++++++++++++++++++ .../swagger/README.PYTHON_T2.md | 1 + 5 files changed, 316 insertions(+) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py index 8669a259692..1b2f518a52d 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py @@ -162,6 +162,12 @@ class SystemEventNames(str, Enum): MediaLiveEventTrackDiscontinuityDetectedEventName = 'Microsoft.Media.LiveEventTrackDiscontinuityDetected' + PolicyInsightsPolicyStateChangedEventName = 'Microsoft.PolicyInsights.PolicyStateChanged' + + PolicyInsightsPolicyStateCreatedEventName = 'Microsoft.PolicyInsights.PolicyStateCreated' + + PolicyInsightsPolicyStateDeletedEventName = 'Microsoft.PolicyInsights.PolicyStateDeleted' + RedisExportRDBCompletedEventName = 'Microsoft.Cache.ExportRDBCompleted' RedisImportRDBCompletedEventName = 'Microsoft.Cache.ImportRDBCompleted' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py index 792fd132d94..0ee1c448ad4 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/__init__.py @@ -121,6 +121,9 @@ from ._models_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData from ._models_py3 import MicrosoftTeamsUserIdentifierModel from ._models_py3 import PhoneNumberIdentifierModel + from ._models_py3 import PolicyInsightsPolicyStateChangedEventData + from ._models_py3 import PolicyInsightsPolicyStateCreatedEventData + from ._models_py3 import PolicyInsightsPolicyStateDeletedEventData from ._models_py3 import RedisExportRDBCompletedEventData from ._models_py3 import RedisImportRDBCompletedEventData from ._models_py3 import RedisPatchingCompletedEventData @@ -282,6 +285,9 @@ from ._models import MediaLiveEventTrackDiscontinuityDetectedEventData # type: ignore from ._models import MicrosoftTeamsUserIdentifierModel # type: ignore from ._models import PhoneNumberIdentifierModel # type: ignore + from ._models import PolicyInsightsPolicyStateChangedEventData # type: ignore + from ._models import PolicyInsightsPolicyStateCreatedEventData # type: ignore + from ._models import PolicyInsightsPolicyStateDeletedEventData # type: ignore from ._models import RedisExportRDBCompletedEventData # type: ignore from ._models import RedisImportRDBCompletedEventData # type: ignore from ._models import RedisPatchingCompletedEventData # type: ignore @@ -456,6 +462,9 @@ 'MediaLiveEventTrackDiscontinuityDetectedEventData', 'MicrosoftTeamsUserIdentifierModel', 'PhoneNumberIdentifierModel', + 'PolicyInsightsPolicyStateChangedEventData', + 'PolicyInsightsPolicyStateCreatedEventData', + 'PolicyInsightsPolicyStateDeletedEventData', 'RedisExportRDBCompletedEventData', 'RedisImportRDBCompletedEventData', 'RedisPatchingCompletedEventData', diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py index f71b9174bdb..36ae090dd30 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py @@ -4307,6 +4307,144 @@ def __init__( self.value = kwargs['value'] +class PolicyInsightsPolicyStateChangedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateChanged event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyInsightsPolicyStateChangedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.compliance_state = kwargs.get('compliance_state', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.compliance_reason_code = kwargs.get('compliance_reason_code', None) + + +class PolicyInsightsPolicyStateCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateCreated event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyInsightsPolicyStateCreatedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.compliance_state = kwargs.get('compliance_state', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.compliance_reason_code = kwargs.get('compliance_reason_code', None) + + +class PolicyInsightsPolicyStateDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateDeleted event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyInsightsPolicyStateDeletedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.policy_assignment_id = kwargs.get('policy_assignment_id', None) + self.policy_definition_id = kwargs.get('policy_definition_id', None) + self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) + self.compliance_state = kwargs.get('compliance_state', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.compliance_reason_code = kwargs.get('compliance_reason_code', None) + + class RedisExportRDBCompletedEventData(msrest.serialization.Model): """Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ExportRDBCompleted event. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py index c635d4bb9c9..cf0c04a1ef0 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models_py3.py @@ -4912,6 +4912,168 @@ def __init__( self.value = value +class PolicyInsightsPolicyStateChangedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateChanged event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + policy_assignment_id: Optional[str] = None, + policy_definition_id: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + compliance_state: Optional[str] = None, + subscription_id: Optional[str] = None, + compliance_reason_code: Optional[str] = None, + **kwargs + ): + super(PolicyInsightsPolicyStateChangedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.policy_assignment_id = policy_assignment_id + self.policy_definition_id = policy_definition_id + self.policy_definition_reference_id = policy_definition_reference_id + self.compliance_state = compliance_state + self.subscription_id = subscription_id + self.compliance_reason_code = compliance_reason_code + + +class PolicyInsightsPolicyStateCreatedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateCreated event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + policy_assignment_id: Optional[str] = None, + policy_definition_id: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + compliance_state: Optional[str] = None, + subscription_id: Optional[str] = None, + compliance_reason_code: Optional[str] = None, + **kwargs + ): + super(PolicyInsightsPolicyStateCreatedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.policy_assignment_id = policy_assignment_id + self.policy_definition_id = policy_definition_id + self.policy_definition_reference_id = policy_definition_reference_id + self.compliance_state = compliance_state + self.subscription_id = subscription_id + self.compliance_reason_code = compliance_reason_code + + +class PolicyInsightsPolicyStateDeletedEventData(msrest.serialization.Model): + """Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateDeleted event. + + :param timestamp: The time that the resource was scanned by Azure Policy in the Universal ISO + 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. + :type timestamp: ~datetime.datetime + :param policy_assignment_id: The resource ID of the policy assignment. + :type policy_assignment_id: str + :param policy_definition_id: The resource ID of the policy definition. + :type policy_definition_id: str + :param policy_definition_reference_id: The reference ID for the policy definition inside the + initiative definition, if the policy assignment is for an initiative. May be empty. + :type policy_definition_reference_id: str + :param compliance_state: The compliance state of the resource with respect to the policy + assignment. + :type compliance_state: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param compliance_reason_code: The compliance reason code. May be empty. + :type compliance_reason_code: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'}, + 'compliance_state': {'key': 'complianceState', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'compliance_reason_code': {'key': 'complianceReasonCode', 'type': 'str'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + policy_assignment_id: Optional[str] = None, + policy_definition_id: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + compliance_state: Optional[str] = None, + subscription_id: Optional[str] = None, + compliance_reason_code: Optional[str] = None, + **kwargs + ): + super(PolicyInsightsPolicyStateDeletedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.policy_assignment_id = policy_assignment_id + self.policy_definition_id = policy_definition_id + self.policy_definition_reference_id = policy_definition_reference_id + self.compliance_state = compliance_state + self.subscription_id = subscription_id + self.compliance_reason_code = compliance_reason_code + + class RedisExportRDBCompletedEventData(msrest.serialization.Model): """Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ExportRDBCompleted event. diff --git a/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md b/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md index adc05e03307..598285dd3c7 100644 --- a/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md +++ b/sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md @@ -29,6 +29,7 @@ input-file: - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json + - https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json python: true v3: true