From cf173f2837bb141ec8c02f9b6eda138255f98fc1 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Thu, 11 Apr 2024 08:55:11 -0700 Subject: [PATCH] [EG] Readme updates (#35152) * simplify readme * update all links to feature branch * spacing * try --- sdk/eventgrid/azure-eventgrid/CHANGELOG.md | 7 +- sdk/eventgrid/azure-eventgrid/README.md | 92 ++++++-------------- sdk/eventgrid/azure-eventgrid/pyproject.toml | 1 - 3 files changed, 31 insertions(+), 69 deletions(-) diff --git a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md index 1bd83a8df331..aa6a475e6f12 100644 --- a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md @@ -8,9 +8,10 @@ - EventGridClient `send` can be used for both Event Grid Namespace Resources and Event Grid Basic Resources. - Added a kwarg `level` in the EventGridClient constructor. The default value is `Standard` which creates a client for an Event Grid Namespace Resource. - ### Breaking Changes - - Removed the `AcknowledgeOptions`,`ReleaseOptions`, `RejectOptions`, and `RenewLockOptions` models. `lock_tokens` can now be specified as a `kwarg` on the operation. - - Renamed `publish_cloud_events` to `send`. +### Breaking Changes + +- Removed the `AcknowledgeOptions`,`ReleaseOptions`, `RejectOptions`, and `RenewLockOptions` models. `lock_tokens` can now be specified as a `kwarg` on the operation. +- Renamed `publish_cloud_events` to `send`. ## 4.19.0 (2024-04-10) diff --git a/sdk/eventgrid/azure-eventgrid/README.md b/sdk/eventgrid/azure-eventgrid/README.md index 88690bd43a61..1d2fdc57ca42 100644 --- a/sdk/eventgrid/azure-eventgrid/README.md +++ b/sdk/eventgrid/azure-eventgrid/README.md @@ -24,21 +24,9 @@ This is a beta release of Azure EventGrid's `EventGridClient`. `EventGridClient` ### Event Grid Resources -Below is a brief synopsis of the differences between Azure Event Grid Namespaces and Azure Event Grid Basic. +Azure Event Grid Namespaces supports both pull and push delivery. Azure Event Grid Basic supports only push delivery. More information on the two resource types can be found [here](https://learn.microsoft.com/azure/event-grid/choose-right-tier). -| Feature | Namespaces (Standard) | Basic | -| :---------------- | :------: | :----: | -| Throughput | High | Low | -| MQTT | Yes | No | -| Publish and Subscribe to custom events | Yes | Yes | -| Push Delivery to Event Hubs | Yes | Yes | -| Maximum message retention | 7 days | 1 day | -| Push Delivery to Azure Services | No | Yes | -| Subscribe to Azure System Events | No | Yes | -| Subscribe to Partner Events | No | Yes | -| Domain Scope Subscriptions | No | Yes | - **Note:** Azure Event Grid Namespaces only supports the Cloud Event v1.0 Schema. ### Install the package @@ -64,18 +52,6 @@ az eventgrid namespace create --location --resource-group --resource-group --name ``` -#### Create an Event Grid Basic Topic - -``` -az eventgrid topic --create --location --resource-group --name -``` - -#### Create an Event Grid Basic Domain - -``` -az eventgrid domain --create --location --resource-group --name -``` - ### Authenticate the client In order to interact with the Event Grid service, you will need to create an instance of a client. An **endpoint** and **credential** are necessary to instantiate the client object. @@ -176,7 +152,7 @@ An **[event](https://docs.microsoft.com/azure/event-grid/concepts#events)** is t Event Grid supports multiple schemas for encoding events. -##### System Topics +#### System Topics A **[system topic](https://docs.microsoft.com/azure/event-grid/system-topics)** in Event Grid represents one or more events published by Azure services such as Azure Storage or Azure Event Hubs. For example, a system topic may represent all blob events or only blob creation and blob deletion events published for a specific storage account. The names of the various event types for the system events published to Azure Event Grid are available in `azure.eventgrid.SystemEventNames`. @@ -205,24 +181,10 @@ The following formats of events are allowed to be sent to an EventGrid Namespace Please have a look at the [samples](https://github.com/Azure/azure-sdk-for-python/tree/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples) for detailed examples. - ## Event Grid on Kubernetes with Azure Arc Event Grid on Kubernetes with Azure Arc is an offering that allows you to run Event Grid on your own Kubernetes cluster. This capability is enabled by the use of Azure Arc enabled Kubernetes. Through Azure Arc enabled Kubernetes, a supported Kubernetes cluster connects to Azure. Once connected, you are able to install Event Grid on it. Learn more about it [here](https://docs.microsoft.com/azure/event-grid/kubernetes/overview). -### Support for CNCF Cloud Events - -Starting with v4.7.0, this package also supports publishing a CNCF cloud event from https://pypi.org/project/cloudevents/. You would be able to pass a CloudEvent object from this library to the `send` API. - -```python - -from cloudevents.http import CloudEvent - -event = CloudEvent(...) - -client.send(event) -``` - ## Examples The following sections provide several code snippets covering some of the most common Event Grid tasks, including: @@ -510,39 +472,39 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [python-eg-product-docs]: https://docs.microsoft.com/azure/event-grid/overview [python-eg-ref-docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventgrid/latest/index.html [publisher-service-doc]: https://docs.microsoft.com/azure/event-grid/concepts -[python-eg-samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventgrid/azure-eventgrid/samples -[python-eg-changelog]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventgrid/azure-eventgrid/CHANGELOG.md +[python-eg-samples]: https://github.com/Azure/azure-sdk-for-python/tree/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples +[python-eg-changelog]: https://github.com/Azure/azure-sdk-for-python/tree/feature/eventgrid/sdk/eventgrid/azure-eventgrid/CHANGELOG.md [pip]: https://pypi.org/project/pip/ [azure_portal_create_EG_resource]: https://ms.portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.EventGrid%2Ftopics [azure-key-credential]: https://aka.ms/azsdk/python/core/azurekeycredential [azure_core_exceptions]: https://aka.ms/azsdk/python/core/docs#module-azure.core.exceptions [python_logging]: https://docs.python.org/3/library/logging.html -[azure_core_ref_docs]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core#configurations +[azure_core_ref_docs]: https://github.com/Azure/azure-sdk-for-python/tree/feature/eventgrid/sdk/core/azure-core#configurations [azure_subscription]: https://azure.microsoft.com/free/ -[python-eg-auth]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_authentication.py -[python-eg-generate-sas]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_generate_sas.py -[python-eg-sample-send-using-sas]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py -[python-eg-sample-eg-event]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py -[python-eg-sample-eg-event-to-domain]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_domain.py -[python-eg-sample-send-cloudevent]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py -[python-eg-publish-custom-schema]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_custom_schema_to_a_topic.py -[python-eg-sample-send-eg-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_event_using_dict.py -[python-eg-sample-send-cloudevent-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cloud_event_using_dict.py - -[python-eg-auth-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_authentication_async.py -[python-eg-sample-send-using-sas-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py -[python-eg-sample-eg-event-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_topic_async.py -[python-eg-sample-eg-event-to-domain-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_domain_async.py -[python-eg-sample-send-cloudevent-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py -[python-eg-publish-custom-schema-async]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_custom_schema_to_a_topic_async.py -[python-eg-sample-send-eg-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_event_using_dict_async.py -[python-eg-sample-send-cloudevent-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cloud_event_using_dict_async.py - -[python-eg-publish-samples]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/publish_samples -[python-eg-consume-samples]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/consume_samples -[python-eg-sample-consume-custom-payload]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_consume_custom_payload.py +[python-eg-auth]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_authentication.py +[python-eg-generate-sas]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_generate_sas.py +[python-eg-sample-send-using-sas]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py +[python-eg-sample-eg-event]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py +[python-eg-sample-eg-event-to-domain]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_domain.py +[python-eg-sample-send-cloudevent]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py +[python-eg-publish-custom-schema]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_custom_schema_to_a_topic.py +[python-eg-sample-send-eg-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_event_using_dict.py +[python-eg-sample-send-cloudevent-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cloud_event_using_dict.py + +[python-eg-auth-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_authentication_async.py +[python-eg-sample-send-using-sas-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py +[python-eg-sample-eg-event-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_topic_async.py +[python-eg-sample-eg-event-to-domain-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_domain_async.py +[python-eg-sample-send-cloudevent-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py +[python-eg-publish-custom-schema-async]:https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_custom_schema_to_a_topic_async.py +[python-eg-sample-send-eg-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_event_using_dict_async.py +[python-eg-sample-send-cloudevent-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cloud_event_using_dict_async.py + +[python-eg-publish-samples]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/publish_samples +[python-eg-consume-samples]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/consume_samples +[python-eg-sample-consume-custom-payload]: https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_consume_custom_payload.py [python-eg-client-all-ops-sample]:https://github.com/Azure/azure-sdk-for-python/blob/feature/eventgrid/sdk/eventgrid/azure-eventgrid/samples/sync_samples/eventgrid_client_samples/sample_all_operations.py diff --git a/sdk/eventgrid/azure-eventgrid/pyproject.toml b/sdk/eventgrid/azure-eventgrid/pyproject.toml index 5f3098c4c74b..1753fb8036e7 100644 --- a/sdk/eventgrid/azure-eventgrid/pyproject.toml +++ b/sdk/eventgrid/azure-eventgrid/pyproject.toml @@ -1,6 +1,5 @@ [tool.azure-sdk-build] pyright = false -type_check_samples = false verifytypes = false strict_sphinx = false pylint = false \ No newline at end of file