Skip to content

Commit

Permalink
Set-AzsOfferDelegation add alias for parameter PropertiesSubscription…
Browse files Browse the repository at this point in the history
…Id and doc update
  • Loading branch information
rakku-ms authored and TheOnlyWei committed Mar 30, 2021
1 parent 7343914 commit 27b692d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
50 changes: 21 additions & 29 deletions src/Azs.Subscriptions.Admin/docs/Set-AzsOfferDelegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Create or update the offer delegation.
### UpdateExpanded (Default)
```
Set-AzsOfferDelegation -Name <String> -OfferName <String> -ResourceGroupName <String>
[-SubscriptionId <String>] [-Location <String>] [-PropertiesSubscriptionId <String>]
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
[-SubscriptionId <String>] [-Location <String>] [-TargetSubscriptionId <String>] [-DefaultProfile <PSObject>]
[-Confirm] [-WhatIf] [<CommonParameters>]
```

### Update
Expand Down Expand Up @@ -55,7 +55,6 @@ Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -Location
Expand All @@ -71,7 +70,6 @@ Position: Named
Default value: (Get-AzLocation)[0].Location
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -Name
Expand All @@ -87,7 +85,6 @@ Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -OfferDelegationDefinition
Expand All @@ -104,7 +101,6 @@ Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Dynamic: False
```
### -OfferName
Expand All @@ -120,55 +116,51 @@ Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -PropertiesSubscriptionId
Identifier of the subscription receiving the delegated offer.
### -ResourceGroupName
The resource group the resource is located under.
```yaml
Type: System.String
Parameter Sets: UpdateExpanded
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -ResourceGroupName
The resource group the resource is located under.
### -SubscriptionId
Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -SubscriptionId
Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
### -TargetSubscriptionId
Identifier of the subscription receiving the delegated offer.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Parameter Sets: UpdateExpanded
Aliases: PropertiesSubscriptionId

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -Confirm
Expand All @@ -184,7 +176,6 @@ Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### -WhatIf
Expand All @@ -201,7 +192,6 @@ Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Dynamic: False
```
### CommonParameters
Expand All @@ -215,14 +205,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IOfferDelegation
## ALIASES
## NOTES
### COMPLEX PARAMETER PROPERTIES
ALIASES
COMPLEX PARAMETER PROPERTIES
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.
#### OFFERDELEGATIONDEFINITION <IOfferDelegation>: Offer delegation.
OFFERDELEGATIONDEFINITION <IOfferDelegation>: Offer delegation.
- `[Location <String>]`: Location of the resource
- `[SubscriptionId <String>]`: Identifier of the subscription receiving the delegated offer.

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

Updates the offer delegation.
9 changes: 8 additions & 1 deletion src/Azs.Subscriptions.Admin/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the SubscriptionsAdmin service
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

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

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
Expand Down Expand Up @@ -198,6 +198,13 @@ directive:
parameter-name: PropertiesSubscriptionId
set:
parameter-name: TargetSubscriptionId
- where:
verb: Set
subject: OfferDelegation
parameter-name: PropertiesSubscriptionId
set:
parameter-name: TargetSubscriptionId
alias: PropertiesSubscriptionId
- where:
subject: (.*)OfferDelegation$
parameter-name: OfferDelegationName
Expand Down

0 comments on commit 27b692d

Please sign in to comment.