diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md
index 258bf6dfc47d..c0cc09ba5be6 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md
@@ -1,5 +1,46 @@
# Release History
+## 3.0.0rc9 (2021-02-23)
+
+**Features**
+
+ - Model WebHookEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model ServiceBusTopicEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model EventSubscriptionFilter has a new parameter enable_advanced_filtering_on_arrays
+ - Model EventSubscriptionUpdateParameters has a new parameter dead_letter_with_resource_identity
+ - Model EventSubscriptionUpdateParameters has a new parameter delivery_with_resource_identity
+ - Model HybridConnectionEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model StorageQueueEventSubscriptionDestination has a new parameter queue_message_time_to_live_in_seconds
+ - Model EventSubscription has a new parameter system_data
+ - Model EventSubscription has a new parameter delivery_with_resource_identity
+ - Model EventSubscription has a new parameter dead_letter_with_resource_identity
+ - Model DomainTopic has a new parameter system_data
+ - Model ServiceBusQueueEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model TopicUpdateParameters has a new parameter identity
+ - Model TopicUpdateParameters has a new parameter sku
+ - Model AzureFunctionEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model DomainUpdateParameters has a new parameter identity
+ - Model DomainUpdateParameters has a new parameter sku
+ - Model Topic has a new parameter system_data
+ - Model Topic has a new parameter identity
+ - Model Topic has a new parameter kind
+ - Model Topic has a new parameter extended_location
+ - Model Topic has a new parameter sku
+ - Model TopicTypeInfo has a new parameter supported_scopes_for_source
+ - Model EventHubEventSubscriptionDestination has a new parameter delivery_attribute_mappings
+ - Model Domain has a new parameter system_data
+ - Model Domain has a new parameter identity
+ - Model Domain has a new parameter sku
+ - Added operation EventSubscriptionsOperations.get_delivery_attributes
+ - Added operation group PartnerRegistrationsOperations
+ - Added operation group PartnerNamespacesOperations
+ - Added operation group PartnerTopicEventSubscriptionsOperations
+ - Added operation group SystemTopicEventSubscriptionsOperations
+ - Added operation group ExtensionTopicsOperations
+ - Added operation group PartnerTopicsOperations
+ - Added operation group SystemTopicsOperations
+ - Added operation group EventChannelsOperations
+
## 3.0.0rc8 (2020-06-05)
**Breaking changes**
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py
index 98100f96a441..c3409b547cbc 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py
@@ -15,11 +15,19 @@
from ._configuration import EventGridManagementClientConfiguration
from .operations import DomainsOperations
from .operations import DomainTopicsOperations
+from .operations import EventChannelsOperations
from .operations import EventSubscriptionsOperations
+from .operations import SystemTopicEventSubscriptionsOperations
+from .operations import PartnerTopicEventSubscriptionsOperations
from .operations import Operations
-from .operations import TopicsOperations
+from .operations import PartnerNamespacesOperations
+from .operations import PartnerRegistrationsOperations
+from .operations import PartnerTopicsOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
+from .operations import SystemTopicsOperations
+from .operations import TopicsOperations
+from .operations import ExtensionTopicsOperations
from .operations import TopicTypesOperations
from . import models
@@ -34,16 +42,32 @@ class EventGridManagementClient(SDKClient):
:vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations
:ivar domain_topics: DomainTopics operations
:vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations
+ :ivar event_channels: EventChannels operations
+ :vartype event_channels: azure.mgmt.eventgrid.operations.EventChannelsOperations
:ivar event_subscriptions: EventSubscriptions operations
:vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations
+ :ivar system_topic_event_subscriptions: SystemTopicEventSubscriptions operations
+ :vartype system_topic_event_subscriptions: azure.mgmt.eventgrid.operations.SystemTopicEventSubscriptionsOperations
+ :ivar partner_topic_event_subscriptions: PartnerTopicEventSubscriptions operations
+ :vartype partner_topic_event_subscriptions: azure.mgmt.eventgrid.operations.PartnerTopicEventSubscriptionsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.eventgrid.operations.Operations
- :ivar topics: Topics operations
- :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations
+ :ivar partner_namespaces: PartnerNamespaces operations
+ :vartype partner_namespaces: azure.mgmt.eventgrid.operations.PartnerNamespacesOperations
+ :ivar partner_registrations: PartnerRegistrations operations
+ :vartype partner_registrations: azure.mgmt.eventgrid.operations.PartnerRegistrationsOperations
+ :ivar partner_topics: PartnerTopics operations
+ :vartype partner_topics: azure.mgmt.eventgrid.operations.PartnerTopicsOperations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.eventgrid.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.eventgrid.operations.PrivateLinkResourcesOperations
+ :ivar system_topics: SystemTopics operations
+ :vartype system_topics: azure.mgmt.eventgrid.operations.SystemTopicsOperations
+ :ivar topics: Topics operations
+ :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations
+ :ivar extension_topics: ExtensionTopics operations
+ :vartype extension_topics: azure.mgmt.eventgrid.operations.ExtensionTopicsOperations
:ivar topic_types: TopicTypes operations
:vartype topic_types: azure.mgmt.eventgrid.operations.TopicTypesOperations
@@ -64,7 +88,7 @@ def __init__(
super(EventGridManagementClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
- self.api_version = '2020-06-01'
+ self.api_version = '2020-10-15-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
@@ -72,15 +96,31 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.domain_topics = DomainTopicsOperations(
self._client, self.config, self._serialize, self._deserialize)
+ self.event_channels = EventChannelsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
self.event_subscriptions = EventSubscriptionsOperations(
self._client, self.config, self._serialize, self._deserialize)
+ self.system_topic_event_subscriptions = SystemTopicEventSubscriptionsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.partner_topic_event_subscriptions = PartnerTopicEventSubscriptionsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
- self.topics = TopicsOperations(
+ self.partner_namespaces = PartnerNamespacesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.partner_registrations = PartnerRegistrationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.partner_topics = PartnerTopicsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
+ self.system_topics = SystemTopicsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.topics = TopicsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.extension_topics = ExtensionTopicsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
self.topic_types = TopicTypesOperations(
self._client, self.config, self._serialize, self._deserialize)
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py
index 435ad189d2b0..ce2ecda15670 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py
@@ -15,52 +15,89 @@
from ._models_py3 import BoolEqualsAdvancedFilter
from ._models_py3 import ConnectionState
from ._models_py3 import DeadLetterDestination
+ from ._models_py3 import DeadLetterWithResourceIdentity
+ from ._models_py3 import DeliveryAttributeListResult
+ from ._models_py3 import DeliveryAttributeMapping
+ from ._models_py3 import DeliveryWithResourceIdentity
from ._models_py3 import Domain
from ._models_py3 import DomainRegenerateKeyRequest
from ._models_py3 import DomainSharedAccessKeys
from ._models_py3 import DomainTopic
from ._models_py3 import DomainUpdateParameters
+ from ._models_py3 import DynamicDeliveryAttributeMapping
+ from ._models_py3 import EventChannel
+ from ._models_py3 import EventChannelDestination
+ from ._models_py3 import EventChannelFilter
+ from ._models_py3 import EventChannelSource
from ._models_py3 import EventHubEventSubscriptionDestination
from ._models_py3 import EventSubscription
from ._models_py3 import EventSubscriptionDestination
from ._models_py3 import EventSubscriptionFilter
from ._models_py3 import EventSubscriptionFullUrl
+ from ._models_py3 import EventSubscriptionIdentity
from ._models_py3 import EventSubscriptionUpdateParameters
from ._models_py3 import EventType
+ from ._models_py3 import ExtendedLocation
+ from ._models_py3 import ExtensionTopic
from ._models_py3 import HybridConnectionEventSubscriptionDestination
+ from ._models_py3 import IdentityInfo
from ._models_py3 import InboundIpRule
from ._models_py3 import InputSchemaMapping
+ from ._models_py3 import IsNotNullAdvancedFilter
+ from ._models_py3 import IsNullOrUndefinedAdvancedFilter
from ._models_py3 import JsonField
from ._models_py3 import JsonFieldWithDefault
from ._models_py3 import JsonInputSchemaMapping
from ._models_py3 import NumberGreaterThanAdvancedFilter
from ._models_py3 import NumberGreaterThanOrEqualsAdvancedFilter
from ._models_py3 import NumberInAdvancedFilter
+ from ._models_py3 import NumberInRangeAdvancedFilter
from ._models_py3 import NumberLessThanAdvancedFilter
from ._models_py3 import NumberLessThanOrEqualsAdvancedFilter
from ._models_py3 import NumberNotInAdvancedFilter
+ from ._models_py3 import NumberNotInRangeAdvancedFilter
from ._models_py3 import Operation
from ._models_py3 import OperationInfo
+ from ._models_py3 import PartnerNamespace
+ from ._models_py3 import PartnerNamespaceRegenerateKeyRequest
+ from ._models_py3 import PartnerNamespaceSharedAccessKeys
+ from ._models_py3 import PartnerNamespaceUpdateParameters
+ from ._models_py3 import PartnerRegistration
+ from ._models_py3 import PartnerRegistrationEventTypesListResult
+ from ._models_py3 import PartnerRegistrationUpdateParameters
+ from ._models_py3 import PartnerTopic
+ from ._models_py3 import PartnerTopicType
+ from ._models_py3 import PartnerTopicTypesListResult
+ from ._models_py3 import PartnerTopicUpdateParameters
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkResource
from ._models_py3 import Resource
+ from ._models_py3 import ResourceSku
from ._models_py3 import RetryPolicy
from ._models_py3 import ServiceBusQueueEventSubscriptionDestination
from ._models_py3 import ServiceBusTopicEventSubscriptionDestination
+ from ._models_py3 import StaticDeliveryAttributeMapping
from ._models_py3 import StorageBlobDeadLetterDestination
from ._models_py3 import StorageQueueEventSubscriptionDestination
from ._models_py3 import StringBeginsWithAdvancedFilter
from ._models_py3 import StringContainsAdvancedFilter
from ._models_py3 import StringEndsWithAdvancedFilter
from ._models_py3 import StringInAdvancedFilter
+ from ._models_py3 import StringNotBeginsWithAdvancedFilter
+ from ._models_py3 import StringNotContainsAdvancedFilter
+ from ._models_py3 import StringNotEndsWithAdvancedFilter
from ._models_py3 import StringNotInAdvancedFilter
+ from ._models_py3 import SystemData
+ from ._models_py3 import SystemTopic
+ from ._models_py3 import SystemTopicUpdateParameters
from ._models_py3 import Topic
from ._models_py3 import TopicRegenerateKeyRequest
from ._models_py3 import TopicSharedAccessKeys
from ._models_py3 import TopicTypeInfo
from ._models_py3 import TopicUpdateParameters
from ._models_py3 import TrackedResource
+ from ._models_py3 import UserIdentityProperties
from ._models_py3 import WebHookEventSubscriptionDestination
except (SyntaxError, ImportError):
from ._models import AdvancedFilter
@@ -68,60 +105,102 @@
from ._models import BoolEqualsAdvancedFilter
from ._models import ConnectionState
from ._models import DeadLetterDestination
+ from ._models import DeadLetterWithResourceIdentity
+ from ._models import DeliveryAttributeListResult
+ from ._models import DeliveryAttributeMapping
+ from ._models import DeliveryWithResourceIdentity
from ._models import Domain
from ._models import DomainRegenerateKeyRequest
from ._models import DomainSharedAccessKeys
from ._models import DomainTopic
from ._models import DomainUpdateParameters
+ from ._models import DynamicDeliveryAttributeMapping
+ from ._models import EventChannel
+ from ._models import EventChannelDestination
+ from ._models import EventChannelFilter
+ from ._models import EventChannelSource
from ._models import EventHubEventSubscriptionDestination
from ._models import EventSubscription
from ._models import EventSubscriptionDestination
from ._models import EventSubscriptionFilter
from ._models import EventSubscriptionFullUrl
+ from ._models import EventSubscriptionIdentity
from ._models import EventSubscriptionUpdateParameters
from ._models import EventType
+ from ._models import ExtendedLocation
+ from ._models import ExtensionTopic
from ._models import HybridConnectionEventSubscriptionDestination
+ from ._models import IdentityInfo
from ._models import InboundIpRule
from ._models import InputSchemaMapping
+ from ._models import IsNotNullAdvancedFilter
+ from ._models import IsNullOrUndefinedAdvancedFilter
from ._models import JsonField
from ._models import JsonFieldWithDefault
from ._models import JsonInputSchemaMapping
from ._models import NumberGreaterThanAdvancedFilter
from ._models import NumberGreaterThanOrEqualsAdvancedFilter
from ._models import NumberInAdvancedFilter
+ from ._models import NumberInRangeAdvancedFilter
from ._models import NumberLessThanAdvancedFilter
from ._models import NumberLessThanOrEqualsAdvancedFilter
from ._models import NumberNotInAdvancedFilter
+ from ._models import NumberNotInRangeAdvancedFilter
from ._models import Operation
from ._models import OperationInfo
+ from ._models import PartnerNamespace
+ from ._models import PartnerNamespaceRegenerateKeyRequest
+ from ._models import PartnerNamespaceSharedAccessKeys
+ from ._models import PartnerNamespaceUpdateParameters
+ from ._models import PartnerRegistration
+ from ._models import PartnerRegistrationEventTypesListResult
+ from ._models import PartnerRegistrationUpdateParameters
+ from ._models import PartnerTopic
+ from ._models import PartnerTopicType
+ from ._models import PartnerTopicTypesListResult
+ from ._models import PartnerTopicUpdateParameters
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkResource
from ._models import Resource
+ from ._models import ResourceSku
from ._models import RetryPolicy
from ._models import ServiceBusQueueEventSubscriptionDestination
from ._models import ServiceBusTopicEventSubscriptionDestination
+ from ._models import StaticDeliveryAttributeMapping
from ._models import StorageBlobDeadLetterDestination
from ._models import StorageQueueEventSubscriptionDestination
from ._models import StringBeginsWithAdvancedFilter
from ._models import StringContainsAdvancedFilter
from ._models import StringEndsWithAdvancedFilter
from ._models import StringInAdvancedFilter
+ from ._models import StringNotBeginsWithAdvancedFilter
+ from ._models import StringNotContainsAdvancedFilter
+ from ._models import StringNotEndsWithAdvancedFilter
from ._models import StringNotInAdvancedFilter
+ from ._models import SystemData
+ from ._models import SystemTopic
+ from ._models import SystemTopicUpdateParameters
from ._models import Topic
from ._models import TopicRegenerateKeyRequest
from ._models import TopicSharedAccessKeys
from ._models import TopicTypeInfo
from ._models import TopicUpdateParameters
from ._models import TrackedResource
+ from ._models import UserIdentityProperties
from ._models import WebHookEventSubscriptionDestination
from ._paged_models import DomainPaged
from ._paged_models import DomainTopicPaged
+from ._paged_models import EventChannelPaged
from ._paged_models import EventSubscriptionPaged
from ._paged_models import EventTypePaged
from ._paged_models import OperationPaged
+from ._paged_models import PartnerNamespacePaged
+from ._paged_models import PartnerRegistrationPaged
+from ._paged_models import PartnerTopicPaged
from ._paged_models import PrivateEndpointConnectionPaged
from ._paged_models import PrivateLinkResourcePaged
+from ._paged_models import SystemTopicPaged
from ._paged_models import TopicPaged
from ._paged_models import TopicTypeInfoPaged
from ._event_grid_management_client_enums import (
@@ -131,10 +210,23 @@
InputSchema,
PublicNetworkAccess,
IpActionType,
+ Sku,
+ IdentityType,
+ CreatedByType,
DomainTopicProvisioningState,
+ EventChannelProvisioningState,
+ PartnerTopicReadinessState,
EventSubscriptionProvisioningState,
+ EventSubscriptionIdentityType,
EventDeliverySchema,
+ PartnerNamespaceProvisioningState,
+ PartnerRegistrationProvisioningState,
+ PartnerRegistrationVisibilityState,
+ PartnerTopicProvisioningState,
+ PartnerTopicActivationState,
+ PartnerTopicTypeAuthorizationState,
TopicProvisioningState,
+ ResourceKind,
ResourceRegionType,
TopicTypeProvisioningState,
)
@@ -145,61 +237,103 @@
'BoolEqualsAdvancedFilter',
'ConnectionState',
'DeadLetterDestination',
+ 'DeadLetterWithResourceIdentity',
+ 'DeliveryAttributeListResult',
+ 'DeliveryAttributeMapping',
+ 'DeliveryWithResourceIdentity',
'Domain',
'DomainRegenerateKeyRequest',
'DomainSharedAccessKeys',
'DomainTopic',
'DomainUpdateParameters',
+ 'DynamicDeliveryAttributeMapping',
+ 'EventChannel',
+ 'EventChannelDestination',
+ 'EventChannelFilter',
+ 'EventChannelSource',
'EventHubEventSubscriptionDestination',
'EventSubscription',
'EventSubscriptionDestination',
'EventSubscriptionFilter',
'EventSubscriptionFullUrl',
+ 'EventSubscriptionIdentity',
'EventSubscriptionUpdateParameters',
'EventType',
+ 'ExtendedLocation',
+ 'ExtensionTopic',
'HybridConnectionEventSubscriptionDestination',
+ 'IdentityInfo',
'InboundIpRule',
'InputSchemaMapping',
+ 'IsNotNullAdvancedFilter',
+ 'IsNullOrUndefinedAdvancedFilter',
'JsonField',
'JsonFieldWithDefault',
'JsonInputSchemaMapping',
'NumberGreaterThanAdvancedFilter',
'NumberGreaterThanOrEqualsAdvancedFilter',
'NumberInAdvancedFilter',
+ 'NumberInRangeAdvancedFilter',
'NumberLessThanAdvancedFilter',
'NumberLessThanOrEqualsAdvancedFilter',
'NumberNotInAdvancedFilter',
+ 'NumberNotInRangeAdvancedFilter',
'Operation',
'OperationInfo',
+ 'PartnerNamespace',
+ 'PartnerNamespaceRegenerateKeyRequest',
+ 'PartnerNamespaceSharedAccessKeys',
+ 'PartnerNamespaceUpdateParameters',
+ 'PartnerRegistration',
+ 'PartnerRegistrationEventTypesListResult',
+ 'PartnerRegistrationUpdateParameters',
+ 'PartnerTopic',
+ 'PartnerTopicType',
+ 'PartnerTopicTypesListResult',
+ 'PartnerTopicUpdateParameters',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkResource',
'Resource',
+ 'ResourceSku',
'RetryPolicy',
'ServiceBusQueueEventSubscriptionDestination',
'ServiceBusTopicEventSubscriptionDestination',
+ 'StaticDeliveryAttributeMapping',
'StorageBlobDeadLetterDestination',
'StorageQueueEventSubscriptionDestination',
'StringBeginsWithAdvancedFilter',
'StringContainsAdvancedFilter',
'StringEndsWithAdvancedFilter',
'StringInAdvancedFilter',
+ 'StringNotBeginsWithAdvancedFilter',
+ 'StringNotContainsAdvancedFilter',
+ 'StringNotEndsWithAdvancedFilter',
'StringNotInAdvancedFilter',
+ 'SystemData',
+ 'SystemTopic',
+ 'SystemTopicUpdateParameters',
'Topic',
'TopicRegenerateKeyRequest',
'TopicSharedAccessKeys',
'TopicTypeInfo',
'TopicUpdateParameters',
'TrackedResource',
+ 'UserIdentityProperties',
'WebHookEventSubscriptionDestination',
'DomainPaged',
'DomainTopicPaged',
+ 'EventChannelPaged',
'EventSubscriptionPaged',
'OperationPaged',
- 'TopicPaged',
- 'EventTypePaged',
+ 'PartnerNamespacePaged',
+ 'PartnerRegistrationPaged',
+ 'PartnerTopicPaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
+ 'SystemTopicPaged',
+ 'TopicPaged',
+ 'EventTypePaged',
'TopicTypeInfoPaged',
'PersistedConnectionStatus',
'ResourceProvisioningState',
@@ -207,10 +341,23 @@
'InputSchema',
'PublicNetworkAccess',
'IpActionType',
+ 'Sku',
+ 'IdentityType',
+ 'CreatedByType',
'DomainTopicProvisioningState',
+ 'EventChannelProvisioningState',
+ 'PartnerTopicReadinessState',
'EventSubscriptionProvisioningState',
+ 'EventSubscriptionIdentityType',
'EventDeliverySchema',
+ 'PartnerNamespaceProvisioningState',
+ 'PartnerRegistrationProvisioningState',
+ 'PartnerRegistrationVisibilityState',
+ 'PartnerTopicProvisioningState',
+ 'PartnerTopicActivationState',
+ 'PartnerTopicTypeAuthorizationState',
'TopicProvisioningState',
+ 'ResourceKind',
'ResourceRegionType',
'TopicTypeProvisioningState',
]
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py
index e74e3f1e9d71..80dc0f749c50 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py
@@ -58,6 +58,28 @@ class IpActionType(str, Enum):
allow = "Allow"
+class Sku(str, Enum):
+
+ basic = "Basic"
+ premium = "Premium"
+
+
+class IdentityType(str, Enum):
+
+ none = "None"
+ system_assigned = "SystemAssigned"
+ user_assigned = "UserAssigned"
+ system_assigned_user_assigned = "SystemAssigned, UserAssigned"
+
+
+class CreatedByType(str, Enum):
+
+ user = "User"
+ application = "Application"
+ managed_identity = "ManagedIdentity"
+ key = "Key"
+
+
class DomainTopicProvisioningState(str, Enum):
creating = "Creating"
@@ -68,6 +90,24 @@ class DomainTopicProvisioningState(str, Enum):
failed = "Failed"
+class EventChannelProvisioningState(str, Enum):
+
+ creating = "Creating"
+ updating = "Updating"
+ deleting = "Deleting"
+ succeeded = "Succeeded"
+ canceled = "Canceled"
+ failed = "Failed"
+
+
+class PartnerTopicReadinessState(str, Enum):
+
+ not_activated_by_user_yet = "NotActivatedByUserYet"
+ activated_by_user = "ActivatedByUser"
+ deactivated_by_user = "DeactivatedByUser"
+ deleted_by_user = "DeletedByUser"
+
+
class EventSubscriptionProvisioningState(str, Enum):
creating = "Creating"
@@ -79,6 +119,12 @@ class EventSubscriptionProvisioningState(str, Enum):
awaiting_manual_action = "AwaitingManualAction"
+class EventSubscriptionIdentityType(str, Enum):
+
+ system_assigned = "SystemAssigned"
+ user_assigned = "UserAssigned"
+
+
class EventDeliverySchema(str, Enum):
event_grid_schema = "EventGridSchema"
@@ -86,6 +132,57 @@ class EventDeliverySchema(str, Enum):
cloud_event_schema_v1_0 = "CloudEventSchemaV1_0"
+class PartnerNamespaceProvisioningState(str, Enum):
+
+ creating = "Creating"
+ updating = "Updating"
+ deleting = "Deleting"
+ succeeded = "Succeeded"
+ canceled = "Canceled"
+ failed = "Failed"
+
+
+class PartnerRegistrationProvisioningState(str, Enum):
+
+ creating = "Creating"
+ updating = "Updating"
+ deleting = "Deleting"
+ succeeded = "Succeeded"
+ canceled = "Canceled"
+ failed = "Failed"
+
+
+class PartnerRegistrationVisibilityState(str, Enum):
+
+ hidden = "Hidden"
+ public_preview = "PublicPreview"
+ generally_available = "GenerallyAvailable"
+
+
+class PartnerTopicProvisioningState(str, Enum):
+
+ creating = "Creating"
+ updating = "Updating"
+ deleting = "Deleting"
+ succeeded = "Succeeded"
+ canceled = "Canceled"
+ failed = "Failed"
+
+
+class PartnerTopicActivationState(str, Enum):
+
+ never_activated = "NeverActivated"
+ activated = "Activated"
+ deactivated = "Deactivated"
+
+
+class PartnerTopicTypeAuthorizationState(str, Enum):
+
+ not_applicable = "NotApplicable"
+ not_authorized = "NotAuthorized"
+ authorized = "Authorized"
+
+
class TopicProvisioningState(str, Enum):
creating = "Creating"
@@ -96,6 +193,12 @@ class TopicProvisioningState(str, Enum):
failed = "Failed"
+class ResourceKind(str, Enum):
+
+ azure = "Azure"
+ azure_arc = "AzureArc"
+
+
class ResourceRegionType(str, Enum):
regional_resource = "RegionalResource"
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py
index 1b5f32a0b3fe..f1cd6c443df3 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py
@@ -27,7 +27,10 @@ class AdvancedFilter(Model):
NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter,
StringInAdvancedFilter, StringNotInAdvancedFilter,
StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter,
- StringContainsAdvancedFilter
+ StringContainsAdvancedFilter, NumberInRangeAdvancedFilter,
+ NumberNotInRangeAdvancedFilter, StringNotBeginsWithAdvancedFilter,
+ StringNotEndsWithAdvancedFilter, StringNotContainsAdvancedFilter,
+ IsNullOrUndefinedAdvancedFilter, IsNotNullAdvancedFilter
All required parameters must be populated in order to send to Azure.
@@ -48,7 +51,7 @@ class AdvancedFilter(Model):
}
_subtype_map = {
- 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'}
+ 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter', 'NumberInRange': 'NumberInRangeAdvancedFilter', 'NumberNotInRange': 'NumberNotInRangeAdvancedFilter', 'StringNotBeginsWith': 'StringNotBeginsWithAdvancedFilter', 'StringNotEndsWith': 'StringNotEndsWithAdvancedFilter', 'StringNotContains': 'StringNotContainsAdvancedFilter', 'IsNullOrUndefined': 'IsNullOrUndefinedAdvancedFilter', 'IsNotNull': 'IsNotNullAdvancedFilter'}
}
def __init__(self, **kwargs):
@@ -102,11 +105,15 @@ class AzureFunctionEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Azure Function destination of an event subscription.
:type resource_id: str
- :param max_events_per_batch: Maximum number of events per batch.
+ :param max_events_per_batch: Maximum number of events per batch. Default
+ value: 1 .
:type max_events_per_batch: int
:param preferred_batch_size_in_kilobytes: Preferred batch size in
- Kilobytes.
+ Kilobytes. Default value: 64 .
:type preferred_batch_size_in_kilobytes: int
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -118,13 +125,15 @@ class AzureFunctionEventSubscriptionDestination(EventSubscriptionDestination):
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'max_events_per_batch': {'key': 'properties.maxEventsPerBatch', 'type': 'int'},
'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(AzureFunctionEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
- self.max_events_per_batch = kwargs.get('max_events_per_batch', None)
- self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', None)
+ self.max_events_per_batch = kwargs.get('max_events_per_batch', 1)
+ self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', 64)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'AzureFunction'
@@ -225,6 +234,106 @@ def __init__(self, **kwargs):
self.endpoint_type = None
+class DeadLetterWithResourceIdentity(Model):
+ """Information about the deadletter destination with resource identity.
+
+ :param identity: The identity to use when dead-lettering events.
+ :type identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity
+ :param dead_letter_destination: Information about the destination where
+ events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_destination:
+ ~azure.mgmt.eventgrid.models.DeadLetterDestination
+ """
+
+ _attribute_map = {
+ 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'},
+ 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'},
+ }
+
+ def __init__(self, **kwargs):
+ super(DeadLetterWithResourceIdentity, self).__init__(**kwargs)
+ self.identity = kwargs.get('identity', None)
+ self.dead_letter_destination = kwargs.get('dead_letter_destination', None)
+
+
+class DeliveryAttributeListResult(Model):
+ """Result of the Get delivery attributes operation.
+
+ :param value: A collection of DeliveryAttributeMapping
+ :type value: list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[DeliveryAttributeMapping]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(DeliveryAttributeListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+
+
+class DeliveryAttributeMapping(Model):
+ """Delivery attribute mapping details.
+
+ You probably want to use the sub-classes and not this class directly. Known
+ sub-classes are: StaticDeliveryAttributeMapping,
+ DynamicDeliveryAttributeMapping
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ _subtype_map = {
+ 'type': {'Static': 'StaticDeliveryAttributeMapping', 'Dynamic': 'DynamicDeliveryAttributeMapping'}
+ }
+
+ def __init__(self, **kwargs):
+ super(DeliveryAttributeMapping, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.type = None
+
+
+class DeliveryWithResourceIdentity(Model):
+ """Information about the delivery for an event subscription with resource
+ identity.
+
+ :param identity: The identity to use when delivering events.
+ :type identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity
+ :param destination: Information about the destination where events have to
+ be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
+ :type destination:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ """
+
+ _attribute_map = {
+ 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'},
+ 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'},
+ }
+
+ def __init__(self, **kwargs):
+ super(DeliveryWithResourceIdentity, self).__init__(**kwargs)
+ self.identity = kwargs.get('identity', None)
+ self.destination = kwargs.get('destination', None)
+
+
class Resource(Model):
"""Definition of a Resource.
@@ -342,13 +451,20 @@ class Domain(TrackedResource):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the domain.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to Domain resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -359,6 +475,7 @@ class Domain(TrackedResource):
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -375,6 +492,9 @@ class Domain(TrackedResource):
'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(self, **kwargs):
@@ -385,8 +505,11 @@ def __init__(self, **kwargs):
self.input_schema = kwargs.get('input_schema', "EventGridSchema")
self.input_schema_mapping = kwargs.get('input_schema_mapping', None)
self.metric_resource_id = None
- self.public_network_access = kwargs.get('public_network_access', None)
+ self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)
+ self.sku = kwargs.get('sku', None)
+ self.identity = kwargs.get('identity', None)
+ self.system_data = None
class DomainRegenerateKeyRequest(Model):
@@ -448,12 +571,15 @@ class DomainTopic(Resource):
'Canceled', 'Failed'
:type provisioning_state: str or
~azure.mgmt.eventgrid.models.DomainTopicProvisioningState
+ :ivar system_data: The system metadata relating to Domain Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -461,11 +587,13 @@ class DomainTopic(Resource):
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(self, **kwargs):
super(DomainTopic, self).__init__(**kwargs)
self.provisioning_state = kwargs.get('provisioning_state', None)
+ self.system_data = None
class DomainUpdateParameters(Model):
@@ -477,26 +605,217 @@ class DomainUpdateParameters(Model):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :param sku: The Sku pricing tier for the domain.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
}
def __init__(self, **kwargs):
super(DomainUpdateParameters, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
- self.public_network_access = kwargs.get('public_network_access', None)
+ self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)
+ self.identity = kwargs.get('identity', None)
+ self.sku = kwargs.get('sku', None)
+
+
+class DynamicDeliveryAttributeMapping(DeliveryAttributeMapping):
+ """Dynamic delivery attribute mapping details.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ :param source_field: JSON path in the event which contains attribute
+ value.
+ :type source_field: str
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'source_field': {'key': 'properties.sourceField', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(DynamicDeliveryAttributeMapping, self).__init__(**kwargs)
+ self.source_field = kwargs.get('source_field', None)
+ self.type = 'Dynamic'
+
+
+class EventChannel(Resource):
+ """Event Channel.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param source: Source of the event channel. This represents a unique
+ resource in the partner's resource model.
+ :type source: ~azure.mgmt.eventgrid.models.EventChannelSource
+ :param destination: Represents the destination of an event channel.
+ :type destination: ~azure.mgmt.eventgrid.models.EventChannelDestination
+ :ivar provisioning_state: Provisioning state of the event channel.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.EventChannelProvisioningState
+ :ivar partner_topic_readiness_state: The readiness state of the
+ corresponding partner topic. Possible values include:
+ 'NotActivatedByUserYet', 'ActivatedByUser', 'DeactivatedByUser',
+ 'DeletedByUser'
+ :vartype partner_topic_readiness_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicReadinessState
+ :param expiration_time_if_not_activated_utc: Expiration time of the event
+ channel. If this timer expires while the corresponding partner topic is
+ never activated,
+ the event channel and corresponding partner topic are deleted.
+ :type expiration_time_if_not_activated_utc: datetime
+ :param filter: Information about the filter for the event channel.
+ :type filter: ~azure.mgmt.eventgrid.models.EventChannelFilter
+ :param partner_topic_friendly_description: Friendly description about the
+ topic. This can be set by the publisher/partner to show custom description
+ for the customer partner topic.
+ This will be helpful to remove any ambiguity of the origin of creation of
+ the partner topic for the customer.
+ :type partner_topic_friendly_description: str
+ :ivar system_data: The system metadata relating to Event Channel resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'partner_topic_readiness_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'source': {'key': 'properties.source', 'type': 'EventChannelSource'},
+ 'destination': {'key': 'properties.destination', 'type': 'EventChannelDestination'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_topic_readiness_state': {'key': 'properties.partnerTopicReadinessState', 'type': 'str'},
+ 'expiration_time_if_not_activated_utc': {'key': 'properties.expirationTimeIfNotActivatedUtc', 'type': 'iso-8601'},
+ 'filter': {'key': 'properties.filter', 'type': 'EventChannelFilter'},
+ 'partner_topic_friendly_description': {'key': 'properties.partnerTopicFriendlyDescription', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EventChannel, self).__init__(**kwargs)
+ self.source = kwargs.get('source', None)
+ self.destination = kwargs.get('destination', None)
+ self.provisioning_state = None
+ self.partner_topic_readiness_state = None
+ self.expiration_time_if_not_activated_utc = kwargs.get('expiration_time_if_not_activated_utc', None)
+ self.filter = kwargs.get('filter', None)
+ self.partner_topic_friendly_description = kwargs.get('partner_topic_friendly_description', None)
+ self.system_data = None
+
+
+class EventChannelDestination(Model):
+ """Properties of the destination of an event channel.
+
+ :param azure_subscription_id: Azure subscription ID of the customer
+ creating the event channel. The partner topic
+ associated with the event channel will be created under this Azure
+ subscription.
+ :type azure_subscription_id: str
+ :param resource_group: Azure Resource Group of the customer creating the
+ event channel. The partner topic
+ associated with the event channel will be created under this resource
+ group.
+ :type resource_group: str
+ :param partner_topic_name: Name of the partner topic associated with the
+ event channel.
+ :type partner_topic_name: str
+ """
+
+ _attribute_map = {
+ 'azure_subscription_id': {'key': 'azureSubscriptionId', 'type': 'str'},
+ 'resource_group': {'key': 'resourceGroup', 'type': 'str'},
+ 'partner_topic_name': {'key': 'partnerTopicName', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EventChannelDestination, self).__init__(**kwargs)
+ self.azure_subscription_id = kwargs.get('azure_subscription_id', None)
+ self.resource_group = kwargs.get('resource_group', None)
+ self.partner_topic_name = kwargs.get('partner_topic_name', None)
+
+
+class EventChannelFilter(Model):
+ """Filter for the Event Channel.
+
+ :param enable_advanced_filtering_on_arrays: Allows advanced filters to be
+ evaluated against an array of values instead of expecting a singular
+ value.
+ :type enable_advanced_filtering_on_arrays: bool
+ :param advanced_filters: An array of advanced filters that are used for
+ filtering event channels.
+ :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter]
+ """
+
+ _attribute_map = {
+ 'enable_advanced_filtering_on_arrays': {'key': 'enableAdvancedFilteringOnArrays', 'type': 'bool'},
+ 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EventChannelFilter, self).__init__(**kwargs)
+ self.enable_advanced_filtering_on_arrays = kwargs.get('enable_advanced_filtering_on_arrays', None)
+ self.advanced_filters = kwargs.get('advanced_filters', None)
+
+
+class EventChannelSource(Model):
+ """Properties of the source of an event channel.
+
+ :param source: The identifier of the resource that's the source of the
+ events.
+ This represents a unique resource in the partner's resource model.
+ :type source: str
+ """
+
+ _attribute_map = {
+ 'source': {'key': 'source', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EventChannelSource, self).__init__(**kwargs)
+ self.source = kwargs.get('source', None)
class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
@@ -509,6 +828,9 @@ class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
an Event Hub destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -518,11 +840,13 @@ class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(EventHubEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'EventHub'
@@ -547,8 +871,17 @@ class EventSubscription(Resource):
~azure.mgmt.eventgrid.models.EventSubscriptionProvisioningState
:param destination: Information about the destination where events have to
be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type destination:
~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ :param delivery_with_resource_identity: Information about the destination
+ where events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type delivery_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity
:param filter: Information about the filter for the event subscription.
:type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter
:param labels: List of user defined labels.
@@ -557,16 +890,31 @@ class EventSubscription(Resource):
:type expiration_time_utc: datetime
:param event_delivery_schema: The event delivery schema for the event
subscription. Possible values include: 'EventGridSchema',
- 'CustomInputSchema', 'CloudEventSchemaV1_0'
+ 'CustomInputSchema', 'CloudEventSchemaV1_0'. Default value:
+ "EventGridSchema" .
:type event_delivery_schema: str or
~azure.mgmt.eventgrid.models.EventDeliverySchema
:param retry_policy: The retry policy for events. This can be used to
configure maximum number of delivery attempts and time to live for events.
:type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy
- :param dead_letter_destination: The DeadLetter destination of the event
- subscription.
+ :param dead_letter_destination: The dead letter destination of the event
+ subscription. Any event that cannot be delivered to its' destination is
+ sent to the dead letter destination.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type dead_letter_destination:
~azure.mgmt.eventgrid.models.DeadLetterDestination
+ :param dead_letter_with_resource_identity: The dead letter destination of
+ the event subscription. Any event that cannot be delivered to its'
+ destination is sent to the dead letter destination.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity
+ :ivar system_data: The system metadata relating to Event Subscription
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -575,6 +923,7 @@ class EventSubscription(Resource):
'type': {'readonly': True},
'topic': {'readonly': True},
'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -584,12 +933,15 @@ class EventSubscription(Resource):
'topic': {'key': 'properties.topic', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'},
+ 'delivery_with_resource_identity': {'key': 'properties.deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'},
'filter': {'key': 'properties.filter', 'type': 'EventSubscriptionFilter'},
'labels': {'key': 'properties.labels', 'type': '[str]'},
'expiration_time_utc': {'key': 'properties.expirationTimeUtc', 'type': 'iso-8601'},
'event_delivery_schema': {'key': 'properties.eventDeliverySchema', 'type': 'str'},
'retry_policy': {'key': 'properties.retryPolicy', 'type': 'RetryPolicy'},
'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'},
+ 'dead_letter_with_resource_identity': {'key': 'properties.deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(self, **kwargs):
@@ -597,12 +949,15 @@ def __init__(self, **kwargs):
self.topic = None
self.provisioning_state = None
self.destination = kwargs.get('destination', None)
+ self.delivery_with_resource_identity = kwargs.get('delivery_with_resource_identity', None)
self.filter = kwargs.get('filter', None)
self.labels = kwargs.get('labels', None)
self.expiration_time_utc = kwargs.get('expiration_time_utc', None)
- self.event_delivery_schema = kwargs.get('event_delivery_schema', None)
+ self.event_delivery_schema = kwargs.get('event_delivery_schema', "EventGridSchema")
self.retry_policy = kwargs.get('retry_policy', None)
self.dead_letter_destination = kwargs.get('dead_letter_destination', None)
+ self.dead_letter_with_resource_identity = kwargs.get('dead_letter_with_resource_identity', None)
+ self.system_data = None
class EventSubscriptionFilter(Model):
@@ -625,6 +980,10 @@ class EventSubscriptionFilter(Model):
SubjectEndsWith properties of the filter
should be compared in a case sensitive manner. Default value: False .
:type is_subject_case_sensitive: bool
+ :param enable_advanced_filtering_on_arrays: Allows advanced filters to be
+ evaluated against an array of values instead of expecting a singular
+ value.
+ :type enable_advanced_filtering_on_arrays: bool
:param advanced_filters: An array of advanced filters that are used for
filtering event subscriptions.
:type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter]
@@ -635,6 +994,7 @@ class EventSubscriptionFilter(Model):
'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'},
'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'},
'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'},
+ 'enable_advanced_filtering_on_arrays': {'key': 'enableAdvancedFilteringOnArrays', 'type': 'bool'},
'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'},
}
@@ -644,6 +1004,7 @@ def __init__(self, **kwargs):
self.subject_ends_with = kwargs.get('subject_ends_with', None)
self.included_event_types = kwargs.get('included_event_types', None)
self.is_subject_case_sensitive = kwargs.get('is_subject_case_sensitive', False)
+ self.enable_advanced_filtering_on_arrays = kwargs.get('enable_advanced_filtering_on_arrays', None)
self.advanced_filters = kwargs.get('advanced_filters', None)
@@ -664,13 +1025,47 @@ def __init__(self, **kwargs):
self.endpoint_url = kwargs.get('endpoint_url', None)
+class EventSubscriptionIdentity(Model):
+ """The identity information with the event subscription.
+
+ :param type: The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of
+ user-assigned identities. The type 'None' will remove any identity.
+ Possible values include: 'SystemAssigned', 'UserAssigned'
+ :type type: str or
+ ~azure.mgmt.eventgrid.models.EventSubscriptionIdentityType
+ :param user_assigned_identity: The user identity associated with the
+ resource.
+ :type user_assigned_identity: str
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EventSubscriptionIdentity, self).__init__(**kwargs)
+ self.type = kwargs.get('type', None)
+ self.user_assigned_identity = kwargs.get('user_assigned_identity', None)
+
+
class EventSubscriptionUpdateParameters(Model):
"""Properties of the Event Subscription update.
:param destination: Information about the destination where events have to
be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type destination:
~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ :param delivery_with_resource_identity: Information about the destination
+ where events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (topic / domain) to
+ acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type delivery_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity
:param filter: Information about the filter for the event subscription.
:type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter
:param labels: List of user defined labels.
@@ -686,31 +1081,46 @@ class EventSubscriptionUpdateParameters(Model):
:param retry_policy: The retry policy for events. This can be used to
configure maximum number of delivery attempts and time to live for events.
:type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy
- :param dead_letter_destination: The DeadLetter destination of the event
- subscription.
+ :param dead_letter_destination: The dead letter destination of the event
+ subscription. Any event that cannot be delivered to its' destination is
+ sent to the dead letter destination.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type dead_letter_destination:
~azure.mgmt.eventgrid.models.DeadLetterDestination
+ :param dead_letter_with_resource_identity: The dead letter destination of
+ the event subscription. Any event that cannot be delivered to its'
+ destination is sent to the dead letter destination.
+ Uses the managed identity setup on the parent resource (topic / domain) to
+ acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity
"""
_attribute_map = {
'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'},
+ 'delivery_with_resource_identity': {'key': 'deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'},
'filter': {'key': 'filter', 'type': 'EventSubscriptionFilter'},
'labels': {'key': 'labels', 'type': '[str]'},
'expiration_time_utc': {'key': 'expirationTimeUtc', 'type': 'iso-8601'},
'event_delivery_schema': {'key': 'eventDeliverySchema', 'type': 'str'},
'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'},
'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'},
+ 'dead_letter_with_resource_identity': {'key': 'deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'},
}
def __init__(self, **kwargs):
super(EventSubscriptionUpdateParameters, self).__init__(**kwargs)
self.destination = kwargs.get('destination', None)
+ self.delivery_with_resource_identity = kwargs.get('delivery_with_resource_identity', None)
self.filter = kwargs.get('filter', None)
self.labels = kwargs.get('labels', None)
self.expiration_time_utc = kwargs.get('expiration_time_utc', None)
self.event_delivery_schema = kwargs.get('event_delivery_schema', None)
self.retry_policy = kwargs.get('retry_policy', None)
self.dead_letter_destination = kwargs.get('dead_letter_destination', None)
+ self.dead_letter_with_resource_identity = kwargs.get('dead_letter_with_resource_identity', None)
class EventType(Resource):
@@ -759,6 +1169,66 @@ def __init__(self, **kwargs):
self.is_in_default_set = kwargs.get('is_in_default_set', None)
+class ExtendedLocation(Model):
+ """Definition of an Extended Location.
+
+ :param name: Fully qualified name of the extended location.
+ :type name: str
+ :param type: Type of the extended location.
+ :type type: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ExtendedLocation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.type = kwargs.get('type', None)
+
+
+class ExtensionTopic(Resource):
+ """Event grid Extension Topic. This is used for getting Event Grid related
+ metrics for Azure resources.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param description: Description of the extension topic.
+ :type description: str
+ :param system_topic: System topic resource id which is mapped to the
+ source.
+ :type system_topic: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'system_topic': {'key': 'properties.systemTopic', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ExtensionTopic, self).__init__(**kwargs)
+ self.description = kwargs.get('description', None)
+ self.system_topic = kwargs.get('system_topic', None)
+
+
class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination):
"""Information about the HybridConnection destination for an event
subscription.
@@ -770,6 +1240,9 @@ class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination)
:param resource_id: The Azure Resource ID of an hybrid connection that is
the destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -779,14 +1252,53 @@ class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination)
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(HybridConnectionEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'HybridConnection'
+class IdentityInfo(Model):
+ """The identity information for the resource.
+
+ :param type: The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of
+ user-assigned identities. The type 'None' will remove any identity.
+ Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
+ 'SystemAssigned, UserAssigned'
+ :type type: str or ~azure.mgmt.eventgrid.models.IdentityType
+ :param principal_id: The principal ID of resource identity.
+ :type principal_id: str
+ :param tenant_id: The tenant ID of resource.
+ :type tenant_id: str
+ :param user_assigned_identities: The list of user identities associated
+ with the resource. The user identity dictionary key references will be ARM
+ resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ This property is currently not used and reserved for future usage.
+ :type user_assigned_identities: dict[str,
+ ~azure.mgmt.eventgrid.models.UserIdentityProperties]
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(IdentityInfo, self).__init__(**kwargs)
+ self.type = kwargs.get('type', None)
+ self.principal_id = kwargs.get('principal_id', None)
+ self.tenant_id = kwargs.get('tenant_id', None)
+ self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
+
+
class InboundIpRule(Model):
"""InboundIpRule.
@@ -840,38 +1352,90 @@ def __init__(self, **kwargs):
self.input_schema_mapping_type = None
-class JsonField(Model):
- """This is used to express the source of an input schema mapping for a single
- target field in the Event Grid Event schema. This is currently used in the
- mappings for the 'id', 'topic' and 'eventtime' properties. This represents
- a field in the input event schema.
+class IsNotNullAdvancedFilter(AdvancedFilter):
+ """IsNotNull Advanced Filter.
- :param source_field: Name of a field in the input event schema that's to
- be used as the source of a mapping.
- :type source_field: str
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
"""
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
_attribute_map = {
- 'source_field': {'key': 'sourceField', 'type': 'str'},
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
}
def __init__(self, **kwargs):
- super(JsonField, self).__init__(**kwargs)
- self.source_field = kwargs.get('source_field', None)
+ super(IsNotNullAdvancedFilter, self).__init__(**kwargs)
+ self.operator_type = 'IsNotNull'
-class JsonFieldWithDefault(Model):
- """This is used to express the source of an input schema mapping for a single
- target field
- in the Event Grid Event schema. This is currently used in the mappings for
- the 'subject',
- 'eventtype' and 'dataversion' properties. This represents a field in the
- input event schema
- along with a default value to be used, and at least one of these two
- properties should be provided.
+class IsNullOrUndefinedAdvancedFilter(AdvancedFilter):
+ """IsNullOrUndefined Advanced Filter.
- :param source_field: Name of a field in the input event schema that's to
- be used as the source of a mapping.
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(IsNullOrUndefinedAdvancedFilter, self).__init__(**kwargs)
+ self.operator_type = 'IsNullOrUndefined'
+
+
+class JsonField(Model):
+ """This is used to express the source of an input schema mapping for a single
+ target field in the Event Grid Event schema. This is currently used in the
+ mappings for the 'id', 'topic' and 'eventtime' properties. This represents
+ a field in the input event schema.
+
+ :param source_field: Name of a field in the input event schema that's to
+ be used as the source of a mapping.
+ :type source_field: str
+ """
+
+ _attribute_map = {
+ 'source_field': {'key': 'sourceField', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(JsonField, self).__init__(**kwargs)
+ self.source_field = kwargs.get('source_field', None)
+
+
+class JsonFieldWithDefault(Model):
+ """This is used to express the source of an input schema mapping for a single
+ target field
+ in the Event Grid Event schema. This is currently used in the mappings for
+ the 'subject',
+ 'eventtype' and 'dataversion' properties. This represents a field in the
+ input event schema
+ along with a default value to be used, and at least one of these two
+ properties should be provided.
+
+ :param source_field: Name of a field in the input event schema that's to
+ be used as the source of a mapping.
:type source_field: str
:param default_value: The default value to be used for mapping when a
SourceField is not provided or if there's no property with the specified
@@ -1034,6 +1598,36 @@ def __init__(self, **kwargs):
self.operator_type = 'NumberIn'
+class NumberInRangeAdvancedFilter(AdvancedFilter):
+ """NumberInRange Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[list[float]]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[[float]]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(NumberInRangeAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'NumberInRange'
+
+
class NumberLessThanAdvancedFilter(AdvancedFilter):
"""NumberLessThan Advanced Filter.
@@ -1109,75 +1703,601 @@ class NumberNotInAdvancedFilter(AdvancedFilter):
"""
_validation = {
- 'operator_type': {'required': True},
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[float]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(NumberNotInAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'NumberNotIn'
+
+
+class NumberNotInRangeAdvancedFilter(AdvancedFilter):
+ """NumberNotInRange Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[list[float]]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[[float]]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(NumberNotInRangeAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'NumberNotInRange'
+
+
+class Operation(Model):
+ """Represents an operation returned by the GetOperations request.
+
+ :param name: Name of the operation
+ :type name: str
+ :param display: Display name of the operation
+ :type display: ~azure.mgmt.eventgrid.models.OperationInfo
+ :param origin: Origin of the operation
+ :type origin: str
+ :param properties: Properties of the operation
+ :type properties: object
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'OperationInfo'},
+ 'origin': {'key': 'origin', 'type': 'str'},
+ 'properties': {'key': 'properties', 'type': 'object'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Operation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display = kwargs.get('display', None)
+ self.origin = kwargs.get('origin', None)
+ self.properties = kwargs.get('properties', None)
+
+
+class OperationInfo(Model):
+ """Information about an operation.
+
+ :param provider: Name of the provider
+ :type provider: str
+ :param resource: Name of the resource type
+ :type resource: str
+ :param operation: Name of the operation
+ :type operation: str
+ :param description: Description of the operation
+ :type description: str
+ """
+
+ _attribute_map = {
+ 'provider': {'key': 'provider', 'type': 'str'},
+ 'resource': {'key': 'resource', 'type': 'str'},
+ 'operation': {'key': 'operation', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(OperationInfo, self).__init__(**kwargs)
+ self.provider = kwargs.get('provider', None)
+ self.resource = kwargs.get('resource', None)
+ self.operation = kwargs.get('operation', None)
+ self.description = kwargs.get('description', None)
+
+
+class PartnerNamespace(TrackedResource):
+ """EventGrid Partner Namespace.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the partner namespace.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerNamespaceProvisioningState
+ :param partner_registration_fully_qualified_id: The fully qualified ARM Id
+ of the partner registration that should be associated with this partner
+ namespace. This takes the following format:
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}.
+ :type partner_registration_fully_qualified_id: str
+ :ivar endpoint: Endpoint for the partner namespace.
+ :vartype endpoint: str
+ :ivar system_data: The system metadata relating to Partner Namespace
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'endpoint': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_registration_fully_qualified_id': {'key': 'properties.partnerRegistrationFullyQualifiedId', 'type': 'str'},
+ 'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerNamespace, self).__init__(**kwargs)
+ self.provisioning_state = None
+ self.partner_registration_fully_qualified_id = kwargs.get('partner_registration_fully_qualified_id', None)
+ self.endpoint = None
+ self.system_data = None
+
+
+class PartnerNamespaceRegenerateKeyRequest(Model):
+ """PartnerNamespace regenerate shared access key request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key_name: Required. Key name to regenerate (key1 or key2).
+ :type key_name: str
+ """
+
+ _validation = {
+ 'key_name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_name': {'key': 'keyName', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerNamespaceRegenerateKeyRequest, self).__init__(**kwargs)
+ self.key_name = kwargs.get('key_name', None)
+
+
+class PartnerNamespaceSharedAccessKeys(Model):
+ """Shared access keys of the partner namespace.
+
+ :param key1: Shared access key1 for the partner namespace.
+ :type key1: str
+ :param key2: Shared access key2 for the partner namespace.
+ :type key2: str
+ """
+
+ _attribute_map = {
+ 'key1': {'key': 'key1', 'type': 'str'},
+ 'key2': {'key': 'key2', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerNamespaceSharedAccessKeys, self).__init__(**kwargs)
+ self.key1 = kwargs.get('key1', None)
+ self.key2 = kwargs.get('key2', None)
+
+
+class PartnerNamespaceUpdateParameters(Model):
+ """Properties of the PartnerNamespace update.
+
+ :param tags: Tags of the partner namespace.
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerNamespaceUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+
+
+class PartnerRegistration(TrackedResource):
+ """Information about a partner registration.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the partner registration.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationProvisioningState
+ :param partner_name: Official name of the partner name. For example:
+ "Contoso".
+ :type partner_name: str
+ :param partner_resource_type_name: Name of the partner resource type.
+ :type partner_resource_type_name: str
+ :param partner_resource_type_display_name: Display name of the partner
+ resource type.
+ :type partner_resource_type_display_name: str
+ :param partner_resource_type_description: Short description of the partner
+ resource type. The length of this description should not exceed 256
+ characters.
+ :type partner_resource_type_description: str
+ :param long_description: Long description for the custom scenarios and
+ integration to be displayed in the portal if needed.
+ Length of this description should not exceed 2048 characters.
+ :type long_description: str
+ :param partner_customer_service_number: The customer service number of the
+ publisher. The expected phone format should start with a '+' sign
+ followed by the country code. The remaining digits are then followed. Only
+ digits and spaces are allowed and its
+ length cannot exceed 16 digits including country code. Examples of valid
+ phone numbers are: +1 515 123 4567 and
+ +966 7 5115 2471. Examples of invalid phone numbers are: +1 (515)
+ 123-4567, 1 515 123 4567 and +966 121 5115 24 7 551 1234 43
+ :type partner_customer_service_number: str
+ :param partner_customer_service_extension: The extension of the customer
+ service number of the publisher. Only digits are allowed and number of
+ digits should not exceed 10.
+ :type partner_customer_service_extension: str
+ :param customer_service_uri: The extension of the customer service URI of
+ the publisher.
+ :type customer_service_uri: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param logo_uri: URI of the logo.
+ :type logo_uri: str
+ :param visibility_state: Visibility state of the partner registration.
+ Possible values include: 'Hidden', 'PublicPreview', 'GenerallyAvailable'
+ :type visibility_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationVisibilityState
+ :param authorized_azure_subscription_ids: List of Azure subscription Ids
+ that are authorized to create a partner namespace
+ associated with this partner registration. This is an optional property.
+ Creating
+ partner namespaces is always permitted under the same Azure subscription
+ as the one used
+ for creating the partner registration.
+ :type authorized_azure_subscription_ids: list[str]
+ :ivar system_data: The system metadata relating to Partner Registration
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_name': {'key': 'properties.partnerName', 'type': 'str'},
+ 'partner_resource_type_name': {'key': 'properties.partnerResourceTypeName', 'type': 'str'},
+ 'partner_resource_type_display_name': {'key': 'properties.partnerResourceTypeDisplayName', 'type': 'str'},
+ 'partner_resource_type_description': {'key': 'properties.partnerResourceTypeDescription', 'type': 'str'},
+ 'long_description': {'key': 'properties.longDescription', 'type': 'str'},
+ 'partner_customer_service_number': {'key': 'properties.partnerCustomerServiceNumber', 'type': 'str'},
+ 'partner_customer_service_extension': {'key': 'properties.partnerCustomerServiceExtension', 'type': 'str'},
+ 'customer_service_uri': {'key': 'properties.customerServiceUri', 'type': 'str'},
+ 'setup_uri': {'key': 'properties.setupUri', 'type': 'str'},
+ 'logo_uri': {'key': 'properties.logoUri', 'type': 'str'},
+ 'visibility_state': {'key': 'properties.visibilityState', 'type': 'str'},
+ 'authorized_azure_subscription_ids': {'key': 'properties.authorizedAzureSubscriptionIds', 'type': '[str]'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerRegistration, self).__init__(**kwargs)
+ self.provisioning_state = None
+ self.partner_name = kwargs.get('partner_name', None)
+ self.partner_resource_type_name = kwargs.get('partner_resource_type_name', None)
+ self.partner_resource_type_display_name = kwargs.get('partner_resource_type_display_name', None)
+ self.partner_resource_type_description = kwargs.get('partner_resource_type_description', None)
+ self.long_description = kwargs.get('long_description', None)
+ self.partner_customer_service_number = kwargs.get('partner_customer_service_number', None)
+ self.partner_customer_service_extension = kwargs.get('partner_customer_service_extension', None)
+ self.customer_service_uri = kwargs.get('customer_service_uri', None)
+ self.setup_uri = kwargs.get('setup_uri', None)
+ self.logo_uri = kwargs.get('logo_uri', None)
+ self.visibility_state = kwargs.get('visibility_state', None)
+ self.authorized_azure_subscription_ids = kwargs.get('authorized_azure_subscription_ids', None)
+ self.system_data = None
+
+
+class PartnerRegistrationEventTypesListResult(Model):
+ """Result of the List Partner Registration Event Types operation.
+
+ :param value: A collection of partner registration event types.
+ :type value: list[~azure.mgmt.eventgrid.models.EventType]
+ :param next_link: A link for the next page of partner registration event
+ types.
+ :type next_link: str
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[EventType]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerRegistrationEventTypesListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = kwargs.get('next_link', None)
+
+
+class PartnerRegistrationUpdateParameters(Model):
+ """Properties of the Partner Registration update.
+
+ :param tags: Tags of the partner registration resource.
+ :type tags: dict[str, str]
+ :param partner_topic_type_name: Name of the partner topic type.
+ :type partner_topic_type_name: str
+ :param partner_topic_type_display_name: Display name of the partner topic
+ type.
+ :type partner_topic_type_display_name: str
+ :param partner_topic_type_description: Description of the partner topic
+ type.
+ :type partner_topic_type_description: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param logo_uri: URI of the partner logo.
+ :type logo_uri: str
+ :param authorized_azure_subscription_ids: List of IDs of Azure AD
+ applications that are authorized to create a partner namespace
+ associated with this partner registration. This is an optional property.
+ Creating
+ partner namespaces is always permitted under the same Azure subscription
+ as the one used
+ for creating the partner registration.
+ :type authorized_azure_subscription_ids: list[str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'partner_topic_type_name': {'key': 'partnerTopicTypeName', 'type': 'str'},
+ 'partner_topic_type_display_name': {'key': 'partnerTopicTypeDisplayName', 'type': 'str'},
+ 'partner_topic_type_description': {'key': 'partnerTopicTypeDescription', 'type': 'str'},
+ 'setup_uri': {'key': 'setupUri', 'type': 'str'},
+ 'logo_uri': {'key': 'logoUri', 'type': 'str'},
+ 'authorized_azure_subscription_ids': {'key': 'authorizedAzureSubscriptionIds', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerRegistrationUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+ self.partner_topic_type_name = kwargs.get('partner_topic_type_name', None)
+ self.partner_topic_type_display_name = kwargs.get('partner_topic_type_display_name', None)
+ self.partner_topic_type_description = kwargs.get('partner_topic_type_description', None)
+ self.setup_uri = kwargs.get('setup_uri', None)
+ self.logo_uri = kwargs.get('logo_uri', None)
+ self.authorized_azure_subscription_ids = kwargs.get('authorized_azure_subscription_ids', None)
+
+
+class PartnerTopic(TrackedResource):
+ """EventGrid Partner Topic.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :param source: Source associated with this partner topic. This represents
+ a unique partner resource.
+ :type source: str
+ :param expiration_time_if_not_activated_utc: Expiration time of the
+ partner topic. If this timer expires while the partner topic is still
+ never activated,
+ the partner topic and corresponding event channel are deleted.
+ :type expiration_time_if_not_activated_utc: datetime
+ :ivar provisioning_state: Provisioning state of the partner topic.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicProvisioningState
+ :param activation_state: Activation state of the partner topic. Possible
+ values include: 'NeverActivated', 'Activated', 'Deactivated'
+ :type activation_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicActivationState
+ :param partner_topic_friendly_description: Friendly description about the
+ topic. This can be set by the publisher/partner to show custom description
+ for the customer partner topic.
+ This will be helpful to remove any ambiguity of the origin of creation of
+ the partner topic for the customer.
+ :type partner_topic_friendly_description: str
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to Partner Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'source': {'key': 'properties.source', 'type': 'str'},
+ 'expiration_time_if_not_activated_utc': {'key': 'properties.expirationTimeIfNotActivatedUtc', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'activation_state': {'key': 'properties.activationState', 'type': 'str'},
+ 'partner_topic_friendly_description': {'key': 'properties.partnerTopicFriendlyDescription', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PartnerTopic, self).__init__(**kwargs)
+ self.source = kwargs.get('source', None)
+ self.expiration_time_if_not_activated_utc = kwargs.get('expiration_time_if_not_activated_utc', None)
+ self.provisioning_state = None
+ self.activation_state = kwargs.get('activation_state', None)
+ self.partner_topic_friendly_description = kwargs.get('partner_topic_friendly_description', None)
+ self.identity = kwargs.get('identity', None)
+ self.system_data = None
+
+
+class PartnerTopicType(Resource):
+ """Properties of a partner topic type.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param partner_name: Official name of the partner.
+ :type partner_name: str
+ :param topic_type_name: Name of the partner topic type. This name should
+ be unique among all partner topic types names.
+ :type topic_type_name: str
+ :param display_name: Display Name for the partner topic type.
+ :type display_name: str
+ :param description: Description of the partner topic type.
+ :type description: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param authorization_state: Status of whether the customer has authorized
+ a partner to create partner topics
+ in the customer's subscription. Possible values include: 'NotApplicable',
+ 'NotAuthorized', 'Authorized'
+ :type authorization_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicTypeAuthorizationState
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
}
_attribute_map = {
- 'key': {'key': 'key', 'type': 'str'},
- 'operator_type': {'key': 'operatorType', 'type': 'str'},
- 'values': {'key': 'values', 'type': '[float]'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'partner_name': {'key': 'properties.partnerName', 'type': 'str'},
+ 'topic_type_name': {'key': 'properties.topicTypeName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'setup_uri': {'key': 'properties.setupUri', 'type': 'str'},
+ 'authorization_state': {'key': 'properties.authorizationState', 'type': 'str'},
}
def __init__(self, **kwargs):
- super(NumberNotInAdvancedFilter, self).__init__(**kwargs)
- self.values = kwargs.get('values', None)
- self.operator_type = 'NumberNotIn'
+ super(PartnerTopicType, self).__init__(**kwargs)
+ self.partner_name = kwargs.get('partner_name', None)
+ self.topic_type_name = kwargs.get('topic_type_name', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.description = kwargs.get('description', None)
+ self.setup_uri = kwargs.get('setup_uri', None)
+ self.authorization_state = kwargs.get('authorization_state', None)
-class Operation(Model):
- """Represents an operation returned by the GetOperations request.
+class PartnerTopicTypesListResult(Model):
+ """Result of the List Partner Topic Types operation.
- :param name: Name of the operation
- :type name: str
- :param display: Display name of the operation
- :type display: ~azure.mgmt.eventgrid.models.OperationInfo
- :param origin: Origin of the operation
- :type origin: str
- :param properties: Properties of the operation
- :type properties: object
+ :param value: A collection of partner topic types.
+ :type value: list[~azure.mgmt.eventgrid.models.PartnerTopicType]
"""
_attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'display': {'key': 'display', 'type': 'OperationInfo'},
- 'origin': {'key': 'origin', 'type': 'str'},
- 'properties': {'key': 'properties', 'type': 'object'},
+ 'value': {'key': 'value', 'type': '[PartnerTopicType]'},
}
def __init__(self, **kwargs):
- super(Operation, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.display = kwargs.get('display', None)
- self.origin = kwargs.get('origin', None)
- self.properties = kwargs.get('properties', None)
+ super(PartnerTopicTypesListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
-class OperationInfo(Model):
- """Information about an operation.
+class PartnerTopicUpdateParameters(Model):
+ """Properties of the Partner Topic update.
- :param provider: Name of the provider
- :type provider: str
- :param resource: Name of the resource type
- :type resource: str
- :param operation: Name of the operation
- :type operation: str
- :param description: Description of the operation
- :type description: str
+ :param tags: Tags of the partner topic.
+ :type tags: dict[str, str]
"""
_attribute_map = {
- 'provider': {'key': 'provider', 'type': 'str'},
- 'resource': {'key': 'resource', 'type': 'str'},
- 'operation': {'key': 'operation', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, **kwargs):
- super(OperationInfo, self).__init__(**kwargs)
- self.provider = kwargs.get('provider', None)
- self.resource = kwargs.get('resource', None)
- self.operation = kwargs.get('operation', None)
- self.description = kwargs.get('description', None)
+ super(PartnerTopicUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
class PrivateEndpoint(Model):
@@ -1261,9 +2381,9 @@ class PrivateLinkResource(Model):
:type required_zone_names: list[str]
:param id: Fully qualified identifier of the resource.
:type id: str
- :param name: Name of the resource
+ :param name: Name of the resource.
:type name: str
- :param type: Type of the resource
+ :param type: Type of the resource.
:type type: str
"""
@@ -1288,14 +2408,31 @@ def __init__(self, **kwargs):
self.type = kwargs.get('type', None)
+class ResourceSku(Model):
+ """Describes an EventGrid Resource Sku.
+
+ :param name: The Sku name of the resource. The possible values are: Basic
+ or Premium. Possible values include: 'Basic', 'Premium'
+ :type name: str or ~azure.mgmt.eventgrid.models.Sku
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ResourceSku, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+
+
class RetryPolicy(Model):
"""Information about the retry policy for an event subscription.
:param max_delivery_attempts: Maximum number of delivery retry attempts
- for events.
+ for events. Default value: 30 .
:type max_delivery_attempts: int
:param event_time_to_live_in_minutes: Time To Live (in minutes) for
- events.
+ events. Default value: 1440 .
:type event_time_to_live_in_minutes: int
"""
@@ -1306,8 +2443,8 @@ class RetryPolicy(Model):
def __init__(self, **kwargs):
super(RetryPolicy, self).__init__(**kwargs)
- self.max_delivery_attempts = kwargs.get('max_delivery_attempts', None)
- self.event_time_to_live_in_minutes = kwargs.get('event_time_to_live_in_minutes', None)
+ self.max_delivery_attempts = kwargs.get('max_delivery_attempts', 30)
+ self.event_time_to_live_in_minutes = kwargs.get('event_time_to_live_in_minutes', 1440)
class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination):
@@ -1320,6 +2457,9 @@ class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Service Bus destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1329,11 +2469,13 @@ class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(ServiceBusQueueEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'ServiceBusQueue'
@@ -1348,6 +2490,9 @@ class ServiceBusTopicEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Service Bus Topic destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1357,14 +2502,50 @@ class ServiceBusTopicEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(ServiceBusTopicEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'ServiceBusTopic'
+class StaticDeliveryAttributeMapping(DeliveryAttributeMapping):
+ """Static delivery attribute mapping details.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ :param value: Value of the delivery attribute.
+ :type value: str
+ :param is_secret: Boolean flag to tell if the attribute contains sensitive
+ information .
+ :type is_secret: bool
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'value': {'key': 'properties.value', 'type': 'str'},
+ 'is_secret': {'key': 'properties.isSecret', 'type': 'bool'},
+ }
+
+ def __init__(self, **kwargs):
+ super(StaticDeliveryAttributeMapping, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.is_secret = kwargs.get('is_secret', None)
+ self.type = 'Static'
+
+
class StorageBlobDeadLetterDestination(DeadLetterDestination):
"""Information about the storage blob based dead letter destination.
@@ -1410,6 +2591,9 @@ class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination):
:param queue_name: The name of the Storage queue under a storage account
that is the destination of an event subscription.
:type queue_name: str
+ :param queue_message_time_to_live_in_seconds: Storage queue message time
+ to live in seconds.
+ :type queue_message_time_to_live_in_seconds: long
"""
_validation = {
@@ -1420,12 +2604,14 @@ class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination):
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'queue_name': {'key': 'properties.queueName', 'type': 'str'},
+ 'queue_message_time_to_live_in_seconds': {'key': 'properties.queueMessageTimeToLiveInSeconds', 'type': 'long'},
}
def __init__(self, **kwargs):
super(StorageQueueEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
self.queue_name = kwargs.get('queue_name', None)
+ self.queue_message_time_to_live_in_seconds = kwargs.get('queue_message_time_to_live_in_seconds', None)
self.endpoint_type = 'StorageQueue'
@@ -1549,6 +2735,96 @@ def __init__(self, **kwargs):
self.operator_type = 'StringIn'
+class StringNotBeginsWithAdvancedFilter(AdvancedFilter):
+ """StringNotBeginsWith Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(StringNotBeginsWithAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'StringNotBeginsWith'
+
+
+class StringNotContainsAdvancedFilter(AdvancedFilter):
+ """StringNotContains Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(StringNotContainsAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'StringNotContains'
+
+
+class StringNotEndsWithAdvancedFilter(AdvancedFilter):
+ """StringNotEndsWith Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(StringNotEndsWithAdvancedFilter, self).__init__(**kwargs)
+ self.values = kwargs.get('values', None)
+ self.operator_type = 'StringNotEndsWith'
+
+
class StringNotInAdvancedFilter(AdvancedFilter):
"""StringNotIn Advanced Filter.
@@ -1579,6 +2855,135 @@ def __init__(self, **kwargs):
self.operator_type = 'StringNotIn'
+class SystemData(Model):
+ """Metadata pertaining to creation and last modification of the resource.
+
+ :param created_by: The identity that created the resource.
+ :type created_by: str
+ :param created_by_type: The type of identity that created the resource.
+ Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
+ :type created_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType
+ :param created_at: The timestamp of resource creation (UTC).
+ :type created_at: datetime
+ :param last_modified_by: The identity that last modified the resource.
+ :type last_modified_by: str
+ :param last_modified_by_type: The type of identity that last modified the
+ resource. Possible values include: 'User', 'Application',
+ 'ManagedIdentity', 'Key'
+ :type last_modified_by_type: str or
+ ~azure.mgmt.eventgrid.models.CreatedByType
+ :param last_modified_at: The timestamp of resource last modification (UTC)
+ :type last_modified_at: datetime
+ """
+
+ _attribute_map = {
+ 'created_by': {'key': 'createdBy', 'type': 'str'},
+ 'created_by_type': {'key': 'createdByType', 'type': 'str'},
+ 'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
+ 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
+ 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
+ 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, **kwargs):
+ super(SystemData, self).__init__(**kwargs)
+ self.created_by = kwargs.get('created_by', None)
+ self.created_by_type = kwargs.get('created_by_type', None)
+ self.created_at = kwargs.get('created_at', None)
+ self.last_modified_by = kwargs.get('last_modified_by', None)
+ self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
+ self.last_modified_at = kwargs.get('last_modified_at', None)
+
+
+class SystemTopic(TrackedResource):
+ """EventGrid System Topic.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the system topic. Possible
+ values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.ResourceProvisioningState
+ :param source: Source for the system topic.
+ :type source: str
+ :param topic_type: TopicType for the system topic.
+ :type topic_type: str
+ :ivar metric_resource_id: Metric resource id for the system topic.
+ :vartype metric_resource_id: str
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to this resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'source': {'key': 'properties.source', 'type': 'str'},
+ 'topic_type': {'key': 'properties.topicType', 'type': 'str'},
+ 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, **kwargs):
+ super(SystemTopic, self).__init__(**kwargs)
+ self.provisioning_state = None
+ self.source = kwargs.get('source', None)
+ self.topic_type = kwargs.get('topic_type', None)
+ self.metric_resource_id = None
+ self.identity = kwargs.get('identity', None)
+ self.system_data = None
+
+
+class SystemTopicUpdateParameters(Model):
+ """Properties of the System Topic update.
+
+ :param tags: Tags of the system topic.
+ :type tags: dict[str, str]
+ :param identity: Resource identity information.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ }
+
+ def __init__(self, **kwargs):
+ super(SystemTopicUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+ self.identity = kwargs.get('identity', None)
+
+
class Topic(TrackedResource):
"""EventGrid Topic.
@@ -1624,13 +3029,25 @@ class Topic(TrackedResource):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the topic.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :param kind: Kind of the resource. Possible values include: 'Azure',
+ 'AzureArc'
+ :type kind: str or ~azure.mgmt.eventgrid.models.ResourceKind
+ :param extended_location: Extended location of the resource.
+ :type extended_location: ~azure.mgmt.eventgrid.models.ExtendedLocation
+ :ivar system_data: The system metadata relating to Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -1641,6 +3058,7 @@ class Topic(TrackedResource):
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -1657,6 +3075,11 @@ class Topic(TrackedResource):
'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(self, **kwargs):
@@ -1667,8 +3090,13 @@ def __init__(self, **kwargs):
self.input_schema = kwargs.get('input_schema', "EventGridSchema")
self.input_schema_mapping = kwargs.get('input_schema_mapping', None)
self.metric_resource_id = None
- self.public_network_access = kwargs.get('public_network_access', None)
+ self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)
+ self.sku = kwargs.get('sku', None)
+ self.identity = kwargs.get('identity', None)
+ self.kind = kwargs.get('kind', None)
+ self.extended_location = kwargs.get('extended_location', None)
+ self.system_data = None
class TopicRegenerateKeyRequest(Model):
@@ -1745,6 +3173,8 @@ class TopicTypeInfo(Resource):
:type supported_locations: list[str]
:param source_resource_format: Source resource format.
:type source_resource_format: str
+ :param supported_scopes_for_source: Supported source scopes.
+ :type supported_scopes_for_source: list[str]
"""
_validation = {
@@ -1764,6 +3194,7 @@ class TopicTypeInfo(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'supported_locations': {'key': 'properties.supportedLocations', 'type': '[str]'},
'source_resource_format': {'key': 'properties.sourceResourceFormat', 'type': 'str'},
+ 'supported_scopes_for_source': {'key': 'properties.supportedScopesForSource', 'type': '[str]'},
}
def __init__(self, **kwargs):
@@ -1775,6 +3206,7 @@ def __init__(self, **kwargs):
self.provisioning_state = kwargs.get('provisioning_state', None)
self.supported_locations = kwargs.get('supported_locations', None)
self.source_resource_format = kwargs.get('source_resource_format', None)
+ self.supported_scopes_for_source = kwargs.get('supported_scopes_for_source', None)
class TopicUpdateParameters(Model):
@@ -1782,30 +3214,59 @@ class TopicUpdateParameters(Model):
:param tags: Tags of the resource.
:type tags: dict[str, str]
+ :param identity: Resource identity information.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
:param public_network_access: This determines if traffic is allowed over
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the topic.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
}
def __init__(self, **kwargs):
super(TopicUpdateParameters, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
- self.public_network_access = kwargs.get('public_network_access', None)
+ self.identity = kwargs.get('identity', None)
+ self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)
+ self.sku = kwargs.get('sku', None)
+
+
+class UserIdentityProperties(Model):
+ """The information about the user identity.
+
+ :param principal_id: The principal id of user assigned identity.
+ :type principal_id: str
+ :param client_id: The client id of user assigned identity.
+ :type client_id: str
+ """
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(UserIdentityProperties, self).__init__(**kwargs)
+ self.principal_id = kwargs.get('principal_id', None)
+ self.client_id = kwargs.get('client_id', None)
class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
@@ -1824,10 +3285,11 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
:ivar endpoint_base_url: The base URL that represents the endpoint of the
destination of an event subscription.
:vartype endpoint_base_url: str
- :param max_events_per_batch: Maximum number of events per batch.
+ :param max_events_per_batch: Maximum number of events per batch. Default
+ value: 1 .
:type max_events_per_batch: int
:param preferred_batch_size_in_kilobytes: Preferred batch size in
- Kilobytes.
+ Kilobytes. Default value: 64 .
:type preferred_batch_size_in_kilobytes: int
:param azure_active_directory_tenant_id: The Azure Active Directory Tenant
ID to get the access token that will be included as the bearer token in
@@ -1837,6 +3299,9 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
Directory Application ID or URI to get the access token that will be
included as the bearer token in delivery requests.
:type azure_active_directory_application_id_or_uri: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1852,14 +3317,16 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'},
'azure_active_directory_tenant_id': {'key': 'properties.azureActiveDirectoryTenantId', 'type': 'str'},
'azure_active_directory_application_id_or_uri': {'key': 'properties.azureActiveDirectoryApplicationIdOrUri', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
def __init__(self, **kwargs):
super(WebHookEventSubscriptionDestination, self).__init__(**kwargs)
self.endpoint_url = kwargs.get('endpoint_url', None)
self.endpoint_base_url = None
- self.max_events_per_batch = kwargs.get('max_events_per_batch', None)
- self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', None)
+ self.max_events_per_batch = kwargs.get('max_events_per_batch', 1)
+ self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', 64)
self.azure_active_directory_tenant_id = kwargs.get('azure_active_directory_tenant_id', None)
self.azure_active_directory_application_id_or_uri = kwargs.get('azure_active_directory_application_id_or_uri', None)
+ self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None)
self.endpoint_type = 'WebHook'
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models_py3.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models_py3.py
index a22f621c6092..9978a720d2f0 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models_py3.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models_py3.py
@@ -27,7 +27,10 @@ class AdvancedFilter(Model):
NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter,
StringInAdvancedFilter, StringNotInAdvancedFilter,
StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter,
- StringContainsAdvancedFilter
+ StringContainsAdvancedFilter, NumberInRangeAdvancedFilter,
+ NumberNotInRangeAdvancedFilter, StringNotBeginsWithAdvancedFilter,
+ StringNotEndsWithAdvancedFilter, StringNotContainsAdvancedFilter,
+ IsNullOrUndefinedAdvancedFilter, IsNotNullAdvancedFilter
All required parameters must be populated in order to send to Azure.
@@ -48,7 +51,7 @@ class AdvancedFilter(Model):
}
_subtype_map = {
- 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'}
+ 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter', 'NumberInRange': 'NumberInRangeAdvancedFilter', 'NumberNotInRange': 'NumberNotInRangeAdvancedFilter', 'StringNotBeginsWith': 'StringNotBeginsWithAdvancedFilter', 'StringNotEndsWith': 'StringNotEndsWithAdvancedFilter', 'StringNotContains': 'StringNotContainsAdvancedFilter', 'IsNullOrUndefined': 'IsNullOrUndefinedAdvancedFilter', 'IsNotNull': 'IsNotNullAdvancedFilter'}
}
def __init__(self, *, key: str=None, **kwargs) -> None:
@@ -102,11 +105,15 @@ class AzureFunctionEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Azure Function destination of an event subscription.
:type resource_id: str
- :param max_events_per_batch: Maximum number of events per batch.
+ :param max_events_per_batch: Maximum number of events per batch. Default
+ value: 1 .
:type max_events_per_batch: int
:param preferred_batch_size_in_kilobytes: Preferred batch size in
- Kilobytes.
+ Kilobytes. Default value: 64 .
:type preferred_batch_size_in_kilobytes: int
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -118,13 +125,15 @@ class AzureFunctionEventSubscriptionDestination(EventSubscriptionDestination):
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'max_events_per_batch': {'key': 'properties.maxEventsPerBatch', 'type': 'int'},
'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, resource_id: str=None, max_events_per_batch: int=None, preferred_batch_size_in_kilobytes: int=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, max_events_per_batch: int=1, preferred_batch_size_in_kilobytes: int=64, delivery_attribute_mappings=None, **kwargs) -> None:
super(AzureFunctionEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
self.max_events_per_batch = max_events_per_batch
self.preferred_batch_size_in_kilobytes = preferred_batch_size_in_kilobytes
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'AzureFunction'
@@ -225,6 +234,106 @@ def __init__(self, **kwargs) -> None:
self.endpoint_type = None
+class DeadLetterWithResourceIdentity(Model):
+ """Information about the deadletter destination with resource identity.
+
+ :param identity: The identity to use when dead-lettering events.
+ :type identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity
+ :param dead_letter_destination: Information about the destination where
+ events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_destination:
+ ~azure.mgmt.eventgrid.models.DeadLetterDestination
+ """
+
+ _attribute_map = {
+ 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'},
+ 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'},
+ }
+
+ def __init__(self, *, identity=None, dead_letter_destination=None, **kwargs) -> None:
+ super(DeadLetterWithResourceIdentity, self).__init__(**kwargs)
+ self.identity = identity
+ self.dead_letter_destination = dead_letter_destination
+
+
+class DeliveryAttributeListResult(Model):
+ """Result of the Get delivery attributes operation.
+
+ :param value: A collection of DeliveryAttributeMapping
+ :type value: list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[DeliveryAttributeMapping]'},
+ }
+
+ def __init__(self, *, value=None, **kwargs) -> None:
+ super(DeliveryAttributeListResult, self).__init__(**kwargs)
+ self.value = value
+
+
+class DeliveryAttributeMapping(Model):
+ """Delivery attribute mapping details.
+
+ You probably want to use the sub-classes and not this class directly. Known
+ sub-classes are: StaticDeliveryAttributeMapping,
+ DynamicDeliveryAttributeMapping
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ _subtype_map = {
+ 'type': {'Static': 'StaticDeliveryAttributeMapping', 'Dynamic': 'DynamicDeliveryAttributeMapping'}
+ }
+
+ def __init__(self, *, name: str=None, **kwargs) -> None:
+ super(DeliveryAttributeMapping, self).__init__(**kwargs)
+ self.name = name
+ self.type = None
+
+
+class DeliveryWithResourceIdentity(Model):
+ """Information about the delivery for an event subscription with resource
+ identity.
+
+ :param identity: The identity to use when delivering events.
+ :type identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity
+ :param destination: Information about the destination where events have to
+ be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
+ :type destination:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ """
+
+ _attribute_map = {
+ 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'},
+ 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'},
+ }
+
+ def __init__(self, *, identity=None, destination=None, **kwargs) -> None:
+ super(DeliveryWithResourceIdentity, self).__init__(**kwargs)
+ self.identity = identity
+ self.destination = destination
+
+
class Resource(Model):
"""Definition of a Resource.
@@ -342,13 +451,20 @@ class Domain(TrackedResource):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the domain.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to Domain resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -359,6 +475,7 @@ class Domain(TrackedResource):
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -375,9 +492,12 @@ class Domain(TrackedResource):
'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
- def __init__(self, *, location: str, tags=None, private_endpoint_connections=None, input_schema="EventGridSchema", input_schema_mapping=None, public_network_access=None, inbound_ip_rules=None, **kwargs) -> None:
+ def __init__(self, *, location: str, tags=None, private_endpoint_connections=None, input_schema="EventGridSchema", input_schema_mapping=None, public_network_access="Enabled", inbound_ip_rules=None, sku=None, identity=None, **kwargs) -> None:
super(Domain, self).__init__(location=location, tags=tags, **kwargs)
self.private_endpoint_connections = private_endpoint_connections
self.provisioning_state = None
@@ -387,6 +507,9 @@ def __init__(self, *, location: str, tags=None, private_endpoint_connections=Non
self.metric_resource_id = None
self.public_network_access = public_network_access
self.inbound_ip_rules = inbound_ip_rules
+ self.sku = sku
+ self.identity = identity
+ self.system_data = None
class DomainRegenerateKeyRequest(Model):
@@ -448,12 +571,15 @@ class DomainTopic(Resource):
'Canceled', 'Failed'
:type provisioning_state: str or
~azure.mgmt.eventgrid.models.DomainTopicProvisioningState
+ :ivar system_data: The system metadata relating to Domain Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -461,11 +587,13 @@ class DomainTopic(Resource):
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(self, *, provisioning_state=None, **kwargs) -> None:
super(DomainTopic, self).__init__(**kwargs)
self.provisioning_state = provisioning_state
+ self.system_data = None
class DomainUpdateParameters(Model):
@@ -477,26 +605,217 @@ class DomainUpdateParameters(Model):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :param sku: The Sku pricing tier for the domain.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
}
- def __init__(self, *, tags=None, public_network_access=None, inbound_ip_rules=None, **kwargs) -> None:
+ def __init__(self, *, tags=None, public_network_access="Enabled", inbound_ip_rules=None, identity=None, sku=None, **kwargs) -> None:
super(DomainUpdateParameters, self).__init__(**kwargs)
self.tags = tags
self.public_network_access = public_network_access
self.inbound_ip_rules = inbound_ip_rules
+ self.identity = identity
+ self.sku = sku
+
+
+class DynamicDeliveryAttributeMapping(DeliveryAttributeMapping):
+ """Dynamic delivery attribute mapping details.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ :param source_field: JSON path in the event which contains attribute
+ value.
+ :type source_field: str
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'source_field': {'key': 'properties.sourceField', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str=None, source_field: str=None, **kwargs) -> None:
+ super(DynamicDeliveryAttributeMapping, self).__init__(name=name, **kwargs)
+ self.source_field = source_field
+ self.type = 'Dynamic'
+
+
+class EventChannel(Resource):
+ """Event Channel.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param source: Source of the event channel. This represents a unique
+ resource in the partner's resource model.
+ :type source: ~azure.mgmt.eventgrid.models.EventChannelSource
+ :param destination: Represents the destination of an event channel.
+ :type destination: ~azure.mgmt.eventgrid.models.EventChannelDestination
+ :ivar provisioning_state: Provisioning state of the event channel.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.EventChannelProvisioningState
+ :ivar partner_topic_readiness_state: The readiness state of the
+ corresponding partner topic. Possible values include:
+ 'NotActivatedByUserYet', 'ActivatedByUser', 'DeactivatedByUser',
+ 'DeletedByUser'
+ :vartype partner_topic_readiness_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicReadinessState
+ :param expiration_time_if_not_activated_utc: Expiration time of the event
+ channel. If this timer expires while the corresponding partner topic is
+ never activated,
+ the event channel and corresponding partner topic are deleted.
+ :type expiration_time_if_not_activated_utc: datetime
+ :param filter: Information about the filter for the event channel.
+ :type filter: ~azure.mgmt.eventgrid.models.EventChannelFilter
+ :param partner_topic_friendly_description: Friendly description about the
+ topic. This can be set by the publisher/partner to show custom description
+ for the customer partner topic.
+ This will be helpful to remove any ambiguity of the origin of creation of
+ the partner topic for the customer.
+ :type partner_topic_friendly_description: str
+ :ivar system_data: The system metadata relating to Event Channel resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'partner_topic_readiness_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'source': {'key': 'properties.source', 'type': 'EventChannelSource'},
+ 'destination': {'key': 'properties.destination', 'type': 'EventChannelDestination'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_topic_readiness_state': {'key': 'properties.partnerTopicReadinessState', 'type': 'str'},
+ 'expiration_time_if_not_activated_utc': {'key': 'properties.expirationTimeIfNotActivatedUtc', 'type': 'iso-8601'},
+ 'filter': {'key': 'properties.filter', 'type': 'EventChannelFilter'},
+ 'partner_topic_friendly_description': {'key': 'properties.partnerTopicFriendlyDescription', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, *, source=None, destination=None, expiration_time_if_not_activated_utc=None, filter=None, partner_topic_friendly_description: str=None, **kwargs) -> None:
+ super(EventChannel, self).__init__(**kwargs)
+ self.source = source
+ self.destination = destination
+ self.provisioning_state = None
+ self.partner_topic_readiness_state = None
+ self.expiration_time_if_not_activated_utc = expiration_time_if_not_activated_utc
+ self.filter = filter
+ self.partner_topic_friendly_description = partner_topic_friendly_description
+ self.system_data = None
+
+
+class EventChannelDestination(Model):
+ """Properties of the destination of an event channel.
+
+ :param azure_subscription_id: Azure subscription ID of the customer
+ creating the event channel. The partner topic
+ associated with the event channel will be created under this Azure
+ subscription.
+ :type azure_subscription_id: str
+ :param resource_group: Azure Resource Group of the customer creating the
+ event channel. The partner topic
+ associated with the event channel will be created under this resource
+ group.
+ :type resource_group: str
+ :param partner_topic_name: Name of the partner topic associated with the
+ event channel.
+ :type partner_topic_name: str
+ """
+
+ _attribute_map = {
+ 'azure_subscription_id': {'key': 'azureSubscriptionId', 'type': 'str'},
+ 'resource_group': {'key': 'resourceGroup', 'type': 'str'},
+ 'partner_topic_name': {'key': 'partnerTopicName', 'type': 'str'},
+ }
+
+ def __init__(self, *, azure_subscription_id: str=None, resource_group: str=None, partner_topic_name: str=None, **kwargs) -> None:
+ super(EventChannelDestination, self).__init__(**kwargs)
+ self.azure_subscription_id = azure_subscription_id
+ self.resource_group = resource_group
+ self.partner_topic_name = partner_topic_name
+
+
+class EventChannelFilter(Model):
+ """Filter for the Event Channel.
+
+ :param enable_advanced_filtering_on_arrays: Allows advanced filters to be
+ evaluated against an array of values instead of expecting a singular
+ value.
+ :type enable_advanced_filtering_on_arrays: bool
+ :param advanced_filters: An array of advanced filters that are used for
+ filtering event channels.
+ :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter]
+ """
+
+ _attribute_map = {
+ 'enable_advanced_filtering_on_arrays': {'key': 'enableAdvancedFilteringOnArrays', 'type': 'bool'},
+ 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'},
+ }
+
+ def __init__(self, *, enable_advanced_filtering_on_arrays: bool=None, advanced_filters=None, **kwargs) -> None:
+ super(EventChannelFilter, self).__init__(**kwargs)
+ self.enable_advanced_filtering_on_arrays = enable_advanced_filtering_on_arrays
+ self.advanced_filters = advanced_filters
+
+
+class EventChannelSource(Model):
+ """Properties of the source of an event channel.
+
+ :param source: The identifier of the resource that's the source of the
+ events.
+ This represents a unique resource in the partner's resource model.
+ :type source: str
+ """
+
+ _attribute_map = {
+ 'source': {'key': 'source', 'type': 'str'},
+ }
+
+ def __init__(self, *, source: str=None, **kwargs) -> None:
+ super(EventChannelSource, self).__init__(**kwargs)
+ self.source = source
class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
@@ -509,6 +828,9 @@ class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
an Event Hub destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -518,11 +840,13 @@ class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, resource_id: str=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, delivery_attribute_mappings=None, **kwargs) -> None:
super(EventHubEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'EventHub'
@@ -547,8 +871,17 @@ class EventSubscription(Resource):
~azure.mgmt.eventgrid.models.EventSubscriptionProvisioningState
:param destination: Information about the destination where events have to
be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type destination:
~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ :param delivery_with_resource_identity: Information about the destination
+ where events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type delivery_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity
:param filter: Information about the filter for the event subscription.
:type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter
:param labels: List of user defined labels.
@@ -557,16 +890,31 @@ class EventSubscription(Resource):
:type expiration_time_utc: datetime
:param event_delivery_schema: The event delivery schema for the event
subscription. Possible values include: 'EventGridSchema',
- 'CustomInputSchema', 'CloudEventSchemaV1_0'
+ 'CustomInputSchema', 'CloudEventSchemaV1_0'. Default value:
+ "EventGridSchema" .
:type event_delivery_schema: str or
~azure.mgmt.eventgrid.models.EventDeliverySchema
:param retry_policy: The retry policy for events. This can be used to
configure maximum number of delivery attempts and time to live for events.
:type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy
- :param dead_letter_destination: The DeadLetter destination of the event
- subscription.
+ :param dead_letter_destination: The dead letter destination of the event
+ subscription. Any event that cannot be delivered to its' destination is
+ sent to the dead letter destination.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type dead_letter_destination:
~azure.mgmt.eventgrid.models.DeadLetterDestination
+ :param dead_letter_with_resource_identity: The dead letter destination of
+ the event subscription. Any event that cannot be delivered to its'
+ destination is sent to the dead letter destination.
+ Uses the managed identity setup on the parent resource (namely, topic or
+ domain) to acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity
+ :ivar system_data: The system metadata relating to Event Subscription
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -575,6 +923,7 @@ class EventSubscription(Resource):
'type': {'readonly': True},
'topic': {'readonly': True},
'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -584,25 +933,31 @@ class EventSubscription(Resource):
'topic': {'key': 'properties.topic', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'},
+ 'delivery_with_resource_identity': {'key': 'properties.deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'},
'filter': {'key': 'properties.filter', 'type': 'EventSubscriptionFilter'},
'labels': {'key': 'properties.labels', 'type': '[str]'},
'expiration_time_utc': {'key': 'properties.expirationTimeUtc', 'type': 'iso-8601'},
'event_delivery_schema': {'key': 'properties.eventDeliverySchema', 'type': 'str'},
'retry_policy': {'key': 'properties.retryPolicy', 'type': 'RetryPolicy'},
'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'},
+ 'dead_letter_with_resource_identity': {'key': 'properties.deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
- def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None:
+ def __init__(self, *, destination=None, delivery_with_resource_identity=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema="EventGridSchema", retry_policy=None, dead_letter_destination=None, dead_letter_with_resource_identity=None, **kwargs) -> None:
super(EventSubscription, self).__init__(**kwargs)
self.topic = None
self.provisioning_state = None
self.destination = destination
+ self.delivery_with_resource_identity = delivery_with_resource_identity
self.filter = filter
self.labels = labels
self.expiration_time_utc = expiration_time_utc
self.event_delivery_schema = event_delivery_schema
self.retry_policy = retry_policy
self.dead_letter_destination = dead_letter_destination
+ self.dead_letter_with_resource_identity = dead_letter_with_resource_identity
+ self.system_data = None
class EventSubscriptionFilter(Model):
@@ -625,6 +980,10 @@ class EventSubscriptionFilter(Model):
SubjectEndsWith properties of the filter
should be compared in a case sensitive manner. Default value: False .
:type is_subject_case_sensitive: bool
+ :param enable_advanced_filtering_on_arrays: Allows advanced filters to be
+ evaluated against an array of values instead of expecting a singular
+ value.
+ :type enable_advanced_filtering_on_arrays: bool
:param advanced_filters: An array of advanced filters that are used for
filtering event subscriptions.
:type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter]
@@ -635,15 +994,17 @@ class EventSubscriptionFilter(Model):
'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'},
'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'},
'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'},
+ 'enable_advanced_filtering_on_arrays': {'key': 'enableAdvancedFilteringOnArrays', 'type': 'bool'},
'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'},
}
- def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, advanced_filters=None, **kwargs) -> None:
+ def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, enable_advanced_filtering_on_arrays: bool=None, advanced_filters=None, **kwargs) -> None:
super(EventSubscriptionFilter, self).__init__(**kwargs)
self.subject_begins_with = subject_begins_with
self.subject_ends_with = subject_ends_with
self.included_event_types = included_event_types
self.is_subject_case_sensitive = is_subject_case_sensitive
+ self.enable_advanced_filtering_on_arrays = enable_advanced_filtering_on_arrays
self.advanced_filters = advanced_filters
@@ -664,13 +1025,47 @@ def __init__(self, *, endpoint_url: str=None, **kwargs) -> None:
self.endpoint_url = endpoint_url
+class EventSubscriptionIdentity(Model):
+ """The identity information with the event subscription.
+
+ :param type: The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of
+ user-assigned identities. The type 'None' will remove any identity.
+ Possible values include: 'SystemAssigned', 'UserAssigned'
+ :type type: str or
+ ~azure.mgmt.eventgrid.models.EventSubscriptionIdentityType
+ :param user_assigned_identity: The user identity associated with the
+ resource.
+ :type user_assigned_identity: str
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'},
+ }
+
+ def __init__(self, *, type=None, user_assigned_identity: str=None, **kwargs) -> None:
+ super(EventSubscriptionIdentity, self).__init__(**kwargs)
+ self.type = type
+ self.user_assigned_identity = user_assigned_identity
+
+
class EventSubscriptionUpdateParameters(Model):
"""Properties of the Event Subscription update.
:param destination: Information about the destination where events have to
be delivered for the event subscription.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type destination:
~azure.mgmt.eventgrid.models.EventSubscriptionDestination
+ :param delivery_with_resource_identity: Information about the destination
+ where events have to be delivered for the event subscription.
+ Uses the managed identity setup on the parent resource (topic / domain) to
+ acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type delivery_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity
:param filter: Information about the filter for the event subscription.
:type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter
:param labels: List of user defined labels.
@@ -686,31 +1081,46 @@ class EventSubscriptionUpdateParameters(Model):
:param retry_policy: The retry policy for events. This can be used to
configure maximum number of delivery attempts and time to live for events.
:type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy
- :param dead_letter_destination: The DeadLetter destination of the event
- subscription.
+ :param dead_letter_destination: The dead letter destination of the event
+ subscription. Any event that cannot be delivered to its' destination is
+ sent to the dead letter destination.
+ Uses Azure Event Grid's identity to acquire the authentication tokens
+ being used during delivery / dead-lettering.
:type dead_letter_destination:
~azure.mgmt.eventgrid.models.DeadLetterDestination
+ :param dead_letter_with_resource_identity: The dead letter destination of
+ the event subscription. Any event that cannot be delivered to its'
+ destination is sent to the dead letter destination.
+ Uses the managed identity setup on the parent resource (topic / domain) to
+ acquire the authentication tokens being used during delivery /
+ dead-lettering.
+ :type dead_letter_with_resource_identity:
+ ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity
"""
_attribute_map = {
'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'},
+ 'delivery_with_resource_identity': {'key': 'deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'},
'filter': {'key': 'filter', 'type': 'EventSubscriptionFilter'},
'labels': {'key': 'labels', 'type': '[str]'},
'expiration_time_utc': {'key': 'expirationTimeUtc', 'type': 'iso-8601'},
'event_delivery_schema': {'key': 'eventDeliverySchema', 'type': 'str'},
'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'},
'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'},
+ 'dead_letter_with_resource_identity': {'key': 'deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'},
}
- def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None:
+ def __init__(self, *, destination=None, delivery_with_resource_identity=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, dead_letter_with_resource_identity=None, **kwargs) -> None:
super(EventSubscriptionUpdateParameters, self).__init__(**kwargs)
self.destination = destination
+ self.delivery_with_resource_identity = delivery_with_resource_identity
self.filter = filter
self.labels = labels
self.expiration_time_utc = expiration_time_utc
self.event_delivery_schema = event_delivery_schema
self.retry_policy = retry_policy
self.dead_letter_destination = dead_letter_destination
+ self.dead_letter_with_resource_identity = dead_letter_with_resource_identity
class EventType(Resource):
@@ -759,6 +1169,66 @@ def __init__(self, *, display_name: str=None, description: str=None, schema_url:
self.is_in_default_set = is_in_default_set
+class ExtendedLocation(Model):
+ """Definition of an Extended Location.
+
+ :param name: Fully qualified name of the extended location.
+ :type name: str
+ :param type: Type of the extended location.
+ :type type: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None:
+ super(ExtendedLocation, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+
+
+class ExtensionTopic(Resource):
+ """Event grid Extension Topic. This is used for getting Event Grid related
+ metrics for Azure resources.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param description: Description of the extension topic.
+ :type description: str
+ :param system_topic: System topic resource id which is mapped to the
+ source.
+ :type system_topic: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'system_topic': {'key': 'properties.systemTopic', 'type': 'str'},
+ }
+
+ def __init__(self, *, description: str=None, system_topic: str=None, **kwargs) -> None:
+ super(ExtensionTopic, self).__init__(**kwargs)
+ self.description = description
+ self.system_topic = system_topic
+
+
class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination):
"""Information about the HybridConnection destination for an event
subscription.
@@ -770,6 +1240,9 @@ class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination)
:param resource_id: The Azure Resource ID of an hybrid connection that is
the destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -779,14 +1252,53 @@ class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination)
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, resource_id: str=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, delivery_attribute_mappings=None, **kwargs) -> None:
super(HybridConnectionEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'HybridConnection'
+class IdentityInfo(Model):
+ """The identity information for the resource.
+
+ :param type: The type of managed identity used. The type 'SystemAssigned,
+ UserAssigned' includes both an implicitly created identity and a set of
+ user-assigned identities. The type 'None' will remove any identity.
+ Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
+ 'SystemAssigned, UserAssigned'
+ :type type: str or ~azure.mgmt.eventgrid.models.IdentityType
+ :param principal_id: The principal ID of resource identity.
+ :type principal_id: str
+ :param tenant_id: The tenant ID of resource.
+ :type tenant_id: str
+ :param user_assigned_identities: The list of user identities associated
+ with the resource. The user identity dictionary key references will be ARM
+ resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ This property is currently not used and reserved for future usage.
+ :type user_assigned_identities: dict[str,
+ ~azure.mgmt.eventgrid.models.UserIdentityProperties]
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'},
+ }
+
+ def __init__(self, *, type=None, principal_id: str=None, tenant_id: str=None, user_assigned_identities=None, **kwargs) -> None:
+ super(IdentityInfo, self).__init__(**kwargs)
+ self.type = type
+ self.principal_id = principal_id
+ self.tenant_id = tenant_id
+ self.user_assigned_identities = user_assigned_identities
+
+
class InboundIpRule(Model):
"""InboundIpRule.
@@ -840,6 +1352,58 @@ def __init__(self, **kwargs) -> None:
self.input_schema_mapping_type = None
+class IsNotNullAdvancedFilter(AdvancedFilter):
+ """IsNotNull Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ }
+
+ def __init__(self, *, key: str=None, **kwargs) -> None:
+ super(IsNotNullAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.operator_type = 'IsNotNull'
+
+
+class IsNullOrUndefinedAdvancedFilter(AdvancedFilter):
+ """IsNullOrUndefined Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ }
+
+ def __init__(self, *, key: str=None, **kwargs) -> None:
+ super(IsNullOrUndefinedAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.operator_type = 'IsNullOrUndefined'
+
+
class JsonField(Model):
"""This is used to express the source of an input schema mapping for a single
target field in the Event Grid Event schema. This is currently used in the
@@ -1034,8 +1598,8 @@ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
self.operator_type = 'NumberIn'
-class NumberLessThanAdvancedFilter(AdvancedFilter):
- """NumberLessThan Advanced Filter.
+class NumberInRangeAdvancedFilter(AdvancedFilter):
+ """NumberInRange Advanced Filter.
All required parameters must be populated in order to send to Azure.
@@ -1044,8 +1608,38 @@ class NumberLessThanAdvancedFilter(AdvancedFilter):
:type key: str
:param operator_type: Required. Constant filled by server.
:type operator_type: str
- :param value: The filter value.
- :type value: float
+ :param values: The set of filter values.
+ :type values: list[list[float]]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[[float]]'},
+ }
+
+ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
+ super(NumberInRangeAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.values = values
+ self.operator_type = 'NumberInRange'
+
+
+class NumberLessThanAdvancedFilter(AdvancedFilter):
+ """NumberLessThan Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param value: The filter value.
+ :type value: float
"""
_validation = {
@@ -1124,6 +1718,36 @@ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
self.operator_type = 'NumberNotIn'
+class NumberNotInRangeAdvancedFilter(AdvancedFilter):
+ """NumberNotInRange Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[list[float]]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[[float]]'},
+ }
+
+ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
+ super(NumberNotInRangeAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.values = values
+ self.operator_type = 'NumberNotInRange'
+
+
class Operation(Model):
"""Represents an operation returned by the GetOperations request.
@@ -1180,6 +1804,502 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non
self.description = description
+class PartnerNamespace(TrackedResource):
+ """EventGrid Partner Namespace.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the partner namespace.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerNamespaceProvisioningState
+ :param partner_registration_fully_qualified_id: The fully qualified ARM Id
+ of the partner registration that should be associated with this partner
+ namespace. This takes the following format:
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}.
+ :type partner_registration_fully_qualified_id: str
+ :ivar endpoint: Endpoint for the partner namespace.
+ :vartype endpoint: str
+ :ivar system_data: The system metadata relating to Partner Namespace
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'endpoint': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_registration_fully_qualified_id': {'key': 'properties.partnerRegistrationFullyQualifiedId', 'type': 'str'},
+ 'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, *, location: str, tags=None, partner_registration_fully_qualified_id: str=None, **kwargs) -> None:
+ super(PartnerNamespace, self).__init__(location=location, tags=tags, **kwargs)
+ self.provisioning_state = None
+ self.partner_registration_fully_qualified_id = partner_registration_fully_qualified_id
+ self.endpoint = None
+ self.system_data = None
+
+
+class PartnerNamespaceRegenerateKeyRequest(Model):
+ """PartnerNamespace regenerate shared access key request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key_name: Required. Key name to regenerate (key1 or key2).
+ :type key_name: str
+ """
+
+ _validation = {
+ 'key_name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_name': {'key': 'keyName', 'type': 'str'},
+ }
+
+ def __init__(self, *, key_name: str, **kwargs) -> None:
+ super(PartnerNamespaceRegenerateKeyRequest, self).__init__(**kwargs)
+ self.key_name = key_name
+
+
+class PartnerNamespaceSharedAccessKeys(Model):
+ """Shared access keys of the partner namespace.
+
+ :param key1: Shared access key1 for the partner namespace.
+ :type key1: str
+ :param key2: Shared access key2 for the partner namespace.
+ :type key2: str
+ """
+
+ _attribute_map = {
+ 'key1': {'key': 'key1', 'type': 'str'},
+ 'key2': {'key': 'key2', 'type': 'str'},
+ }
+
+ def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None:
+ super(PartnerNamespaceSharedAccessKeys, self).__init__(**kwargs)
+ self.key1 = key1
+ self.key2 = key2
+
+
+class PartnerNamespaceUpdateParameters(Model):
+ """Properties of the PartnerNamespace update.
+
+ :param tags: Tags of the partner namespace.
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(PartnerNamespaceUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+
+
+class PartnerRegistration(TrackedResource):
+ """Information about a partner registration.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the partner registration.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationProvisioningState
+ :param partner_name: Official name of the partner name. For example:
+ "Contoso".
+ :type partner_name: str
+ :param partner_resource_type_name: Name of the partner resource type.
+ :type partner_resource_type_name: str
+ :param partner_resource_type_display_name: Display name of the partner
+ resource type.
+ :type partner_resource_type_display_name: str
+ :param partner_resource_type_description: Short description of the partner
+ resource type. The length of this description should not exceed 256
+ characters.
+ :type partner_resource_type_description: str
+ :param long_description: Long description for the custom scenarios and
+ integration to be displayed in the portal if needed.
+ Length of this description should not exceed 2048 characters.
+ :type long_description: str
+ :param partner_customer_service_number: The customer service number of the
+ publisher. The expected phone format should start with a '+' sign
+ followed by the country code. The remaining digits are then followed. Only
+ digits and spaces are allowed and its
+ length cannot exceed 16 digits including country code. Examples of valid
+ phone numbers are: +1 515 123 4567 and
+ +966 7 5115 2471. Examples of invalid phone numbers are: +1 (515)
+ 123-4567, 1 515 123 4567 and +966 121 5115 24 7 551 1234 43
+ :type partner_customer_service_number: str
+ :param partner_customer_service_extension: The extension of the customer
+ service number of the publisher. Only digits are allowed and number of
+ digits should not exceed 10.
+ :type partner_customer_service_extension: str
+ :param customer_service_uri: The extension of the customer service URI of
+ the publisher.
+ :type customer_service_uri: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param logo_uri: URI of the logo.
+ :type logo_uri: str
+ :param visibility_state: Visibility state of the partner registration.
+ Possible values include: 'Hidden', 'PublicPreview', 'GenerallyAvailable'
+ :type visibility_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationVisibilityState
+ :param authorized_azure_subscription_ids: List of Azure subscription Ids
+ that are authorized to create a partner namespace
+ associated with this partner registration. This is an optional property.
+ Creating
+ partner namespaces is always permitted under the same Azure subscription
+ as the one used
+ for creating the partner registration.
+ :type authorized_azure_subscription_ids: list[str]
+ :ivar system_data: The system metadata relating to Partner Registration
+ resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'partner_name': {'key': 'properties.partnerName', 'type': 'str'},
+ 'partner_resource_type_name': {'key': 'properties.partnerResourceTypeName', 'type': 'str'},
+ 'partner_resource_type_display_name': {'key': 'properties.partnerResourceTypeDisplayName', 'type': 'str'},
+ 'partner_resource_type_description': {'key': 'properties.partnerResourceTypeDescription', 'type': 'str'},
+ 'long_description': {'key': 'properties.longDescription', 'type': 'str'},
+ 'partner_customer_service_number': {'key': 'properties.partnerCustomerServiceNumber', 'type': 'str'},
+ 'partner_customer_service_extension': {'key': 'properties.partnerCustomerServiceExtension', 'type': 'str'},
+ 'customer_service_uri': {'key': 'properties.customerServiceUri', 'type': 'str'},
+ 'setup_uri': {'key': 'properties.setupUri', 'type': 'str'},
+ 'logo_uri': {'key': 'properties.logoUri', 'type': 'str'},
+ 'visibility_state': {'key': 'properties.visibilityState', 'type': 'str'},
+ 'authorized_azure_subscription_ids': {'key': 'properties.authorizedAzureSubscriptionIds', 'type': '[str]'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, *, location: str, tags=None, partner_name: str=None, partner_resource_type_name: str=None, partner_resource_type_display_name: str=None, partner_resource_type_description: str=None, long_description: str=None, partner_customer_service_number: str=None, partner_customer_service_extension: str=None, customer_service_uri: str=None, setup_uri: str=None, logo_uri: str=None, visibility_state=None, authorized_azure_subscription_ids=None, **kwargs) -> None:
+ super(PartnerRegistration, self).__init__(location=location, tags=tags, **kwargs)
+ self.provisioning_state = None
+ self.partner_name = partner_name
+ self.partner_resource_type_name = partner_resource_type_name
+ self.partner_resource_type_display_name = partner_resource_type_display_name
+ self.partner_resource_type_description = partner_resource_type_description
+ self.long_description = long_description
+ self.partner_customer_service_number = partner_customer_service_number
+ self.partner_customer_service_extension = partner_customer_service_extension
+ self.customer_service_uri = customer_service_uri
+ self.setup_uri = setup_uri
+ self.logo_uri = logo_uri
+ self.visibility_state = visibility_state
+ self.authorized_azure_subscription_ids = authorized_azure_subscription_ids
+ self.system_data = None
+
+
+class PartnerRegistrationEventTypesListResult(Model):
+ """Result of the List Partner Registration Event Types operation.
+
+ :param value: A collection of partner registration event types.
+ :type value: list[~azure.mgmt.eventgrid.models.EventType]
+ :param next_link: A link for the next page of partner registration event
+ types.
+ :type next_link: str
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[EventType]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None:
+ super(PartnerRegistrationEventTypesListResult, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class PartnerRegistrationUpdateParameters(Model):
+ """Properties of the Partner Registration update.
+
+ :param tags: Tags of the partner registration resource.
+ :type tags: dict[str, str]
+ :param partner_topic_type_name: Name of the partner topic type.
+ :type partner_topic_type_name: str
+ :param partner_topic_type_display_name: Display name of the partner topic
+ type.
+ :type partner_topic_type_display_name: str
+ :param partner_topic_type_description: Description of the partner topic
+ type.
+ :type partner_topic_type_description: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param logo_uri: URI of the partner logo.
+ :type logo_uri: str
+ :param authorized_azure_subscription_ids: List of IDs of Azure AD
+ applications that are authorized to create a partner namespace
+ associated with this partner registration. This is an optional property.
+ Creating
+ partner namespaces is always permitted under the same Azure subscription
+ as the one used
+ for creating the partner registration.
+ :type authorized_azure_subscription_ids: list[str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'partner_topic_type_name': {'key': 'partnerTopicTypeName', 'type': 'str'},
+ 'partner_topic_type_display_name': {'key': 'partnerTopicTypeDisplayName', 'type': 'str'},
+ 'partner_topic_type_description': {'key': 'partnerTopicTypeDescription', 'type': 'str'},
+ 'setup_uri': {'key': 'setupUri', 'type': 'str'},
+ 'logo_uri': {'key': 'logoUri', 'type': 'str'},
+ 'authorized_azure_subscription_ids': {'key': 'authorizedAzureSubscriptionIds', 'type': '[str]'},
+ }
+
+ def __init__(self, *, tags=None, partner_topic_type_name: str=None, partner_topic_type_display_name: str=None, partner_topic_type_description: str=None, setup_uri: str=None, logo_uri: str=None, authorized_azure_subscription_ids=None, **kwargs) -> None:
+ super(PartnerRegistrationUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+ self.partner_topic_type_name = partner_topic_type_name
+ self.partner_topic_type_display_name = partner_topic_type_display_name
+ self.partner_topic_type_description = partner_topic_type_description
+ self.setup_uri = setup_uri
+ self.logo_uri = logo_uri
+ self.authorized_azure_subscription_ids = authorized_azure_subscription_ids
+
+
+class PartnerTopic(TrackedResource):
+ """EventGrid Partner Topic.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :param source: Source associated with this partner topic. This represents
+ a unique partner resource.
+ :type source: str
+ :param expiration_time_if_not_activated_utc: Expiration time of the
+ partner topic. If this timer expires while the partner topic is still
+ never activated,
+ the partner topic and corresponding event channel are deleted.
+ :type expiration_time_if_not_activated_utc: datetime
+ :ivar provisioning_state: Provisioning state of the partner topic.
+ Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicProvisioningState
+ :param activation_state: Activation state of the partner topic. Possible
+ values include: 'NeverActivated', 'Activated', 'Deactivated'
+ :type activation_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicActivationState
+ :param partner_topic_friendly_description: Friendly description about the
+ topic. This can be set by the publisher/partner to show custom description
+ for the customer partner topic.
+ This will be helpful to remove any ambiguity of the origin of creation of
+ the partner topic for the customer.
+ :type partner_topic_friendly_description: str
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to Partner Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'source': {'key': 'properties.source', 'type': 'str'},
+ 'expiration_time_if_not_activated_utc': {'key': 'properties.expirationTimeIfNotActivatedUtc', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'activation_state': {'key': 'properties.activationState', 'type': 'str'},
+ 'partner_topic_friendly_description': {'key': 'properties.partnerTopicFriendlyDescription', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, *, location: str, tags=None, source: str=None, expiration_time_if_not_activated_utc=None, activation_state=None, partner_topic_friendly_description: str=None, identity=None, **kwargs) -> None:
+ super(PartnerTopic, self).__init__(location=location, tags=tags, **kwargs)
+ self.source = source
+ self.expiration_time_if_not_activated_utc = expiration_time_if_not_activated_utc
+ self.provisioning_state = None
+ self.activation_state = activation_state
+ self.partner_topic_friendly_description = partner_topic_friendly_description
+ self.identity = identity
+ self.system_data = None
+
+
+class PartnerTopicType(Resource):
+ """Properties of a partner topic type.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param partner_name: Official name of the partner.
+ :type partner_name: str
+ :param topic_type_name: Name of the partner topic type. This name should
+ be unique among all partner topic types names.
+ :type topic_type_name: str
+ :param display_name: Display Name for the partner topic type.
+ :type display_name: str
+ :param description: Description of the partner topic type.
+ :type description: str
+ :param setup_uri: URI of the partner website that can be used by Azure
+ customers to setup Event Grid
+ integration on an event source.
+ :type setup_uri: str
+ :param authorization_state: Status of whether the customer has authorized
+ a partner to create partner topics
+ in the customer's subscription. Possible values include: 'NotApplicable',
+ 'NotAuthorized', 'Authorized'
+ :type authorization_state: str or
+ ~azure.mgmt.eventgrid.models.PartnerTopicTypeAuthorizationState
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'partner_name': {'key': 'properties.partnerName', 'type': 'str'},
+ 'topic_type_name': {'key': 'properties.topicTypeName', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'setup_uri': {'key': 'properties.setupUri', 'type': 'str'},
+ 'authorization_state': {'key': 'properties.authorizationState', 'type': 'str'},
+ }
+
+ def __init__(self, *, partner_name: str=None, topic_type_name: str=None, display_name: str=None, description: str=None, setup_uri: str=None, authorization_state=None, **kwargs) -> None:
+ super(PartnerTopicType, self).__init__(**kwargs)
+ self.partner_name = partner_name
+ self.topic_type_name = topic_type_name
+ self.display_name = display_name
+ self.description = description
+ self.setup_uri = setup_uri
+ self.authorization_state = authorization_state
+
+
+class PartnerTopicTypesListResult(Model):
+ """Result of the List Partner Topic Types operation.
+
+ :param value: A collection of partner topic types.
+ :type value: list[~azure.mgmt.eventgrid.models.PartnerTopicType]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[PartnerTopicType]'},
+ }
+
+ def __init__(self, *, value=None, **kwargs) -> None:
+ super(PartnerTopicTypesListResult, self).__init__(**kwargs)
+ self.value = value
+
+
+class PartnerTopicUpdateParameters(Model):
+ """Properties of the Partner Topic update.
+
+ :param tags: Tags of the partner topic.
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(PartnerTopicUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+
+
class PrivateEndpoint(Model):
"""PrivateEndpoint information.
@@ -1261,9 +2381,9 @@ class PrivateLinkResource(Model):
:type required_zone_names: list[str]
:param id: Fully qualified identifier of the resource.
:type id: str
- :param name: Name of the resource
+ :param name: Name of the resource.
:type name: str
- :param type: Type of the resource
+ :param type: Type of the resource.
:type type: str
"""
@@ -1288,14 +2408,31 @@ def __init__(self, *, group_id: str=None, display_name: str=None, required_membe
self.type = type
+class ResourceSku(Model):
+ """Describes an EventGrid Resource Sku.
+
+ :param name: The Sku name of the resource. The possible values are: Basic
+ or Premium. Possible values include: 'Basic', 'Premium'
+ :type name: str or ~azure.mgmt.eventgrid.models.Sku
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ }
+
+ def __init__(self, *, name=None, **kwargs) -> None:
+ super(ResourceSku, self).__init__(**kwargs)
+ self.name = name
+
+
class RetryPolicy(Model):
"""Information about the retry policy for an event subscription.
:param max_delivery_attempts: Maximum number of delivery retry attempts
- for events.
+ for events. Default value: 30 .
:type max_delivery_attempts: int
:param event_time_to_live_in_minutes: Time To Live (in minutes) for
- events.
+ events. Default value: 1440 .
:type event_time_to_live_in_minutes: int
"""
@@ -1304,7 +2441,7 @@ class RetryPolicy(Model):
'event_time_to_live_in_minutes': {'key': 'eventTimeToLiveInMinutes', 'type': 'int'},
}
- def __init__(self, *, max_delivery_attempts: int=None, event_time_to_live_in_minutes: int=None, **kwargs) -> None:
+ def __init__(self, *, max_delivery_attempts: int=30, event_time_to_live_in_minutes: int=1440, **kwargs) -> None:
super(RetryPolicy, self).__init__(**kwargs)
self.max_delivery_attempts = max_delivery_attempts
self.event_time_to_live_in_minutes = event_time_to_live_in_minutes
@@ -1320,6 +2457,9 @@ class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Service Bus destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1329,11 +2469,13 @@ class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, resource_id: str=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, delivery_attribute_mappings=None, **kwargs) -> None:
super(ServiceBusQueueEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'ServiceBusQueue'
@@ -1348,6 +2490,9 @@ class ServiceBusTopicEventSubscriptionDestination(EventSubscriptionDestination):
:param resource_id: The Azure Resource Id that represents the endpoint of
the Service Bus Topic destination of an event subscription.
:type resource_id: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1357,14 +2502,50 @@ class ServiceBusTopicEventSubscriptionDestination(EventSubscriptionDestination):
_attribute_map = {
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, resource_id: str=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, delivery_attribute_mappings=None, **kwargs) -> None:
super(ServiceBusTopicEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'ServiceBusTopic'
+class StaticDeliveryAttributeMapping(DeliveryAttributeMapping):
+ """Static delivery attribute mapping details.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Name of the delivery attribute or header.
+ :type name: str
+ :param type: Required. Constant filled by server.
+ :type type: str
+ :param value: Value of the delivery attribute.
+ :type value: str
+ :param is_secret: Boolean flag to tell if the attribute contains sensitive
+ information .
+ :type is_secret: bool
+ """
+
+ _validation = {
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'value': {'key': 'properties.value', 'type': 'str'},
+ 'is_secret': {'key': 'properties.isSecret', 'type': 'bool'},
+ }
+
+ def __init__(self, *, name: str=None, value: str=None, is_secret: bool=None, **kwargs) -> None:
+ super(StaticDeliveryAttributeMapping, self).__init__(name=name, **kwargs)
+ self.value = value
+ self.is_secret = is_secret
+ self.type = 'Static'
+
+
class StorageBlobDeadLetterDestination(DeadLetterDestination):
"""Information about the storage blob based dead letter destination.
@@ -1410,6 +2591,9 @@ class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination):
:param queue_name: The name of the Storage queue under a storage account
that is the destination of an event subscription.
:type queue_name: str
+ :param queue_message_time_to_live_in_seconds: Storage queue message time
+ to live in seconds.
+ :type queue_message_time_to_live_in_seconds: long
"""
_validation = {
@@ -1420,12 +2604,14 @@ class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination):
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'resource_id': {'key': 'properties.resourceId', 'type': 'str'},
'queue_name': {'key': 'properties.queueName', 'type': 'str'},
+ 'queue_message_time_to_live_in_seconds': {'key': 'properties.queueMessageTimeToLiveInSeconds', 'type': 'long'},
}
- def __init__(self, *, resource_id: str=None, queue_name: str=None, **kwargs) -> None:
+ def __init__(self, *, resource_id: str=None, queue_name: str=None, queue_message_time_to_live_in_seconds: int=None, **kwargs) -> None:
super(StorageQueueEventSubscriptionDestination, self).__init__(**kwargs)
self.resource_id = resource_id
self.queue_name = queue_name
+ self.queue_message_time_to_live_in_seconds = queue_message_time_to_live_in_seconds
self.endpoint_type = 'StorageQueue'
@@ -1549,6 +2735,96 @@ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
self.operator_type = 'StringIn'
+class StringNotBeginsWithAdvancedFilter(AdvancedFilter):
+ """StringNotBeginsWith Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
+ super(StringNotBeginsWithAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.values = values
+ self.operator_type = 'StringNotBeginsWith'
+
+
+class StringNotContainsAdvancedFilter(AdvancedFilter):
+ """StringNotContains Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
+ super(StringNotContainsAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.values = values
+ self.operator_type = 'StringNotContains'
+
+
+class StringNotEndsWithAdvancedFilter(AdvancedFilter):
+ """StringNotEndsWith Advanced Filter.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key: The field/property in the event based on which you want to
+ filter.
+ :type key: str
+ :param operator_type: Required. Constant filled by server.
+ :type operator_type: str
+ :param values: The set of filter values.
+ :type values: list[str]
+ """
+
+ _validation = {
+ 'operator_type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key': {'key': 'key', 'type': 'str'},
+ 'operator_type': {'key': 'operatorType', 'type': 'str'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ }
+
+ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
+ super(StringNotEndsWithAdvancedFilter, self).__init__(key=key, **kwargs)
+ self.values = values
+ self.operator_type = 'StringNotEndsWith'
+
+
class StringNotInAdvancedFilter(AdvancedFilter):
"""StringNotIn Advanced Filter.
@@ -1579,6 +2855,135 @@ def __init__(self, *, key: str=None, values=None, **kwargs) -> None:
self.operator_type = 'StringNotIn'
+class SystemData(Model):
+ """Metadata pertaining to creation and last modification of the resource.
+
+ :param created_by: The identity that created the resource.
+ :type created_by: str
+ :param created_by_type: The type of identity that created the resource.
+ Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
+ :type created_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType
+ :param created_at: The timestamp of resource creation (UTC).
+ :type created_at: datetime
+ :param last_modified_by: The identity that last modified the resource.
+ :type last_modified_by: str
+ :param last_modified_by_type: The type of identity that last modified the
+ resource. Possible values include: 'User', 'Application',
+ 'ManagedIdentity', 'Key'
+ :type last_modified_by_type: str or
+ ~azure.mgmt.eventgrid.models.CreatedByType
+ :param last_modified_at: The timestamp of resource last modification (UTC)
+ :type last_modified_at: datetime
+ """
+
+ _attribute_map = {
+ 'created_by': {'key': 'createdBy', 'type': 'str'},
+ 'created_by_type': {'key': 'createdByType', 'type': 'str'},
+ 'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
+ 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
+ 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
+ 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None:
+ super(SystemData, self).__init__(**kwargs)
+ self.created_by = created_by
+ self.created_by_type = created_by_type
+ self.created_at = created_at
+ self.last_modified_by = last_modified_by
+ self.last_modified_by_type = last_modified_by_type
+ self.last_modified_at = last_modified_at
+
+
+class SystemTopic(TrackedResource):
+ """EventGrid System Topic.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Fully qualified identifier of the resource.
+ :vartype id: str
+ :ivar name: Name of the resource.
+ :vartype name: str
+ :ivar type: Type of the resource.
+ :vartype type: str
+ :param location: Required. Location of the resource.
+ :type location: str
+ :param tags: Tags of the resource.
+ :type tags: dict[str, str]
+ :ivar provisioning_state: Provisioning state of the system topic. Possible
+ values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ 'Canceled', 'Failed'
+ :vartype provisioning_state: str or
+ ~azure.mgmt.eventgrid.models.ResourceProvisioningState
+ :param source: Source for the system topic.
+ :type source: str
+ :param topic_type: TopicType for the system topic.
+ :type topic_type: str
+ :ivar metric_resource_id: Metric resource id for the system topic.
+ :vartype metric_resource_id: str
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :ivar system_data: The system metadata relating to this resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'source': {'key': 'properties.source', 'type': 'str'},
+ 'topic_type': {'key': 'properties.topicType', 'type': 'str'},
+ 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
+ }
+
+ def __init__(self, *, location: str, tags=None, source: str=None, topic_type: str=None, identity=None, **kwargs) -> None:
+ super(SystemTopic, self).__init__(location=location, tags=tags, **kwargs)
+ self.provisioning_state = None
+ self.source = source
+ self.topic_type = topic_type
+ self.metric_resource_id = None
+ self.identity = identity
+ self.system_data = None
+
+
+class SystemTopicUpdateParameters(Model):
+ """Properties of the System Topic update.
+
+ :param tags: Tags of the system topic.
+ :type tags: dict[str, str]
+ :param identity: Resource identity information.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ }
+
+ def __init__(self, *, tags=None, identity=None, **kwargs) -> None:
+ super(SystemTopicUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+ self.identity = identity
+
+
class Topic(TrackedResource):
"""EventGrid Topic.
@@ -1624,13 +3029,25 @@ class Topic(TrackedResource):
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the topic.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
+ :param identity: Identity information for the resource.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
+ :param kind: Kind of the resource. Possible values include: 'Azure',
+ 'AzureArc'
+ :type kind: str or ~azure.mgmt.eventgrid.models.ResourceKind
+ :param extended_location: Extended location of the resource.
+ :type extended_location: ~azure.mgmt.eventgrid.models.ExtendedLocation
+ :ivar system_data: The system metadata relating to Topic resource.
+ :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData
"""
_validation = {
@@ -1641,6 +3058,7 @@ class Topic(TrackedResource):
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
@@ -1657,9 +3075,14 @@ class Topic(TrackedResource):
'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
- def __init__(self, *, location: str, tags=None, private_endpoint_connections=None, input_schema="EventGridSchema", input_schema_mapping=None, public_network_access=None, inbound_ip_rules=None, **kwargs) -> None:
+ def __init__(self, *, location: str, tags=None, private_endpoint_connections=None, input_schema="EventGridSchema", input_schema_mapping=None, public_network_access="Enabled", inbound_ip_rules=None, sku=None, identity=None, kind=None, extended_location=None, **kwargs) -> None:
super(Topic, self).__init__(location=location, tags=tags, **kwargs)
self.private_endpoint_connections = private_endpoint_connections
self.provisioning_state = None
@@ -1669,6 +3092,11 @@ def __init__(self, *, location: str, tags=None, private_endpoint_connections=Non
self.metric_resource_id = None
self.public_network_access = public_network_access
self.inbound_ip_rules = inbound_ip_rules
+ self.sku = sku
+ self.identity = identity
+ self.kind = kind
+ self.extended_location = extended_location
+ self.system_data = None
class TopicRegenerateKeyRequest(Model):
@@ -1745,6 +3173,8 @@ class TopicTypeInfo(Resource):
:type supported_locations: list[str]
:param source_resource_format: Source resource format.
:type source_resource_format: str
+ :param supported_scopes_for_source: Supported source scopes.
+ :type supported_scopes_for_source: list[str]
"""
_validation = {
@@ -1764,9 +3194,10 @@ class TopicTypeInfo(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'supported_locations': {'key': 'properties.supportedLocations', 'type': '[str]'},
'source_resource_format': {'key': 'properties.sourceResourceFormat', 'type': 'str'},
+ 'supported_scopes_for_source': {'key': 'properties.supportedScopesForSource', 'type': '[str]'},
}
- def __init__(self, *, provider: str=None, display_name: str=None, description: str=None, resource_region_type=None, provisioning_state=None, supported_locations=None, source_resource_format: str=None, **kwargs) -> None:
+ def __init__(self, *, provider: str=None, display_name: str=None, description: str=None, resource_region_type=None, provisioning_state=None, supported_locations=None, source_resource_format: str=None, supported_scopes_for_source=None, **kwargs) -> None:
super(TopicTypeInfo, self).__init__(**kwargs)
self.provider = provider
self.display_name = display_name
@@ -1775,6 +3206,7 @@ def __init__(self, *, provider: str=None, display_name: str=None, description: s
self.provisioning_state = provisioning_state
self.supported_locations = supported_locations
self.source_resource_format = source_resource_format
+ self.supported_scopes_for_source = supported_scopes_for_source
class TopicUpdateParameters(Model):
@@ -1782,30 +3214,59 @@ class TopicUpdateParameters(Model):
:param tags: Tags of the resource.
:type tags: dict[str, str]
+ :param identity: Resource identity information.
+ :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo
:param public_network_access: This determines if traffic is allowed over
public network. By default it is enabled.
You can further restrict to specific IPs by configuring . Possible values include: 'Enabled', 'Disabled'
+ />. Possible values include: 'Enabled', 'Disabled'. Default value:
+ "Enabled" .
:type public_network_access: str or
~azure.mgmt.eventgrid.models.PublicNetworkAccess
:param inbound_ip_rules: This can be used to restrict traffic from
specific IPs instead of all IPs. Note: These are considered only if
PublicNetworkAccess is enabled.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
+ :param sku: The Sku pricing tier for the topic.
+ :type sku: ~azure.mgmt.eventgrid.models.ResourceSku
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
+ 'identity': {'key': 'identity', 'type': 'IdentityInfo'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
+ 'sku': {'key': 'sku', 'type': 'ResourceSku'},
}
- def __init__(self, *, tags=None, public_network_access=None, inbound_ip_rules=None, **kwargs) -> None:
+ def __init__(self, *, tags=None, identity=None, public_network_access="Enabled", inbound_ip_rules=None, sku=None, **kwargs) -> None:
super(TopicUpdateParameters, self).__init__(**kwargs)
self.tags = tags
+ self.identity = identity
self.public_network_access = public_network_access
self.inbound_ip_rules = inbound_ip_rules
+ self.sku = sku
+
+
+class UserIdentityProperties(Model):
+ """The information about the user identity.
+
+ :param principal_id: The principal id of user assigned identity.
+ :type principal_id: str
+ :param client_id: The client id of user assigned identity.
+ :type client_id: str
+ """
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ }
+
+ def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None:
+ super(UserIdentityProperties, self).__init__(**kwargs)
+ self.principal_id = principal_id
+ self.client_id = client_id
class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
@@ -1824,10 +3285,11 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
:ivar endpoint_base_url: The base URL that represents the endpoint of the
destination of an event subscription.
:vartype endpoint_base_url: str
- :param max_events_per_batch: Maximum number of events per batch.
+ :param max_events_per_batch: Maximum number of events per batch. Default
+ value: 1 .
:type max_events_per_batch: int
:param preferred_batch_size_in_kilobytes: Preferred batch size in
- Kilobytes.
+ Kilobytes. Default value: 64 .
:type preferred_batch_size_in_kilobytes: int
:param azure_active_directory_tenant_id: The Azure Active Directory Tenant
ID to get the access token that will be included as the bearer token in
@@ -1837,6 +3299,9 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
Directory Application ID or URI to get the access token that will be
included as the bearer token in delivery requests.
:type azure_active_directory_application_id_or_uri: str
+ :param delivery_attribute_mappings: Delivery attribute details.
+ :type delivery_attribute_mappings:
+ list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping]
"""
_validation = {
@@ -1852,9 +3317,10 @@ class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'},
'azure_active_directory_tenant_id': {'key': 'properties.azureActiveDirectoryTenantId', 'type': 'str'},
'azure_active_directory_application_id_or_uri': {'key': 'properties.azureActiveDirectoryApplicationIdOrUri', 'type': 'str'},
+ 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'},
}
- def __init__(self, *, endpoint_url: str=None, max_events_per_batch: int=None, preferred_batch_size_in_kilobytes: int=None, azure_active_directory_tenant_id: str=None, azure_active_directory_application_id_or_uri: str=None, **kwargs) -> None:
+ def __init__(self, *, endpoint_url: str=None, max_events_per_batch: int=1, preferred_batch_size_in_kilobytes: int=64, azure_active_directory_tenant_id: str=None, azure_active_directory_application_id_or_uri: str=None, delivery_attribute_mappings=None, **kwargs) -> None:
super(WebHookEventSubscriptionDestination, self).__init__(**kwargs)
self.endpoint_url = endpoint_url
self.endpoint_base_url = None
@@ -1862,4 +3328,5 @@ def __init__(self, *, endpoint_url: str=None, max_events_per_batch: int=None, pr
self.preferred_batch_size_in_kilobytes = preferred_batch_size_in_kilobytes
self.azure_active_directory_tenant_id = azure_active_directory_tenant_id
self.azure_active_directory_application_id_or_uri = azure_active_directory_application_id_or_uri
+ self.delivery_attribute_mappings = delivery_attribute_mappings
self.endpoint_type = 'WebHook'
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_paged_models.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_paged_models.py
index 67a83f8f121e..20d75dc4b167 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_paged_models.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_paged_models.py
@@ -38,6 +38,19 @@ class DomainTopicPaged(Paged):
def __init__(self, *args, **kwargs):
super(DomainTopicPaged, self).__init__(*args, **kwargs)
+class EventChannelPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`EventChannel ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[EventChannel]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(EventChannelPaged, self).__init__(*args, **kwargs)
class EventSubscriptionPaged(Paged):
"""
A paging container for iterating over a list of :class:`EventSubscription ` object
@@ -64,32 +77,45 @@ class OperationPaged(Paged):
def __init__(self, *args, **kwargs):
super(OperationPaged, self).__init__(*args, **kwargs)
-class TopicPaged(Paged):
+class PartnerNamespacePaged(Paged):
"""
- A paging container for iterating over a list of :class:`Topic ` object
+ A paging container for iterating over a list of :class:`PartnerNamespace ` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
- 'current_page': {'key': 'value', 'type': '[Topic]'}
+ 'current_page': {'key': 'value', 'type': '[PartnerNamespace]'}
}
def __init__(self, *args, **kwargs):
- super(TopicPaged, self).__init__(*args, **kwargs)
-class EventTypePaged(Paged):
+ super(PartnerNamespacePaged, self).__init__(*args, **kwargs)
+class PartnerRegistrationPaged(Paged):
"""
- A paging container for iterating over a list of :class:`EventType ` object
+ A paging container for iterating over a list of :class:`PartnerRegistration ` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
- 'current_page': {'key': 'value', 'type': '[EventType]'}
+ 'current_page': {'key': 'value', 'type': '[PartnerRegistration]'}
}
def __init__(self, *args, **kwargs):
- super(EventTypePaged, self).__init__(*args, **kwargs)
+ super(PartnerRegistrationPaged, self).__init__(*args, **kwargs)
+class PartnerTopicPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`PartnerTopic ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[PartnerTopic]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(PartnerTopicPaged, self).__init__(*args, **kwargs)
class PrivateEndpointConnectionPaged(Paged):
"""
A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object
@@ -116,6 +142,45 @@ class PrivateLinkResourcePaged(Paged):
def __init__(self, *args, **kwargs):
super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs)
+class SystemTopicPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`SystemTopic ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[SystemTopic]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(SystemTopicPaged, self).__init__(*args, **kwargs)
+class TopicPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`Topic ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[Topic]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(TopicPaged, self).__init__(*args, **kwargs)
+class EventTypePaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`EventType ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[EventType]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(EventTypePaged, self).__init__(*args, **kwargs)
class TopicTypeInfoPaged(Paged):
"""
A paging container for iterating over a list of :class:`TopicTypeInfo ` object
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py
index 7407c6aeccd6..6a4607f4a8ba 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py
@@ -11,20 +11,36 @@
from ._domains_operations import DomainsOperations
from ._domain_topics_operations import DomainTopicsOperations
+from ._event_channels_operations import EventChannelsOperations
from ._event_subscriptions_operations import EventSubscriptionsOperations
+from ._system_topic_event_subscriptions_operations import SystemTopicEventSubscriptionsOperations
+from ._partner_topic_event_subscriptions_operations import PartnerTopicEventSubscriptionsOperations
from ._operations import Operations
-from ._topics_operations import TopicsOperations
+from ._partner_namespaces_operations import PartnerNamespacesOperations
+from ._partner_registrations_operations import PartnerRegistrationsOperations
+from ._partner_topics_operations import PartnerTopicsOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
+from ._system_topics_operations import SystemTopicsOperations
+from ._topics_operations import TopicsOperations
+from ._extension_topics_operations import ExtensionTopicsOperations
from ._topic_types_operations import TopicTypesOperations
__all__ = [
'DomainsOperations',
'DomainTopicsOperations',
+ 'EventChannelsOperations',
'EventSubscriptionsOperations',
+ 'SystemTopicEventSubscriptionsOperations',
+ 'PartnerTopicEventSubscriptionsOperations',
'Operations',
- 'TopicsOperations',
+ 'PartnerNamespacesOperations',
+ 'PartnerRegistrationsOperations',
+ 'PartnerTopicsOperations',
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
+ 'SystemTopicsOperations',
+ 'TopicsOperations',
+ 'ExtensionTopicsOperations',
'TopicTypesOperations',
]
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py
index bd1b6519d1a1..e699c73c0217 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py
@@ -27,7 +27,7 @@ class DomainTopicsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
@@ -239,7 +239,7 @@ def _delete_initial(
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py
index e4d04093cb33..65c2c277f8bd 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py
@@ -27,7 +27,7 @@ class DomainsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
@@ -238,7 +238,7 @@ def _delete_initial(
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py
new file mode 100644
index 000000000000..94679458e94f
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py
@@ -0,0 +1,362 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class EventChannelsOperations(object):
+ """EventChannelsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, partner_namespace_name, event_channel_name, custom_headers=None, raw=False, **operation_config):
+ """Get an event channel.
+
+ Get properties of an event channel.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param event_channel_name: Name of the event channel.
+ :type event_channel_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventChannel or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventChannel or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'),
+ 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventChannel', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'}
+
+ def create_or_update(
+ self, resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers=None, raw=False, **operation_config):
+ """Create an event channel.
+
+ Asynchronously creates a new event channel with the specified
+ parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param event_channel_name: Name of the event channel.
+ :type event_channel_name: str
+ :param event_channel_info: EventChannel information.
+ :type event_channel_info: ~azure.mgmt.eventgrid.models.EventChannel
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventChannel or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventChannel or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'),
+ 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(event_channel_info, 'EventChannel')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventChannel', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, partner_namespace_name, event_channel_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'),
+ 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, partner_namespace_name, event_channel_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete an event channel.
+
+ Delete existing event channel.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param event_channel_name: Name of the event channel.
+ :type event_channel_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ partner_namespace_name=partner_namespace_name,
+ event_channel_name=event_channel_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'}
+
+ def list_by_partner_namespace(
+ self, resource_group_name, partner_namespace_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List event channels.
+
+ List all the event channels in a partner namespace.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of EventChannel
+ :rtype:
+ ~azure.mgmt.eventgrid.models.EventChannelPaged[~azure.mgmt.eventgrid.models.EventChannel]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_partner_namespace.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.EventChannelPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_partner_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py
index f4521c5187e1..84fcd069735d 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py
@@ -27,7 +27,7 @@ class EventSubscriptionsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
@@ -1439,3 +1439,74 @@ def internal_paging(next_link=None):
return deserialized
list_by_domain_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'}
+
+ def get_delivery_attributes(
+ self, scope, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get delivery attributes for an event subscription.
+
+ Get all delivery attributes for an event subscription.
+
+ :param scope: The scope of the event subscription. The scope can be a
+ subscription, or a resource group, or a top level resource belonging
+ to a resource provider namespace, or an EventGrid topic. For example,
+ use '/subscriptions/{subscriptionId}/' for a subscription,
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'
+ for a resource group, and
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
+ for a resource, and
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
+ for an EventGrid topic.
+ :type scope: str
+ :param event_subscription_name: Name of the event subscription.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: DeliveryAttributeListResult or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_delivery_attributes.metadata['url']
+ path_format_arguments = {
+ 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeliveryAttributeListResult', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_delivery_attributes.metadata = {'url': '/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py
new file mode 100644
index 000000000000..b6d5b3fdc5df
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py
@@ -0,0 +1,106 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ExtensionTopicsOperations(object):
+ """ExtensionTopicsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, scope, custom_headers=None, raw=False, **operation_config):
+ """Get properties of an extension topic.
+
+ Get the properties of an extension topic.
+
+ :param scope: The identifier of the resource to which extension topic
+ is queried. The scope can be a subscription, or a resource group, or a
+ top level resource belonging to a resource provider namespace. For
+ example, use '/subscriptions/{subscriptionId}/' for a subscription,
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'
+ for a resource group, and
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
+ for Azure resource.
+ :type scope: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ExtensionTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.ExtensionTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'scope': self._serialize.url("scope", scope, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ExtensionTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/{scope}/providers/Microsoft.EventGrid/extensionTopics/default'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py
index d437a163aca6..9c2d8e447ec8 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py
@@ -25,7 +25,7 @@ class Operations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py
new file mode 100644
index 000000000000..2bf628cf4a1f
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py
@@ -0,0 +1,713 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class PartnerNamespacesOperations(object):
+ """PartnerNamespacesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, partner_namespace_name, custom_headers=None, raw=False, **operation_config):
+ """Get a partner namespace.
+
+ Get properties of a partner namespace.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerNamespace or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespace or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerNamespace', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'}
+
+
+ def _create_or_update_initial(
+ self, resource_group_name, partner_namespace_name, partner_namespace_info, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(partner_namespace_info, 'PartnerNamespace')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('PartnerNamespace', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def create_or_update(
+ self, resource_group_name, partner_namespace_name, partner_namespace_info, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Create a partner namespace.
+
+ Asynchronously creates a new partner namespace with the specified
+ parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param partner_namespace_info: PartnerNamespace information.
+ :type partner_namespace_info:
+ ~azure.mgmt.eventgrid.models.PartnerNamespace
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns PartnerNamespace or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.PartnerNamespace]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.PartnerNamespace]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ partner_namespace_name=partner_namespace_name,
+ partner_namespace_info=partner_namespace_info,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('PartnerNamespace', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, partner_namespace_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, partner_namespace_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete a partner namespace.
+
+ Delete existing partner namespace.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ partner_namespace_name=partner_namespace_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'}
+
+
+ def _update_initial(
+ self, resource_group_name, partner_namespace_name, tags=None, custom_headers=None, raw=False, **operation_config):
+ partner_namespace_update_parameters = models.PartnerNamespaceUpdateParameters(tags=tags)
+
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(partner_namespace_update_parameters, 'PartnerNamespaceUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('PartnerNamespace', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def update(
+ self, resource_group_name, partner_namespace_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Update a partner namespace.
+
+ Asynchronously updates a partner namespace with the specified
+ parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param tags: Tags of the partner namespace.
+ :type tags: dict[str, str]
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns PartnerNamespace or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.PartnerNamespace]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.PartnerNamespace]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._update_initial(
+ resource_group_name=resource_group_name,
+ partner_namespace_name=partner_namespace_name,
+ tags=tags,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('PartnerNamespace', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'}
+
+ def list_by_subscription(
+ self, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner namespaces under an Azure subscription.
+
+ List all the partner namespaces under an Azure subscription.
+
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerNamespace
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerNamespacePaged[~azure.mgmt.eventgrid.models.PartnerNamespace]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces'}
+
+ def list_by_resource_group(
+ self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner namespaces under a resource group.
+
+ List all the partner namespaces under a resource group.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerNamespace
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerNamespacePaged[~azure.mgmt.eventgrid.models.PartnerNamespace]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces'}
+
+ def list_shared_access_keys(
+ self, resource_group_name, partner_namespace_name, custom_headers=None, raw=False, **operation_config):
+ """List keys for a partner namespace.
+
+ List the two keys used to publish to a partner namespace.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerNamespaceSharedAccessKeys or ClientRawResponse if
+ raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.list_shared_access_keys.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys'}
+
+ def regenerate_key(
+ self, resource_group_name, partner_namespace_name, key_name, custom_headers=None, raw=False, **operation_config):
+ """Regenerate key for a partner namespace.
+
+ Regenerate a shared access key for a partner namespace.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_namespace_name: Name of the partner namespace.
+ :type partner_namespace_name: str
+ :param key_name: Key name to regenerate (key1 or key2).
+ :type key_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerNamespaceSharedAccessKeys or ClientRawResponse if
+ raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ regenerate_key_request = models.PartnerNamespaceRegenerateKeyRequest(key_name=key_name)
+
+ # Construct URL
+ url = self.regenerate_key.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(regenerate_key_request, 'PartnerNamespaceRegenerateKeyRequest')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py
new file mode 100644
index 000000000000..ab12ed688e40
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py
@@ -0,0 +1,545 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class PartnerRegistrationsOperations(object):
+ """PartnerRegistrationsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, partner_registration_name, custom_headers=None, raw=False, **operation_config):
+ """Get a partner registration.
+
+ Gets a partner registration with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_registration_name: Name of the partner registration.
+ :type partner_registration_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerRegistration or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerRegistration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'}
+
+ def create_or_update(
+ self, resource_group_name, partner_registration_name, partner_registration_info, custom_headers=None, raw=False, **operation_config):
+ """Create a partner registration.
+
+ Creates a new partner registration with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_registration_name: Name of the partner registration.
+ :type partner_registration_name: str
+ :param partner_registration_info: PartnerRegistration information.
+ :type partner_registration_info:
+ ~azure.mgmt.eventgrid.models.PartnerRegistration
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerRegistration or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(partner_registration_info, 'PartnerRegistration')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerRegistration', response)
+ if response.status_code == 202:
+ deserialized = self._deserialize('PartnerRegistration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'}
+
+ def delete(
+ self, resource_group_name, partner_registration_name, custom_headers=None, raw=False, **operation_config):
+ """Delete a partner registration.
+
+ Deletes a partner registration with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_registration_name: Name of the partner registration.
+ :type partner_registration_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'}
+
+ def update(
+ self, resource_group_name, partner_registration_name, partner_registration_update_parameters, custom_headers=None, raw=False, **operation_config):
+ """Update a partner registration.
+
+ Updates a partner registration with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_registration_name: Name of the partner registration.
+ :type partner_registration_name: str
+ :param partner_registration_update_parameters: Partner registration
+ update information.
+ :type partner_registration_update_parameters:
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationUpdateParameters
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerRegistration or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(partner_registration_update_parameters, 'PartnerRegistrationUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 201:
+ deserialized = self._deserialize('PartnerRegistration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'}
+
+ def list_by_subscription(
+ self, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner registrations under an Azure subscription.
+
+ List all the partner registrations under an Azure subscription.
+
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerRegistration
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationPaged[~azure.mgmt.eventgrid.models.PartnerRegistration]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerRegistrationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations'}
+
+ def list_by_resource_group(
+ self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner registrations under a resource group.
+
+ List all the partner registrations under a resource group.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerRegistration
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationPaged[~azure.mgmt.eventgrid.models.PartnerRegistration]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerRegistrationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations'}
+
+ def list(
+ self, custom_headers=None, raw=False, **operation_config):
+ """List all available partners registrations.
+
+ List all partners registrations.
+
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerRegistration
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerRegistrationPaged[~azure.mgmt.eventgrid.models.PartnerRegistration]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerRegistrationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/providers/Microsoft.EventGrid/partnerRegistrations'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py
new file mode 100644
index 000000000000..43a14aee8e78
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py
@@ -0,0 +1,655 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class PartnerTopicEventSubscriptionsOperations(object):
+ """PartnerTopicEventSubscriptionsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, partner_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get an event subscription of a partner topic.
+
+ Get an event subscription of a partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ found. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventSubscription or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventSubscription or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _create_or_update_initial(
+ self, resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(event_subscription_info, 'EventSubscription')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def create_or_update(
+ self, resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Create or update an event subscription of a partner topic.
+
+ Asynchronously creates or updates an event subscription of a partner
+ topic with the specified parameters. Existing event subscriptions will
+ be updated with this API.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param event_subscription_info: Event subscription properties
+ containing the destination and filter information.
+ :type event_subscription_info:
+ ~azure.mgmt.eventgrid.models.EventSubscription
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns EventSubscription or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.EventSubscription]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.EventSubscription]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ partner_topic_name=partner_topic_name,
+ event_subscription_name=event_subscription_name,
+ event_subscription_info=event_subscription_info,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, partner_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, partner_topic_name, event_subscription_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete an event subscription of a partner topic.
+
+ Delete an event subscription of a partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ partner_topic_name=partner_topic_name,
+ event_subscription_name=event_subscription_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _update_initial(
+ self, resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def update(
+ self, resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Update event subscription of a partner topic.
+
+ Update event subscription of a partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param event_subscription_update_parameters: Updated event
+ subscription information.
+ :type event_subscription_update_parameters:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionUpdateParameters
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns EventSubscription or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.EventSubscription]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.EventSubscription]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._update_initial(
+ resource_group_name=resource_group_name,
+ partner_topic_name=partner_topic_name,
+ event_subscription_name=event_subscription_name,
+ event_subscription_update_parameters=event_subscription_update_parameters,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+ def get_full_url(
+ self, resource_group_name, partner_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get full URL of an event subscription of a partner topic.
+
+ Get the full endpoint URL for an event subscription of a partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventSubscriptionFullUrl or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventSubscriptionFullUrl or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_full_url.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventSubscriptionFullUrl', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_full_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'}
+
+ def list_by_partner_topic(
+ self, resource_group_name, partner_topic_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List event subscriptions of a partner topic.
+
+ List event subscriptions that belong to a specific partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of EventSubscription
+ :rtype:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_partner_topic.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_partner_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions'}
+
+ def get_delivery_attributes(
+ self, resource_group_name, partner_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get delivery attributes for an event subscription of a partner topic.
+
+ Get all delivery attributes for an event subscription of a partner
+ topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: DeliveryAttributeListResult or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_delivery_attributes.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeliveryAttributeListResult', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_delivery_attributes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py
new file mode 100644
index 000000000000..600da658b2d7
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py
@@ -0,0 +1,564 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class PartnerTopicsOperations(object):
+ """PartnerTopicsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, partner_topic_name, custom_headers=None, raw=False, **operation_config):
+ """Get a partner topic.
+
+ Get properties of a partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, partner_topic_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, partner_topic_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete a partner topic.
+
+ Delete existing partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ partner_topic_name=partner_topic_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'}
+
+ def update(
+ self, resource_group_name, partner_topic_name, tags=None, custom_headers=None, raw=False, **operation_config):
+ """Update a partner topic.
+
+ Asynchronously updates a partner topic with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param tags: Tags of the partner topic.
+ :type tags: dict[str, str]
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ partner_topic_update_parameters = models.PartnerTopicUpdateParameters(tags=tags)
+
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(partner_topic_update_parameters, 'PartnerTopicUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 201:
+ deserialized = self._deserialize('PartnerTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'}
+
+ def list_by_subscription(
+ self, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner topics under an Azure subscription.
+
+ List all the partner topics under an Azure subscription.
+
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerTopic
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerTopicPaged[~azure.mgmt.eventgrid.models.PartnerTopic]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerTopicPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics'}
+
+ def list_by_resource_group(
+ self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List partner topics under a resource group.
+
+ List all the partner topics under a resource group.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of PartnerTopic
+ :rtype:
+ ~azure.mgmt.eventgrid.models.PartnerTopicPaged[~azure.mgmt.eventgrid.models.PartnerTopic]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.PartnerTopicPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics'}
+
+ def activate(
+ self, resource_group_name, partner_topic_name, custom_headers=None, raw=False, **operation_config):
+ """Activate a partner topic.
+
+ Activate a newly created partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.activate.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate'}
+
+ def deactivate(
+ self, resource_group_name, partner_topic_name, custom_headers=None, raw=False, **operation_config):
+ """Deactivate a partner topic.
+
+ Deactivate specific partner topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param partner_topic_name: Name of the partner topic.
+ :type partner_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: PartnerTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.deactivate.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('PartnerTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py
index f9f0aa6ed9eb..d1df43e4a58a 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py
@@ -27,7 +27,7 @@ class PrivateEndpointConnectionsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py
index 989a875634bb..113658ccfca3 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py
@@ -25,7 +25,7 @@ class PrivateLinkResourcesOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py
new file mode 100644
index 000000000000..7720fcaba35f
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py
@@ -0,0 +1,654 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class SystemTopicEventSubscriptionsOperations(object):
+ """SystemTopicEventSubscriptionsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, system_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get an event subscription of a system topic.
+
+ Get an event subscription.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventSubscription or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventSubscription or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _create_or_update_initial(
+ self, resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(event_subscription_info, 'EventSubscription')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def create_or_update(
+ self, resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Create or update an event subscription for a system topic.
+
+ Asynchronously creates or updates an event subscription with the
+ specified parameters. Existing event subscriptions will be updated with
+ this API.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param event_subscription_info: Event subscription properties
+ containing the destination and filter information.
+ :type event_subscription_info:
+ ~azure.mgmt.eventgrid.models.EventSubscription
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns EventSubscription or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.EventSubscription]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.EventSubscription]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ event_subscription_name=event_subscription_name,
+ event_subscription_info=event_subscription_info,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, system_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, system_topic_name, event_subscription_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete an event subscription of a system topic.
+
+ Delete an event subscription of a system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ event_subscription_name=event_subscription_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+
+ def _update_initial(
+ self, resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def update(
+ self, resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Update event subscription of a system topic.
+
+ Update event subscription of a system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param event_subscription_update_parameters: Updated event
+ subscription information.
+ :type event_subscription_update_parameters:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionUpdateParameters
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns EventSubscription or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.EventSubscription]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.EventSubscription]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._update_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ event_subscription_name=event_subscription_name,
+ event_subscription_update_parameters=event_subscription_update_parameters,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('EventSubscription', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'}
+
+ def get_full_url(
+ self, resource_group_name, system_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get full URL of an event subscription of a system topic.
+
+ Get the full endpoint URL for an event subscription of a system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: EventSubscriptionFullUrl or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.EventSubscriptionFullUrl or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_full_url.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EventSubscriptionFullUrl', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_full_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'}
+
+ def list_by_system_topic(
+ self, resource_group_name, system_topic_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List event subscriptions of a system topic.
+
+ List event subscriptions that belong to a specific system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of EventSubscription
+ :rtype:
+ ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_system_topic.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_system_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions'}
+
+ def get_delivery_attributes(
+ self, resource_group_name, system_topic_name, event_subscription_name, custom_headers=None, raw=False, **operation_config):
+ """Get delivery attributes for an event subscription.
+
+ Get all delivery attributes for an event subscription.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param event_subscription_name: Name of the event subscription to be
+ created. Event subscription names must be between 3 and 100 characters
+ in length and use alphanumeric letters only.
+ :type event_subscription_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: DeliveryAttributeListResult or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_delivery_attributes.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str'),
+ 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeliveryAttributeListResult', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_delivery_attributes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py
new file mode 100644
index 000000000000..4aa0182c7d5d
--- /dev/null
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py
@@ -0,0 +1,576 @@
+# 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.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
+
+from .. import models
+
+
+class SystemTopicsOperations(object):
+ """SystemTopicsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2020-10-15-preview"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, system_topic_name, custom_headers=None, raw=False, **operation_config):
+ """Get a system topic.
+
+ Get properties of a system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: SystemTopic or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.eventgrid.models.SystemTopic or
+ ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('SystemTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}'}
+
+
+ def _create_or_update_initial(
+ self, resource_group_name, system_topic_name, system_topic_info, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(system_topic_info, 'SystemTopic')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('SystemTopic', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('SystemTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def create_or_update(
+ self, resource_group_name, system_topic_name, system_topic_info, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Create a system topic.
+
+ Asynchronously creates a new system topic with the specified
+ parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param system_topic_info: System Topic information.
+ :type system_topic_info: ~azure.mgmt.eventgrid.models.SystemTopic
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns SystemTopic or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.SystemTopic]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.SystemTopic]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ system_topic_info=system_topic_info,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('SystemTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}'}
+
+
+ def _delete_initial(
+ self, resource_group_name, system_topic_name, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 202, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ def delete(
+ self, resource_group_name, system_topic_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Delete a system topic.
+
+ Delete existing system topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns None or
+ ClientRawResponse if raw==True
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}'}
+
+
+ def _update_initial(
+ self, resource_group_name, system_topic_name, system_topic_update_parameters, custom_headers=None, raw=False, **operation_config):
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'systemTopicName': self._serialize.url("system_topic_name", system_topic_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(system_topic_update_parameters, 'SystemTopicUpdateParameters')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('SystemTopic', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('SystemTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ def update(
+ self, resource_group_name, system_topic_name, system_topic_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Update a system topic.
+
+ Asynchronously updates a system topic with the specified parameters.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param system_topic_name: Name of the system topic.
+ :type system_topic_name: str
+ :param system_topic_update_parameters: SystemTopic update information.
+ :type system_topic_update_parameters:
+ ~azure.mgmt.eventgrid.models.SystemTopicUpdateParameters
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns SystemTopic or
+ ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.SystemTopic]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.SystemTopic]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._update_initial(
+ resource_group_name=resource_group_name,
+ system_topic_name=system_topic_name,
+ system_topic_update_parameters=system_topic_update_parameters,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('SystemTopic', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}'}
+
+ def list_by_subscription(
+ self, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List system topics under an Azure subscription.
+
+ List all the system topics under an Azure subscription.
+
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of SystemTopic
+ :rtype:
+ ~azure.mgmt.eventgrid.models.SystemTopicPaged[~azure.mgmt.eventgrid.models.SystemTopic]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.SystemTopicPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/systemTopics'}
+
+ def list_by_resource_group(
+ self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config):
+ """List system topics under a resource group.
+
+ List all the system topics under a resource group.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param filter: The query used to filter the search results using OData
+ syntax. Filtering is permitted on the 'name' property only and with
+ limited number of OData operations. These operations are: the
+ 'contains' function as well as the following logical operations: not,
+ and, or, eq (for equal), and ne (for not equal). No arithmetic
+ operations are supported. The following is a valid filter example:
+ $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The
+ following is not a valid filter example: $filter=location eq 'westus'.
+ :type filter: str
+ :param top: The number of results to return per page for the list
+ operation. Valid range for top parameter is 1 to 100. If not
+ specified, the default number of results to be returned is 20 items
+ per page.
+ :type top: int
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of SystemTopic
+ :rtype:
+ ~azure.mgmt.eventgrid.models.SystemTopicPaged[~azure.mgmt.eventgrid.models.SystemTopic]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ if filter is not None:
+ query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.SystemTopicPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics'}
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py
index ed05c90ad4a6..0e29ecc17584 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py
@@ -25,7 +25,7 @@ class TopicTypesOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py
index 1f292158d5a9..6c774846ca79 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py
@@ -27,7 +27,7 @@ class TopicsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01".
+ :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-10-15-preview".
"""
models = models
@@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2020-06-01"
+ self.api_version = "2020-10-15-preview"
self.config = config
@@ -634,29 +634,9 @@ def list_shared_access_keys(
return deserialized
list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys'}
- def regenerate_key(
- self, resource_group_name, topic_name, key_name, custom_headers=None, raw=False, **operation_config):
- """Regenerate key for a topic.
-
- Regenerate a shared access key for a topic.
- :param resource_group_name: The name of the resource group within the
- user's subscription.
- :type resource_group_name: str
- :param topic_name: Name of the topic.
- :type topic_name: str
- :param key_name: Key name to regenerate key1 or key2
- :type key_name: str
- :param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :param operation_config: :ref:`Operation configuration
- overrides`.
- :return: TopicSharedAccessKeys or ClientRawResponse if raw=true
- :rtype: ~azure.mgmt.eventgrid.models.TopicSharedAccessKeys or
- ~msrest.pipeline.ClientRawResponse
- :raises: :class:`CloudError`
- """
+ def _regenerate_key_initial(
+ self, resource_group_name, topic_name, key_name, custom_headers=None, raw=False, **operation_config):
regenerate_key_request = models.TopicRegenerateKeyRequest(key_name=key_name)
# Construct URL
@@ -690,12 +670,13 @@ def regenerate_key(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
- if response.status_code not in [200]:
+ if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
+
if response.status_code == 200:
deserialized = self._deserialize('TopicSharedAccessKeys', response)
@@ -704,6 +685,58 @@ def regenerate_key(
return client_raw_response
return deserialized
+
+ def regenerate_key(
+ self, resource_group_name, topic_name, key_name, custom_headers=None, raw=False, polling=True, **operation_config):
+ """Regenerate key for a topic.
+
+ Regenerate a shared access key for a topic.
+
+ :param resource_group_name: The name of the resource group within the
+ user's subscription.
+ :type resource_group_name: str
+ :param topic_name: Name of the topic.
+ :type topic_name: str
+ :param key_name: Key name to regenerate key1 or key2
+ :type key_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns TopicSharedAccessKeys
+ or ClientRawResponse if raw==True
+ :rtype:
+ ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.TopicSharedAccessKeys]
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.TopicSharedAccessKeys]]
+ :raises: :class:`CloudError`
+ """
+ raw_result = self._regenerate_key_initial(
+ resource_group_name=resource_group_name,
+ topic_name=topic_name,
+ key_name=key_name,
+ custom_headers=custom_headers,
+ raw=True,
+ **operation_config
+ )
+
+ def get_long_running_output(response):
+ deserialized = self._deserialize('TopicSharedAccessKeys', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ lro_delay = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey'}
def list_event_types(
diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py
index 304d7b0ee60c..4d098dcd1661 100644
--- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py
+++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py
@@ -9,4 +9,4 @@
# regenerated.
# --------------------------------------------------------------------------
-VERSION = "3.0.0rc8"
+VERSION = "3.0.0rc9"