NSX multi-tenancy supports the sharing of certain resources from the /infra
space with the Org.
The Enterprise Admin for an NSX deployment can set up sharing of the /infra
space resources with the default Org in that deployment. For instance, when an Enterprise Admin shares groups or services from the /infra
space with the Org, those resources become available to the Projects under the Org.
When you share an object you can also choose to share the child objects if required.
Use the following API to view the objects that are shared by default with all Projects:
GET /policy/api/v1/infra/shares/default/resources/default
In addition to the objects shared by default, you can share the following resource objects with the Org or the Projects in the Org:
- Group
- DhcpServiceConfig
- DhcpRelayConfig
- Service
- PolicyContextProfile
- Segment
Share a resource with the Org by making the following API call:
PATCH /policy/api/v1/infra/shares/default/resources/<shared-resource-id>Sample request:
URL:
PATCH https://{{nsx-manager-ip}}/policy/api/v1/infra/shares/default/resources/resource-1 --> share group-1 with all the projectsBody:
{ "resource_objects": [ { "resource_path": "/infra/domains/default/groups/group-1", "include_children": false } ] }When you share a resource with the Org, it is available to all Projects under the Org.
Share a resource with a Project by making the following API call:
PATCH /policy/api/v1/infra/shares/<share-id>/resources/<shared-resource-id>Sample request:
URL:
PATCH https://{{nsx-manager-ip}}/policy/api/v1/infra/shares/default-project-1/resources/resource-1 --> share group-1 with project-1
{ "resource_objects": [ { "resource_path": "/infra/domains/default/groups/group-1", "include_children": false } ] }