@@ -66,7 +66,7 @@ An Event Grid namespace provides a user-defined endpoint to which you post your
66
66
1. Create a namespace. You might want to change the location where you deploy it.
67
67
68
68
```azurecli-interactive
69
- az eventgrid namespace create -g $resource_group -n $namespace -l eastus
69
+ az eventgrid namespace create --resource-group $resource_group --name $namespace --location eastus
70
70
```
71
71
72
72
## Create a namespace topic
@@ -81,7 +81,7 @@ Create a topic that's used to hold all events published to the namespace endpoin
81
81
1. Create your namespace topic:
82
82
83
83
```azurecli-interactive
84
- az eventgrid namespace topic create -g $resource_group -n $topic --namespace-name $namespace
84
+ az eventgrid namespace topic create --resource-group $resource_group --name $topic --namespace-name $namespace
85
85
```
86
86
87
87
## Create an event subscription
@@ -96,7 +96,7 @@ Create an event subscription setting its delivery mode to *queue*, which support
96
96
1. Create an event subscription to the namespace topic:
97
97
98
98
```azurecli-interactive
99
- az eventgrid namespace topic event-subscription create -g $resource_group --topic-name $topic -n $event_subscription --namespace-name $namespace --delivery-configuration "{deliveryMode:Queue,queue:{receiveLockDurationInSeconds:300,maxDeliveryCount:4,eventTimeToLive:P1D}}"
99
+ az eventgrid namespace topic event-subscription create --resource-group $resource_group --topic-name $topic --name $event_subscription --namespace-name $namespace --delivery-configuration "{deliveryMode:Queue,queue:{receiveLockDurationInSeconds:300,maxDeliveryCount:4,eventTimeToLive:P1D}}"
100
100
```
101
101
102
102
## Send events to your topic
@@ -107,7 +107,8 @@ Now, send a sample event to the namespace topic by following steps in this secti
107
107
1. Get the access keys associated with the namespace you created. You use one of them to authenticate when publishing events. To list your keys, you need the full namespace resource ID first. Get it by running the following command:
108
108
109
109
```azurecli-interactive
110
- namespace_resource_id=$(az eventgrid namespace show -g $resource_group -n $namespace --query "id" --output tsv)
110
+ namespace_resource_id=$(az eventgrid namespace show --resource-group $resource_group --name $namespace --query "id" --output tsv)
111
+
111
112
```
112
113
1. Get the first key from the namespace:
113
114
@@ -143,7 +144,7 @@ You receive events from Event Grid using an endpoint that refers to an event sub
143
144
1. Compose that endpoint by running the following command:
144
145
145
146
```azurecli-interactive
146
- receive_operation_uri="https://"$(az eventgrid namespace show -g $resource_group -n $namespace --query "topicsConfiguration.hostname" --output tsv)"/topics/"$topic/eventsubscriptions/$event_subscription:receive?api-version=2023-06-01-preview
147
+ receive_operation_uri="https://"$(az eventgrid namespace show --resource-group $resource_group --name $namespace --query "topicsConfiguration.hostname" --output tsv)"/topics/"$topic/eventsubscriptions/$event_subscription:receive?api-version=2023-06-01-preview
147
148
```
148
149
149
150
1. Submit a request to consume the event:
0 commit comments