File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,9 @@ def instance_create(
141
141
a :any:`Type`, a :any:`Region`, and an :any:`Image`. All three of
142
142
these fields may be provided as either the ID or the appropriate object.
143
143
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::
145
147
146
148
new_linode, password = client.linode.instance_create(
147
149
"g6-standard-2",
@@ -157,6 +159,15 @@ def instance_create(
157
159
region,
158
160
image=image)
159
161
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
+
160
171
**Create an Instance from StackScript**
161
172
162
173
When creating an Instance from a :any:`StackScript`, an :any:`Image` that
You can’t perform that action at this time.
0 commit comments