Skip to content

Commit 4e567ea

Browse files
author
Adam Carruthers
committed
Add associate floating IP docs
1 parent 8ed7a43 commit 4e567ea

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

source/includes/openstack/_instances.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,38 @@ Required |  
123123
`flavorId`<br/>*UUID* | The [flavor](#flavors) will determine the number of CPU and RAM of your instance
124124
`networkId`<br/>*UUID* | The network in which the instance will be created. If you don't have a network, it can be created through the create network API.
125125

126+
#### Associate a floating IP
127+
128+
```shell
129+
curl -X POST \
130+
-H "MC-Api-Key: your_api_key" \
131+
-H "Content-Type: application/json" \
132+
-d "request_body" \
133+
"https://api.your.cloudmc/v1/services/compute-os/devel/instances/30fca349-68b0-48c2-9ada-1f60f57fa44e?operation=associate"
134+
# Request body should look like
135+
```
136+
```json
137+
{
138+
"floatingIpId": "287a3963-983b-4602-9dea-4dff89e9dc10"
139+
}
140+
```
141+
142+
<code>POST /services/<a href="#service-connections">:service_code</a>/<a href="#environments">:environment_name</a>/instances/:id?operation=associate</code>
143+
144+
Associate a floating IP to an instance in your environment.
145+
146+
Required | Description
147+
------------------------- | -------------------------------------------
148+
`floatingIpId`<br/>*UUID* | The ID of a previously-acquired floating IP
126149

127150
#### Delete an instance
128151

129152
```shell
130153
curl -X DELETE \
131-
-H "MC-Api-Key: your_api_key"
154+
-H "MC-Api-Key: your_api_key" \
132155
"https://api.your.cloudmc/v1/services/compute-os/devel/instances/30fca349-68b0-48c2-9ada-1f60f57fa44e"
133156
```
134157

135158
<code>DELETE /services/<a href="#service-connections">:service_code</a>/<a href="#environments">:environment_name</a>/instances/:id</code>
136159

137-
Delete a instance.
160+
Delete an instance.

0 commit comments

Comments
 (0)