From 4f13bcab847cd7877f7e60dc7c846c002e9e386e Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Mon, 13 Jun 2022 06:10:45 +0000 Subject: [PATCH 1/3] code and test --- .../azure-mgmt-eventgrid/CHANGELOG.md | 20 + sdk/eventgrid/azure-mgmt-eventgrid/_meta.json | 4 +- .../azure/mgmt/eventgrid/_configuration.py | 6 +- .../_event_grid_management_client.py | 32 +- .../azure/mgmt/eventgrid/_metadata.json | 124 -- .../azure/mgmt/eventgrid/_version.py | 2 +- .../mgmt/eventgrid/aio/_configuration.py | 6 +- .../aio/_event_grid_management_client.py | 33 +- .../mgmt/eventgrid/aio/operations/__init__.py | 16 +- .../aio/operations/_channels_operations.py | 14 +- .../_domain_event_subscriptions_operations.py | 146 +- ...in_topic_event_subscriptions_operations.py | 20 +- .../operations/_domain_topics_operations.py | 12 +- .../aio/operations/_domains_operations.py | 22 +- .../operations/_event_channels_operations.py | 398 ------ .../_event_subscriptions_operations.py | 38 +- .../_extension_topics_operations.py | 2 +- .../eventgrid/aio/operations/_operations.py | 2 +- .../_partner_configurations_operations.py | 22 +- .../_partner_destinations_operations.py | 606 -------- .../_partner_namespaces_operations.py | 22 +- .../_partner_registrations_operations.py | 18 +- ...er_topic_event_subscriptions_operations.py | 20 +- .../operations/_partner_topics_operations.py | 18 +- ...private_endpoint_connections_operations.py | 32 +- .../_private_link_resources_operations.py | 4 +- ...em_topic_event_subscriptions_operations.py | 20 +- .../operations/_system_topics_operations.py | 18 +- .../_topic_event_subscriptions_operations.py | 146 +- .../aio/operations/_topic_types_operations.py | 6 +- .../aio/operations/_topics_operations.py | 26 +- .../_verified_partners_operations.py | 4 +- .../azure/mgmt/eventgrid/models/__init__.py | 62 +- .../_event_grid_management_client_enums.py | 104 +- .../mgmt/eventgrid/models/_models_py3.py | 1238 +---------------- .../mgmt/eventgrid/operations/__init__.py | 16 +- .../operations/_channels_operations.py | 26 +- .../_domain_event_subscriptions_operations.py | 234 ++-- ...in_topic_event_subscriptions_operations.py | 34 +- .../operations/_domain_topics_operations.py | 20 +- .../operations/_domains_operations.py | 38 +- .../operations/_event_channels_operations.py | 559 -------- .../_event_subscriptions_operations.py | 70 +- .../_extension_topics_operations.py | 4 +- .../mgmt/eventgrid/operations/_operations.py | 4 +- .../_partner_configurations_operations.py | 38 +- .../_partner_destinations_operations.py | 879 ------------ .../_partner_namespaces_operations.py | 38 +- .../_partner_registrations_operations.py | 30 +- ...er_topic_event_subscriptions_operations.py | 34 +- .../operations/_partner_topics_operations.py | 34 +- ...private_endpoint_connections_operations.py | 48 +- .../_private_link_resources_operations.py | 8 +- ...em_topic_event_subscriptions_operations.py | 34 +- .../operations/_system_topics_operations.py | 30 +- .../_topic_event_subscriptions_operations.py | 234 ++-- .../operations/_topic_types_operations.py | 12 +- .../operations/_topics_operations.py | 44 +- .../_verified_partners_operations.py | 8 +- ...domain.pyTestMgmtEventGridtest_domain.json | 392 +----- 60 files changed, 976 insertions(+), 5155 deletions(-) delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_destinations_operations.py delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_destinations_operations.py diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md index 955d4b5cc9db..8fa1e35d27a0 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md @@ -1,5 +1,25 @@ # Release History +## 10.2.0 (2022-06-13) + +**Features** + + - Added operation group ChannelsOperations + - Added operation group DomainEventSubscriptionsOperations + - Added operation group DomainTopicEventSubscriptionsOperations + - Added operation group PartnerConfigurationsOperations + - Added operation group PartnerNamespacesOperations + - Added operation group PartnerRegistrationsOperations + - Added operation group PartnerTopicEventSubscriptionsOperations + - Added operation group PartnerTopicsOperations + - Added operation group TopicEventSubscriptionsOperations + - Added operation group VerifiedPartnersOperations + - Model Domain has a new parameter data_residency_boundary + - Model DomainUpdateParameters has a new parameter data_residency_boundary + - Model Operation has a new parameter is_data_action + - Model Topic has a new parameter data_residency_boundary + - Model TopicUpdateParameters has a new parameter data_residency_boundary + ## 10.2.0b2 (2022-05-30) **Breaking changes** diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json index 4ecfbcfde767..5f81584f7682 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.13.0", "@autorest/modelerfour@4.19.3" ], - "commit": "32143b0f5f230ee2601e3c5d1990188666a5058d", + "commit": "34c658b6354f16d452e937ee983bb73386ff50a4", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/eventgrid/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py index 8bd071d981fd..c359484d356d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py @@ -30,8 +30,8 @@ class EventGridManagementClientConfiguration(Configuration): # pylint: disable= :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-10-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +42,7 @@ def __init__( **kwargs: Any ) -> None: super(EventGridManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 3aabbb14e980..8df704df72cb 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 @@ -16,7 +16,7 @@ from . import models from ._configuration import EventGridManagementClientConfiguration -from .operations import ChannelsOperations, DomainEventSubscriptionsOperations, DomainTopicEventSubscriptionsOperations, DomainTopicsOperations, DomainsOperations, EventChannelsOperations, EventSubscriptionsOperations, ExtensionTopicsOperations, Operations, PartnerConfigurationsOperations, PartnerDestinationsOperations, PartnerNamespacesOperations, PartnerRegistrationsOperations, PartnerTopicEventSubscriptionsOperations, PartnerTopicsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, SystemTopicEventSubscriptionsOperations, SystemTopicsOperations, TopicEventSubscriptionsOperations, TopicTypesOperations, TopicsOperations, VerifiedPartnersOperations +from .operations import ChannelsOperations, DomainEventSubscriptionsOperations, DomainTopicEventSubscriptionsOperations, DomainTopicsOperations, DomainsOperations, EventSubscriptionsOperations, ExtensionTopicsOperations, Operations, PartnerConfigurationsOperations, PartnerNamespacesOperations, PartnerRegistrationsOperations, PartnerTopicEventSubscriptionsOperations, PartnerTopicsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, SystemTopicEventSubscriptionsOperations, SystemTopicsOperations, TopicEventSubscriptionsOperations, TopicTypesOperations, TopicsOperations, VerifiedPartnersOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -31,19 +31,17 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut :vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations :ivar domain_topics: DomainTopicsOperations operations :vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations - :ivar event_channels: EventChannelsOperations operations - :vartype event_channels: azure.mgmt.eventgrid.operations.EventChannelsOperations - :ivar event_subscriptions: EventSubscriptionsOperations operations - :vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations - :ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations - :vartype domain_topic_event_subscriptions: - azure.mgmt.eventgrid.operations.DomainTopicEventSubscriptionsOperations :ivar topic_event_subscriptions: TopicEventSubscriptionsOperations operations :vartype topic_event_subscriptions: azure.mgmt.eventgrid.operations.TopicEventSubscriptionsOperations :ivar domain_event_subscriptions: DomainEventSubscriptionsOperations operations :vartype domain_event_subscriptions: azure.mgmt.eventgrid.operations.DomainEventSubscriptionsOperations + :ivar event_subscriptions: EventSubscriptionsOperations operations + :vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations + :ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations + :vartype domain_topic_event_subscriptions: + azure.mgmt.eventgrid.operations.DomainTopicEventSubscriptionsOperations :ivar system_topic_event_subscriptions: SystemTopicEventSubscriptionsOperations operations :vartype system_topic_event_subscriptions: azure.mgmt.eventgrid.operations.SystemTopicEventSubscriptionsOperations @@ -52,11 +50,11 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut azure.mgmt.eventgrid.operations.PartnerTopicEventSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.eventgrid.operations.Operations + :ivar topics: TopicsOperations operations + :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations :ivar partner_configurations: PartnerConfigurationsOperations operations :vartype partner_configurations: azure.mgmt.eventgrid.operations.PartnerConfigurationsOperations - :ivar partner_destinations: PartnerDestinationsOperations operations - :vartype partner_destinations: azure.mgmt.eventgrid.operations.PartnerDestinationsOperations :ivar partner_namespaces: PartnerNamespacesOperations operations :vartype partner_namespaces: azure.mgmt.eventgrid.operations.PartnerNamespacesOperations :ivar partner_registrations: PartnerRegistrationsOperations operations @@ -70,8 +68,6 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut :vartype private_link_resources: azure.mgmt.eventgrid.operations.PrivateLinkResourcesOperations :ivar system_topics: SystemTopicsOperations operations :vartype system_topics: azure.mgmt.eventgrid.operations.SystemTopicsOperations - :ivar topics: TopicsOperations operations - :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations :ivar extension_topics: ExtensionTopicsOperations operations :vartype extension_topics: azure.mgmt.eventgrid.operations.ExtensionTopicsOperations :ivar topic_types: TopicTypesOperations operations @@ -85,8 +81,8 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2021-10-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -109,23 +105,21 @@ def __init__( self.channels = ChannelsOperations(self._client, self._config, self._serialize, self._deserialize) self.domains = DomainsOperations(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.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) self.topic_event_subscriptions = TopicEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) self.domain_event_subscriptions = DomainEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.event_subscriptions = EventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(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._client, self._config, self._serialize, self._deserialize) self.partner_configurations = PartnerConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.partner_destinations = PartnerDestinationsOperations(self._client, self._config, self._serialize, self._deserialize) 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) self.verified_partners = VerifiedPartnersOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json deleted file mode 100644 index 1561f0e29de7..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "chosen_version": "2021-10-15-preview", - "total_api_version_list": ["2021-10-15-preview"], - "client": { - "name": "EventGridManagementClient", - "filename": "_event_grid_management_client", - "description": "Azure EventGrid Management Client.", - "host_value": "\"https://management.azure.com\"", - "parameterized_host_template": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EventGridManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EventGridManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=\"https://management.azure.com\", # type: str", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", - "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "channels": "ChannelsOperations", - "domains": "DomainsOperations", - "domain_topics": "DomainTopicsOperations", - "event_channels": "EventChannelsOperations", - "event_subscriptions": "EventSubscriptionsOperations", - "domain_topic_event_subscriptions": "DomainTopicEventSubscriptionsOperations", - "topic_event_subscriptions": "TopicEventSubscriptionsOperations", - "domain_event_subscriptions": "DomainEventSubscriptionsOperations", - "system_topic_event_subscriptions": "SystemTopicEventSubscriptionsOperations", - "partner_topic_event_subscriptions": "PartnerTopicEventSubscriptionsOperations", - "operations": "Operations", - "partner_configurations": "PartnerConfigurationsOperations", - "partner_destinations": "PartnerDestinationsOperations", - "partner_namespaces": "PartnerNamespacesOperations", - "partner_registrations": "PartnerRegistrationsOperations", - "partner_topics": "PartnerTopicsOperations", - "private_endpoint_connections": "PrivateEndpointConnectionsOperations", - "private_link_resources": "PrivateLinkResourcesOperations", - "system_topics": "SystemTopicsOperations", - "topics": "TopicsOperations", - "extension_topics": "ExtensionTopicsOperations", - "topic_types": "TopicTypesOperations", - "verified_partners": "VerifiedPartnersOperations" - } -} \ No newline at end of file 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 904865f36a5c..dca644af5794 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "10.2.0b2" +VERSION = "10.2.0" diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py index 909376c85d5c..fe1ec20750c8 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py @@ -30,8 +30,8 @@ class EventGridManagementClientConfiguration(Configuration): # pylint: disable= :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-10-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +42,7 @@ def __init__( **kwargs: Any ) -> None: super(EventGridManagementClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py index 7a6c1d7003a3..56b3a49003df 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py @@ -16,7 +16,7 @@ from .. import models from ._configuration import EventGridManagementClientConfiguration -from .operations import ChannelsOperations, DomainEventSubscriptionsOperations, DomainTopicEventSubscriptionsOperations, DomainTopicsOperations, DomainsOperations, EventChannelsOperations, EventSubscriptionsOperations, ExtensionTopicsOperations, Operations, PartnerConfigurationsOperations, PartnerDestinationsOperations, PartnerNamespacesOperations, PartnerRegistrationsOperations, PartnerTopicEventSubscriptionsOperations, PartnerTopicsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, SystemTopicEventSubscriptionsOperations, SystemTopicsOperations, TopicEventSubscriptionsOperations, TopicTypesOperations, TopicsOperations, VerifiedPartnersOperations +from .operations import ChannelsOperations, DomainEventSubscriptionsOperations, DomainTopicEventSubscriptionsOperations, DomainTopicsOperations, DomainsOperations, EventSubscriptionsOperations, ExtensionTopicsOperations, Operations, PartnerConfigurationsOperations, PartnerNamespacesOperations, PartnerRegistrationsOperations, PartnerTopicEventSubscriptionsOperations, PartnerTopicsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, SystemTopicEventSubscriptionsOperations, SystemTopicsOperations, TopicEventSubscriptionsOperations, TopicTypesOperations, TopicsOperations, VerifiedPartnersOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -31,19 +31,17 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut :vartype domains: azure.mgmt.eventgrid.aio.operations.DomainsOperations :ivar domain_topics: DomainTopicsOperations operations :vartype domain_topics: azure.mgmt.eventgrid.aio.operations.DomainTopicsOperations - :ivar event_channels: EventChannelsOperations operations - :vartype event_channels: azure.mgmt.eventgrid.aio.operations.EventChannelsOperations - :ivar event_subscriptions: EventSubscriptionsOperations operations - :vartype event_subscriptions: azure.mgmt.eventgrid.aio.operations.EventSubscriptionsOperations - :ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations - :vartype domain_topic_event_subscriptions: - azure.mgmt.eventgrid.aio.operations.DomainTopicEventSubscriptionsOperations :ivar topic_event_subscriptions: TopicEventSubscriptionsOperations operations :vartype topic_event_subscriptions: azure.mgmt.eventgrid.aio.operations.TopicEventSubscriptionsOperations :ivar domain_event_subscriptions: DomainEventSubscriptionsOperations operations :vartype domain_event_subscriptions: azure.mgmt.eventgrid.aio.operations.DomainEventSubscriptionsOperations + :ivar event_subscriptions: EventSubscriptionsOperations operations + :vartype event_subscriptions: azure.mgmt.eventgrid.aio.operations.EventSubscriptionsOperations + :ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations + :vartype domain_topic_event_subscriptions: + azure.mgmt.eventgrid.aio.operations.DomainTopicEventSubscriptionsOperations :ivar system_topic_event_subscriptions: SystemTopicEventSubscriptionsOperations operations :vartype system_topic_event_subscriptions: azure.mgmt.eventgrid.aio.operations.SystemTopicEventSubscriptionsOperations @@ -52,12 +50,11 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut azure.mgmt.eventgrid.aio.operations.PartnerTopicEventSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.eventgrid.aio.operations.Operations + :ivar topics: TopicsOperations operations + :vartype topics: azure.mgmt.eventgrid.aio.operations.TopicsOperations :ivar partner_configurations: PartnerConfigurationsOperations operations :vartype partner_configurations: azure.mgmt.eventgrid.aio.operations.PartnerConfigurationsOperations - :ivar partner_destinations: PartnerDestinationsOperations operations - :vartype partner_destinations: - azure.mgmt.eventgrid.aio.operations.PartnerDestinationsOperations :ivar partner_namespaces: PartnerNamespacesOperations operations :vartype partner_namespaces: azure.mgmt.eventgrid.aio.operations.PartnerNamespacesOperations :ivar partner_registrations: PartnerRegistrationsOperations operations @@ -73,8 +70,6 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut azure.mgmt.eventgrid.aio.operations.PrivateLinkResourcesOperations :ivar system_topics: SystemTopicsOperations operations :vartype system_topics: azure.mgmt.eventgrid.aio.operations.SystemTopicsOperations - :ivar topics: TopicsOperations operations - :vartype topics: azure.mgmt.eventgrid.aio.operations.TopicsOperations :ivar extension_topics: ExtensionTopicsOperations operations :vartype extension_topics: azure.mgmt.eventgrid.aio.operations.ExtensionTopicsOperations :ivar topic_types: TopicTypesOperations operations @@ -88,8 +83,8 @@ class EventGridManagementClient: # pylint: disable=too-many-instance-attribut :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2021-10-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -112,23 +107,21 @@ def __init__( self.channels = ChannelsOperations(self._client, self._config, self._serialize, self._deserialize) self.domains = DomainsOperations(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.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) self.topic_event_subscriptions = TopicEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) self.domain_event_subscriptions = DomainEventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.event_subscriptions = EventSubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(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._client, self._config, self._serialize, self._deserialize) self.partner_configurations = PartnerConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.partner_destinations = PartnerDestinationsOperations(self._client, self._config, self._serialize, self._deserialize) 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) self.verified_partners = VerifiedPartnersOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py index 258ebb7b5751..74227e25aa0d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py @@ -9,23 +9,21 @@ from ._channels_operations import ChannelsOperations from ._domains_operations import DomainsOperations from ._domain_topics_operations import DomainTopicsOperations -from ._event_channels_operations import EventChannelsOperations -from ._event_subscriptions_operations import EventSubscriptionsOperations -from ._domain_topic_event_subscriptions_operations import DomainTopicEventSubscriptionsOperations from ._topic_event_subscriptions_operations import TopicEventSubscriptionsOperations from ._domain_event_subscriptions_operations import DomainEventSubscriptionsOperations +from ._event_subscriptions_operations import EventSubscriptionsOperations +from ._domain_topic_event_subscriptions_operations import DomainTopicEventSubscriptionsOperations 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_configurations_operations import PartnerConfigurationsOperations -from ._partner_destinations_operations import PartnerDestinationsOperations 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 from ._verified_partners_operations import VerifiedPartnersOperations @@ -34,23 +32,21 @@ 'ChannelsOperations', 'DomainsOperations', 'DomainTopicsOperations', - 'EventChannelsOperations', - 'EventSubscriptionsOperations', - 'DomainTopicEventSubscriptionsOperations', 'TopicEventSubscriptionsOperations', 'DomainEventSubscriptionsOperations', + 'EventSubscriptionsOperations', + 'DomainTopicEventSubscriptionsOperations', 'SystemTopicEventSubscriptionsOperations', 'PartnerTopicEventSubscriptionsOperations', 'Operations', + 'TopicsOperations', 'PartnerConfigurationsOperations', - 'PartnerDestinationsOperations', 'PartnerNamespacesOperations', 'PartnerRegistrationsOperations', 'PartnerTopicsOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', 'SystemTopicsOperations', - 'TopicsOperations', 'ExtensionTopicsOperations', 'TopicTypesOperations', 'VerifiedPartnersOperations', diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_channels_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_channels_operations.py index b32ff4f70a62..9f0a3a0a50f6 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_channels_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_channels_operations.py @@ -76,7 +76,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -143,7 +143,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(channel_info, 'Channel') @@ -199,7 +199,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -260,7 +260,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -330,7 +330,7 @@ async def update( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(channel_update_parameters, 'ChannelUpdateParameters') @@ -400,7 +400,7 @@ def list_by_partner_namespace( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.ChannelsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ChannelsListResult"] error_map = { @@ -496,7 +496,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_event_subscriptions_operations.py index 0658ac1d9bad..a7ccc09f9e1e 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_event_subscriptions_operations.py @@ -47,6 +47,70 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async + async def get_delivery_attributes( + self, + resource_group_name: str, + domain_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": + """Get delivery attributes for an event subscription for domain. + + Get all delivery attributes for an event subscription for domain. + + :param resource_group_name: The name of the resource group within the user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain topic. + :type domain_name: str + :param event_subscription_name: Name of the event subscription. + :type event_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeliveryAttributeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + + request = build_get_delivery_attributes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + domain_name=domain_name, + event_subscription_name=event_subscription_name, + api_version=api_version, + template_url=self.get_delivery_attributes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore + + @distributed_trace_async async def get( self, @@ -77,7 +141,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -126,7 +190,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -206,7 +270,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -263,7 +327,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -326,7 +390,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -378,7 +442,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -452,7 +516,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -525,7 +589,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -596,7 +660,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -662,67 +726,3 @@ async def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions"} # type: ignore - - @distributed_trace_async - async def get_delivery_attributes( - self, - resource_group_name: str, - domain_name: str, - event_subscription_name: str, - **kwargs: Any - ) -> "_models.DeliveryAttributeListResult": - """Get delivery attributes for an event subscription for domain. - - Get all delivery attributes for an event subscription for domain. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain topic. - :type domain_name: str - :param event_subscription_name: Name of the event subscription. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_delivery_attributes_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - domain_name=domain_name, - event_subscription_name=event_subscription_name, - api_version=api_version, - template_url=self.get_delivery_attributes.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore - diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topic_event_subscriptions_operations.py index 81394d9fc333..b1f8cb8ada9a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topic_event_subscriptions_operations.py @@ -79,7 +79,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -130,7 +130,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -214,7 +214,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -273,7 +273,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -340,7 +340,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -394,7 +394,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -472,7 +472,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -549,7 +549,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -624,7 +624,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -725,7 +725,7 @@ async def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py index eda95c1b0dd9..59c3fa7d5b77 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py @@ -76,7 +76,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -124,7 +124,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_create_or_update_request_initial( @@ -190,7 +190,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.DomainTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainTopic"] lro_delay = kwargs.pop( @@ -244,7 +244,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -305,7 +305,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -379,7 +379,7 @@ def list_by_domain( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.DomainTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainTopicsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py index 97a87d0b5a5b..6f8cfc705e14 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -120,7 +120,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_info, 'Domain') @@ -189,7 +189,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] @@ -244,7 +244,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -301,7 +301,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -351,7 +351,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') @@ -422,7 +422,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] @@ -493,7 +493,7 @@ def list_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.DomainsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainsListResult"] error_map = { @@ -587,7 +587,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.DomainsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainsListResult"] error_map = { @@ -678,7 +678,7 @@ async def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -741,7 +741,7 @@ async def regenerate_key( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py deleted file mode 100644 index 0b80c1c63ae6..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py +++ /dev/null @@ -1,398 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._event_channels_operations import build_create_or_update_request, build_delete_request_initial, build_get_request, build_list_by_partner_namespace_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class EventChannelsOperations: - """EventChannelsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> "_models.EventChannel": - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('EventChannel', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - event_channel_info: "_models.EventChannel", - **kwargs: Any - ) -> "_models.EventChannel": - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(event_channel_info, 'EventChannel') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('EventChannel', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - @distributed_trace - def list_by_partner_namespace( - self, - resource_group_name: str, - partner_namespace_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.EventChannelsListResult"]: - """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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventChannelsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventChannelsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannelsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_partner_namespace_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_partner_namespace.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_partner_namespace_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EventChannelsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_partner_namespace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels"} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py index ea05cc057a37..d8e3a004753f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py @@ -80,7 +80,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -126,7 +126,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -205,7 +205,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -260,7 +260,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -323,7 +323,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -373,7 +373,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -449,7 +449,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -525,7 +525,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -588,7 +588,7 @@ def list_global_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -684,7 +684,7 @@ def list_global_by_subscription_for_topic_type( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -782,7 +782,7 @@ def list_global_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -883,7 +883,7 @@ def list_global_by_resource_group_for_topic_type( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -983,7 +983,7 @@ def list_regional_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1085,7 +1085,7 @@ def list_regional_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1189,7 +1189,7 @@ def list_regional_by_subscription_for_topic_type( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1297,7 +1297,7 @@ def list_regional_by_resource_group_for_topic_type( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1408,7 +1408,7 @@ def list_by_resource( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1518,7 +1518,7 @@ def list_by_domain_topic( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1620,7 +1620,7 @@ async def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py index 439608f199c3..ca364929ebb9 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py @@ -71,7 +71,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py index 7d40ea5a1f53..3d5e1da4b887 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py @@ -60,7 +60,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.OperationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_configurations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_configurations_operations.py index 8cbfa4a681ab..d49ec6738b37 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_configurations_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_configurations_operations.py @@ -70,7 +70,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -115,7 +115,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_configuration_info, 'PartnerConfiguration') @@ -184,7 +184,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerConfiguration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfiguration"] @@ -237,7 +237,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -290,7 +290,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -338,7 +338,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_configuration_update_parameters, 'PartnerConfigurationUpdateParameters') @@ -408,7 +408,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerConfiguration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfiguration"] @@ -469,7 +469,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerConfigurationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfigurationsListResult"] error_map = { @@ -560,7 +560,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerConfigurationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfigurationsListResult"] error_map = { @@ -649,7 +649,7 @@ async def authorize_partner( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_info, 'Partner') @@ -712,7 +712,7 @@ async def unauthorize_partner( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_info, 'Partner') diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_destinations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_destinations_operations.py deleted file mode 100644 index 31b11d6ccc2f..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_destinations_operations.py +++ /dev/null @@ -1,606 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._partner_destinations_operations import build_activate_request, build_create_or_update_request, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_update_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PartnerDestinationsOperations: - """PartnerDestinationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> "_models.PartnerDestination": - """Get a partner destination. - - Get properties of a partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - partner_destination_name: str, - partner_destination: "_models.PartnerDestination", - **kwargs: Any - ) -> "_models.PartnerDestination": - """Create a partner destination. - - Asynchronously creates a new partner destination 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_destination_name: Name of the partner destination. - :type partner_destination_name: str - :param partner_destination: Partner destination create information. - :type partner_destination: ~azure.mgmt.eventgrid.models.PartnerDestination - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner_destination, 'PartnerDestination') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a partner destination. - - Delete existing partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - partner_destination_name: str, - partner_destination_update_parameters: "_models.PartnerDestinationUpdateParameters", - **kwargs: Any - ) -> Optional["_models.PartnerDestination"]: - """Update a partner destination. - - Asynchronously updates a partner destination 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_destination_name: Name of the partner destination. - :type partner_destination_name: str - :param partner_destination_update_parameters: Partner destination update information. - :type partner_destination_update_parameters: - ~azure.mgmt.eventgrid.models.PartnerDestinationUpdateParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerDestination"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner_destination_update_parameters, 'PartnerDestinationUpdateParameters') - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace - def list_by_subscription( - self, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.PartnerDestinationsListResult"]: - """List partner destinations under an Azure subscription. - - List all the partner destinations 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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerDestinationsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerDestinationsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestinationsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PartnerDestinationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations"} # type: ignore - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.PartnerDestinationsListResult"]: - """List partner destinations under a resource group. - - List all the partner destinations 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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerDestinationsListResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerDestinationsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestinationsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PartnerDestinationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations"} # type: ignore - - @distributed_trace_async - async def activate( - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> "_models.PartnerDestination": - """Activate a partner destination. - - Activate a newly created partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_activate_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self.activate.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - activate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate"} # type: ignore - diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py index 808f976b50e6..5138548a8a1d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -120,7 +120,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_namespace_info, 'PartnerNamespace') @@ -189,7 +189,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] @@ -244,7 +244,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -301,7 +301,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -351,7 +351,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_namespace_update_parameters, 'PartnerNamespaceUpdateParameters') @@ -423,7 +423,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] @@ -496,7 +496,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] error_map = { @@ -592,7 +592,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] error_map = { @@ -683,7 +683,7 @@ async def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -746,7 +746,7 @@ async def regenerate_key( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'PartnerNamespaceRegenerateKeyRequest') diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py index eebddd5da195..548d369ec82f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -120,7 +120,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_registration_info, 'PartnerRegistration') @@ -193,7 +193,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerRegistration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] @@ -248,7 +248,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -305,7 +305,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -355,7 +355,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_registration_update_parameters, 'PartnerRegistrationUpdateParameters') @@ -427,7 +427,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerRegistration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] @@ -500,7 +500,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] error_map = { @@ -596,7 +596,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py index aa9d19fc3ccf..3660b9e3fef5 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py @@ -77,7 +77,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -126,7 +126,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -207,7 +207,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -264,7 +264,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -327,7 +327,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -379,7 +379,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -455,7 +455,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -530,7 +530,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -601,7 +601,7 @@ def list_by_partner_topic( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -699,7 +699,7 @@ async def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py index 87d3ba9908be..e18837f1f0c0 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -136,7 +136,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_topic_info, 'PartnerTopic') @@ -190,7 +190,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -247,7 +247,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -314,7 +314,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_topic_update_parameters, 'PartnerTopicUpdateParameters') @@ -384,7 +384,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] error_map = { @@ -480,7 +480,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] error_map = { @@ -571,7 +571,7 @@ async def activate( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_activate_request( @@ -631,7 +631,7 @@ async def deactivate( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_deactivate_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py index 773fe1fff039..40991aa575dd 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py @@ -51,7 +51,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -64,7 +64,7 @@ async def get( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -82,7 +82,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -121,7 +121,7 @@ async def get( async def _update_initial( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -133,7 +133,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') @@ -181,7 +181,7 @@ async def _update_initial( async def begin_update( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -195,7 +195,7 @@ async def begin_update( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -218,7 +218,7 @@ async def begin_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -266,7 +266,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -277,7 +277,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -313,7 +313,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -326,7 +326,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -345,7 +345,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -388,7 +388,7 @@ def get_long_running_output(pipeline_response): def list_by_resource( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, filter: Optional[str] = None, top: Optional[int] = None, @@ -402,7 +402,7 @@ def list_by_resource( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -425,7 +425,7 @@ def list_by_resource( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py index c31c342a0345..af9aac0393da 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py @@ -79,7 +79,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -156,7 +156,7 @@ def list_by_resource( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PrivateLinkResourcesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py index de99df74a8bf..dda746cdd662 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py @@ -78,7 +78,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -127,7 +127,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -204,7 +204,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -261,7 +261,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -324,7 +324,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -376,7 +376,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -452,7 +452,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -527,7 +527,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -598,7 +598,7 @@ def list_by_system_topic( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -696,7 +696,7 @@ async def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py index 65f429a2a0ce..10e37adcc11c 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -120,7 +120,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(system_topic_info, 'SystemTopic') @@ -193,7 +193,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.SystemTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] @@ -248,7 +248,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -305,7 +305,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -355,7 +355,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(system_topic_update_parameters, 'SystemTopicUpdateParameters') @@ -428,7 +428,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.SystemTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] @@ -501,7 +501,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.SystemTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopicsListResult"] error_map = { @@ -597,7 +597,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.SystemTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopicsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_event_subscriptions_operations.py index a276902b5346..f97b98d4b683 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_event_subscriptions_operations.py @@ -47,6 +47,70 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async + async def get_delivery_attributes( + self, + resource_group_name: str, + topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": + """Get delivery attributes for an event subscription for topic. + + Get all delivery attributes for an event subscription for 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 domain topic. + :type topic_name: str + :param event_subscription_name: Name of the event subscription. + :type event_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeliveryAttributeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + + request = build_get_delivery_attributes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + topic_name=topic_name, + event_subscription_name=event_subscription_name, + api_version=api_version, + template_url=self.get_delivery_attributes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore + + @distributed_trace_async async def get( self, @@ -77,7 +141,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -126,7 +190,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -206,7 +270,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -263,7 +327,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -326,7 +390,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -378,7 +442,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -452,7 +516,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -525,7 +589,7 @@ async def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -596,7 +660,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -662,67 +726,3 @@ async def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions"} # type: ignore - - @distributed_trace_async - async def get_delivery_attributes( - self, - resource_group_name: str, - topic_name: str, - event_subscription_name: str, - **kwargs: Any - ) -> "_models.DeliveryAttributeListResult": - """Get delivery attributes for an event subscription for topic. - - Get all delivery attributes for an event subscription for 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 domain topic. - :type topic_name: str - :param event_subscription_name: Name of the event subscription. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_delivery_attributes_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - topic_name=topic_name, - event_subscription_name=event_subscription_name, - api_version=api_version, - template_url=self.get_delivery_attributes.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore - diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py index f33d36521416..543c8267d763 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py @@ -61,7 +61,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.TopicTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicTypesListResult"] error_map = { @@ -141,7 +141,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -192,7 +192,7 @@ def list_event_types( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventTypesListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py index ac1b86b38c6e..a97c3d3f5808 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py @@ -73,7 +73,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -120,7 +120,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(topic_info, 'Topic') @@ -188,7 +188,7 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.Topic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Topic"] @@ -243,7 +243,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -300,7 +300,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -350,7 +350,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(topic_update_parameters, 'TopicUpdateParameters') @@ -420,7 +420,7 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.Topic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Topic"] @@ -491,7 +491,7 @@ def list_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.TopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicsListResult"] error_map = { @@ -585,7 +585,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.TopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicsListResult"] error_map = { @@ -676,7 +676,7 @@ async def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -723,7 +723,7 @@ async def _regenerate_key_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'TopicRegenerateKeyRequest') @@ -794,7 +794,7 @@ async def begin_regenerate_key( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.TopicSharedAccessKeys] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicSharedAccessKeys"] @@ -865,7 +865,7 @@ def list_event_types( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventTypesListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_verified_partners_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_verified_partners_operations.py index a0910f954b97..fa667faa5c06 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_verified_partners_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_verified_partners_operations.py @@ -68,7 +68,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -130,7 +130,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.VerifiedPartnersListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VerifiedPartnersListResult"] error_map = { 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 c26fb5c688e0..7c514ba709c1 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 @@ -7,7 +7,6 @@ # -------------------------------------------------------------------------- from ._models_py3 import AdvancedFilter -from ._models_py3 import AzureADPartnerClientAuthentication from ._models_py3 import AzureFunctionEventSubscriptionDestination from ._models_py3 import BoolEqualsAdvancedFilter from ._models_py3 import Channel @@ -27,11 +26,6 @@ from ._models_py3 import DomainUpdateParameters from ._models_py3 import DomainsListResult 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 EventChannelsListResult from ._models_py3 import EventHubEventSubscriptionDestination from ._models_py3 import EventSubscription from ._models_py3 import EventSubscriptionDestination @@ -43,7 +37,6 @@ from ._models_py3 import EventType from ._models_py3 import EventTypeInfo from ._models_py3 import EventTypesListResult -from ._models_py3 import ExtendedLocation from ._models_py3 import ExtensionTopic from ._models_py3 import HybridConnectionEventSubscriptionDestination from ._models_py3 import IdentityInfo @@ -68,16 +61,10 @@ from ._models_py3 import OperationsListResult from ._models_py3 import Partner from ._models_py3 import PartnerAuthorization -from ._models_py3 import PartnerClientAuthentication from ._models_py3 import PartnerConfiguration from ._models_py3 import PartnerConfigurationUpdateParameters from ._models_py3 import PartnerConfigurationsListResult -from ._models_py3 import PartnerDestination -from ._models_py3 import PartnerDestinationInfo -from ._models_py3 import PartnerDestinationUpdateParameters -from ._models_py3 import PartnerDestinationsListResult from ._models_py3 import PartnerDetails -from ._models_py3 import PartnerEventSubscriptionDestination from ._models_py3 import PartnerNamespace from ._models_py3 import PartnerNamespaceRegenerateKeyRequest from ._models_py3 import PartnerNamespaceSharedAccessKeys @@ -90,7 +77,6 @@ from ._models_py3 import PartnerTopicInfo from ._models_py3 import PartnerTopicUpdateParameters from ._models_py3 import PartnerTopicsListResult -from ._models_py3 import PartnerUpdateDestinationInfo from ._models_py3 import PartnerUpdateTopicInfo from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection @@ -98,8 +84,6 @@ from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkResourcesListResult from ._models_py3 import Resource -from ._models_py3 import ResourceMoveChangeHistory -from ._models_py3 import ResourceSku from ._models_py3 import RetryPolicy from ._models_py3 import ServiceBusQueueEventSubscriptionDestination from ._models_py3 import ServiceBusTopicEventSubscriptionDestination @@ -130,8 +114,6 @@ from ._models_py3 import VerifiedPartner from ._models_py3 import VerifiedPartnersListResult from ._models_py3 import WebHookEventSubscriptionDestination -from ._models_py3 import WebhookPartnerDestinationInfo -from ._models_py3 import WebhookUpdatePartnerDestinationInfo from ._event_grid_management_client_enums import ( @@ -145,7 +127,6 @@ DomainProvisioningState, DomainTopicProvisioningState, EndpointType, - EventChannelProvisioningState, EventDefinitionKind, EventDeliverySchema, EventSubscriptionIdentityType, @@ -154,35 +135,26 @@ InputSchema, InputSchemaMappingType, IpActionType, - ParentType, - PartnerClientAuthenticationType, PartnerConfigurationProvisioningState, - PartnerDestinationActivationState, - PartnerDestinationProvisioningState, - PartnerEndpointType, PartnerNamespaceProvisioningState, PartnerRegistrationProvisioningState, - PartnerRegistrationVisibilityState, PartnerTopicActivationState, PartnerTopicProvisioningState, - PartnerTopicReadinessState, PartnerTopicRoutingMode, PersistedConnectionStatus, + PrivateEndpointConnectionsParentType, PublicNetworkAccess, ReadinessState, - ResourceKind, ResourceProvisioningState, ResourceRegionType, - Sku, TopicProvisioningState, - TopicTypePropertiesSupportedScopesForSourceItem, TopicTypeProvisioningState, + TopicTypeSourceScope, VerifiedPartnerProvisioningState, ) __all__ = [ 'AdvancedFilter', - 'AzureADPartnerClientAuthentication', 'AzureFunctionEventSubscriptionDestination', 'BoolEqualsAdvancedFilter', 'Channel', @@ -202,11 +174,6 @@ 'DomainUpdateParameters', 'DomainsListResult', 'DynamicDeliveryAttributeMapping', - 'EventChannel', - 'EventChannelDestination', - 'EventChannelFilter', - 'EventChannelSource', - 'EventChannelsListResult', 'EventHubEventSubscriptionDestination', 'EventSubscription', 'EventSubscriptionDestination', @@ -218,7 +185,6 @@ 'EventType', 'EventTypeInfo', 'EventTypesListResult', - 'ExtendedLocation', 'ExtensionTopic', 'HybridConnectionEventSubscriptionDestination', 'IdentityInfo', @@ -243,16 +209,10 @@ 'OperationsListResult', 'Partner', 'PartnerAuthorization', - 'PartnerClientAuthentication', 'PartnerConfiguration', 'PartnerConfigurationUpdateParameters', 'PartnerConfigurationsListResult', - 'PartnerDestination', - 'PartnerDestinationInfo', - 'PartnerDestinationUpdateParameters', - 'PartnerDestinationsListResult', 'PartnerDetails', - 'PartnerEventSubscriptionDestination', 'PartnerNamespace', 'PartnerNamespaceRegenerateKeyRequest', 'PartnerNamespaceSharedAccessKeys', @@ -265,7 +225,6 @@ 'PartnerTopicInfo', 'PartnerTopicUpdateParameters', 'PartnerTopicsListResult', - 'PartnerUpdateDestinationInfo', 'PartnerUpdateTopicInfo', 'PrivateEndpoint', 'PrivateEndpointConnection', @@ -273,8 +232,6 @@ 'PrivateLinkResource', 'PrivateLinkResourcesListResult', 'Resource', - 'ResourceMoveChangeHistory', - 'ResourceSku', 'RetryPolicy', 'ServiceBusQueueEventSubscriptionDestination', 'ServiceBusTopicEventSubscriptionDestination', @@ -305,8 +262,6 @@ 'VerifiedPartner', 'VerifiedPartnersListResult', 'WebHookEventSubscriptionDestination', - 'WebhookPartnerDestinationInfo', - 'WebhookUpdatePartnerDestinationInfo', 'AdvancedFilterOperatorType', 'ChannelProvisioningState', 'ChannelType', @@ -317,7 +272,6 @@ 'DomainProvisioningState', 'DomainTopicProvisioningState', 'EndpointType', - 'EventChannelProvisioningState', 'EventDefinitionKind', 'EventDeliverySchema', 'EventSubscriptionIdentityType', @@ -326,28 +280,20 @@ 'InputSchema', 'InputSchemaMappingType', 'IpActionType', - 'ParentType', - 'PartnerClientAuthenticationType', 'PartnerConfigurationProvisioningState', - 'PartnerDestinationActivationState', - 'PartnerDestinationProvisioningState', - 'PartnerEndpointType', 'PartnerNamespaceProvisioningState', 'PartnerRegistrationProvisioningState', - 'PartnerRegistrationVisibilityState', 'PartnerTopicActivationState', 'PartnerTopicProvisioningState', - 'PartnerTopicReadinessState', 'PartnerTopicRoutingMode', 'PersistedConnectionStatus', + 'PrivateEndpointConnectionsParentType', 'PublicNetworkAccess', 'ReadinessState', - 'ResourceKind', 'ResourceProvisioningState', 'ResourceRegionType', - 'Sku', 'TopicProvisioningState', - 'TopicTypePropertiesSupportedScopesForSourceItem', 'TopicTypeProvisioningState', + 'TopicTypeSourceScope', 'VerifiedPartnerProvisioningState', ] 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 8c090c36f0f4..5d74f5a932ba 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 @@ -45,13 +45,13 @@ class ChannelProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum SUCCEEDED = "Succeeded" CANCELED = "Canceled" FAILED = "Failed" + IDLE_DUE_TO_MIRRORED_PARTNER_TOPIC_DELETION = "IdleDueToMirroredPartnerTopicDeletion" class ChannelType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the event channel which represents the direction flow of events. + """The type of the event channel which represents the direction flow of events. """ PARTNER_TOPIC = "PartnerTopic" - PARTNER_DESTINATION = "PartnerDestination" class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. @@ -115,18 +115,6 @@ class EndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SERVICE_BUS_QUEUE = "ServiceBusQueue" SERVICE_BUS_TOPIC = "ServiceBusTopic" AZURE_FUNCTION = "AzureFunction" - PARTNER_DESTINATION = "PartnerDestination" - -class EventChannelProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the event channel. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" class EventDefinitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The kind of event type used. @@ -195,18 +183,6 @@ class IpActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ALLOW = "Allow" -class ParentType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - TOPICS = "topics" - DOMAINS = "domains" - PARTNER_NAMESPACES = "partnerNamespaces" - -class PartnerClientAuthenticationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Type of client authentication - """ - - AZURE_AD = "AzureAD" - class PartnerConfigurationProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state of the partner configuration. """ @@ -218,30 +194,6 @@ class PartnerConfigurationProvisioningState(with_metaclass(CaseInsensitiveEnumMe CANCELED = "Canceled" FAILED = "Failed" -class PartnerDestinationActivationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Activation state of the partner destination. - """ - - NEVER_ACTIVATED = "NeverActivated" - ACTIVATED = "Activated" - -class PartnerDestinationProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the partner destination. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" - -class PartnerEndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Type of the endpoint for the partner destination - """ - - WEB_HOOK = "WebHook" - class PartnerNamespaceProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state of the partner namespace. """ @@ -264,14 +216,6 @@ class PartnerRegistrationProvisioningState(with_metaclass(CaseInsensitiveEnumMet CANCELED = "Canceled" FAILED = "Failed" -class PartnerRegistrationVisibilityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Visibility state of the partner registration. - """ - - HIDDEN = "Hidden" - PUBLIC_PREVIEW = "PublicPreview" - GENERALLY_AVAILABLE = "GenerallyAvailable" - class PartnerTopicActivationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Activation state of the partner topic. """ @@ -290,15 +234,7 @@ class PartnerTopicProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, SUCCEEDED = "Succeeded" CANCELED = "Canceled" FAILED = "Failed" - -class PartnerTopicReadinessState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The readiness state of the corresponding partner topic. - """ - - NOT_ACTIVATED_BY_USER_YET = "NotActivatedByUserYet" - ACTIVATED_BY_USER = "ActivatedByUser" - DEACTIVATED_BY_USER = "DeactivatedByUser" - DELETED_BY_USER = "DeletedByUser" + IDLE_DUE_TO_MIRRORED_CHANNEL_RESOURCE_DELETION = "IdleDueToMirroredChannelResourceDeletion" class PartnerTopicRoutingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """This determines if events published to this partner namespace should use the source attribute @@ -319,6 +255,12 @@ class PersistedConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enu REJECTED = "Rejected" DISCONNECTED = "Disconnected" +class PrivateEndpointConnectionsParentType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + TOPICS = "topics" + DOMAINS = "domains" + PARTNER_NAMESPACES = "partnerNamespaces" + class PublicNetworkAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring :code:` HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -77,7 +77,7 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,7 +120,7 @@ def build_delete_request_initial( channel_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") # pylint: disable=line-too-long @@ -155,7 +155,7 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] # Construct URL @@ -198,7 +198,7 @@ def build_list_by_partner_namespace_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -239,7 +239,7 @@ def build_get_full_url_request( channel_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -320,7 +320,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -387,7 +387,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(channel_info, 'Channel') @@ -443,7 +443,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -504,7 +504,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -574,7 +574,7 @@ def update( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(channel_update_parameters, 'ChannelUpdateParameters') @@ -643,7 +643,7 @@ def list_by_partner_namespace( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.ChannelsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ChannelsListResult"] error_map = { @@ -739,7 +739,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_event_subscriptions_operations.py index f007f930e206..0a5f5c6178a6 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_event_subscriptions_operations.py @@ -29,6 +29,44 @@ _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False +def build_get_delivery_attributes_request( + subscription_id: str, + resource_group_name: str, + domain_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), + "eventSubscriptionName": _SERIALIZER.url("event_subscription_name", event_subscription_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + def build_get_request( subscription_id: str, resource_group_name: str, @@ -36,7 +74,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -77,7 +115,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,7 +158,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") # pylint: disable=line-too-long @@ -155,7 +193,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -198,7 +236,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -238,7 +276,7 @@ def build_list_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -271,44 +309,6 @@ def build_list_request( **kwargs ) - -def build_get_delivery_attributes_request( - subscription_id: str, - resource_group_name: str, - domain_name: str, - event_subscription_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), - "eventSubscriptionName": _SERIALIZER.url("event_subscription_name", event_subscription_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - class DomainEventSubscriptionsOperations(object): """DomainEventSubscriptionsOperations operations. @@ -331,6 +331,70 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace + def get_delivery_attributes( + self, + resource_group_name: str, + domain_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": + """Get delivery attributes for an event subscription for domain. + + Get all delivery attributes for an event subscription for domain. + + :param resource_group_name: The name of the resource group within the user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain topic. + :type domain_name: str + :param event_subscription_name: Name of the event subscription. + :type event_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeliveryAttributeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + + request = build_get_delivery_attributes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + domain_name=domain_name, + event_subscription_name=event_subscription_name, + api_version=api_version, + template_url=self.get_delivery_attributes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore + + @distributed_trace def get( self, @@ -361,7 +425,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -410,7 +474,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -490,7 +554,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -547,7 +611,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -610,7 +674,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -662,7 +726,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -736,7 +800,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -809,7 +873,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -879,7 +943,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -945,67 +1009,3 @@ def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions"} # type: ignore - - @distributed_trace - def get_delivery_attributes( - self, - resource_group_name: str, - domain_name: str, - event_subscription_name: str, - **kwargs: Any - ) -> "_models.DeliveryAttributeListResult": - """Get delivery attributes for an event subscription for domain. - - Get all delivery attributes for an event subscription for domain. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain topic. - :type domain_name: str - :param event_subscription_name: Name of the event subscription. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_delivery_attributes_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - domain_name=domain_name, - event_subscription_name=event_subscription_name, - api_version=api_version, - template_url=self.get_delivery_attributes.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore - diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topic_event_subscriptions_operations.py index a2fc82d97fb6..47e849cb87ba 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topic_event_subscriptions_operations.py @@ -37,7 +37,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -80,7 +80,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -125,7 +125,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") # pylint: disable=line-too-long @@ -162,7 +162,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -207,7 +207,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -249,7 +249,7 @@ def build_list_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -292,7 +292,7 @@ def build_get_delivery_attributes_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -377,7 +377,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -428,7 +428,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -512,7 +512,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -571,7 +571,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -638,7 +638,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -692,7 +692,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -770,7 +770,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -847,7 +847,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -921,7 +921,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1022,7 +1022,7 @@ def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( 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 448b856bc7f0..8abf1e0182f8 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 @@ -35,7 +35,7 @@ def build_get_request( domain_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -73,7 +73,7 @@ def build_create_or_update_request_initial( domain_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -111,7 +111,7 @@ def build_delete_request_initial( domain_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") # pylint: disable=line-too-long @@ -145,7 +145,7 @@ def build_list_by_domain_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -277,7 +277,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_create_or_update_request_initial( @@ -343,7 +343,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.DomainTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainTopic"] lro_delay = kwargs.pop( @@ -397,7 +397,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -458,7 +458,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -531,7 +531,7 @@ def list_by_domain( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.DomainTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainTopicsListResult"] error_map = { 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 43c369b8fd22..de15cf374e82 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 @@ -35,7 +35,7 @@ def build_get_request( domain_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( domain_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -269,7 +269,7 @@ def build_list_shared_access_keys_request( domain_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -308,7 +308,7 @@ def build_regenerate_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -390,7 +390,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -437,7 +437,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_info, 'Domain') @@ -505,7 +505,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] @@ -560,7 +560,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -617,7 +617,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -667,7 +667,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') @@ -737,7 +737,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] @@ -808,7 +808,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.DomainsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainsListResult"] error_map = { @@ -902,7 +902,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.DomainsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainsListResult"] error_map = { @@ -993,7 +993,7 @@ def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -1056,7 +1056,7 @@ def regenerate_key( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') 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 deleted file mode 100644 index c380e2953192..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py +++ /dev/null @@ -1,559 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - subscription_id: str, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerNamespaceName": _SERIALIZER.url("partner_namespace_name", partner_namespace_name, 'str'), - "eventChannelName": _SERIALIZER.url("event_channel_name", event_channel_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerNamespaceName": _SERIALIZER.url("partner_namespace_name", partner_namespace_name, 'str'), - "eventChannelName": _SERIALIZER.url("event_channel_name", event_channel_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerNamespaceName": _SERIALIZER.url("partner_namespace_name", partner_namespace_name, 'str'), - "eventChannelName": _SERIALIZER.url("event_channel_name", event_channel_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) - - -def build_list_by_partner_namespace_request( - subscription_id: str, - resource_group_name: str, - partner_namespace_name: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerNamespaceName": _SERIALIZER.url("partner_namespace_name", partner_namespace_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class EventChannelsOperations(object): - """EventChannelsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> "_models.EventChannel": - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('EventChannel', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - event_channel_info: "_models.EventChannel", - **kwargs: Any - ) -> "_models.EventChannel": - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(event_channel_info, 'EventChannel') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('EventChannel', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - - @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}"} # type: ignore - - @distributed_trace - def list_by_partner_namespace( - self, - resource_group_name: str, - partner_namespace_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_models.EventChannelsListResult"]: - """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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventChannelsListResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventChannelsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannelsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_partner_namespace_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_partner_namespace.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_partner_namespace_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EventChannelsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_by_partner_namespace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels"} # type: ignore 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 be546356cd6b..bdbd83affea9 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 @@ -34,7 +34,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -71,7 +71,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -110,7 +110,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @@ -141,7 +141,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -180,7 +180,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -216,7 +216,7 @@ def build_list_global_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ def build_list_global_by_subscription_for_topic_type_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -297,7 +297,7 @@ def build_list_global_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -339,7 +339,7 @@ def build_list_global_by_resource_group_for_topic_type_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -381,7 +381,7 @@ def build_list_regional_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -423,7 +423,7 @@ def build_list_regional_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -466,7 +466,7 @@ def build_list_regional_by_subscription_for_topic_type_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -510,7 +510,7 @@ def build_list_regional_by_resource_group_for_topic_type_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -556,7 +556,7 @@ def build_list_by_resource_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -602,7 +602,7 @@ def build_list_by_domain_topic_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -642,7 +642,7 @@ def build_get_delivery_attributes_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -725,7 +725,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -771,7 +771,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -850,7 +850,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -905,7 +905,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -968,7 +968,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -1018,7 +1018,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -1094,7 +1094,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -1170,7 +1170,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -1232,7 +1232,7 @@ def list_global_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1327,7 +1327,7 @@ def list_global_by_subscription_for_topic_type( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1424,7 +1424,7 @@ def list_global_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1524,7 +1524,7 @@ def list_global_by_resource_group_for_topic_type( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1623,7 +1623,7 @@ def list_regional_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1724,7 +1724,7 @@ def list_regional_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1827,7 +1827,7 @@ def list_regional_by_subscription_for_topic_type( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -1934,7 +1934,7 @@ def list_regional_by_resource_group_for_topic_type( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -2044,7 +2044,7 @@ def list_by_resource( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -2153,7 +2153,7 @@ def list_by_domain_topic( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -2255,7 +2255,7 @@ def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( 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 index d9accf7b546b..a7a47e39621b 100644 --- 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 @@ -29,7 +29,7 @@ def build_get_request( scope: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -106,7 +106,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( 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 fbafa18fea25..eeee64d2c0d1 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 @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.OperationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_configurations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_configurations_operations.py index 0d52d86030d6..71b38266bb02 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_configurations_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_configurations_operations.py @@ -34,7 +34,7 @@ def build_get_request( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -71,7 +71,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -110,7 +110,7 @@ def build_delete_request_initial( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") # pylint: disable=line-too-long @@ -141,7 +141,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -180,7 +180,7 @@ def build_list_by_resource_group_request( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -216,7 +216,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ def build_authorize_partner_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -298,7 +298,7 @@ def build_unauthorize_partner_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -376,7 +376,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -421,7 +421,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_configuration_info, 'PartnerConfiguration') @@ -490,7 +490,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerConfiguration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfiguration"] @@ -543,7 +543,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -596,7 +596,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -644,7 +644,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_configuration_update_parameters, 'PartnerConfigurationUpdateParameters') @@ -714,7 +714,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerConfiguration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfiguration"] @@ -775,7 +775,7 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerConfigurationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfigurationsListResult"] error_map = { @@ -866,7 +866,7 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerConfigurationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerConfigurationsListResult"] error_map = { @@ -955,7 +955,7 @@ def authorize_partner( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_info, 'Partner') @@ -1018,7 +1018,7 @@ def unauthorize_partner( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_info, 'Partner') diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_destinations_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_destinations_operations.py deleted file mode 100644 index 0e26b13a82e5..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_destinations_operations.py +++ /dev/null @@ -1,879 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - subscription_id: str, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerDestinationName": _SERIALIZER.url("partner_destination_name", partner_destination_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - subscription_id: str, - resource_group_name: str, - partner_destination_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerDestinationName": _SERIALIZER.url("partner_destination_name", partner_destination_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerDestinationName": _SERIALIZER.url("partner_destination_name", partner_destination_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - **kwargs - ) - - -def build_update_request( - subscription_id: str, - resource_group_name: str, - partner_destination_name: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerDestinationName": _SERIALIZER.url("partner_destination_name", partner_destination_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, - json=json, - content=content, - **kwargs - ) - - -def build_list_by_subscription_request( - subscription_id: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - *, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_activate_request( - subscription_id: str, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "partnerDestinationName": _SERIALIZER.url("partner_destination_name", partner_destination_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -class PartnerDestinationsOperations(object): - """PartnerDestinationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> "_models.PartnerDestination": - """Get a partner destination. - - Get properties of a partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - partner_destination_name: str, - partner_destination: "_models.PartnerDestination", - **kwargs: Any - ) -> "_models.PartnerDestination": - """Create a partner destination. - - Asynchronously creates a new partner destination 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_destination_name: Name of the partner destination. - :type partner_destination_name: str - :param partner_destination: Partner destination create information. - :type partner_destination: ~azure.mgmt.eventgrid.models.PartnerDestination - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner_destination, 'PartnerDestination') - - request = build_create_or_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_delete_request_initial( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self._delete_initial.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """Delete a partner destination. - - Delete existing partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - cls=lambda x,y,z: x, - **kwargs - ) - kwargs.pop('error_map', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - @distributed_trace - def update( - self, - resource_group_name: str, - partner_destination_name: str, - partner_destination_update_parameters: "_models.PartnerDestinationUpdateParameters", - **kwargs: Any - ) -> Optional["_models.PartnerDestination"]: - """Update a partner destination. - - Asynchronously updates a partner destination 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_destination_name: Name of the partner destination. - :type partner_destination_name: str - :param partner_destination_update_parameters: Partner destination update information. - :type partner_destination_update_parameters: - ~azure.mgmt.eventgrid.models.PartnerDestinationUpdateParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerDestination"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partner_destination_update_parameters, 'PartnerDestinationUpdateParameters') - - request = build_update_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}"} # type: ignore - - - @distributed_trace - def list_by_subscription( - self, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_models.PartnerDestinationsListResult"]: - """List partner destinations under an Azure subscription. - - List all the partner destinations 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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerDestinationsListResult or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerDestinationsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestinationsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_subscription.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PartnerDestinationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations"} # type: ignore - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> Iterable["_models.PartnerDestinationsListResult"]: - """List partner destinations under a resource group. - - List all the partner destinations 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'. Default value is - None. - :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. Default value is None. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerDestinationsListResult or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerDestinationsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestinationsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - filter=filter, - top=top, - template_url=self.list_by_resource_group.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - else: - - request = build_list_by_resource_group_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - api_version=api_version, - filter=filter, - top=top, - template_url=next_link, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PartnerDestinationsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations"} # type: ignore - - @distributed_trace - def activate( - self, - resource_group_name: str, - partner_destination_name: str, - **kwargs: Any - ) -> "_models.PartnerDestination": - """Activate a partner destination. - - Activate a newly created partner destination. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_destination_name: Name of the partner destination. - :type partner_destination_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerDestination, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerDestination - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerDestination"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_activate_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - partner_destination_name=partner_destination_name, - api_version=api_version, - template_url=self.activate.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerDestination', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - activate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate"} # type: ignore - 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 index 6eba4bc39a46..2ade07c786df 100644 --- 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 @@ -35,7 +35,7 @@ def build_get_request( partner_namespace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( partner_namespace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -269,7 +269,7 @@ def build_list_shared_access_keys_request( partner_namespace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -308,7 +308,7 @@ def build_regenerate_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -390,7 +390,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -437,7 +437,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_namespace_info, 'PartnerNamespace') @@ -506,7 +506,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] @@ -561,7 +561,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -618,7 +618,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -668,7 +668,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_namespace_update_parameters, 'PartnerNamespaceUpdateParameters') @@ -740,7 +740,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] @@ -812,7 +812,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] error_map = { @@ -907,7 +907,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] error_map = { @@ -998,7 +998,7 @@ def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -1061,7 +1061,7 @@ def regenerate_key( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'PartnerNamespaceRegenerateKeyRequest') 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 index 62adcfed379b..0bcaa54bc385 100644 --- 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 @@ -35,7 +35,7 @@ def build_get_request( partner_registration_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( partner_registration_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -310,7 +310,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -357,7 +357,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_registration_info, 'PartnerRegistration') @@ -430,7 +430,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerRegistration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] @@ -485,7 +485,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -542,7 +542,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -592,7 +592,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_registration_update_parameters, 'PartnerRegistrationUpdateParameters') @@ -664,7 +664,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerRegistration] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] @@ -737,7 +737,7 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] error_map = { @@ -833,7 +833,7 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] error_map = { 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 b1db003c0e1f..5733d0acd6be 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 @@ -36,7 +36,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -77,7 +77,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,7 +120,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") # pylint: disable=line-too-long @@ -155,7 +155,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -198,7 +198,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -238,7 +238,7 @@ def build_list_by_partner_topic_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -279,7 +279,7 @@ def build_get_delivery_attributes_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -361,7 +361,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -410,7 +410,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -491,7 +491,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -548,7 +548,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -611,7 +611,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -663,7 +663,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -739,7 +739,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -814,7 +814,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -884,7 +884,7 @@ def list_by_partner_topic( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -982,7 +982,7 @@ def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( 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 index 8fdb02ecfe2f..2b249f091f95 100644 --- 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 @@ -35,7 +35,7 @@ def build_get_request( partner_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( partner_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -269,7 +269,7 @@ def build_activate_request( partner_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -305,7 +305,7 @@ def build_deactivate_request( partner_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -382,7 +382,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -445,7 +445,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_topic_info, 'PartnerTopic') @@ -499,7 +499,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -556,7 +556,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -623,7 +623,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partner_topic_update_parameters, 'PartnerTopicUpdateParameters') @@ -692,7 +692,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] error_map = { @@ -787,7 +787,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] error_map = { @@ -878,7 +878,7 @@ def activate( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_activate_request( @@ -938,7 +938,7 @@ def deactivate( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_deactivate_request( 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 9ddf736e58e9..3e4b623b28ee 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 @@ -32,12 +32,12 @@ def build_get_request( subscription_id: str, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -72,7 +72,7 @@ def build_get_request( def build_update_request_initial( subscription_id: str, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, *, @@ -80,7 +80,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,12 +120,12 @@ def build_update_request_initial( def build_delete_request_initial( subscription_id: str, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long @@ -154,14 +154,14 @@ def build_delete_request_initial( def build_list_by_resource_request( subscription_id: str, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -221,7 +221,7 @@ def __init__(self, client, config, serializer, deserializer): def get( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -234,7 +234,7 @@ def get( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -252,7 +252,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -291,7 +291,7 @@ def get( def _update_initial( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -303,7 +303,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') @@ -351,7 +351,7 @@ def _update_initial( def begin_update( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -365,7 +365,7 @@ def begin_update( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -387,7 +387,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -435,7 +435,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -446,7 +446,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -482,7 +482,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -495,7 +495,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -514,7 +514,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -557,7 +557,7 @@ def get_long_running_output(pipeline_response): def list_by_resource( self, resource_group_name: str, - parent_type: Union[str, "_models.ParentType"], + parent_type: Union[str, "_models.PrivateEndpointConnectionsParentType"], parent_name: str, filter: Optional[str] = None, top: Optional[int] = None, @@ -571,7 +571,7 @@ def list_by_resource( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.ParentType + :type parent_type: str or ~azure.mgmt.eventgrid.models.PrivateEndpointConnectionsParentType :param parent_name: The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). :type parent_name: str @@ -594,7 +594,7 @@ def list_by_resource( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 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 9640f3b294a2..85faf1213ff0 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 @@ -34,7 +34,7 @@ def build_get_request( private_link_resource_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -76,7 +76,7 @@ def build_list_by_resource_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -166,7 +166,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -243,7 +243,7 @@ def list_by_resource( ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PrivateLinkResourcesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] error_map = { 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 0addd7c02bbd..55bb30e1d363 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 @@ -36,7 +36,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -77,7 +77,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,7 +120,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") # pylint: disable=line-too-long @@ -155,7 +155,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -198,7 +198,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -238,7 +238,7 @@ def build_list_by_system_topic_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -279,7 +279,7 @@ def build_get_delivery_attributes_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -362,7 +362,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -411,7 +411,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -488,7 +488,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -545,7 +545,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -608,7 +608,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -660,7 +660,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -736,7 +736,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -811,7 +811,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -881,7 +881,7 @@ def list_by_system_topic( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -979,7 +979,7 @@ def get_delivery_attributes( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_delivery_attributes_request( 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 index 0db08654ed66..edbbac027289 100644 --- 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 @@ -35,7 +35,7 @@ def build_get_request( system_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( system_topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -310,7 +310,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -357,7 +357,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(system_topic_info, 'SystemTopic') @@ -430,7 +430,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.SystemTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] @@ -485,7 +485,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -542,7 +542,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -592,7 +592,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(system_topic_update_parameters, 'SystemTopicUpdateParameters') @@ -665,7 +665,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.SystemTopic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] @@ -737,7 +737,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.SystemTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopicsListResult"] error_map = { @@ -832,7 +832,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.SystemTopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopicsListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_event_subscriptions_operations.py index 6e41474da541..269a22aadb3c 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_event_subscriptions_operations.py @@ -29,6 +29,44 @@ _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False +def build_get_delivery_attributes_request( + subscription_id: str, + resource_group_name: str, + topic_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "topicName": _SERIALIZER.url("topic_name", topic_name, 'str'), + "eventSubscriptionName": _SERIALIZER.url("event_subscription_name", event_subscription_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + def build_get_request( subscription_id: str, resource_group_name: str, @@ -36,7 +74,7 @@ def build_get_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -77,7 +115,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -120,7 +158,7 @@ def build_delete_request_initial( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") # pylint: disable=line-too-long @@ -155,7 +193,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -198,7 +236,7 @@ def build_get_full_url_request( event_subscription_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -238,7 +276,7 @@ def build_list_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -271,44 +309,6 @@ def build_list_request( **kwargs ) - -def build_get_delivery_attributes_request( - subscription_id: str, - resource_group_name: str, - topic_name: str, - event_subscription_name: str, - **kwargs: Any -) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "topicName": _SERIALIZER.url("topic_name", topic_name, 'str'), - "eventSubscriptionName": _SERIALIZER.url("event_subscription_name", event_subscription_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - class TopicEventSubscriptionsOperations(object): """TopicEventSubscriptionsOperations operations. @@ -331,6 +331,70 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace + def get_delivery_attributes( + self, + resource_group_name: str, + topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": + """Get delivery attributes for an event subscription for topic. + + Get all delivery attributes for an event subscription for 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 domain topic. + :type topic_name: str + :param event_subscription_name: Name of the event subscription. + :type event_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeliveryAttributeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2022-06-15") # type: str + + + request = build_get_delivery_attributes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + topic_name=topic_name, + event_subscription_name=event_subscription_name, + api_version=api_version, + template_url=self.get_delivery_attributes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore + + @distributed_trace def get( self, @@ -361,7 +425,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -410,7 +474,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_info, 'EventSubscription') @@ -490,7 +554,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -547,7 +611,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -610,7 +674,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -662,7 +726,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') @@ -736,7 +800,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] @@ -809,7 +873,7 @@ def get_full_url( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_full_url_request( @@ -879,7 +943,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] error_map = { @@ -945,67 +1009,3 @@ def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions"} # type: ignore - - @distributed_trace - def get_delivery_attributes( - self, - resource_group_name: str, - topic_name: str, - event_subscription_name: str, - **kwargs: Any - ) -> "_models.DeliveryAttributeListResult": - """Get delivery attributes for an event subscription for topic. - - Get all delivery attributes for an event subscription for 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 domain topic. - :type topic_name: str - :param event_subscription_name: Name of the event subscription. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str - - - request = build_get_delivery_attributes_request( - subscription_id=self._config.subscription_id, - resource_group_name=resource_group_name, - topic_name=topic_name, - event_subscription_name=event_subscription_name, - api_version=api_version, - template_url=self.get_delivery_attributes.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_delivery_attributes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes"} # type: ignore - 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 48a6c1895150..e303f7944529 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 @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -56,7 +56,7 @@ def build_get_request( topic_type_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ def build_list_event_types_request( topic_type_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -152,7 +152,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.TopicTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicTypesListResult"] error_map = { @@ -232,7 +232,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -282,7 +282,7 @@ def list_event_types( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventTypesListResult"] error_map = { 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 862526e9f949..a45dab0f9d2c 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 @@ -35,7 +35,7 @@ def build_get_request( topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -115,7 +115,7 @@ def build_delete_request_initial( topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") # pylint: disable=line-too-long @@ -148,7 +148,7 @@ def build_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -190,7 +190,7 @@ def build_list_by_subscription_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -230,7 +230,7 @@ def build_list_by_resource_group_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -269,7 +269,7 @@ def build_list_shared_access_keys_request( topic_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -308,7 +308,7 @@ def build_regenerate_key_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -351,7 +351,7 @@ def build_list_event_types_request( resource_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -430,7 +430,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -477,7 +477,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(topic_info, 'Topic') @@ -545,7 +545,7 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.Topic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Topic"] @@ -600,7 +600,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_delete_request_initial( @@ -657,7 +657,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -707,7 +707,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(topic_update_parameters, 'TopicUpdateParameters') @@ -777,7 +777,7 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.Topic] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Topic"] @@ -848,7 +848,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.TopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicsListResult"] error_map = { @@ -942,7 +942,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.TopicsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicsListResult"] error_map = { @@ -1033,7 +1033,7 @@ def list_shared_access_keys( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_list_shared_access_keys_request( @@ -1080,7 +1080,7 @@ def _regenerate_key_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(regenerate_key_request, 'TopicRegenerateKeyRequest') @@ -1151,7 +1151,7 @@ def begin_regenerate_key( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.TopicSharedAccessKeys] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicSharedAccessKeys"] @@ -1221,7 +1221,7 @@ def list_event_types( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventTypesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.EventTypesListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_verified_partners_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_verified_partners_operations.py index ed9488cdec0e..cca408b71fdb 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_verified_partners_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_verified_partners_operations.py @@ -30,7 +30,7 @@ def build_get_request( verified_partner_name: str, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -64,7 +64,7 @@ def build_list_request( top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str accept = "application/json" # Construct URL @@ -135,7 +135,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str request = build_get_request( @@ -196,7 +196,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.VerifiedPartnersListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-10-15-preview") # type: str + api_version = kwargs.pop('api_version', "2022-06-15") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VerifiedPartnersListResult"] error_map = { diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json index d99469f855a5..c11ad9872b60 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json @@ -7,7 +7,7 @@ "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" }, "RequestBody": null, "StatusCode": 200, @@ -17,12 +17,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "1753", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:07:59 GMT", + "Date": "Mon, 13 Jun 2022 06:10:42 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12651.10 - SCUS ProdSlices", + "x-ms-ests-server": "2.1.12851.7 - WUS2 ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -101,7 +101,7 @@ "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" }, "RequestBody": null, "StatusCode": 200, @@ -111,12 +111,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "945", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:07:59 GMT", + "Date": "Mon, 13 Jun 2022 06:10:43 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12651.10 - SCUS ProdSlices", + "x-ms-ests-server": "2.1.12851.7 - SCUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -172,28 +172,28 @@ "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip, deflate", - "client-request-id": "9c9b12a7-5dfb-412b-b14d-b727a7467ac0", + "client-request-id": "abf01b09-5c07-48c0-be43-97abd3629108", "Connection": "keep-alive", - "Content-Length": "286", + "Content-Length": "289", "Content-Type": "application/x-www-form-urlencoded", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0", + "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0", "x-client-cpu": "x64", "x-client-current-telemetry": "4|730,0|", "x-client-last-telemetry": "4|0|||", "x-client-os": "linux", "x-client-sku": "MSAL.Python", - "x-client-ver": "1.17.0", + "x-client-ver": "1.18.0", "x-ms-lib-capability": "retry-after, h429" }, - "RequestBody": "client_id=8c41a920-007a-4844-a189-2d0efe39f51e\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=o0XWF_siD-FhI.5AE83-u0GaQHW_GP7cjy\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", + "RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q~IsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-store, no-cache", - "client-request-id": "9c9b12a7-5dfb-412b-b14d-b727a7467ac0", + "client-request-id": "abf01b09-5c07-48c0-be43-97abd3629108", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:07:59 GMT", + "Date": "Mon, 13 Jun 2022 06:10:43 GMT", "Expires": "-1", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Pragma": "no-cache", @@ -201,7 +201,7 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "x-ms-clitelem": "1,0,0,,", - "x-ms-ests-server": "2.1.12651.10 - EUS ProdSlices", + "x-ms-ests-server": "2.1.12851.7 - EUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -212,7 +212,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -220,372 +220,30 @@ "Connection": "keep-alive", "Content-Length": "27", "Content-Type": "application/json", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" }, "RequestBody": { "location": "eastus2euap" }, - "StatusCode": 201, + "StatusCode": 400, "ResponseHeaders": { - "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/47817715-B100-47E6-A618-A8BE483F14E0?api-version=2021-10-15-preview", "Cache-Control": "no-cache", - "Content-Length": "313", + "Content-Length": "1008", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:02 GMT", + "Date": "Mon, 13 Jun 2022 06:10:43 GMT", "Expires": "-1", "Pragma": "no-cache", - "Retry-After": "10", - "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "47995d9f-a31d-4237-9cb8-678760fcdf2c", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010803Z:47995d9f-a31d-4237-9cb8-678760fcdf2c" + "x-ms-correlation-request-id": "57b46275-880d-4cdf-8083-5fa25f722548", + "x-ms-failure-cause": "gateway", + "x-ms-routing-request-id": "WESTUS:20220613T061044Z:57b46275-880d-4cdf-8083-5fa25f722548" }, "ResponseBody": { - "properties": { - "provisioningState": "Creating", - "endpoint": null - }, - "systemData": null, - "location": "eastus2euap", - "tags": null, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", - "name": "domainc98a23ef", - "type": "Microsoft.EventGrid/domains" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/47817715-B100-47E6-A618-A8BE483F14E0?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:12 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4c264167-b0f6-418b-a1d8-f15deba281b4", - "x-ms-ratelimit-remaining-subscription-reads": "11999", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010813Z:4c264167-b0f6-418b-a1d8-f15deba281b4" - }, - "ResponseBody": { - "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/47817715-B100-47E6-A618-A8BE483F14E0?api-version=2021-10-15-preview", - "name": "47817715-b100-47e6-a618-a8be483f14e0", - "status": "Succeeded" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:13 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8ddde611-bd5b-4011-a9f5-ce94f576e39e", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010813Z:8ddde611-bd5b-4011-a9f5-ce94f576e39e" - }, - "ResponseBody": { - "properties": { - "provisioningState": "Succeeded", - "endpoint": "https://domainc98a23ef.eastus2euap-1.eventgrid.azure.net/api/events", - "inputSchema": "EventGridSchema", - "metricResourceId": "756d9357-84e2-4823-93da-22d072f10148", - "publicNetworkAccess": "Enabled", - "dataResidencyBoundary": "WithinGeopair" - }, - "sku": { - "name": "Basic" - }, - "systemData": null, - "location": "eastus2euap", - "tags": null, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", - "name": "domainc98a23ef", - "type": "Microsoft.EventGrid/domains" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "46", - "Content-Type": "application/json", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": { - "tags": { - "tag1": "value1", - "tag2": "value2" + "error": { + "code": "NoRegisteredProviderFound", + "message": "No registered resource provider found for location \u0027eastus2euap\u0027 and API version \u00272022-06-15\u0027 for type \u0027domains\u0027. The supported api-versions are \u00272018-09-15-preview, 2019-02-01-preview, 2019-06-01, 2020-01-01-preview, 2020-04-01-preview, 2020-06-01, 2020-10-15-preview, 2021-06-01-preview, 2021-12-01, 2021-10-15-preview, 2017-06-15-preview, 2017-09-15-preview, 2018-01-01, 2018-05-01-preview, 2019-01-01\u0027. The supported locations are \u0027centralus, westus2, eastus, westus, eastus2, westcentralus, australiaeast, australiasoutheast, australiacentral, japaneast, japanwest, westeurope, northeurope, southeastasia, eastasia, northcentralus, southcentralus, brazilsouth, canadacentral, canadaeast, centralindia, southindia, westindia, francecentral, ukwest, uksouth, koreacentral, koreasouth, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, westus3, jioindiawest, jioindiacentral, swedencentral, norwayeast, eastus2euap, centraluseuap\u0027." } - }, - "StatusCode": 201, - "ResponseHeaders": { - "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/EC9FFC63-48DE-4EF9-912C-2637EE2D70B0?api-version=2021-10-15-preview", - "Cache-Control": "no-cache", - "Content-Length": "592", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:18 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Retry-After": "10", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "be048b71-ab11-4367-bdf9-1d339db03d4f", - "x-ms-ratelimit-remaining-subscription-writes": "1198", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010818Z:be048b71-ab11-4367-bdf9-1d339db03d4f" - }, - "ResponseBody": { - "properties": { - "provisioningState": "Updating", - "endpoint": "https://domainc98a23ef.eastus2euap-1.eventgrid.azure.net/api/events", - "inputSchema": "EventGridSchema", - "metricResourceId": "756d9357-84e2-4823-93da-22d072f10148", - "publicNetworkAccess": "Enabled", - "dataResidencyBoundary": "WithinGeopair" - }, - "sku": { - "name": "Basic" - }, - "systemData": null, - "location": "eastus2euap", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", - "name": "domainc98a23ef", - "type": "Microsoft.EventGrid/domains" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/EC9FFC63-48DE-4EF9-912C-2637EE2D70B0?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:28 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c4977d9c-f864-4b70-ad9c-7f1476fd132e", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010828Z:c4977d9c-f864-4b70-ad9c-7f1476fd132e" - }, - "ResponseBody": { - "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/EC9FFC63-48DE-4EF9-912C-2637EE2D70B0?api-version=2021-10-15-preview", - "name": "ec9ffc63-48de-4ef9-912c-2637ee2d70b0", - "status": "Succeeded" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:28 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "890f141b-4b34-4734-8244-48111704387c", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010828Z:890f141b-4b34-4734-8244-48111704387c" - }, - "ResponseBody": { - "properties": { - "provisioningState": "Succeeded", - "endpoint": "https://domainc98a23ef.eastus2euap-1.eventgrid.azure.net/api/events", - "inputSchema": "EventGridSchema", - "metricResourceId": "756d9357-84e2-4823-93da-22d072f10148", - "publicNetworkAccess": "Enabled", - "dataResidencyBoundary": "WithinGeopair" - }, - "sku": { - "name": "Basic" - }, - "systemData": null, - "location": "eastus2euap", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", - "name": "domainc98a23ef", - "type": "Microsoft.EventGrid/domains" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:28 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5226448f-1d13-4a40-989a-8cdc74a725f3", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010829Z:5226448f-1d13-4a40-989a-8cdc74a725f3" - }, - "ResponseBody": { - "properties": { - "provisioningState": "Succeeded", - "endpoint": "https://domainc98a23ef.eastus2euap-1.eventgrid.azure.net/api/events", - "inputSchema": "EventGridSchema", - "metricResourceId": "756d9357-84e2-4823-93da-22d072f10148", - "publicNetworkAccess": "Enabled", - "dataResidencyBoundary": "WithinGeopair" - }, - "sku": { - "name": "Basic" - }, - "systemData": null, - "location": "eastus2euap", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", - "name": "domainc98a23ef", - "type": "Microsoft.EventGrid/domains" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2021-10-15-preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "0", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/4A2A5DBC-1B33-43E4-8E08-56D66AC3217D?api-version=2021-10-15-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Thu, 12 May 2022 01:08:28 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationResults/4A2A5DBC-1B33-43E4-8E08-56D66AC3217D?api-version=2021-10-15-preview", - "Pragma": "no-cache", - "Retry-After": "10", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "836097d6-d628-4f0f-8da0-1ff05553f759", - "x-ms-ratelimit-remaining-subscription-deletes": "14999", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010829Z:836097d6-d628-4f0f-8da0-1ff05553f759" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/4A2A5DBC-1B33-43E4-8E08-56D66AC3217D?api-version=2021-10-15-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.8.12 (Linux-5.13.0-1022-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 12 May 2022 01:08:38 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b03c45b7-3ea1-45a7-83db-966b78e5cbdb", - "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-routing-request-id": "NORTHCENTRALUS:20220512T010839Z:b03c45b7-3ea1-45a7-83db-966b78e5cbdb" - }, - "ResponseBody": { - "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/4A2A5DBC-1B33-43E4-8E08-56D66AC3217D?api-version=2021-10-15-preview", - "name": "4a2a5dbc-1b33-43e4-8e08-56d66ac3217d", - "status": "Succeeded" } } ], From 3cb6d9dd98659a938e9decd87470db709e08296d Mon Sep 17 00:00:00 2001 From: BigCat20196 <1095260342@qq.com> Date: Mon, 20 Jun 2022 15:28:25 +0800 Subject: [PATCH 2/3] update test and result --- ...domain.pyTestMgmtEventGridtest_domain.json | 364 ++++++++++++++++-- .../azure-mgmt-eventgrid/tests/test_domain.py | 2 +- 2 files changed, 340 insertions(+), 26 deletions(-) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json index c11ad9872b60..d7d18c4d3560 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.pyTestMgmtEventGridtest_domain.json @@ -7,7 +7,7 @@ "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -17,12 +17,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "1753", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Jun 2022 06:10:42 GMT", + "Date": "Mon, 20 Jun 2022 07:26:30 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12851.7 - WUS2 ProdSlices", + "x-ms-ests-server": "2.1.12890.7 - SCUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -101,7 +101,7 @@ "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -111,12 +111,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "945", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Jun 2022 06:10:43 GMT", + "Date": "Mon, 20 Jun 2022 07:26:30 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12851.7 - SCUS ProdSlices", + "x-ms-ests-server": "2.1.13006.6 - SEASLR2 ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -172,28 +172,28 @@ "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip, deflate", - "client-request-id": "abf01b09-5c07-48c0-be43-97abd3629108", + "client-request-id": "515e670a-8e04-4c8d-b2db-2cd7d4dbb434", "Connection": "keep-alive", "Content-Length": "289", "Content-Type": "application/x-www-form-urlencoded", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0", + "User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)", "x-client-cpu": "x64", "x-client-current-telemetry": "4|730,0|", "x-client-last-telemetry": "4|0|||", - "x-client-os": "linux", + "x-client-os": "win32", "x-client-sku": "MSAL.Python", - "x-client-ver": "1.18.0", + "x-client-ver": "1.16.0", "x-ms-lib-capability": "retry-after, h429" }, "RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q~IsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-store, no-cache", - "client-request-id": "abf01b09-5c07-48c0-be43-97abd3629108", + "client-request-id": "515e670a-8e04-4c8d-b2db-2cd7d4dbb434", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Jun 2022 06:10:43 GMT", + "Date": "Mon, 20 Jun 2022 07:26:31 GMT", "Expires": "-1", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Pragma": "no-cache", @@ -201,7 +201,7 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "x-ms-clitelem": "1,0,0,,", - "x-ms-ests-server": "2.1.12851.7 - EUS ProdSlices", + "x-ms-ests-server": "2.1.12890.7 - NCUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -218,32 +218,346 @@ "Accept": "application/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "Content-Length": "27", + "Content-Length": "23", "Content-Type": "application/json", - "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.12 (Linux-5.13.0-1025-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": { - "location": "eastus2euap" + "location": "eastus2" }, - "StatusCode": 400, + "StatusCode": 201, "ResponseHeaders": { + "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/FB85846B-BEA2-4B71-A1F3-983352EE023C?api-version=2022-06-15", "Cache-Control": "no-cache", - "Content-Length": "1008", + "Content-Length": "309", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Jun 2022 06:10:43 GMT", + "Date": "Mon, 20 Jun 2022 07:26:38 GMT", "Expires": "-1", "Pragma": "no-cache", + "Retry-After": "10", + "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "57b46275-880d-4cdf-8083-5fa25f722548", - "x-ms-failure-cause": "gateway", - "x-ms-routing-request-id": "WESTUS:20220613T061044Z:57b46275-880d-4cdf-8083-5fa25f722548" + "x-ms-correlation-request-id": "b1defd0c-a9a9-4655-9d80-7938061a522b", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072638Z:b1defd0c-a9a9-4655-9d80-7938061a522b" }, "ResponseBody": { - "error": { - "code": "NoRegisteredProviderFound", - "message": "No registered resource provider found for location \u0027eastus2euap\u0027 and API version \u00272022-06-15\u0027 for type \u0027domains\u0027. The supported api-versions are \u00272018-09-15-preview, 2019-02-01-preview, 2019-06-01, 2020-01-01-preview, 2020-04-01-preview, 2020-06-01, 2020-10-15-preview, 2021-06-01-preview, 2021-12-01, 2021-10-15-preview, 2017-06-15-preview, 2017-09-15-preview, 2018-01-01, 2018-05-01-preview, 2019-01-01\u0027. The supported locations are \u0027centralus, westus2, eastus, westus, eastus2, westcentralus, australiaeast, australiasoutheast, australiacentral, japaneast, japanwest, westeurope, northeurope, southeastasia, eastasia, northcentralus, southcentralus, brazilsouth, canadacentral, canadaeast, centralindia, southindia, westindia, francecentral, ukwest, uksouth, koreacentral, koreasouth, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, westus3, jioindiawest, jioindiacentral, swedencentral, norwayeast, eastus2euap, centraluseuap\u0027." + "properties": { + "provisioningState": "Creating", + "endpoint": null + }, + "systemData": null, + "location": "eastus2", + "tags": null, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", + "name": "domainc98a23ef", + "type": "Microsoft.EventGrid/domains" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/FB85846B-BEA2-4B71-A1F3-983352EE023C?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "280", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:26:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a0d813e3-618f-4ccc-bb37-02bfab667f42", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072649Z:a0d813e3-618f-4ccc-bb37-02bfab667f42" + }, + "ResponseBody": { + "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/FB85846B-BEA2-4B71-A1F3-983352EE023C?api-version=2022-06-15", + "name": "fb85846b-bea2-4b71-a1f3-983352ee023c", + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "493", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:26:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "95784b14-91cf-421b-860a-71916b907252", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072649Z:95784b14-91cf-421b-860a-71916b907252" + }, + "ResponseBody": { + "properties": { + "provisioningState": "Succeeded", + "endpoint": "https://domainc98a23ef.eastus2-1.eventgrid.azure.net/api/events", + "inputSchema": "EventGridSchema", + "metricResourceId": "ca249b55-f104-477b-aa8f-53b1c3b8dc81", + "publicNetworkAccess": "Enabled" + }, + "systemData": null, + "location": "eastus2", + "tags": null, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", + "name": "domainc98a23ef", + "type": "Microsoft.EventGrid/domains" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Content-Length": "46", + "Content-Type": "application/json", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": { + "tags": { + "tag1": "value1", + "tag2": "value2" } + }, + "StatusCode": 201, + "ResponseHeaders": { + "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/899D1B34-A7DA-4B1F-B912-CD78EDA31F10?api-version=2022-06-15", + "Cache-Control": "no-cache", + "Content-Length": "521", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:26:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "df1e3052-03ac-4366-8c32-a7dbaccdc196", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072652Z:df1e3052-03ac-4366-8c32-a7dbaccdc196" + }, + "ResponseBody": { + "properties": { + "provisioningState": "Updating", + "endpoint": "https://domainc98a23ef.eastus2-1.eventgrid.azure.net/api/events", + "inputSchema": "EventGridSchema", + "metricResourceId": "ca249b55-f104-477b-aa8f-53b1c3b8dc81", + "publicNetworkAccess": "Enabled" + }, + "systemData": null, + "location": "eastus2", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", + "name": "domainc98a23ef", + "type": "Microsoft.EventGrid/domains" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/899D1B34-A7DA-4B1F-B912-CD78EDA31F10?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "280", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:27:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2263311c-ee5f-481e-b113-67424c45e207", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072702Z:2263311c-ee5f-481e-b113-67424c45e207" + }, + "ResponseBody": { + "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/899D1B34-A7DA-4B1F-B912-CD78EDA31F10?api-version=2022-06-15", + "name": "899d1b34-a7da-4b1f-b912-cd78eda31f10", + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "522", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:27:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "668284ec-727a-421c-b8f4-62fa938129e9", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072703Z:668284ec-727a-421c-b8f4-62fa938129e9" + }, + "ResponseBody": { + "properties": { + "provisioningState": "Succeeded", + "endpoint": "https://domainc98a23ef.eastus2-1.eventgrid.azure.net/api/events", + "inputSchema": "EventGridSchema", + "metricResourceId": "ca249b55-f104-477b-aa8f-53b1c3b8dc81", + "publicNetworkAccess": "Enabled" + }, + "systemData": null, + "location": "eastus2", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", + "name": "domainc98a23ef", + "type": "Microsoft.EventGrid/domains" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "522", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:27:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c506fcc8-a643-4504-950b-d08cb3c90f3c", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072703Z:c506fcc8-a643-4504-950b-d08cb3c90f3c" + }, + "ResponseBody": { + "properties": { + "provisioningState": "Succeeded", + "endpoint": "https://domainc98a23ef.eastus2-1.eventgrid.azure.net/api/events", + "inputSchema": "EventGridSchema", + "metricResourceId": "ca249b55-f104-477b-aa8f-53b1c3b8dc81", + "publicNetworkAccess": "Enabled" + }, + "systemData": null, + "location": "eastus2", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef", + "name": "domainc98a23ef", + "type": "Microsoft.EventGrid/domains" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domainc98a23ef?api-version=2022-06-15", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Azure-AsyncOperation": "https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/8615A211-86B6-48C3-B53A-B29500B491C4?api-version=2022-06-15", + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 20 Jun 2022 07:27:03 GMT", + "Expires": "-1", + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationResults/8615A211-86B6-48C3-B53A-B29500B491C4?api-version=2022-06-15", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a5ba428c-00f9-404e-9b46-356fc256cea3", + "x-ms-ratelimit-remaining-subscription-deletes": "14999", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072704Z:a5ba428c-00f9-404e-9b46-356fc256cea3" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/8615A211-86B6-48C3-B53A-B29500B491C4?api-version=2022-06-15", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "User-Agent": "azsdk-python-mgmt-eventgrid/10.2.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "280", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 20 Jun 2022 07:27:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9d30d721-f786-4ba5-8523-d5f35f44d037", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220620T072715Z:9d30d721-f786-4ba5-8523-d5f35f44d037" + }, + "ResponseBody": { + "id": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2/operationsStatus/8615A211-86B6-48C3-B53A-B29500B491C4?api-version=2022-06-15", + "name": "8615a211-86b6-48c3-b53a-b29500b491c4", + "status": "Succeeded" } } ], diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py b/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py index 79dd7fbf0b32..91b26d2f6c56 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py @@ -17,7 +17,7 @@ class TestMgmtEventGrid(AzureMgmtRecordedTestCase): def setup_method(self, method): self.eventgrid_client = self.create_mgmt_client(EventGridManagementClient) - @RandomNameResourceGroupPreparer(location="eastus2euap") + @RandomNameResourceGroupPreparer(location="eastus2") @recorded_by_proxy def test_domain(self, resource_group, location): # create From 427a438ac42a0d7dabce92d194ee0909efa9ac3e Mon Sep 17 00:00:00 2001 From: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:29:42 +0800 Subject: [PATCH 3/3] Update CHANGELOG.md --- sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md index 8fa1e35d27a0..897751af2c2a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 10.2.0 (2022-06-13) +## 10.2.0 (2022-06-20) **Features**