Reference For: developers, administrators

kyvernon inventory

The inventory command of the kyvernon CLI with its subcommands and arguments.

kyvernon inventory

Inventory

Usage
kyvernon inventory <COMMAND>

Subcommands: roots, children, path, vms, hosts, datastores, networks, get, vm, host, datastore, network, datacenter, cluster, search, kind, create, update, delete, move-into, move-into-pool, changes, rename, create-datacenter, delete-datacenter, tag-categories, tags, object-tags

kyvernon inventory roots

Top-level nodes

Usage
kyvernon inventory roots

API operation: GET /v1/inventory/roots

kyvernon inventory children

Children of a node

Usage
kyvernon inventory children <ID>
ArgumentDescriptionRequired
<ID>Node idyes

API operation: GET /v1/inventory/nodes/{id}/children

kyvernon inventory path

Path to a node

Usage
kyvernon inventory path <ID>
ArgumentDescriptionRequired
<ID>Node idyes

API operation: GET /v1/inventory/nodes/{id}/path

kyvernon inventory vms

Virtual machines

Usage
kyvernon inventory vms [OPTIONS]
ArgumentDescriptionRequired
--scopeContainer id (datacenter, folder, cluster, host, pool, datastore, network)
--limitMaximum items
--afterResume after this id

API operation: GET /v1/inventory/vms

kyvernon inventory hosts

Hosts

Usage
kyvernon inventory hosts [OPTIONS]
ArgumentDescriptionRequired
--scopeContainer id (datacenter, folder, cluster, host, pool, datastore, network)
--limitMaximum items
--afterResume after this id

API operation: GET /v1/inventory/hosts

kyvernon inventory datastores

Datastores

Usage
kyvernon inventory datastores [OPTIONS]
ArgumentDescriptionRequired
--scopeContainer id (datacenter, folder, cluster, host, pool, datastore, network)
--limitMaximum items
--afterResume after this id

API operation: GET /v1/inventory/datastores

kyvernon inventory networks

Networks

Usage
kyvernon inventory networks [OPTIONS]
ArgumentDescriptionRequired
--scopeContainer id (datacenter, folder, cluster, host, pool, datastore, network)
--limitMaximum items
--afterResume after this id

API operation: GET /v1/inventory/networks

kyvernon inventory get

Any object by id

Usage
kyvernon inventory get <ID>
ArgumentDescriptionRequired
<ID>Object idyes

API operation: GET /v1/inventory/objects/{id}

kyvernon inventory vm

A virtual machine by id

Usage
kyvernon inventory vm <ID>
ArgumentDescriptionRequired
<ID>vm-Nyes

API operation: GET /v1/inventory/vms/{id}

kyvernon inventory host

A host by id

Usage
kyvernon inventory host <ID>
ArgumentDescriptionRequired
<ID>host-Nyes

API operation: GET /v1/inventory/hosts/{id}

kyvernon inventory datastore

A datastore by id

Usage
kyvernon inventory datastore <ID>
ArgumentDescriptionRequired
<ID>datastore-Nyes

API operation: GET /v1/inventory/datastores/{id}

kyvernon inventory network

A network by id

Usage
kyvernon inventory network <ID>
ArgumentDescriptionRequired
<ID>network-N or dvportgroup-Nyes

API operation: GET /v1/inventory/networks/{id}

kyvernon inventory datacenter

A datacenter by id

Usage
kyvernon inventory datacenter <ID>
ArgumentDescriptionRequired
<ID>datacenter-Nyes

API operation: GET /v1/inventory/datacenters/{id}

kyvernon inventory cluster

A cluster by id

Usage
kyvernon inventory cluster <ID>
ArgumentDescriptionRequired
<ID>domain-cNyes

API operation: GET /v1/inventory/clusters/{id}

Name search

Usage
kyvernon inventory search [OPTIONS] <Q>
ArgumentDescriptionRequired
<Q>Substringyes
--limitMaximum items

API operation: GET /v1/inventory/search

kyvernon inventory kind

Records of one kind (virtual_machine, vm_folder, tag, ...)

Usage
kyvernon inventory kind [OPTIONS] <KIND>
ArgumentDescriptionRequired
<KIND>Kind nameyes
--parentOnly children of this parent
--name-prefixName prefix
--changed-afterOnly records changed after this store version
--limitMaximum items
--afterResume after this id (from next)

API operation: GET /v1/inventory/kinds/{kind}

kyvernon inventory create

Create a record of a kind from a JSON body

Usage
kyvernon inventory create [OPTIONS] <KIND>
ArgumentDescriptionRequired
<KIND>Kind nameyes
--parentParent id
--bodyInline JSON body
--body-fileFile with the JSON body (- for stdin)

API operation: POST /v1/inventory/kinds/{kind}

kyvernon inventory update

Replace a record body (compare-and-set)

