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 538fd1e5bf7c..0db3105c7c08 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 @@ -24,6 +24,7 @@ from ._models_py3 import DomainUpdateParameters 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 @@ -68,8 +69,6 @@ from ._models_py3 import RetryPolicy from ._models_py3 import ServiceBusQueueEventSubscriptionDestination from ._models_py3 import ServiceBusTopicEventSubscriptionDestination - from ._models_py3 import SkuDefinitionsForResourceType - from ._models_py3 import SkuDefinitionsForResourceTypeListResult from ._models_py3 import StorageBlobDeadLetterDestination from ._models_py3 import StorageQueueEventSubscriptionDestination from ._models_py3 import StringBeginsWithAdvancedFilter @@ -102,6 +101,7 @@ from ._models import DomainUpdateParameters from ._models import EventChannel from ._models import EventChannelDestination + from ._models import EventChannelFilter from ._models import EventChannelSource from ._models import EventHubEventSubscriptionDestination from ._models import EventSubscription @@ -146,8 +146,6 @@ from ._models import RetryPolicy from ._models import ServiceBusQueueEventSubscriptionDestination from ._models import ServiceBusTopicEventSubscriptionDestination - from ._models import SkuDefinitionsForResourceType - from ._models import SkuDefinitionsForResourceTypeListResult from ._models import StorageBlobDeadLetterDestination from ._models import StorageQueueEventSubscriptionDestination from ._models import StringBeginsWithAdvancedFilter @@ -219,6 +217,7 @@ 'DomainUpdateParameters', 'EventChannel', 'EventChannelDestination', + 'EventChannelFilter', 'EventChannelSource', 'EventHubEventSubscriptionDestination', 'EventSubscription', @@ -263,8 +262,6 @@ 'RetryPolicy', 'ServiceBusQueueEventSubscriptionDestination', 'ServiceBusTopicEventSubscriptionDestination', - 'SkuDefinitionsForResourceType', - 'SkuDefinitionsForResourceTypeListResult', 'StorageBlobDeadLetterDestination', 'StorageQueueEventSubscriptionDestination', 'StringBeginsWithAdvancedFilter', 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 1de5cb112928..d772c9ac0366 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 @@ -167,7 +167,7 @@ class CloudError(Model): class ConnectionState(Model): - """ConnectionState Information. + """ConnectionState information. :param status: Status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' @@ -587,6 +587,8 @@ class EventChannel(Resource): 'Canceled', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.EventChannelProvisioningState + :param filter: Information about the filter for the event channel. + :type filter: ~azure.mgmt.eventgrid.models.EventChannelFilter """ _validation = { @@ -603,6 +605,7 @@ class EventChannel(Resource): 'source': {'key': 'properties.source', 'type': 'EventChannelSource'}, 'destination': {'key': 'properties.destination', 'type': 'EventChannelDestination'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'filter': {'key': 'properties.filter', 'type': 'EventChannelFilter'}, } def __init__(self, **kwargs): @@ -610,6 +613,7 @@ def __init__(self, **kwargs): self.source = kwargs.get('source', None) self.destination = kwargs.get('destination', None) self.provisioning_state = None + self.filter = kwargs.get('filter', None) class EventChannelDestination(Model): @@ -643,6 +647,48 @@ def __init__(self, **kwargs): self.partner_topic_name = kwargs.get('partner_topic_name', None) +class EventChannelFilter(Model): + """Filter for the Event Channel. + + :param subject_begins_with: An optional string to filter events for an + event channel based on a resource path prefix. + The format of this depends on the publisher of the events. Wildcard + characters are not supported in this path. + :type subject_begins_with: str + :param subject_ends_with: An optional string to filter events for an event + channel based on a resource path suffix. + Wildcard characters are not supported in this path. + :type subject_ends_with: str + :param included_event_types: A list of applicable event types that need to + be part of the event channel. If it is desired to subscribe to all default + event types, set the IncludedEventTypes to null. + :type included_event_types: list[str] + :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and + SubjectEndsWith properties of the filter + should be compared in a case sensitive manner. + :type is_subject_case_sensitive: 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 = { + 'subject_begins_with': {'key': 'subjectBeginsWith', 'type': 'str'}, + 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, + 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, + 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, + 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, + } + + def __init__(self, **kwargs): + super(EventChannelFilter, self).__init__(**kwargs) + self.subject_begins_with = kwargs.get('subject_begins_with', None) + 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', None) + self.advanced_filters = kwargs.get('advanced_filters', None) + + class EventChannelSource(Model): """Properties of the source of an event channel. @@ -1725,6 +1771,8 @@ def __init__(self, **kwargs): 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 @@ -1750,6 +1798,7 @@ class PartnerRegistrationUpdateParameters(Model): """ _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'}, @@ -1760,6 +1809,7 @@ class PartnerRegistrationUpdateParameters(Model): 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) @@ -1936,7 +1986,7 @@ def __init__(self, **kwargs): class PrivateEndpointConnection(Resource): - """PrivateEndpointConnection resource information. + """PrivateEndpointConnection. Variables are only populated by the server, and will be ignored when sending a request. @@ -2122,47 +2172,6 @@ def __init__(self, **kwargs): self.endpoint_type = 'ServiceBusTopic' -class SkuDefinitionsForResourceType(Model): - """Describes an EventGrid Resource Sku Definition. - - :param resource_type: The Resource Type applicable for the Sku. - :type resource_type: str - :param skus: The Sku pricing tiers for the resource type. - :type skus: list[~azure.mgmt.eventgrid.models.ResourceSku] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[ResourceSku]'}, - } - - def __init__(self, **kwargs): - super(SkuDefinitionsForResourceType, self).__init__(**kwargs) - self.resource_type = kwargs.get('resource_type', None) - self.skus = kwargs.get('skus', None) - - -class SkuDefinitionsForResourceTypeListResult(Model): - """List collection of Sku Definitions for each Resource Type. - - :param value: A collection of Sku Definitions for each Resource Type. - :type value: - list[~azure.mgmt.eventgrid.models.SkuDefinitionsForResourceType] - :param next_link: A link for the next page of Sku Definitions. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SkuDefinitionsForResourceType]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SkuDefinitionsForResourceTypeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - class StorageBlobDeadLetterDestination(DeadLetterDestination): """Information about the storage blob based dead letter destination. @@ -2471,7 +2480,7 @@ class Topic(TrackedResource): :type location: str :param tags: Tags of the resource. :type tags: dict[str, str] - :param private_endpoint_connections: List of private endpoint connections. + :param private_endpoint_connections: :type private_endpoint_connections: list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] :ivar provisioning_state: Provisioning state of the topic. Possible values 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 7e9db8370110..72d8e5795f90 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 @@ -167,7 +167,7 @@ class CloudError(Model): class ConnectionState(Model): - """ConnectionState Information. + """ConnectionState information. :param status: Status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' @@ -587,6 +587,8 @@ class EventChannel(Resource): 'Canceled', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.EventChannelProvisioningState + :param filter: Information about the filter for the event channel. + :type filter: ~azure.mgmt.eventgrid.models.EventChannelFilter """ _validation = { @@ -603,13 +605,15 @@ class EventChannel(Resource): 'source': {'key': 'properties.source', 'type': 'EventChannelSource'}, 'destination': {'key': 'properties.destination', 'type': 'EventChannelDestination'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'filter': {'key': 'properties.filter', 'type': 'EventChannelFilter'}, } - def __init__(self, *, source=None, destination=None, **kwargs) -> None: + def __init__(self, *, source=None, destination=None, filter=None, **kwargs) -> None: super(EventChannel, self).__init__(**kwargs) self.source = source self.destination = destination self.provisioning_state = None + self.filter = filter class EventChannelDestination(Model): @@ -643,6 +647,48 @@ def __init__(self, *, azure_subscription_id: str=None, resource_group: str=None, self.partner_topic_name = partner_topic_name +class EventChannelFilter(Model): + """Filter for the Event Channel. + + :param subject_begins_with: An optional string to filter events for an + event channel based on a resource path prefix. + The format of this depends on the publisher of the events. Wildcard + characters are not supported in this path. + :type subject_begins_with: str + :param subject_ends_with: An optional string to filter events for an event + channel based on a resource path suffix. + Wildcard characters are not supported in this path. + :type subject_ends_with: str + :param included_event_types: A list of applicable event types that need to + be part of the event channel. If it is desired to subscribe to all default + event types, set the IncludedEventTypes to null. + :type included_event_types: list[str] + :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and + SubjectEndsWith properties of the filter + should be compared in a case sensitive manner. + :type is_subject_case_sensitive: 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 = { + 'subject_begins_with': {'key': 'subjectBeginsWith', 'type': 'str'}, + 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, + 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, + 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', '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=None, advanced_filters=None, **kwargs) -> None: + super(EventChannelFilter, 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.advanced_filters = advanced_filters + + class EventChannelSource(Model): """Properties of the source of an event channel. @@ -1725,6 +1771,8 @@ def __init__(self, *, value=None, next_link: str=None, **kwargs) -> 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 @@ -1750,6 +1798,7 @@ class PartnerRegistrationUpdateParameters(Model): """ _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'}, @@ -1758,8 +1807,9 @@ class PartnerRegistrationUpdateParameters(Model): 'authorized_azure_subscription_ids': {'key': 'authorizedAzureSubscriptionIds', 'type': '[str]'}, } - def __init__(self, *, 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: + 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 @@ -1936,7 +1986,7 @@ def __init__(self, *, id: str=None, **kwargs) -> None: class PrivateEndpointConnection(Resource): - """PrivateEndpointConnection resource information. + """PrivateEndpointConnection. Variables are only populated by the server, and will be ignored when sending a request. @@ -2122,47 +2172,6 @@ def __init__(self, *, resource_id: str=None, **kwargs) -> None: self.endpoint_type = 'ServiceBusTopic' -class SkuDefinitionsForResourceType(Model): - """Describes an EventGrid Resource Sku Definition. - - :param resource_type: The Resource Type applicable for the Sku. - :type resource_type: str - :param skus: The Sku pricing tiers for the resource type. - :type skus: list[~azure.mgmt.eventgrid.models.ResourceSku] - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'skus': {'key': 'skus', 'type': '[ResourceSku]'}, - } - - def __init__(self, *, resource_type: str=None, skus=None, **kwargs) -> None: - super(SkuDefinitionsForResourceType, self).__init__(**kwargs) - self.resource_type = resource_type - self.skus = skus - - -class SkuDefinitionsForResourceTypeListResult(Model): - """List collection of Sku Definitions for each Resource Type. - - :param value: A collection of Sku Definitions for each Resource Type. - :type value: - list[~azure.mgmt.eventgrid.models.SkuDefinitionsForResourceType] - :param next_link: A link for the next page of Sku Definitions. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SkuDefinitionsForResourceType]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(SkuDefinitionsForResourceTypeListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - class StorageBlobDeadLetterDestination(DeadLetterDestination): """Information about the storage blob based dead letter destination. @@ -2471,7 +2480,7 @@ class Topic(TrackedResource): :type location: str :param tags: Tags of the resource. :type tags: dict[str, str] - :param private_endpoint_connections: List of private endpoint connections. + :param private_endpoint_connections: :type private_endpoint_connections: list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] :ivar provisioning_state: Provisioning state of the topic. Possible values 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 index 25f10bb4882d..ef4d815ffdf4 100644 --- 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 @@ -12,6 +12,8 @@ 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 @@ -180,28 +182,9 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} - def delete( - self, resource_group_name, partner_namespace_name, event_channel_name, custom_headers=None, raw=False, **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: 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` - """ + 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 = { @@ -237,6 +220,52 @@ def delete( 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( 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 index 678c1fef122a..04110282b68d 100644 --- 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 @@ -492,7 +492,7 @@ def get_full_url( 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, custom_headers=None, raw=False, **operation_config): + 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. @@ -502,6 +502,20 @@ def list_by_partner_topic( :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 @@ -526,6 +540,10 @@ def prepare_request(next_link=None): # 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 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 6aa90da3bc5f..253fc8db2222 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 @@ -116,7 +116,7 @@ def get( def _update_initial( - self, resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -135,6 +135,7 @@ def _update_initial( # 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: @@ -142,8 +143,11 @@ def _update_initial( 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(private_endpoint_connection, 'PrivateEndpointConnection') + # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) + 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]: @@ -165,7 +169,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers=None, raw=False, polling=True, **operation_config): """Update a specific private endpoint connection. Update a specific private endpoint connection under a topic or domain. @@ -182,6 +186,10 @@ def update( :param private_endpoint_connection_name: The name of the private endpoint connection connection. :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection + object to update. + :type private_endpoint_connection: + ~azure.mgmt.eventgrid.models.PrivateEndpointConnection :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 @@ -201,6 +209,7 @@ def update( parent_type=parent_type, parent_name=parent_name, private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, custom_headers=custom_headers, raw=True, **operation_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 index 94eb74dd3bb6..bfa03f260133 100644 --- 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 @@ -492,7 +492,7 @@ def get_full_url( 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, custom_headers=None, raw=False, **operation_config): + 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. @@ -502,6 +502,20 @@ def list_by_system_topic( :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 @@ -526,6 +540,10 @@ def prepare_request(next_link=None): # 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