Skip to content

Commit 38ef11a

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-eventgrid-2023-05-16-14575(can only be merged by SDK owner) (Azure#30402)
* code and test * update: --------- Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: msyyc <[email protected]>
1 parent 0e3501b commit 38ef11a

File tree

289 files changed

+26995
-14801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+26995
-14801
lines changed

sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Release History
22

3+
## 10.3.0b2 (2023-05-19)
4+
5+
### Features Added
6+
7+
- Added operation group CaCertificatesOperations
8+
- Added operation group ClientGroupsOperations
9+
- Added operation group ClientsOperations
10+
- Added operation group NamespaceTopicEventSubscriptionsOperations
11+
- Added operation group NamespaceTopicsOperations
12+
- Added operation group NamespacesOperations
13+
- Added operation group PartnerDestinationsOperations
14+
- Added operation group PermissionBindingsOperations
15+
- Added operation group TopicSpacesOperations
16+
- Model Channel has a new parameter partner_destination_info
17+
- Model ChannelUpdateParameters has a new parameter partner_destination_info
18+
- Model Domain has a new parameter event_type_info
19+
- Model Domain has a new parameter minimum_tls_version_allowed
20+
- Model Domain has a new parameter sku
21+
- Model DomainUpdateParameters has a new parameter event_type_info
22+
- Model DomainUpdateParameters has a new parameter minimum_tls_version_allowed
23+
- Model DomainUpdateParameters has a new parameter sku
24+
- Model PartnerNamespace has a new parameter minimum_tls_version_allowed
25+
- Model PartnerNamespaceUpdateParameters has a new parameter minimum_tls_version_allowed
26+
- Model Topic has a new parameter event_type_info
27+
- Model Topic has a new parameter extended_location
28+
- Model Topic has a new parameter kind
29+
- Model Topic has a new parameter minimum_tls_version_allowed
30+
- Model Topic has a new parameter sku
31+
- Model TopicTypeInfo has a new parameter are_regional_and_global_sources_supported
32+
- Model TopicUpdateParameters has a new parameter event_type_info
33+
- Model TopicUpdateParameters has a new parameter minimum_tls_version_allowed
34+
- Model TopicUpdateParameters has a new parameter sku
35+
- Model VerifiedPartner has a new parameter partner_destination_details
36+
- Model WebHookEventSubscriptionDestination has a new parameter minimum_tls_version_allowed
37+
338
## 10.3.0b1 (2022-11-30)
439

540
### Other Changes

sdk/eventgrid/azure-mgmt-eventgrid/README.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,53 @@ For a more complete view of Azure libraries, see the [azure sdk python release](
88

99
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/event-grid)
17-
Code samples for this package can be found at [Event Grid Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://github.com/Azure-Samples/azure-samples-python-management/tree/main/samples/eventgrid)
15+
- Python 3.7+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-eventgrid
22+
pip install azure-identity
23+
```
24+
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.eventgrid import EventGridManagementClient
40+
import os
41+
42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = EventGridManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
45+
46+
## Examples
47+
48+
Code samples for this package can be found at:
49+
- [Search Event Grid Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
51+
52+
53+
## Troubleshooting
54+
55+
## Next steps
56+
57+
## Provide Feedback
2258

2359
If you encounter any bugs or have suggestions, please file an issue in the
2460
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "2f2e48923cebd95f7d184608a29bcd06d9cb3653",
2+
"commit": "288939a1c67efd5f129124ea0912ca17ff7b9d90",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.2.7",
6+
"@autorest/python@6.4.12",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/eventgrid/resource-manager/readme.md"
1111
}

sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -36,14 +30,14 @@ class EventGridManagementClientConfiguration(Configuration): # pylint: disable=
3630
:param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure
3731
subscription. The subscription ID forms part of the URI for every service call. Required.
3832
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this
40-
default value may result in unsupported behavior.
33+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
34+
this default value may result in unsupported behavior.
4135
:paramtype api_version: str
4236
"""
4337

4438
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4539
super(EventGridManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2022-06-15"] = kwargs.pop("api_version", "2022-06-15")
40+
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")
4741

4842
if credential is None:
4943
raise ValueError("Parameter 'credential' must not be None.")

sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,33 @@
1616
from ._configuration import EventGridManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
19+
CaCertificatesOperations,
1920
ChannelsOperations,
21+
ClientGroupsOperations,
22+
ClientsOperations,
2023
DomainEventSubscriptionsOperations,
2124
DomainTopicEventSubscriptionsOperations,
2225
DomainTopicsOperations,
2326
DomainsOperations,
2427
EventSubscriptionsOperations,
2528
ExtensionTopicsOperations,
29+
NamespaceTopicEventSubscriptionsOperations,
30+
NamespaceTopicsOperations,
31+
NamespacesOperations,
2632
Operations,
2733
PartnerConfigurationsOperations,
34+
PartnerDestinationsOperations,
2835
PartnerNamespacesOperations,
2936
PartnerRegistrationsOperations,
3037
PartnerTopicEventSubscriptionsOperations,
3138
PartnerTopicsOperations,
39+
PermissionBindingsOperations,
3240
PrivateEndpointConnectionsOperations,
3341
PrivateLinkResourcesOperations,
3442
SystemTopicEventSubscriptionsOperations,
3543
SystemTopicsOperations,
3644
TopicEventSubscriptionsOperations,
45+
TopicSpacesOperations,
3746
TopicTypesOperations,
3847
TopicsOperations,
3948
VerifiedPartnersOperations,
@@ -47,12 +56,21 @@
4756
class EventGridManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
4857
"""Azure EventGrid Management Client.
4958
59+
:ivar ca_certificates: CaCertificatesOperations operations
60+
:vartype ca_certificates: azure.mgmt.eventgrid.operations.CaCertificatesOperations
5061
:ivar channels: ChannelsOperations operations
5162
:vartype channels: azure.mgmt.eventgrid.operations.ChannelsOperations
63+
:ivar client_groups: ClientGroupsOperations operations
64+
:vartype client_groups: azure.mgmt.eventgrid.operations.ClientGroupsOperations
65+
:ivar clients: ClientsOperations operations
66+
:vartype clients: azure.mgmt.eventgrid.operations.ClientsOperations
5267
:ivar domains: DomainsOperations operations
5368
:vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations
5469
:ivar domain_topics: DomainTopicsOperations operations
5570
:vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations
71+
:ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations
72+
:vartype domain_topic_event_subscriptions:
73+
azure.mgmt.eventgrid.operations.DomainTopicEventSubscriptionsOperations
5674
:ivar topic_event_subscriptions: TopicEventSubscriptionsOperations operations
5775
:vartype topic_event_subscriptions:
5876
azure.mgmt.eventgrid.operations.TopicEventSubscriptionsOperations
@@ -61,37 +79,48 @@ class EventGridManagementClient: # pylint: disable=client-accepts-api-version-k
6179
azure.mgmt.eventgrid.operations.DomainEventSubscriptionsOperations
6280
:ivar event_subscriptions: EventSubscriptionsOperations operations
6381
:vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations
64-
:ivar domain_topic_event_subscriptions: DomainTopicEventSubscriptionsOperations operations
65-
:vartype domain_topic_event_subscriptions:
66-
azure.mgmt.eventgrid.operations.DomainTopicEventSubscriptionsOperations
6782
:ivar system_topic_event_subscriptions: SystemTopicEventSubscriptionsOperations operations
6883
:vartype system_topic_event_subscriptions:
6984
azure.mgmt.eventgrid.operations.SystemTopicEventSubscriptionsOperations
85+
:ivar namespace_topic_event_subscriptions: NamespaceTopicEventSubscriptionsOperations
86+
operations
87+
:vartype namespace_topic_event_subscriptions:
88+
azure.mgmt.eventgrid.operations.NamespaceTopicEventSubscriptionsOperations
7089
:ivar partner_topic_event_subscriptions: PartnerTopicEventSubscriptionsOperations operations
7190
:vartype partner_topic_event_subscriptions:
7291
azure.mgmt.eventgrid.operations.PartnerTopicEventSubscriptionsOperations
92+
:ivar namespaces: NamespacesOperations operations
93+
:vartype namespaces: azure.mgmt.eventgrid.operations.NamespacesOperations
94+
:ivar namespace_topics: NamespaceTopicsOperations operations
95+
:vartype namespace_topics: azure.mgmt.eventgrid.operations.NamespaceTopicsOperations
7396
:ivar operations: Operations operations
7497
:vartype operations: azure.mgmt.eventgrid.operations.Operations
75-
:ivar topics: TopicsOperations operations
76-
:vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations
7798
:ivar partner_configurations: PartnerConfigurationsOperations operations
7899
:vartype partner_configurations:
79100
azure.mgmt.eventgrid.operations.PartnerConfigurationsOperations
101+
:ivar partner_destinations: PartnerDestinationsOperations operations
102+
:vartype partner_destinations: azure.mgmt.eventgrid.operations.PartnerDestinationsOperations
80103
:ivar partner_namespaces: PartnerNamespacesOperations operations
81104
:vartype partner_namespaces: azure.mgmt.eventgrid.operations.PartnerNamespacesOperations
82105
:ivar partner_registrations: PartnerRegistrationsOperations operations
83106
:vartype partner_registrations: azure.mgmt.eventgrid.operations.PartnerRegistrationsOperations
84107
:ivar partner_topics: PartnerTopicsOperations operations
85108
:vartype partner_topics: azure.mgmt.eventgrid.operations.PartnerTopicsOperations
109+
:ivar permission_bindings: PermissionBindingsOperations operations
110+
:vartype permission_bindings: azure.mgmt.eventgrid.operations.PermissionBindingsOperations
86111
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
87112
:vartype private_endpoint_connections:
88113
azure.mgmt.eventgrid.operations.PrivateEndpointConnectionsOperations
89114
:ivar private_link_resources: PrivateLinkResourcesOperations operations
90115
:vartype private_link_resources: azure.mgmt.eventgrid.operations.PrivateLinkResourcesOperations
91116
:ivar system_topics: SystemTopicsOperations operations
92117
:vartype system_topics: azure.mgmt.eventgrid.operations.SystemTopicsOperations
118+
:ivar topics: TopicsOperations operations
119+
:vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations
93120
:ivar extension_topics: ExtensionTopicsOperations operations
94121
:vartype extension_topics: azure.mgmt.eventgrid.operations.ExtensionTopicsOperations
122+
:ivar topic_spaces: TopicSpacesOperations operations
123+
:vartype topic_spaces: azure.mgmt.eventgrid.operations.TopicSpacesOperations
95124
:ivar topic_types: TopicTypesOperations operations
96125
:vartype topic_types: azure.mgmt.eventgrid.operations.TopicTypesOperations
97126
:ivar verified_partners: VerifiedPartnersOperations operations
@@ -103,8 +132,8 @@ class EventGridManagementClient: # pylint: disable=client-accepts-api-version-k
103132
:type subscription_id: str
104133
:param base_url: Service URL. Default value is "https://management.azure.com".
105134
:type base_url: str
106-
:keyword api_version: Api Version. Default value is "2022-06-15". Note that overriding this
107-
default value may result in unsupported behavior.
135+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
136+
this default value may result in unsupported behavior.
108137
:paramtype api_version: str
109138
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
110139
Retry-After header is present.
@@ -120,15 +149,21 @@ def __init__(
120149
self._config = EventGridManagementClientConfiguration(
121150
credential=credential, subscription_id=subscription_id, **kwargs
122151
)
123-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
152+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
124153

125154
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
126155
self._serialize = Serializer(client_models)
127156
self._deserialize = Deserializer(client_models)
128157
self._serialize.client_side_validation = False
158+
self.ca_certificates = CaCertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
129159
self.channels = ChannelsOperations(self._client, self._config, self._serialize, self._deserialize)
160+
self.client_groups = ClientGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
161+
self.clients = ClientsOperations(self._client, self._config, self._serialize, self._deserialize)
130162
self.domains = DomainsOperations(self._client, self._config, self._serialize, self._deserialize)
131163
self.domain_topics = DomainTopicsOperations(self._client, self._config, self._serialize, self._deserialize)
164+
self.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(
165+
self._client, self._config, self._serialize, self._deserialize
166+
)
132167
self.topic_event_subscriptions = TopicEventSubscriptionsOperations(
133168
self._client, self._config, self._serialize, self._deserialize
134169
)
@@ -138,37 +173,48 @@ def __init__(
138173
self.event_subscriptions = EventSubscriptionsOperations(
139174
self._client, self._config, self._serialize, self._deserialize
140175
)
141-
self.domain_topic_event_subscriptions = DomainTopicEventSubscriptionsOperations(
176+
self.system_topic_event_subscriptions = SystemTopicEventSubscriptionsOperations(
142177
self._client, self._config, self._serialize, self._deserialize
143178
)
144-
self.system_topic_event_subscriptions = SystemTopicEventSubscriptionsOperations(
179+
self.namespace_topic_event_subscriptions = NamespaceTopicEventSubscriptionsOperations(
145180
self._client, self._config, self._serialize, self._deserialize
146181
)
147182
self.partner_topic_event_subscriptions = PartnerTopicEventSubscriptionsOperations(
148183
self._client, self._config, self._serialize, self._deserialize
149184
)
185+
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
186+
self.namespace_topics = NamespaceTopicsOperations(
187+
self._client, self._config, self._serialize, self._deserialize
188+
)
150189
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
151-
self.topics = TopicsOperations(self._client, self._config, self._serialize, self._deserialize)
152190
self.partner_configurations = PartnerConfigurationsOperations(
153191
self._client, self._config, self._serialize, self._deserialize
154192
)
193+
self.partner_destinations = PartnerDestinationsOperations(
194+
self._client, self._config, self._serialize, self._deserialize
195+
)
155196
self.partner_namespaces = PartnerNamespacesOperations(
156197
self._client, self._config, self._serialize, self._deserialize
157198
)
158199
self.partner_registrations = PartnerRegistrationsOperations(
159200
self._client, self._config, self._serialize, self._deserialize
160201
)
161202
self.partner_topics = PartnerTopicsOperations(self._client, self._config, self._serialize, self._deserialize)
203+
self.permission_bindings = PermissionBindingsOperations(
204+
self._client, self._config, self._serialize, self._deserialize
205+
)
162206
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
163207
self._client, self._config, self._serialize, self._deserialize
164208
)
165209
self.private_link_resources = PrivateLinkResourcesOperations(
166210
self._client, self._config, self._serialize, self._deserialize
167211
)
168212
self.system_topics = SystemTopicsOperations(self._client, self._config, self._serialize, self._deserialize)
213+
self.topics = TopicsOperations(self._client, self._config, self._serialize, self._deserialize)
169214
self.extension_topics = ExtensionTopicsOperations(
170215
self._client, self._config, self._serialize, self._deserialize
171216
)
217+
self.topic_spaces = TopicSpacesOperations(self._client, self._config, self._serialize, self._deserialize)
172218
self.topic_types = TopicTypesOperations(self._client, self._config, self._serialize, self._deserialize)
173219
self.verified_partners = VerifiedPartnersOperations(
174220
self._client, self._config, self._serialize, self._deserialize
@@ -203,5 +249,5 @@ def __enter__(self) -> "EventGridManagementClient":
203249
self._client.__enter__()
204250
return self
205251

206-
def __exit__(self, *exc_details) -> None:
252+
def __exit__(self, *exc_details: Any) -> None:
207253
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)