inventories
Creates, updates, deletes, gets or lists an inventories resource.
Overview
| Name | inventories |
| Type | Resource |
| Id | aws.ssm.inventories |
Fields
The following fields are returned by SELECT queries:
- get_inventory
| Name | Datatype | Description |
|---|---|---|
data | object | The data section in the inventory result entity JSON. |
id | string | ID 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_inventory | select | region | Query inventory information. This includes managed node status, such as Stopped or Terminated. | |
put_inventory | replace | region, InstanceId, Items | 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. | |
delete_inventory | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_inventory
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
- put_inventory
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_inventory
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
;