put_inventory

SSM.Client.put_inventory(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_inventory(
    InstanceId='string',
    Items=[
        {
            'TypeName': 'string',
            'SchemaVersion': 'string',
            'CaptureTime': 'string',
            'ContentHash': 'string',
            'Content': [
                {
                    'string': 'string'
                },
            ],
            'Context': {
                'string': 'string'
            }
        },
    ]
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    An managed node ID where you want to add or update inventory items.

  • Items (list) --

    [REQUIRED]

    The inventory items that you want to add or update on managed nodes.

    • (dict) --

      Information collected from managed nodes based on your inventory policy document

      • TypeName (string) -- [REQUIRED]

        The name of the inventory type. Default inventory item type names start with AWS . Custom inventory type names will start with Custom. Default inventory item types include the following: AWS:AWSComponent , AWS:Application , AWS:InstanceInformation , AWS:Network , and AWS:WindowsUpdate .

      • SchemaVersion (string) -- [REQUIRED]

        The schema version for the inventory item.

      • CaptureTime (string) -- [REQUIRED]

        The time the inventory information was collected.

      • ContentHash (string) --

        MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.

      • Content (list) --

        The inventory data of the inventory type.

        • (dict) --
          • (string) --
            • (string) --
      • Context (dict) --

        A map of associated properties for a specified inventory type. For example, with this attribute, you can specify the ExecutionId , ExecutionType , ComplianceType properties of the AWS:ComplianceItem type.

        • (string) --
          • (string) --
Return type

dict

Returns

Response Syntax

{
    'Message': 'string'
}

Response Structure

  • (dict) --

    • Message (string) --

      Information about the request.

Exceptions

  • SSM.Client.exceptions.InternalServerError
  • SSM.Client.exceptions.InvalidInstanceId
  • SSM.Client.exceptions.InvalidTypeNameException
  • SSM.Client.exceptions.InvalidItemContentException
  • SSM.Client.exceptions.TotalSizeLimitExceededException
  • SSM.Client.exceptions.ItemSizeLimitExceededException
  • SSM.Client.exceptions.ItemContentMismatchException
  • SSM.Client.exceptions.CustomSchemaCountLimitExceededException
  • SSM.Client.exceptions.UnsupportedInventorySchemaVersionException
  • SSM.Client.exceptions.UnsupportedInventoryItemContextException
  • SSM.Client.exceptions.InvalidInventoryItemContextException
  • SSM.Client.exceptions.SubTypeCountLimitExceededException