diff --git a/azure-eventgrid/HISTORY.rst b/azure-eventgrid/HISTORY.rst index 5b774d604112..95183a60ed6b 100644 --- a/azure-eventgrid/HISTORY.rst +++ b/azure-eventgrid/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.2.0 (2018-08-28) +++++++++++++++++++ + +- Event Schemas for new events (IotHub DeviceConnected and DeviceDisconnected events, Resource events related to actions), and breaking changes to the schema for IotHub DeviceCreated event and IotHub DeviceDeleted event. + 1.1.0 (2018-05-24) ++++++++++++++++++ diff --git a/azure-eventgrid/README.rst b/azure-eventgrid/README.rst index 8ca27f1fc490..95480912b17f 100644 --- a/azure-eventgrid/README.rst +++ b/azure-eventgrid/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Event Grid Client Library. -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index 57ba4b413989..4398f6ccd602 100644 --- a/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -19,18 +19,25 @@ from .resource_delete_success_data_py3 import ResourceDeleteSuccessData from .resource_delete_failure_data_py3 import ResourceDeleteFailureData from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData + from .resource_action_success_data_py3 import ResourceActionSuccessData + from .resource_action_failure_data_py3 import ResourceActionFailureData + from .resource_action_cancel_data_py3 import ResourceActionCancelData from .event_grid_event_py3 import EventGridEvent from .subscription_validation_event_data_py3 import SubscriptionValidationEventData from .subscription_validation_response_py3 import SubscriptionValidationResponse from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData + from .iot_hub_device_connected_event_data_py3 import IotHubDeviceConnectedEventData + from .iot_hub_device_disconnected_event_data_py3 import IotHubDeviceDisconnectedEventData from .device_twin_metadata_py3 import DeviceTwinMetadata from .device_twin_properties_py3 import DeviceTwinProperties from .device_twin_info_properties_py3 import DeviceTwinInfoProperties from .device_twin_info_x509_thumbprint_py3 import DeviceTwinInfoX509Thumbprint from .device_twin_info_py3 import DeviceTwinInfo from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties + from .device_connection_state_event_info_py3 import DeviceConnectionStateEventInfo + from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties from .container_registry_image_pushed_event_data_py3 import ContainerRegistryImagePushedEventData from .container_registry_image_deleted_event_data_py3 import ContainerRegistryImageDeletedEventData from .container_registry_event_target_py3 import ContainerRegistryEventTarget @@ -51,18 +58,25 @@ from .resource_delete_success_data import ResourceDeleteSuccessData from .resource_delete_failure_data import ResourceDeleteFailureData from .resource_delete_cancel_data import ResourceDeleteCancelData + from .resource_action_success_data import ResourceActionSuccessData + from .resource_action_failure_data import ResourceActionFailureData + from .resource_action_cancel_data import ResourceActionCancelData from .event_grid_event import EventGridEvent from .subscription_validation_event_data import SubscriptionValidationEventData from .subscription_validation_response import SubscriptionValidationResponse from .subscription_deleted_event_data import SubscriptionDeletedEventData from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData + from .iot_hub_device_connected_event_data import IotHubDeviceConnectedEventData + from .iot_hub_device_disconnected_event_data import IotHubDeviceDisconnectedEventData from .device_twin_metadata import DeviceTwinMetadata from .device_twin_properties import DeviceTwinProperties from .device_twin_info_properties import DeviceTwinInfoProperties from .device_twin_info_x509_thumbprint import DeviceTwinInfoX509Thumbprint from .device_twin_info import DeviceTwinInfo from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties + from .device_connection_state_event_info import DeviceConnectionStateEventInfo + from .device_connection_state_event_properties import DeviceConnectionStateEventProperties from .container_registry_image_pushed_event_data import ContainerRegistryImagePushedEventData from .container_registry_image_deleted_event_data import ContainerRegistryImageDeletedEventData from .container_registry_event_target import ContainerRegistryEventTarget @@ -87,18 +101,25 @@ 'ResourceDeleteSuccessData', 'ResourceDeleteFailureData', 'ResourceDeleteCancelData', + 'ResourceActionSuccessData', + 'ResourceActionFailureData', + 'ResourceActionCancelData', 'EventGridEvent', 'SubscriptionValidationEventData', 'SubscriptionValidationResponse', 'SubscriptionDeletedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', + 'IotHubDeviceConnectedEventData', + 'IotHubDeviceDisconnectedEventData', 'DeviceTwinMetadata', 'DeviceTwinProperties', 'DeviceTwinInfoProperties', 'DeviceTwinInfoX509Thumbprint', 'DeviceTwinInfo', 'DeviceLifeCycleEventProperties', + 'DeviceConnectionStateEventInfo', + 'DeviceConnectionStateEventProperties', 'ContainerRegistryImagePushedEventData', 'ContainerRegistryImageDeletedEventData', 'ContainerRegistryEventTarget', diff --git a/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py new file mode 100644 index 000000000000..7a110cab64af --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeviceConnectionStateEventInfo(Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a + hexadecimal number. string compare can be used to identify the larger + number because both in ASCII and HEX numbers come after alphabets. If you + are converting the string to hex, then the number is a 256 bit number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = kwargs.get('sequence_number', None) diff --git a/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py new file mode 100644 index 000000000000..0ef8c03b2074 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeviceConnectionStateEventInfo(Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a + hexadecimal number. string compare can be used to identify the larger + number because both in ASCII and HEX numbers come after alphabets. If you + are converting the string to hex, then the number is a 256 bit number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, sequence_number: str=None, **kwargs) -> None: + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = sequence_number diff --git a/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py new file mode 100644 index 000000000000..04a5a1aefcb0 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeviceConnectionStateEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device connection + state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.module_id = kwargs.get('module_id', None) + self.hub_name = kwargs.get('hub_name', None) + self.device_connection_state_event_info = kwargs.get('device_connection_state_event_info', None) diff --git a/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py new file mode 100644 index 000000000000..b8c339e55f64 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeviceConnectionStateEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device connection + state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = device_id + self.module_id = module_id + self.hub_name = hub_name + self.device_connection_state_event_info = device_connection_state_event_info diff --git a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py index daa20dc9ef06..b6cf0e6f2961 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py +++ b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py @@ -24,21 +24,14 @@ class DeviceLifeCycleEventProperties(Model): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } @@ -46,6 +39,4 @@ def __init__(self, **kwargs): super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) self.device_id = kwargs.get('device_id', None) self.hub_name = kwargs.get('hub_name', None) - self.op_type = kwargs.get('op_type', None) - self.operation_timestamp = kwargs.get('operation_timestamp', None) self.twin = kwargs.get('twin', None) diff --git a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py index f5033203064f..f203cf9f1005 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py @@ -24,28 +24,19 @@ class DeviceLifeCycleEventProperties(Model): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } - def __init__(self, *, device_id: str=None, hub_name: str=None, op_type: str=None, operation_timestamp: str=None, twin=None, **kwargs) -> None: + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) self.device_id = device_id self.hub_name = hub_name - self.op_type = op_type - self.operation_timestamp = operation_timestamp self.twin = twin diff --git a/azure-eventgrid/azure/eventgrid/models/device_twin_info.py b/azure-eventgrid/azure/eventgrid/models/device_twin_info.py index 4f7782f31aa2..a3c555d320cf 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_twin_info.py +++ b/azure-eventgrid/azure/eventgrid/models/device_twin_info.py @@ -13,7 +13,7 @@ class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud represenation of + """Information about the device twin, which is the cloud representation of application device metadata. :param authentication_type: Authentication type used for this device: diff --git a/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py b/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py index c496c850aba0..e74f3c65e994 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py @@ -13,7 +13,7 @@ class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud represenation of + """Information about the device twin, which is the cloud representation of application device metadata. :param authentication_type: Authentication type used for this device: diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py new file mode 100644 index 000000000000..9f48f9c10abc --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .device_connection_state_event_properties import DeviceConnectionStateEventProperties + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceConnectedEventData, self).__init__(**kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py new file mode 100644 index 000000000000..3c4791507b54 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(IotHubDeviceConnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py index 92c5392dd4c8..df911f0b0456 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py @@ -23,21 +23,14 @@ class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py index 02b0ee8ce99d..e8d497edc97e 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py @@ -23,23 +23,16 @@ class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } - def __init__(self, *, device_id: str=None, hub_name: str=None, op_type: str=None, operation_timestamp: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, op_type=op_type, operation_timestamp=operation_timestamp, twin=twin, **kwargs) + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: + super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py index 95fbdd3e1cca..92d7e5c9c67f 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py @@ -23,21 +23,14 @@ class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py index a090981744a5..635003d7176c 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py @@ -23,23 +23,16 @@ class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): :param hub_name: Name of the IoT Hub where the device was created or deleted. :type hub_name: str - :param op_type: The event type specified for this operation by the IoT - Hub. - :type op_type: str - :param operation_timestamp: The ISO8601 timestamp of the operation. - :type operation_timestamp: str :param twin: Information about the device twin, which is the cloud - represenation of application device metadata. + representation of application device metadata. :type twin: ~azure.eventgrid.models.DeviceTwinInfo """ _attribute_map = { 'device_id': {'key': 'deviceId', 'type': 'str'}, 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'op_type': {'key': 'opType', 'type': 'str'}, - 'operation_timestamp': {'key': 'operationTimestamp', 'type': 'str'}, 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, } - def __init__(self, *, device_id: str=None, hub_name: str=None, op_type: str=None, operation_timestamp: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, op_type=op_type, operation_timestamp=operation_timestamp, twin=twin, **kwargs) + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: + super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py new file mode 100644 index 000000000000..0de85a3a601f --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .device_connection_state_event_properties import DeviceConnectionStateEventProperties + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceDisconnectedEventData, self).__init__(**kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py new file mode 100644 index 000000000000..d340d625e90c --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(IotHubDeviceDisconnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py b/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py new file mode 100644 index 000000000000..3a01e07bbf84 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceActionCancel event. This is raised when a + resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py b/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py new file mode 100644 index 000000000000..7999e471f542 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceActionCancel event. This is raised when a + resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py b/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py new file mode 100644 index 000000000000..bb3225665c81 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionFailure event. This is raised when a + resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py b/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py new file mode 100644 index 000000000000..2c356d0b0340 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionFailure event. This is raised when a + resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py b/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py new file mode 100644 index 000000000000..559817f997ca --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionSuccess event. This is raised when a + resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) diff --git a/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py b/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py new file mode 100644 index 000000000000..59e9f32f46fc --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceActionSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionSuccess event. This is raised when a + resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request diff --git a/azure-eventgrid/azure/eventgrid/version.py b/azure-eventgrid/azure/eventgrid/version.py index 24b9de3384da..9c644827672b 100644 --- a/azure-eventgrid/azure/eventgrid/version.py +++ b/azure-eventgrid/azure/eventgrid/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.0" +VERSION = "1.2.0" diff --git a/azure-eventgrid/sdk_packaging.toml b/azure-eventgrid/sdk_packaging.toml new file mode 100644 index 000000000000..892600b2e61c --- /dev/null +++ b/azure-eventgrid/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-eventgrid" +package_pprint_name = "Event Grid" +package_doc_id = "event-grid" +is_stable = true +is_arm = false diff --git a/azure-eventgrid/setup.py b/azure-eventgrid/setup.py index 11ca1afdf01e..b5ded43b0ed7 100644 --- a/azure-eventgrid/setup.py +++ b/azure-eventgrid/setup.py @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass