Get Associations

Get Associations

Returns information about resources that are associated with the given resource. Id and type of the resource for which associated resources are to be fetched are to be specified as query parameter in the URI. Resource type of the associated resources must be specified as query parameter.


This API is deprecated. Please use below policy API /infra/virtual-machine-group-associations?vm_external_id=<ext-id> /infra/virtual-network-interface-group-associations?vif_external_id=<ext-id> /infra/ip-address-group-associations?ip_address=10.1.19.10 /infra/group-associations?intent_path=<intent-path> to get policy groups associated with the given resource.
Request
URI
GET
https://nsxmanager.your.domain/api/v1/associations
COPY
Query Parameters
string
associated_resource_type
Required

Resource type valid for use as target in association API

string
cursor
Optional

Opaque cursor to be used for getting next page of records (supplied by current result page)

boolean
fetch_ancestors
Optional
Constraints: default: false

Fetch complete list of associated resources considering containment and nesting

string
included_fields
Optional

Comma separated list of fields that should be included in query result

integer
page_size
Optional
Constraints: minimum: 0 maximum: 1000 default: 1000

Maximum number of results to return in this page (server may return fewer)

string
resource_id
Required

The resource for which associated resources are to be fetched

string
resource_type
Required

Resource type valid for use as source in association API

Possible values are : NSGroup, IPSet, MACSet, LogicalSwitch, LogicalPort, VirtualMachine, DirectoryGroup, VirtualNetworkInterface, TransportNode, IPAddress, CloudNativeServiceInstance, PhysicalServer,
boolean
sort_ascending
Optional

sort_ascending

string
sort_by
Optional

Field by which records are sorted


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns AssociationListResult of type(s) application/json
This response body class contains all of the following: InlineAssociationListResult1
{
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_schema": "string",
    "_self": {},
    "cursor": "string",
    "result_count": 0,
    "sort_ascending": false,
    "sort_by": "string",
    "results": [
        {
            "is_valid": false,
            "target_display_name": "string",
            "target_id": "string",
            "target_type": "string"
        }
    ]
}

400
Returns BadRequest of type(s) application/json
Operation doesn't return any data structure

403
Returns Forbidden of type(s) application/json
Operation doesn't return any data structure

404
Returns NotFound of type(s) application/json
Operation doesn't return any data structure

412
Returns PreconditionFailed of type(s) application/json
Operation doesn't return any data structure

500
Returns InternalServerError of type(s) application/json
Operation doesn't return any data structure

503
Returns ServiceUnavailable of type(s) application/json
Operation doesn't return any data structure

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/associations?associated_resource_type=value&resource_id=value&resource_type=v