Partager via


New-AzsAcquiredPlan

Syntax

New-AzsAcquiredPlan
   -TargetSubscriptionId <String>
   [-PlanAcquisitionId <String>]
   [-SubscriptionId <String>]
   [-AcquisitionTime <DateTime>]
   [-ExternalReferenceId <String>]
   [-Id <String>]
   [-PlanId <String>]
   [-ProvisioningState <ProvisioningState>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzsAcquiredPlan
   -TargetSubscriptionId <String>
   -AcquiredPlanDefinition \<IPlanAcquisition>
   [-PlanAcquisitionId <String>]
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Examples

Example 1

PS C:\> New-AzsAcquiredPlan -PlanAcquisitionId $([Guid]::NewGuid()) -PlanId "/subscriptions/d77ed1d7-cb62-4658-a777-386a8ae523dd/resourceGroups/testrg/providers/Microsoft.Subscriptions.Admin/plans/testplan" -TargetSubscriptionId "d77ed1d7-cb62-4658-a777-386a8ae523dd"

AcquisitionId       : 718c7f7c-4868-479a-98ce-5caaa8f158c1
AcquisitionTime     : 3/12/2020 11:16:08 PM
ExternalReferenceId : 
Id                  : /subscriptions/d77ed1d7-cb62-4658-a777-386a8ae523dd/providers/Microsoft.Subscriptions.Admin/subscriptions/d77ed1d7-cb62-4658-a777-386a8ae523dd/acquiredPlan
                      s/718c7f7c-4868-479a-98ce-5caaa8f158c1
PlanId              : /subscriptions/d77ed1d7-cb62-4658-a777-386a8ae523dd/providers/Microsoft.Subscriptions.Admin/plans/testplan
ProvisioningState   : Succeeded

Create a subscription plan.

Parameters

-AcquiredPlanDefinition

To construct, see NOTES section for ACQUIREDPLANDEFINITION properties and create a hash table.

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

-AcquisitionTime

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

-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

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

-ExternalReferenceId

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

-Id

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

-PlanAcquisitionId

Type:System.String
Position:Named
Default value:$([Guid]::NewGuid().ToString())
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PlanId

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

-ProvisioningState

Type:Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Support.ProvisioningState
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

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

-TargetSubscriptionId

Type:System.String
Position:Named
Default value:None
Required:True
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.IPlanAcquisition

Outputs

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

ALIASES

New-AzsSubscriptionPlan

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.

ACQUIREDPLANDEFINITION <IPlanAcquisition>:

  • [AcquisitionId <String>]: Acquisition identifier.
  • [AcquisitionTime <DateTime?>]: Acquisition time.
  • [ExternalReferenceId <String>]: External reference identifier.
  • [Id <String>]: Identifier in the tenant subscription context.
  • [PlanId <String>]: Plan identifier in the tenant subscription context.
  • [ProvisioningState <ProvisioningState?>]: State of the provisioning.