Skip to content

Commit 6c35950

Browse files
authored
Merge branch 'main' into dev
2 parents d9b2b6a + b468966 commit 6c35950

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

linode_api4/groups/linode.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def instance_create(
141141
a :any:`Type`, a :any:`Region`, and an :any:`Image`. All three of
142142
these fields may be provided as either the ID or the appropriate object.
143143
In this mode, a root password will be generated and returned with the
144-
new Instance object. For example::
144+
new Instance object.
145+
146+
For example::
145147
146148
new_linode, password = client.linode.instance_create(
147149
"g6-standard-2",
@@ -157,6 +159,15 @@ def instance_create(
157159
region,
158160
image=image)
159161
162+
To output the password from the above example:
163+
print(password)
164+
165+
To output the first IPv4 address of the new Linode:
166+
print(new_linode.ipv4[0])
167+
168+
To delete the new_linode (WARNING: this immediately destroys the Linode):
169+
new_linode.delete()
170+
160171
**Create an Instance from StackScript**
161172
162173
When creating an Instance from a :any:`StackScript`, an :any:`Image` that

0 commit comments

Comments
 (0)