Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EG prep for release #18609

Merged
merged 1 commit into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -456,6 +462,9 @@
'MediaLiveEventTrackDiscontinuityDetectedEventData',
'MicrosoftTeamsUserIdentifierModel',
'PhoneNumberIdentifierModel',
'PolicyInsightsPolicyStateChangedEventData',
'PolicyInsightsPolicyStateCreatedEventData',
'PolicyInsightsPolicyStateDeletedEventData',
'RedisExportRDBCompletedEventData',
'RedisImportRDBCompletedEventData',
'RedisPatchingCompletedEventData',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions sdk/eventgrid/azure-eventgrid/swagger/README.PYTHON_T2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down