Aller au contenu
NimbusNexus

Groupes d’adresses

Un groupe d’adresses est un ensemble nommé et modifiable de blocs CIDR que vous pouvez référencer depuis les règles des groupes de sécurité. Au lieu de coller la même liste d’autorisation dans dix groupes de sécurité, vous créez un seul groupe d’adresses (office-cidrs) et vous le référencez depuis chaque règle. Ajoutez ou retirez un CIDR du groupe ; chaque règle qui le référence est mise à jour immédiatement.

Le cas d’usage type : des CIDR de VPN d’entreprise qui changent avec le temps. Maintenir la liste en dur dans chaque groupe de sécurité oblige à traquer chaque occurrence quand un CIDR change ; la maintenir dans un seul groupe d’adresses permet de la mettre à jour à un seul endroit.

Étapes suivantes

Reference

GET/api/v1/address_group/

List Address Groups

Lists address groups visible to the project.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
namequerystring | null—
descriptionquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/address_group/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/address_group/

Create Address Group

Creates an address group that can be referenced by security group rules.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
name*string—
descriptionstring | null—
addressesarray of string | null—
project_idstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/address_group/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example"
  }'
GET/api/v1/address_group/{address_group_id}

Get Address Group

Returns the details of a single address group by ID.

Parameters

NameInTypeDescription
address_group_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/address_group/<address_group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/address_group/{address_group_id}

Update Address Group

Updates the name or description of an existing address group.

Parameters

NameInTypeDescription
address_group_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/address_group/<address_group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/address_group/{address_group_id}

Delete Address Group

Deletes an address group by ID.

Parameters

NameInTypeDescription
address_group_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation Error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/address_group/<address_group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/address_group/{address_group_id}/add_addresses

Add Addresses

Adds CIDR addresses to an existing address group.

Parameters

NameInTypeDescription
address_group_id*pathstring—

Request body

FieldTypeDescription
addresses*array of string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/address_group/<address_group_id>/add_addresses" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [
      "example"
    ]
  }'
PUT/api/v1/address_group/{address_group_id}/remove_addresses

Remove Addresses

Removes CIDR addresses from an existing address group.

Parameters

NameInTypeDescription
address_group_id*pathstring—

Request body

FieldTypeDescription
addresses*array of string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/address_group/<address_group_id>/remove_addresses" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [
      "example"
    ]
  }'

Need to make a real call? Try these endpoints in the live Swagger UI →