Skip to main content

inventories

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

Overview

Nameinventories
TypeResource
Idaws.ssm.inventories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dataobjectThe data section in the inventory result entity JSON.
idstringID of the inventory result entity. For example, for managed node inventory the result will be the managed node ID. For EC2 instance inventory, the result will be the instance ID.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_inventoryselectregionQuery inventory information. This includes managed node status, such as Stopped or Terminated.
put_inventoryreplaceregion, InstanceId, ItemsBulk update custom inventory items on one or more managed nodes. The request adds an inventory item, if it doesn't already exist, or updates an inventory item, if it does exist.
delete_inventorydeleteregionDelete a custom inventory type or the data associated with a custom Inventory type. Deleting a custom inventory type is also referred to as deleting a custom inventory schema.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Query inventory information. This includes managed node status, such as Stopped or Terminated.

SELECT
data,
id
FROM aws.ssm.inventories
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Bulk update custom inventory items on one or more managed nodes. The request adds an inventory item, if it doesn't already exist, or updates an inventory item, if it does exist.

REPLACE aws.ssm.inventories
SET
InstanceId = '{{ InstanceId }}',
Items = '{{ Items }}'
WHERE
region = '{{ region }}' --required
AND InstanceId = '{{ InstanceId }}' --required
AND Items = '{{ Items }}' --required
RETURNING
message;

DELETE examples

Delete a custom inventory type or the data associated with a custom Inventory type. Deleting a custom inventory type is also referred to as deleting a custom inventory schema.

DELETE FROM aws.ssm.inventories
WHERE region = '{{ region }}' --required
;