Skip to main content

order_items

Creates, updates, deletes, gets or lists an order_items resource.

Overview

Nameorder_items
TypeResource
Idazure_extras.edge_order.order_items

Fields

The following fields are returned by SELECT queries:

Order item object.

NameDatatypeDescription
identityobjectMsi identity of the resource
locationstringThe geo-location where the resource lives
propertiesobjectOrder item properties.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, orderItemName$expandGet an order item.
list_by_resource_groupselectsubscriptionId, resourceGroupName$filter, $expand, $skipToken, $topList order items at resource group level.
list_by_subscriptionselectsubscriptionId$filter, $expand, $skipToken, $topList order items at subscription level.
createinsertsubscriptionId, resourceGroupName, orderItemName, data__propertiesCreate an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item
API.
updateupdatesubscriptionId, resourceGroupName, orderItemNameIf-MatchUpdate the properties of an existing order item.
deletedeletesubscriptionId, resourceGroupName, orderItemNameDelete an order item.
cancelexecsubscriptionId, resourceGroupName, orderItemName, reasonCancel order item.
returnexecsubscriptionId, resourceGroupName, orderItemName, returnReasonReturn order item.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orderItemNamestringThe name of the order item.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
$expandstring$expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively.
$filterstring$filter is supported to filter based on order id and order Item Type. Filter supports only equals operation.
$skipTokenstring$skipToken is supported on Get list of order items, which provides the next page in the list of order items.
$topinteger (int32)$top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller.
If-MatchstringDefines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value.

SELECT examples

Get an order item.

SELECT
identity,
location,
properties,
tags
FROM azure_extras.edge_order.order_items
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND orderItemName = '{{ orderItemName }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

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

INSERT INTO azure_extras.edge_order.order_items (
data__tags,
data__location,
data__properties,
data__identity,
subscriptionId,
resourceGroupName,
orderItemName
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ properties }}' /* required */,
'{{ identity }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ orderItemName }}'
RETURNING
identity,
location,
properties,
tags
;

UPDATE examples

Update the properties of an existing order item.

UPDATE azure_extras.edge_order.order_items
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}',
data__identity = '{{ identity }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND orderItemName = '{{ orderItemName }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
identity,
location,
properties,
tags;

DELETE examples

Delete an order item.

DELETE FROM azure_extras.edge_order.order_items
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND orderItemName = '{{ orderItemName }}' --required
;

Lifecycle Methods

Cancel order item.

EXEC azure_extras.edge_order.order_items.cancel 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@orderItemName='{{ orderItemName }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;