Usage
kyvernon inventory update [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Object idyes
--expected-versionVersion read before the changeyes
--bodyInline JSON body
--body-fileFile with the JSON body (- for stdin)

API operation: PUT /v1/inventory/objects/{id}

kyvernon inventory delete

Delete a record

Usage
kyvernon inventory delete [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Object idyes
--expected-versionFail if the version changed
--cascadeAlso delete descendants

API operation: DELETE /v1/inventory/objects/{id}

kyvernon inventory move-into

Move entities into a folder (Folder.MoveIntoFolder_Task)

Usage
kyvernon inventory move-into [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Destination folder id (group-vN, …)yes
--entityEntities to move (repeatable)yes
--waitWait for the task to finish and print it
--idempotency-keyIdempotency key (a retry with the same key returns the same task)

API operation: POST /v1/inventory/folders/{id}/move-into

kyvernon inventory move-into-pool

Move VMs and/or child pools into a resource pool (MoveIntoResourcePool)

Usage
kyvernon inventory move-into-pool [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Destination resource pool id (resgroup-N, …)yes
--entityEntities to move (repeatable)yes
--waitWait for the task to finish and print it
--idempotency-keyIdempotency key (a retry with the same key returns the same task)

API operation: POST /v1/resource-pools/{id}/move-into

kyvernon inventory changes

Change feed (long poll)

Usage
kyvernon inventory changes [OPTIONS]
ArgumentDescriptionRequired
--sinceStore version to start afteryes
--timeoutSeconds to wait for a change
--kindsComma-separated kinds
--limitMaximum change sets

API operation: GET /v1/inventory/changes

kyvernon inventory rename

Rename an object (datacenter, folder, cluster, host, resource group, VM, datastore, network)

Usage
kyvernon inventory rename [OPTIONS] <ID> <NAME>
ArgumentDescriptionRequired
<ID>Object idyes
<NAME>New nameyes
--waitWait for the task

API operation: POST /v1/inventory/objects/{id}/rename

kyvernon inventory create-datacenter

Create a datacenter with its folders

Usage
kyvernon inventory create-datacenter [OPTIONS] <NAME>
ArgumentDescriptionRequired
<NAME>Nameyes
--folderDatacenter folder (default: the root folder)

API operation: POST /v1/datacenters

kyvernon inventory delete-datacenter

Delete an empty datacenter

Usage
kyvernon inventory delete-datacenter <ID>
ArgumentDescriptionRequired
<ID>Datacenter idyes

API operation: DELETE /v1/datacenters/{id}

kyvernon inventory tag-categories

Tag categories

Usage
kyvernon inventory tag-categories <COMMAND>

Subcommands: list, get, create, update, delete

kyvernon inventory tag-categories list

List categories

Usage
kyvernon inventory tag-categories list

API operation: GET /v1/tag-categories

kyvernon inventory tag-categories get

One category

Usage
kyvernon inventory tag-categories get <ID>
ArgumentDescriptionRequired
<ID>Category idyes

API operation: GET /v1/tag-categories/{id}

kyvernon inventory tag-categories create

Create a category

Usage
kyvernon inventory tag-categories create [OPTIONS] <NAME>
ArgumentDescriptionRequired
<NAME>Nameyes
--descriptionDescription
--cardinalitysingle (default) or multiple
--kindObject kind the tags may be attached to (repeat; none: every kind)

API operation: POST /v1/tag-categories

kyvernon inventory tag-categories update

Change a category

Usage
kyvernon inventory tag-categories update [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Category idyes
--nameNew name
--descriptionNew description
--cardinalitymultiple
--kindThe new list of associable kinds (repeat; a superset of the current one)

API operation: PUT /v1/tag-categories/{id}

kyvernon inventory tag-categories delete

Delete a category and its tags

Usage
kyvernon inventory tag-categories delete <ID>
ArgumentDescriptionRequired
<ID>Category idyes

API operation: DELETE /v1/tag-categories/{id}

kyvernon inventory tags

Tags and their assignments

Usage
kyvernon inventory tags <COMMAND>

Subcommands: list, get, create, update, delete, objects, attach, detach

kyvernon inventory tags list

List tags

Usage
kyvernon inventory tags list [OPTIONS]
ArgumentDescriptionRequired
--categoryOnly tags of this category

API operation: GET /v1/tags

kyvernon inventory tags get

One tag

Usage
kyvernon inventory tags get <ID>
ArgumentDescriptionRequired
<ID>Tag idyes

API operation: GET /v1/tags/{id}

kyvernon inventory tags create

Create a tag

Usage
kyvernon inventory tags create [OPTIONS] <CATEGORY> <NAME>
ArgumentDescriptionRequired
<CATEGORY>Category idyes
<NAME>Nameyes
--descriptionDescription

API operation: POST /v1/tags

kyvernon inventory tags update

Change a tag

Usage
kyvernon inventory tags update [OPTIONS] <ID>
ArgumentDescriptionRequired
<ID>Tag idyes
--nameNew name
--descriptionNew description

API operation: PUT /v1/tags/{id}

kyvernon inventory tags delete

Delete a tag

Usage
kyvernon inventory tags delete <ID>
ArgumentDescriptionRequired
<ID>Tag idyes

API operation: DELETE /v1/tags/{id}

kyvernon inventory tags objects

The objects a tag is attached to

Usage
kyvernon inventory tags objects <ID>
ArgumentDescriptionRequired
<ID>Tag idyes

API operation: GET /v1/tags/{id}/objects

kyvernon inventory tags attach

Attach a tag to objects

Usage
kyvernon inventory tags attach <ID> <OBJECTS>
ArgumentDescriptionRequired
<ID>Tag idyes
<OBJECTS>Object idsyes

API operation: POST /v1/tags/{id}/attach

kyvernon inventory tags detach

Detach a tag from objects

Usage
kyvernon inventory tags detach <ID> <OBJECTS>
ArgumentDescriptionRequired
<ID>Tag idyes
<OBJECTS>Object idsyes

API operation: POST /v1/tags/{id}/detach

kyvernon inventory object-tags

The tags attached to an object

Usage
kyvernon inventory object-tags <ID>
ArgumentDescriptionRequired
<ID>Object idyes

API operation: GET /v1/inventory/objects/{id}/tags

Version 0.1.