Skip to content

Commit 27b692d

Browse files
rakku-msTheOnlyWei
authored andcommitted
Set-AzsOfferDelegation add alias for parameter PropertiesSubscriptionId and doc update
1 parent 7343914 commit 27b692d

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

src/Azs.Subscriptions.Admin/docs/Set-AzsOfferDelegation.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Create or update the offer delegation.
1515
### UpdateExpanded (Default)
1616
```
1717
Set-AzsOfferDelegation -Name <String> -OfferName <String> -ResourceGroupName <String>
18-
[-SubscriptionId <String>] [-Location <String>] [-PropertiesSubscriptionId <String>]
19-
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
18+
[-SubscriptionId <String>] [-Location <String>] [-TargetSubscriptionId <String>] [-DefaultProfile <PSObject>]
19+
[-Confirm] [-WhatIf] [<CommonParameters>]
2020
```
2121

2222
### Update
@@ -55,7 +55,6 @@ Position: Named
5555
Default value: None
5656
Accept pipeline input: False
5757
Accept wildcard characters: False
58-
Dynamic: False
5958
```
6059
6160
### -Location
@@ -71,7 +70,6 @@ Position: Named
7170
Default value: (Get-AzLocation)[0].Location
7271
Accept pipeline input: False
7372
Accept wildcard characters: False
74-
Dynamic: False
7573
```
7674
7775
### -Name
@@ -87,7 +85,6 @@ Position: Named
8785
Default value: None
8886
Accept pipeline input: False
8987
Accept wildcard characters: False
90-
Dynamic: False
9188
```
9289
9390
### -OfferDelegationDefinition
@@ -104,7 +101,6 @@ Position: Named
104101
Default value: None
105102
Accept pipeline input: True (ByValue)
106103
Accept wildcard characters: False
107-
Dynamic: False
108104
```
109105
110106
### -OfferName
@@ -120,55 +116,51 @@ Position: Named
120116
Default value: None
121117
Accept pipeline input: False
122118
Accept wildcard characters: False
123-
Dynamic: False
124119
```
125120
126-
### -PropertiesSubscriptionId
127-
Identifier of the subscription receiving the delegated offer.
121+
### -ResourceGroupName
122+
The resource group the resource is located under.
128123
129124
```yaml
130125
Type: System.String
131-
Parameter Sets: UpdateExpanded
126+
Parameter Sets: (All)
132127
Aliases:
133128

134-
Required: False
129+
Required: True
135130
Position: Named
136131
Default value: None
137132
Accept pipeline input: False
138133
Accept wildcard characters: False
139-
Dynamic: False
140134
```
141135
142-
### -ResourceGroupName
143-
The resource group the resource is located under.
136+
### -SubscriptionId
137+
Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
144138
145139
```yaml
146140
Type: System.String
147141
Parameter Sets: (All)
148142
Aliases:
149143

150-
Required: True
144+
Required: False
151145
Position: Named
152-
Default value: None
146+
Default value: (Get-AzContext).Subscription.Id
153147
Accept pipeline input: False
154148
Accept wildcard characters: False
155-
Dynamic: False
156149
```
157150
158-
### -SubscriptionId
159-
Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
151+
### -TargetSubscriptionId
152+
Identifier of the subscription receiving the delegated offer.
160153
161154
```yaml
162155
Type: System.String
163-
Parameter Sets: (All)
164-
Aliases:
156+
Parameter Sets: UpdateExpanded
157+
Aliases: PropertiesSubscriptionId
165158

166159
Required: False
167160
Position: Named
168-
Default value: (Get-AzContext).Subscription.Id
161+
Default value: None
169162
Accept pipeline input: False
170163
Accept wildcard characters: False
171-
Dynamic: False
172164
```
173165
174166
### -Confirm
@@ -184,7 +176,6 @@ Position: Named
184176
Default value: None
185177
Accept pipeline input: False
186178
Accept wildcard characters: False
187-
Dynamic: False
188179
```
189180
190181
### -WhatIf
@@ -201,7 +192,6 @@ Position: Named
201192
Default value: None
202193
Accept pipeline input: False
203194
Accept wildcard characters: False
204-
Dynamic: False
205195
```
206196
207197
### CommonParameters
@@ -215,14 +205,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
215205
216206
### Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IOfferDelegation
217207
218-
## ALIASES
219-
220208
## NOTES
221209
222-
### COMPLEX PARAMETER PROPERTIES
210+
ALIASES
211+
212+
COMPLEX PARAMETER PROPERTIES
213+
223214
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
224215
225-
#### OFFERDELEGATIONDEFINITION <IOfferDelegation>: Offer delegation.
216+
217+
OFFERDELEGATIONDEFINITION <IOfferDelegation>: Offer delegation.
226218
- `[Location <String>]`: Location of the resource
227219
- `[SubscriptionId <String>]`: Identifier of the subscription receiving the delegated offer.
228220

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
### Example 1
22
```powershell
3-
PS C:\> Set-AzsOfferDelegation -Offer offer1 -ResourceGroupName rg1 -Name delegate1 -SubscriptionId "c90173b1-de7a-4b1d-8600-b832b0e65946" -Location "local"
3+
PS C:\> Set-AzsOfferDelegation -OfferName "testof" -ResourceGroupName "testrgp" -Name "testofd" -TargetSubscriptionId "a7aa1685-566a-4d85-8a74-1b9db1b321c1"
44
5-
{{ Add output here }}
5+
6+
Id : /subscriptions/209523fa-09a8-4642-93df-58496efe1ca2/resourceGroups/testrgp/providers/Microsoft.Subscriptions.Admin/offers/testof/offerDelegations/testo
7+
fd
8+
Location : local
9+
Name : testof/testofd
10+
SubscriptionId : a7aa1685-566a-4d85-8a74-1b9db1b321c1
11+
Tags : Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.ResourceTags
12+
Type : Microsoft.Subscriptions.Admin/offers/offerDelegations
613
```
714

815
Updates the offer delegation.

src/Azs.Subscriptions.Admin/readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This directory contains the PowerShell module for the SubscriptionsAdmin service
1717
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
1818

1919
## Module Requirements
20-
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.7.4 or greater
20+
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
2121

2222
## Authentication
2323
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
@@ -198,6 +198,13 @@ directive:
198198
parameter-name: PropertiesSubscriptionId
199199
set:
200200
parameter-name: TargetSubscriptionId
201+
- where:
202+
verb: Set
203+
subject: OfferDelegation
204+
parameter-name: PropertiesSubscriptionId
205+
set:
206+
parameter-name: TargetSubscriptionId
207+
alias: PropertiesSubscriptionId
201208
- where:
202209
subject: (.*)OfferDelegation$
203210
parameter-name: OfferDelegationName

0 commit comments

Comments
 (0)