Skip to main content

order_items

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

Overview

Nameorder_items
TypeResource
Idazure_extras.edgeorder.order_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
addressDetailsobjectRepresents shipping and return address for order item. Required.
locationstringThe geo-location where the resource lives. Required.
orderIdstringId of the order to which order item belongs to. Required.
orderItemDetailsobjectRepresents order item details. Required.
startTimestring (date-time)Start time of order item.
systemDataobjectRepresents resource creation and update time.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_order_item_by_nameselectorder_item_name, resource_group_name, subscription_id$expandGets an order item.
create_order_iteminsertorder_item_name, resource_group_name, subscription_id, location, propertiesCreates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API.
update_order_itemupdateorder_item_name, resource_group_name, subscription_idIf-MatchUpdates the properties of an existing order item.
delete_order_item_by_nameexecorder_item_name, resource_group_name, subscription_idDeletes an 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
order_item_namestringThe name of the order item. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstring$expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. Default value is None.
If-MatchstringDefines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. Default value is None.

SELECT examples

Gets an order item.

SELECT
id,
name,
addressDetails,
location,
orderId,
orderItemDetails,
startTime,
systemData,
tags,
type
FROM azure_extras.edgeorder.order_items
WHERE order_item_name = '{{ order_item_name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates 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.edgeorder.order_items (
tags,
location,
properties,
order_item_name,
resource_group_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ order_item_name }}',
'{{ resource_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates the properties of an existing order item.

UPDATE azure_extras.edgeorder.order_items
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
order_item_name = '{{ order_item_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

Lifecycle Methods

Deletes an order item.

EXEC azure_extras.edgeorder.order_items.delete_order_item_by_name 
@order_item_name='{{ order_item_name }}' --required,
@resource_group_name='{{ resource_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;