Перейти до вмісту
NimbusNexus

Спільні мережі

Зазвичай мережі ізольовані в межах проєкту: мережу в проєкті acme-prod не видно з acme-staging. Спільний доступ до мережі робить у цій ізоляції контрольований виняток: ви надаєте обʼєкт, яким володіє ваш проєкт, іншому проєкту, у якому маєте роль, і проєкт-отримувач може користуватися ним так, ніби він його власний, — скажімо, підʼєднувати VM до спільної мережі.

Спільний доступ надає POST /api/v1/rbac_policy/. Він приймає object_type (network, qos_policy, security_group, subnetpool, address_scope або address_group), object_id обʼєкта, action, як-от access_as_shared, і проєкт-отримувач у target_tenant.

Сценарії: мережа спільних сервісів (бази даних, кеші, внутрішні API), до якої потрібен доступ кільком проєктам застосунків. Альтернатива — відкрити сервіси на публічних IP і знову захищати їх на рівні L7: це можливо, але складніше, ніж надати спільний доступ до сегмента L2 у межах довіри робочого простору.

Що далі

  • Мережі — ресурс, до якого надають спільний доступ.
  • Проєкти — власники й отримувачі спільних обʼєктів.
  • Групи безпеки — те, що фільтрує трафік у спільній мережі.

Reference

GET/api/v1/rbac_policy/

List Rbac Policies

Lists networking RBAC policies visible to the project.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
target_tenantquerystring | null—
tenant_idquerystring | null—
object_typequeryRBACObjectType | null—
object_idquerystring | null—
actionquerystring | null—
project_idquerystring | null—
idquerystring | null—

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/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/rbac_policy/

Create Rbac Policy

Creates a networking RBAC policy that shares a network resource with another project.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
object_type*objectThe type of the object the RBAC policy applies to.
object_id*stringThe ID of the object the RBAC policy applies to.
action*"access_as_shared" | "access_as_external"The action to be enforced by the policy.
target_tenant*stringThe ID of the project to which access is granted

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/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "object_type": "network",
    "object_id": "<object_id>",
    "action": "access_as_shared",
    "target_tenant": "example"
  }'
PUT/api/v1/rbac_policy/

Update Rbac Policy

Updates an existing networking RBAC policy.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
rbac_policy_id*string—
target_tenant*stringThe new target project ID

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/rbac_policy/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rbac_policy_id": "<rbac_policy_id>",
    "target_tenant": "example"
  }'
GET/api/v1/rbac_policy/artifacts

Rbac Policy Artifacts

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
projectquerystring | null—

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/rbac_policy/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/rbac_policy/{rbac_policy_id}

Show Rbac Policy

Returns a single networking RBAC policy by ID.

Parameters

NameInTypeDescription
rbac_policy_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/rbac_policy/<rbac_policy_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
DELETE/api/v1/rbac_policy/{rbac_policy_id}

Delete Rbac Policy

Deletes a networking RBAC policy by ID.

Parameters

NameInTypeDescription
rbac_policy_id*pathstring—

Responses

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

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/rbac_policy/<rbac_policy_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

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