Sdílet prostřednictvím


New-AzsOfferDelegation

Create or update the offer delegation.

Syntax

New-AzsOfferDelegation
   -Name <String>
   -OfferName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-Location <String>]
   [-TargetSubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzsOfferDelegation
   -Name <String>
   -OfferName <String>
   -ResourceGroupName <String>
   -OfferDelegationDefinition \<IOfferDelegation>
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Create or update the offer delegation.

Examples

Example 1

PS C:\> New-AzsOfferDelegation -Name "testofferdelegation" -OfferName "testoffer" -ResourceGroupName "testrg" -TargetSubscriptionId "dbc27112-f67a-4690-ba12-730f71cba018"

Id             : /subscriptions/d77ed1d7-cb62-4658-a777-386a8ae523dd/resourceGroups/testrg/providers/Microsoft.Subscriptions.Admin/offers/testoffer/offerDelegations/testofferdel
                 egation
Location       : redmond
Name           : testoffer/testofferdelegation
SubscriptionId : dbc27112-f67a-4690-ba12-730f71cba018
Tags           : Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.ResourceTags
Type           : Microsoft.Subscriptions.Admin/offers/offerDelegations

Create a new offer delegation.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:System.Management.Automation.PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Location of the resource

Type:System.String
Position:Named
Default value:(Get-AzLocation)[0].Location
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of a offer delegation.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-OfferDelegationDefinition

Offer delegation. To construct, see NOTES section for OFFERDELEGATIONDEFINITION properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IOfferDelegation
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-OfferName

Name of an offer.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group the resource is located under.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.

Type:System.String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetSubscriptionId

Identifier of the subscription receiving the delegated offer.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IOfferDelegation

Outputs

Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IOfferDelegation

ALIASES

Notes

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.

  • [Location <String>]: Location of the resource
  • [SubscriptionId <String>]: Identifier of the subscription receiving the delegated offer.