gcp.mms


Description
on turn on a VM instance
off turn off a VM instance
status status of VM instance(s)
create create a VM instance
delete delete a VM instance

[email protected]

Function Parameters Return
vm(on) {"cmd":"on", "name":"STRING"} {"OpType":"STRING","Status":"STRING", "InsertTime":"STRING"}
{"cmd":"on","name":"instance_test_01"} {"OpType":"start","Status":"PENDING","InsertTime":"2018-01-31T00:08:11.629-08:00"}
vm(off) {"cmd":"off", "name":"STRING"} {"OpType":"STRING","Status":"STRING", "InsertTime":"STRING"}
{"cmd":"off","name":"instance_test_01"} {"OpType":"stop","Status":"PENDING","InsertTime":"2018-01-31T00:08:11.629-08:00"}
vm(Status) {"cmd":"status", "name":"STRING", "os":"STRING"}1 {"name":"STRING", "zone":"STRING", "status":"STRING"}
{"cmd":"status", "name":"instance-1xyzabc"} {"name":"instance-1xyzabc", "zone":"asia-east1-a", "status":"TERMINATED"}
vm(create) {"cmd":"create", "name":"STRING", "os":"STRING"} 2 3 4 {"VmName":"STRING", "OpType":"STRING", "Status":"STRING", "InsertTime":"STRING"}
{"cmd":"create", "name":"instance-1xyzabc"} {"VmName":"STRING","OpType":"insert","Status":"RUNNING","InsertTime":"2018-01-31T00:08:11.629-08:00"}
vm(delete) {"cmd":"delete", "name":"STRING"} {"VmName":"STRING","OpType":"STRING","Status":"STRING","InsertTime":"STRING"}
{"cmd":"delete", "name":"instance-1xyzabc"} {"VmName":"instance-1xyzabc","OpType":"delete","Status":"PENDING","InsertTime":"2018-01-31T00:08:11.629-08:00"}
1. if STRING===""|| STRING!==any VM’s name, show ALL VMs’ status
2. the name MUST be a match of regex '(?:a-z?)', i.e.: Name must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen
3. if STRING===””, a name of vm2018m1d2h3m4s5r999999 will be generated by current date + time + a random number
4. OS could be one in {'debian', 'ubuntu', 'windows'} for now

results matching ""

    No results matching ""