你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzEdgeOrderItem

Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API.

Syntax

New-AzEdgeOrderItem
   -Name <String>
   -ResourceGroupName <String>
   -ForwardAddressContactDetail <IContactDetails>
   -Location <String>
   -OrderId <String>
   -OrderItemDetail <IOrderItemDetails>
   [-SubscriptionId <String>]
   [-ForwardShippingAddress <IShippingAddress>]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API.

Examples

Example 1: Creates a new orderItem

$contactDetail = New-AzEdgeOrderContactDetailsObject -ContactName ContactName -EmailList @("emailId") -Phone Phone
$ShippingDetails = New-AzEdgeOrderShippingAddressObject -StreetAddress1 "101 TOWNSEND ST" -StateOrProvince "CA" -Country "US" -City "San Francisco" -PostalCode "94107" -AddressType "Commercial"
$HierarchyInformation=New-AzEdgeOrderHierarchyInformationObject -ProductFamilyName "azurestackedge" -ProductLineName "azurestackedge" -ProductName "azurestackedgegpu" -ConfigurationName "EdgeP_High"
$details = New-AzEdgeOrderOrderItemDetailsObject -OrderItemType "Purchase"  -ProductDetail  @{"HierarchyInformation"=$HierarchyInformation}
$orderItem = New-AzEdgeOrderItem -Name "examplePowershell" -ResourceGroupName ResourceGroup -ForwardAddressContactDetail $contactDetail -Location "eastus" -OrderId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/pwOrderItem11" -OrderItemDetail $details -SubscriptionId SubscriptionId -ForwardShippingAddress $ShippingDetails

$orderItem = New-AzEdgeOrderItem -Name "examplePowershell" -ResourceGroupName "resourceGroupName" -ForwardAddressContactDetail $contactDetail -Location "eastus" -OrderId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/pwOrderItem11" -OrderItemDetail $details -SubscriptionId SubscriptionId -ForwardShippingAddress $ShippingDetails
$DebugPreference = "Continue"
# You can use `$DebugPreference = "Continue"`, with any example/usecase to get exact details of error in below format when creation command fails.
# {
#   "Error": {
#     "Code": "StaticValidationGenericCountryCodeHasInvalidLength",
#     "Message": "The attribute country code does not meet length constraints.\r\nEnter a value with 2 characters for country code.",
#     "Details": [
#       null
#     ],
#     "Target": null
#   }
# } 
$orderItem = New-AzEdgeOrderItem -Name "examplePowershell" -ResourceGroupName "resourceGroupName" -ForwardAddressContactDetail $contactDetail -Location "eastus" -OrderId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/pwOrderItem11" -OrderItemDetail $details -SubscriptionId SubscriptionId -ForwardShippingAddress $ShippingDetails
$orderItem | Format-List

ForwardAddressContactDetail    : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20211201.ContactDetails
ForwardAddressShippingAddress  : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20211201.ShippingAddress
ForwardAddressValidationStatus : Valid
Id                             : /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/orderItems/examplePowershell
Location                       : eastus
Name                           : examplePowershell
OrderId                        : /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/pwOrderItem11
OrderItemDetail                : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20211201.OrderItemDetails
ReturnAddressContactDetail     : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20211201.ContactDetails
ReturnAddressShippingAddress   : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20211201.ShippingAddress
ReturnAddressValidationStatus  :
StartTime                      : 11/16/2021 10:34:51 AM
SystemData                     : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20.SystemData
Tag                            : Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Models.Api20.TrackedResourceTags
Type                           : Microsoft.EdgeOrder/orderItems

Creates a new orderItem.

Example 2: Creates a new orderItem with preference set for transport, encryption and management resource

$contactDetail = New-AzEdgeOrderContactDetailsObject -ContactName "ContactName2" -EmailList $env.EmailList -Phone $env.Phone
$ShippingDetails = New-AzEdgeOrderShippingAddressObject -StreetAddress1 $env.StreetAddress1 -StateOrProvince $env.StateOrProvince -Country $env.Country -City $env.City -PostalCode $env.PostalCode -AddressType $env.AddressType
$HierarchyInformation=New-AzEdgeOrderHierarchyInformationObject -ProductFamilyName "azurestackedge" -ProductLineName "azurestackedge" -ProductName "azurestackedgegpu" -ConfigurationName "EdgeP_High"
$preference = New-AzEdgeOrderPreferencesObject -EncryptionPreference @{DoubleEncryptionStatus = "Disabled"} -TransportPreference @{PreferredShipmentType = "MicrosoftManaged"} -ManagementResourcePreference @{PreferredManagementResourceId = "/subscriptions/managementSubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.DataBoxEdge/DataBoxEdgeDevices/1GPUtest"}
$details = New-AzEdgeOrderOrderItemDetailsObject -OrderItemType "Purchase"  -ProductDetail  @{"HierarchyInformation"=$HierarchyInformation} -Preference $preference
New-AzEdgeOrderItem -Name "OrderItemNameWithPref" -ResourceGroupName "resourceGroupName" -ForwardAddressContactDetail $contactDetail -Location "eastus" -OrderId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/pwPrefOrder" -OrderItemDetail $details -SubscriptionId $env.SubscriptionId -ForwardShippingAddress $ShippingDetails

Location Name                  Type
-------- ----                  ----
eastus   OrderItemNameWithPref Microsoft.EdgeOrder/orderItems

Creates a new orderItem with preference set for transport, encryption and management resource

Parameters

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ForwardAddressContactDetail

Contact details for the address To construct, see NOTES section for FORWARDADDRESSCONTACTDETAIL properties and create a hash table.

Type:IContactDetails
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ForwardShippingAddress

Shipping details for the address To construct, see NOTES section for FORWARDSHIPPINGADDRESS properties and create a hash table.

Type:IShippingAddress
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Location

The geo-location where the resource lives

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

-Name

The name of the order item

Type:String
Aliases:OrderItemName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-OrderId

Id of the order to which order item belongs to

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

-OrderItemDetail

Represents order item details. To construct, see NOTES section for ORDERITEMDETAIL properties and create a hash table.

Type:IOrderItemDetails
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

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

-SubscriptionId

The ID of the target subscription.

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

-Tag

Resource tags.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IOrderItemResource

Notes

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.

FORWARDADDRESSCONTACTDETAIL <IContactDetails>: Contact details for the address

  • ContactName <String>: Contact name of the person.
  • EmailList <String[]>: List of Email-ids to be notified about job progress.
  • Phone <String>: Phone number of the contact person.
  • [Mobile <String>]: Mobile number of the contact person.
  • [PhoneExtension <String>]: Phone extension number of the contact person.

FORWARDSHIPPINGADDRESS <IShippingAddress>: Shipping details for the address

  • Country <String>: Name of the Country.
  • StreetAddress1 <String>: Street Address line 1.
  • [AddressType <AddressType?>]: Type of address.
  • [City <String>]: Name of the City.
  • [CompanyName <String>]: Name of the company.
  • [PostalCode <String>]: Postal code.
  • [StateOrProvince <String>]: Name of the State or Province.
  • [StreetAddress2 <String>]: Street Address line 2.
  • [StreetAddress3 <String>]: Street Address line 3.
  • [ZipExtendedCode <String>]: Extended Zip Code.

ORDERITEMDETAIL <IOrderItemDetails>: Represents order item details.

  • OrderItemType <OrderItemType>: Order item type.
  • ProductDetail <IProductDetails>: Unique identifier for configuration.
    • HierarchyInformation <IHierarchyInformation>: Hierarchy of the product which uniquely identifies the product
      • [ConfigurationName <String>]: Represents configuration name that uniquely identifies configuration
      • [ProductFamilyName <String>]: Represents product family name that uniquely identifies product family
      • [ProductLineName <String>]: Represents product line name that uniquely identifies product line
      • [ProductName <String>]: Represents product name that uniquely identifies product
  • [NotificationEmailList <String[]>]: Additional notification email list
  • [Preference <IPreferences>]: Customer notification Preferences
    • [EncryptionPreference <IEncryptionPreferences>]: Preferences related to the Encryption.
      • [DoubleEncryptionStatus <DoubleEncryptionStatus?>]: Double encryption status as entered by the customer. It is compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured.
    • [ManagementResourcePreference <IManagementResourcePreferences>]: Preferences related to the Management resource.
      • [PreferredManagementResourceId <String>]: Customer preferred Management resource ARM ID
    • [NotificationPreference <INotificationPreference[]>]: Notification preferences.
      • SendNotification <Boolean>: Notification is required or not.
      • StageName <NotificationStageName>: Name of the stage.
    • [TransportPreference <ITransportPreferences>]: Preferences related to the shipment logistics of the order.
      • PreferredShipmentType <TransportShipmentTypes>: Indicates Shipment Logistics type that the customer preferred.