Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## find running instances with display name like test
- ubuntu@FAKELES-7310:~$ oci search resource structured-search --query-text "QUERY instance resources where lifeCycleState = 'RUNNING' && displayName =~ 'test' && compartmentId = 'ocid1.compartment.oc1..<compartment-id>' " --query 'data.items[*].{name:"display-name",instance:"identifier"}' --output table
- +---------------------------------------------+---------+
- | instance | name |
- +---------------------------------------------+---------+
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-10 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-9 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-8 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-7 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-6 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-5 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-4 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-3 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-2 |
- | ocid1.instance.oc1.uk-london-1.<instance-id>| test-1 |
- +---------------------------------------------+---------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement