Skip to content

Commit 84dcac7

Browse files
Fix the help files for DeliveryAttributeMapping parameter (Azure#21365)
* fix the help files for DeliveryAttributeMapping parameter * fix static analysis issue
1 parent 1dd5ada commit 84dcac7

6 files changed

+117
-67
lines changed

src/EventGrid/EventGrid/help/New-AzEventGridPartnerTopicEventSubscription.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Creates a new Azure Event Grid Event Subscription to a Partner topic.
1515
```
1616
New-AzEventGridPartnerTopicEventSubscription -Name <String> -ResourceGroupName <String>
1717
-PartnerTopicName <String> [-AzureActiveDirectoryApplicationIdOrUri <String>]
18-
[-AzureActiveDirectoryTenantId <String>] [-DeadLetterEndpoint <String>] [-DeliveryAttributeMapping <String[]>]
19-
[-Endpoint <String>] [-EndpointType <String>] [-DeliverySchema <String>] [-EventTtl <Int32>]
20-
[-ExpirationDate <DateTime>] [-Label <String[]>] [-MaxDeliveryAttempt <Int32>] [-MaxEventsPerBatch <Int32>]
21-
[-PreferredBatchSizeInKiloByte <Int32>] [-StorageQueueMessageTtl <Int64>] [-AdvancedFilter <Hashtable[]>]
22-
[-AdvancedFilteringOnArray] [-IncludedEventType <String[]>] [-SubjectBeginsWith <String>]
23-
[-SubjectEndsWith <String>] [-SubjectCaseSensitive] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
24-
[-Confirm] [<CommonParameters>]
18+
[-AzureActiveDirectoryTenantId <String>] [-DeadLetterEndpoint <String>]
19+
[-DeliveryAttributeMapping <Hashtable[]>] [-Endpoint <String>] [-EndpointType <String>]
20+
[-DeliverySchema <String>] [-EventTtl <Int32>] [-ExpirationDate <DateTime>] [-Label <String[]>]
21+
[-MaxDeliveryAttempt <Int32>] [-MaxEventsPerBatch <Int32>] [-PreferredBatchSizeInKiloByte <Int32>]
22+
[-StorageQueueMessageTtl <Int64>] [-AdvancedFilter <Hashtable[]>] [-AdvancedFilteringOnArray]
23+
[-IncludedEventType <String[]>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>]
24+
[-SubjectCaseSensitive] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
## DESCRIPTION
@@ -153,10 +153,15 @@ Accept wildcard characters: False
153153
```
154154
155155
### -DeliveryAttributeMapping
156-
The delivery attribute mappings for this system topic event subscription
156+
The delivery attribute mappings for this system topic event subscription.
157+
Each delivery attribute mapping should contain following two mandatory fields : Name and Type.
158+
The Type can either be 'Static' or 'Dynamic'.
159+
If the type is 'Static' then properties 'Value' and 'IsSecret' are required.
160+
If the type is 'Dynamic' then property 'SourceField' is required.
161+
An example of the DynamicAttributeMapping parameters: $DeliveryAttributeMapping=@($DeliveryAttributeMapping1, $DeliveryAttributeMapping2) where $DeliveryAttributeMapping1=@{Name="Name1"; Type="Static"; Values="value"; IsSecret="false"} and $DeliveryAttributeMapping2=@{Name="Name2"; Type="Dynamic"; SourceField="data.prop1"}
157162
158163
```yaml
159-
Type: System.String[]
164+
Type: System.Collections.Hashtable[]
160165
Parameter Sets: (All)
161166
Aliases:
162167

src/EventGrid/EventGrid/help/New-AzEventGridSubscription.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <Strin
2121
[-ExpirationDate <DateTime>] [-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>]
2222
[-PreferredBatchSizeInKiloByte <Int32>] [-AzureActiveDirectoryTenantId <String>]
2323
[-AzureActiveDirectoryApplicationIdOrUri <String>] [-AdvancedFilteringOnArray]
24-
[-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
24+
[-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
2525
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2626
```
2727

@@ -33,7 +33,7 @@ New-AzEventGridSubscription [-ResourceId] <String> [-EventSubscriptionName] <Str
3333
[-DeliverySchema <String>] [-DeadLetterEndpoint <String>] [-ExpirationDate <DateTime>]
3434
[-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>] [-PreferredBatchSizeInKiloByte <Int32>]
3535
[-AzureActiveDirectoryTenantId <String>] [-AzureActiveDirectoryApplicationIdOrUri <String>]
36-
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
36+
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
3737
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3838
```
3939

@@ -45,7 +45,7 @@ New-AzEventGridSubscription [-InputObject] <PSTopic> [-EventSubscriptionName] <S
4545
[-DeliverySchema <String>] [-DeadLetterEndpoint <String>] [-ExpirationDate <DateTime>]
4646
[-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>] [-PreferredBatchSizeInKiloByte <Int32>]
4747
[-AzureActiveDirectoryTenantId <String>] [-AzureActiveDirectoryApplicationIdOrUri <String>]
48-
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
48+
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
4949
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
5050
```
5151

@@ -58,7 +58,7 @@ New-AzEventGridSubscription [-DomainInputObject] <PSDomain> [-EventSubscriptionN
5858
[-ExpirationDate <DateTime>] [-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>]
5959
[-PreferredBatchSizeInKiloByte <Int32>] [-AzureActiveDirectoryTenantId <String>]
6060
[-AzureActiveDirectoryApplicationIdOrUri <String>] [-AdvancedFilteringOnArray]
61-
[-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
61+
[-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
6262
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
6363
```
6464

@@ -71,7 +71,7 @@ New-AzEventGridSubscription [-DomainTopicInputObject] <PSDomainTopic> [-EventSub
7171
[-ExpirationDate <DateTime>] [-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>]
7272
[-PreferredBatchSizeInKiloByte <Int32>] [-AzureActiveDirectoryTenantId <String>]
7373
[-AzureActiveDirectoryApplicationIdOrUri <String>] [-AdvancedFilteringOnArray]
74-
[-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
74+
[-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
7575
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
7676
```
7777

@@ -84,7 +84,7 @@ New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <Strin
8484
[-ExpirationDate <DateTime>] [-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>]
8585
[-PreferredBatchSizeInKiloByte <Int32>] [-AzureActiveDirectoryTenantId <String>]
8686
[-AzureActiveDirectoryApplicationIdOrUri <String>] [-AdvancedFilteringOnArray]
87-
[-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
87+
[-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
8888
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
8989
```
9090

@@ -97,7 +97,7 @@ New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <Strin
9797
[-ExpirationDate <DateTime>] [-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>]
9898
[-PreferredBatchSizeInKiloByte <Int32>] [-AzureActiveDirectoryTenantId <String>]
9999
[-AzureActiveDirectoryApplicationIdOrUri <String>] [-AdvancedFilteringOnArray]
100-
[-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
100+
[-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
101101
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
102102
```
103103

@@ -110,7 +110,7 @@ New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <Strin
110110
[-DeliverySchema <String>] [-DeadLetterEndpoint <String>] [-ExpirationDate <DateTime>]
111111
[-AdvancedFilter <Hashtable[]>] [-MaxEventsPerBatch <Int32>] [-PreferredBatchSizeInKiloByte <Int32>]
112112
[-AzureActiveDirectoryTenantId <String>] [-AzureActiveDirectoryApplicationIdOrUri <String>]
113-
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <String[]>] [-StorageQueueMessageTtl <Int64>]
113+
[-AdvancedFilteringOnArray] [-DeliveryAttributeMapping <Hashtable[]>] [-StorageQueueMessageTtl <Int64>]
114114
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
115115
```
116116

@@ -308,10 +308,15 @@ Accept wildcard characters: False
308308
```
309309
310310
### -DeliveryAttributeMapping
311-
The delivery attribute mappings for this system topic event subscription
311+
The delivery attribute mappings for this system topic event subscription.
312+
Each delivery attribute mapping should contain following two mandatory fields : Name and Type.
313+
The Type can either be 'Static' or 'Dynamic'.
314+
If the type is 'Static' then properties 'Value' and 'IsSecret' are required.
315+
If the type is 'Dynamic' then property 'SourceField' is required.
316+
An example of the DynamicAttributeMapping parameters: $DeliveryAttributeMapping=@($DeliveryAttributeMapping1, $DeliveryAttributeMapping2) where $DeliveryAttributeMapping1=@{Name="Name1"; Type="Static"; Values="value"; IsSecret="false"} and $DeliveryAttributeMapping2=@{Name="Name2"; Type="Dynamic"; SourceField="data.prop1"}
312317
313318
```yaml
314-
Type: System.String[]
319+
Type: System.Collections.Hashtable[]
315320
Parameter Sets: ResourceGroupNameParameterSet, ResourceIdEventSubscriptionParameterSet, CustomTopicEventSubscriptionParameterSet, DomainEventSubscriptionParameterSet, DomainTopicEventSubscriptionParameterSet
316321
Aliases:
317322

@@ -323,7 +328,7 @@ Accept wildcard characters: False
323328
```
324329
325330
```yaml
326-
Type: System.String[]
331+
Type: System.Collections.Hashtable[]
327332
Parameter Sets: EventSubscriptionCustomTopicInputObjectParameterSet, EventSubscriptionDomainInputObjectParameterSet, EventSubscriptionDomainTopicInputObjectParameterSet
328333
Aliases:
329334

src/EventGrid/EventGrid/help/New-AzEventGridSystemTopicEventSubscription.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ New-AzEventGridSystemTopicEventSubscription [-DefaultProfile <IAzureContextConta
2222
```
2323
New-AzEventGridSystemTopicEventSubscription -EventSubscriptionName <String> -ResourceGroupName <String>
2424
-SystemTopicName <String> [-AzureActiveDirectoryApplicationIdOrUri <String>]
25-
[-AzureActiveDirectoryTenantId <String>] [-DeadLetterEndpoint <String>] [-DeliveryAttributeMapping <String[]>]
26-
[-Endpoint <String>] [-EndpointType <String>] [-DeliverySchema <String>] [-EventTtl <Int32>]
27-
[-ExpirationDate <DateTime>] [-Label <String[]>] [-MaxDeliveryAttempt <Int32>] [-MaxEventsPerBatch <Int32>]
28-
[-PreferredBatchSizeInKiloByte <Int32>] [-StorageQueueMessageTtl <Int64>] [-AdvancedFilter <Hashtable[]>]
29-
[-AdvancedFilteringOnArray] [-IncludedEventType <String[]>] [-SubjectBeginsWith <String>]
30-
[-SubjectEndsWith <String>] [-SubjectCaseSensitive] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
31-
[-Confirm] [<CommonParameters>]
25+
[-AzureActiveDirectoryTenantId <String>] [-DeadLetterEndpoint <String>]
26+
[-DeliveryAttributeMapping <Hashtable[]>] [-Endpoint <String>] [-EndpointType <String>]
27+
[-DeliverySchema <String>] [-EventTtl <Int32>] [-ExpirationDate <DateTime>] [-Label <String[]>]
28+
[-MaxDeliveryAttempt <Int32>] [-MaxEventsPerBatch <Int32>] [-PreferredBatchSizeInKiloByte <Int32>]
29+
[-StorageQueueMessageTtl <Int64>] [-AdvancedFilter <Hashtable[]>] [-AdvancedFilteringOnArray]
30+
[-IncludedEventType <String[]>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>]
31+
[-SubjectCaseSensitive] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3232
```
3333

3434
## DESCRIPTION
@@ -38,7 +38,7 @@ Create a new event subscription to an Azure Event Grid System topic.
3838

3939
### Example 1
4040
```powershell
41-
New-AzEventGridSystemTopicEventSubscription -ResourceGroup MyResourceGroup -SystemTopicName Topic1 -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1
41+
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName MyResourceGroup -SystemTopicName Topic1 -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1
4242
```
4343

4444
Creates a new event subscription \`EventSubscription1\` to an Azure Event Grid System topic \`Topic1\` in resource group \`MyResourceGroupName\` with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription uses default filters.
@@ -47,14 +47,14 @@ Creates a new event subscription \`EventSubscription1\` to an Azure Event Grid S
4747
```powershell
4848
$includedEventTypes = "Microsoft.Resources.ResourceWriteFailure", "Microsoft.Resources.ResourceWriteSuccess"
4949
$labels = "Finance", "HR"
50-
New-AzEventGridSystemTopicEventSubscription -ResourceGroup MyResourceGroup -SystemTopicName Topic1 -EventSubscriptionName EventSubscription1 -Endpoint https://requestb.in/19qlscd1 -SubjectBeginsWith "TestPrefix" -SubjectEndsWith "TestSuffix" -IncludedEventType $includedEventTypes -Label $labels
50+
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName MyResourceGroup -SystemTopicName Topic1 -EventSubscriptionName EventSubscription1 -Endpoint https://requestb.in/19qlscd1 -SubjectBeginsWith "TestPrefix" -SubjectEndsWith "TestSuffix" -IncludedEventType $includedEventTypes -Label $labels
5151
```
5252

5353
Creates a new event subscription \`EventSubscription1\` to Sytem Topic \`Topic1\` in resource group \`MyResourceGroup\` with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription specifies the additional filters for event types and subject, and only events matching those filters will be delivered to the destination endpoint.
5454

5555
### Example 3
5656
```powershell
57-
New-AzEventGridSystemTopicEventSubscription -ResourceGroup MyResourceGroup -SystemTopicName Topic1 -EventSubscriptionName EventSubscription1 -EndpointType "eventhub" -Endpoint "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"
57+
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName MyResourceGroup -SystemTopicName Topic1 -EventSubscriptionName EventSubscription1 -EndpointType "eventhub" -Endpoint "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"
5858
```
5959

6060
Creates a new event subscription \`EventSubscription1\` to Sytem Topic \`Topic1\` in resource group \`MyResourceGroup\` with the specified event hub as the destination for events. This event subscription uses default filters.
@@ -160,10 +160,15 @@ Accept wildcard characters: False
160160
```
161161
162162
### -DeliveryAttributeMapping
163-
The delivery attribute mappings for this system topic event subscription
163+
The delivery attribute mappings for this system topic event subscription.
164+
Each delivery attribute mapping should contain following two mandatory fields : Name and Type.
165+
The Type can either be 'Static' or 'Dynamic'.
166+
If the type is 'Static' then properties 'Value' and 'IsSecret' are required.
167+
If the type is 'Dynamic' then property 'SourceField' is required.
168+
An example of the DynamicAttributeMapping parameters: $DeliveryAttributeMapping=@($DeliveryAttributeMapping1, $DeliveryAttributeMapping2) where $DeliveryAttributeMapping1=@{Name="Name1"; Type="Static"; Values="value"; IsSecret="false"} and $DeliveryAttributeMapping2=@{Name="Name2"; Type="Dynamic"; SourceField="data.prop1"}
164169
165170
```yaml
166-
Type: System.String[]
171+
Type: System.Collections.Hashtable[]
167172
Parameter Sets: SystemTopicEventSuscriptionParameterSet
168173
Aliases:
169174

src/EventGrid/EventGrid/help/Update-AzEventGridPartnerTopicEventSubscription.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Update-AzEventGridPartnerTopicEventSubscription [-DefaultProfile <IAzureContextC
2121
### PartnerTopicEventSubscriptionParameterSet
2222
```
2323
Update-AzEventGridPartnerTopicEventSubscription -Name <String> -ResourceGroupName <String>
24-
-PartnerTopicName <String> [-DeadLetterEndpoint <String>] [-DeliveryAttributeMapping <String[]>]
24+
-PartnerTopicName <String> [-DeadLetterEndpoint <String>] [-DeliveryAttributeMapping <Hashtable[]>]
2525
[-Endpoint <String>] [-EndpointType <String>] [-Label <String[]>] [-StorageQueueMessageTtl <Int64>]
2626
[-AdvancedFilter <Hashtable[]>] [-AdvancedFilteringOnArray] [-IncludedEventType <String[]>]
2727
[-SubjectBeginsWith <String>] [-SubjectEndsWith <String>] [-SubjectCaseSensitive]
@@ -31,7 +31,7 @@ Update-AzEventGridPartnerTopicEventSubscription -Name <String> -ResourceGroupNam
3131
### ResourceIdPartnerTopicEventSubscriptionParameterSet
3232
```
3333
Update-AzEventGridPartnerTopicEventSubscription [-ResourceId] <String> [-DeadLetterEndpoint <String>]
34-
[-DeliveryAttributeMapping <String[]>] [-Endpoint <String>] [-EndpointType <String>] [-Label <String[]>]
34+
[-DeliveryAttributeMapping <Hashtable[]>] [-Endpoint <String>] [-EndpointType <String>] [-Label <String[]>]
3535
[-StorageQueueMessageTtl <Int64>] [-AdvancedFilter <Hashtable[]>] [-AdvancedFilteringOnArray]
3636
[-IncludedEventType <String[]>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>]
3737
[-SubjectCaseSensitive] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
@@ -135,10 +135,15 @@ Accept wildcard characters: False
135135
```
136136
137137
### -DeliveryAttributeMapping
138-
The delivery attribute mappings for this system topic event subscription
138+
The delivery attribute mappings for this system topic event subscription.
139+
Each delivery attribute mapping should contain following two mandatory fields : Name and Type.
140+
The Type can either be 'Static' or 'Dynamic'.
141+
If the type is 'Static' then properties 'Value' and 'IsSecret' are required.
142+
If the type is 'Dynamic' then property 'SourceField' is required.
143+
An example of the DynamicAttributeMapping parameters: $DeliveryAttributeMapping=@($DeliveryAttributeMapping1, $DeliveryAttributeMapping2) where $DeliveryAttributeMapping1=@{Name="Name1"; Type="Static"; Values="value"; IsSecret="false"} and $DeliveryAttributeMapping2=@{Name="Name2"; Type="Dynamic"; SourceField="data.prop1"}
139144
140145
```yaml
141-
Type: System.String[]
146+
Type: System.Collections.Hashtable[]
142147
Parameter Sets: PartnerTopicEventSubscriptionParameterSet, ResourceIdPartnerTopicEventSubscriptionParameterSet
143148
Aliases:
144149

0 commit comments

Comments
 (0)