# API How-Tos

[<mark style="color:blue;">Cloud API</mark>](https://api.ionos.com/docs/cloud/v6/) allows contract administrators, owners, and authenticated users with the required permissions to create a NSG and associate it with [<mark style="color:blue;">Network Interface Cards (NICs)</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#network-interface-card-nic) or [<mark style="color:blue;">Virtual Machine (VM)</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#virtual-machine-vm) resources.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Create a Default Network Security Group</strong></mark></td><td>Learn how to create a Default NSG.</td><td><a href="/pages/yd8zR2tuROnRcFPVm0Wr">/pages/yd8zR2tuROnRcFPVm0Wr</a></td></tr><tr><td><mark style="color:blue;"><strong>Create a Custom Network Security Group</strong></mark></td><td>Learn how to create a Custom NSG.</td><td><a href="/pages/Q3ePbub5vdB7RHnDv5NZ">/pages/Q3ePbub5vdB7RHnDv5NZ</a></td></tr><tr><td><mark style="color:blue;"><strong>Convert a Custom Network Security Group to Default</strong></mark></td><td>Learn how to convert a Custom NSG to a Default NSG.</td><td><a href="/pages/S01ujttkLNsbVXEhDuys">/pages/S01ujttkLNsbVXEhDuys</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve Network Security Groups by Group ID</strong></mark></td><td>Learn how to retrieve a NSG by Group ID.</td><td><a href="/pages/EL40ps8CklkeoVYkTGGK">/pages/EL40ps8CklkeoVYkTGGK</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve all Network Security Groups</strong></mark></td><td>Learn how to retrieve your NSGs.</td><td><a href="/pages/Rq0lLPPDt63BhRKOhb4e">/pages/Rq0lLPPDt63BhRKOhb4e</a></td></tr><tr><td><mark style="color:blue;"><strong>Update a Network Security Group</strong></mark></td><td>Learn how to update a NSG.</td><td><a href="/pages/H4nV9pjWx0wY7NspEKBR">/pages/H4nV9pjWx0wY7NspEKBR</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete a Network Security Group</strong></mark></td><td>Learn how to delete your NSGs.</td><td><a href="/pages/3zLmR1JOrbQhWquqwUqg">/pages/3zLmR1JOrbQhWquqwUqg</a></td></tr><tr><td><mark style="color:blue;"><strong>Create Firewall rule for a Network Security Group</strong></mark></td><td>Learn how to create a Firewall rule for the specified NSG.</td><td><a href="/pages/4XXyhD24Ef0f7ols0Lq1">/pages/4XXyhD24Ef0f7ols0Lq1</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve Firewall rules by Network Security Group ID</strong></mark></td><td>Learn how to retrieve all Firewall rules for the specified NSG.</td><td><a href="/pages/4k4pHMoOjlBaG8zyU7R6">/pages/4k4pHMoOjlBaG8zyU7R6</a></td></tr><tr><td><mark style="color:blue;"><strong>Update Firewall rules of a Network Security Group</strong></mark></td><td>Learn how to update Firewall rule of the specified NSG.</td><td><a href="/pages/bqsHLsD0R3yPd0AvBfM6">/pages/bqsHLsD0R3yPd0AvBfM6</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete Firewall rule from a Network Security Group</strong></mark></td><td>Learn how to delete a firewall rule from a NSG.</td><td><a href="/pages/URD8909TZiQkpbPHyKpT">/pages/URD8909TZiQkpbPHyKpT</a></td></tr><tr><td><mark style="color:blue;"><strong>Attach a List of Security Groups to a Server or NIC</strong></mark></td><td>Learn how to attach a list of NSGs to a server or NIC.</td><td><a href="/pages/pTmfuLhqgIumD0dF4MjZ">/pages/pTmfuLhqgIumD0dF4MjZ</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/security/network-security-groups/api-how-tos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
