NSX-T Data Center REST API
Create or Replace Port Mirroring Profile.
Create or Replace port mirroring profile. Packets will be mirrored fromsource group, segment, port to destination group.
Realized entities of this API can be found using the path of monitoring
profile binding map that is used to apply this profile.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX.
Request:
Method:
PUT
URI Path(s):
/policy/api/v1/infra/port-mirroring-profiles/{port-mirroring-profile-id}
Request Headers:
n/a
Query Parameters:
OverrideRequestParameters+
OverrideRequestParameters (schema)
Name | Description | Type | Notes |
---|---|---|---|
override | Locally override the global object If true, the global resource can be over written locally. This means that there will be a local only resource in place of the global resource that can reflect local specific settings and values. The global object will continue to exist but will not be used for any configuration until this local object is removed. When the object is overridden the Global resource continues to exist unmodified, while the overridden object is created with all of the user specified values. The Global resource may be updated in the background, however, the overridden object may only be updated by the user. Once the user removes the overridden copy, the Global resource will then resume being used in the configuration. |
boolean | Default: "False" |
Request Body:
PortMirroringProfile+
PortMirroringProfile (schema)
Name | Description | Type | Notes |
---|---|---|---|
_create_time | Timestamp of resource creation | EpochMsTimestamp | Readonly Sortable |
_create_user | ID of the user who created this resource | string | Readonly |
_last_modified_time | Timestamp of last modification | EpochMsTimestamp | Readonly Sortable |
_last_modified_user | ID of the user who last modified this resource | string | Readonly |
_links | References related to this resource The server will populate this field when returing the resource. Ignored on PUT and POST. |
array of ResourceLink | Readonly |
_protection | Indicates protection status of this resource Protection status is one of the following: PROTECTED - the client who retrieved the entity is not allowed to modify it. NOT_PROTECTED - the client who retrieved the entity is allowed to modify it REQUIRE_OVERRIDE - the client who retrieved the entity is a super user and can modify it, but only when providing the request header X-Allow-Overwrite=true. UNKNOWN - the _protection field could not be determined for this entity. |
string | Readonly |
_revision | Generation of this resource config The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected. |
int | |
_schema | Schema for this resource | string | Readonly |
_self | Link to this resource | SelfResourceLink | Readonly |
_system_owned | Indicates system owned resource | boolean | Readonly |
children | Subtree for this type within policy tree Subtree for this type within policy tree containing nested elements. Note that this type is applicable to be used in Hierarchical API only. |
array of ChildPolicyConfigResource Children are not allowed for this type |
|
description | Description of this resource | string | Maximum length: 1024 Sortable |
destination_group | Destination group path Data from source group will be copied to members of destination group. Only IPSET group and group with membership criteria VM is supported. IPSET group allows only three ip's. |
string | Required |
direction | Direction Port mirroring profile direction |
string | Enum: INGRESS, EGRESS, BIDIRECTIONAL Default: "BIDIRECTIONAL" |
display_name | Identifier to use when displaying entity in logs or GUI Defaults to ID if not set |
string | Maximum length: 255 Sortable |
encapsulation_type | Mirror Destination encapsulation type User can provide Mirror Destination type e.g GRE, ERSPAN_TWO or ERSPAN_THREE.If profile type is REMOTE_L3_SPAN, encapsulation type is used else ignored. |
string | Enum: GRE, ERSPAN_TWO, ERSPAN_THREE Default: "GRE" |
erspan_id | ERSPAN session id Used by physical switch for the mirror traffic forwarding. Must be provided and only effective when encapsulation type is ERSPAN type II or type III. |
int | Minimum: 0 Maximum: 1023 Default: "0" |
filter_action | Action to include or exclude traffic for all filter in port_mirroring_filters If set to INCLUDE, packets matching all filters will be mirrored. If set to EXCLUDE, packets NOT matching any filters will be mirrored. |
string | Enum: INCLUDE, EXCLUDE Default: "INCLUDE" |
gre_key | GRE encapsulation key User-configurable 32-bit key only for GRE |
int | Minimum: 0 Default: "0" |
id | Unique identifier of this resource | string | Sortable |
marked_for_delete | Indicates whether the intent object is marked for deletion Intent objects are not directly deleted from the system when a delete is invoked on them. They are marked for deletion and only when all the realized entities for that intent object gets deleted, the intent object is deleted. Objects that are marked for deletion are not returned in GET call. One can use the search API to get these objects. |
boolean | Readonly Default: "False" |
origin_site_id | A unique identifier assigned by the system for knowing which site owns an object This is a UUID generated by the system for knowing which site owns an object. This is used in NSX+. |
string | Readonly |
overridden | Indicates whether this object is the overridden intent object Global intent objects cannot be modified by the user. However, certain global intent objects can be overridden locally by use of this property. In such cases, the overridden local values take precedence over the globally defined values for the properties. |
boolean | Readonly Default: "False" |
owner_id | A unique identifier assigned by the system for the ownership of an object This is a UUID generated by the system for knowing who owns this object. This is used in NSX+. |
string | Readonly |
parent_path | Path of its parent Path of its parent |
string | Readonly |
path | Absolute path of this object Absolute path of this object |
string | Readonly |
port_mirroring_filters | Port mirroring filter An array of 5-tuples used to filter packets for the mirror session. If not provided, all the packets will be mirrored. This field is with filter_action which defines whether packets matching the filter will be included or excluded |
array of PortMirrorFilter | Minimum items: 0 Maximum items: 1 |
profile_type | Allows user to select type of port mirroring session. | string | Enum: REMOTE_L3_SPAN, LOGICAL_SPAN Default: "REMOTE_L3_SPAN" |
realization_id | A unique identifier assigned by the system for realizing intent This is a UUID generated by the system for realizing the entity object. In most cases this should be same as 'unique_id' of the entity. However, in some cases this can be different because of entities have migrated their unique identifier to NSX Policy intent objects later in the timeline and did not use unique_id for realization. Realization id is helpful for users to debug data path to correlate the configuration with corresponding intent. |
string | Readonly |
relative_path | Relative path of this object Path relative from its parent |
string | Readonly |
remote_path | Path of the object on the remote end. This path is populated only in case of multi-site scenario. Currently it is supported only for LM objects. When LM is onboarded to multi-site platform like NAPP or GM, remote_path will be set to the globally unique path across multi-site topology . It is generated based on local site-name and uses /org tree namespace. Note: It is populated only for LM objects. Not supported on the GM. |
string | Readonly |
resource_type | Must be set to the value PortMirroringProfile | string | |
snap_length | Maximum packet length for packet truncation If this property is set, the packet will be truncated to the provided length. If this property is unset, entire packet will be mirrored. |
int | Minimum: 60 Maximum: 65535 |
tags | Opaque identifiers meaningful to the API user | array of Tag | Maximum items: 30 |
tcp_ip_stack | Mirror Destination encapsulation type User can provide Mirror stack or Default stack to send mirror traffic. If profile type is REMOTE_L3_SPAN, tcp_ip_stack type is used else ignored. |
string | Enum: Default, Mirror Default: "Default" |
unique_id | A unique identifier assigned by the system This is a UUID generated by the GM/LM to uniquely identify entities in a federated environment. For entities that are stretched across multiple sites, the same ID will be used on all the stretched sites. |
string | Readonly |
Example Request:
{ "snap_length": 744, "destination_group": "/infra/domains/d1/groups/group_ip", "direction": "BIDIRECTIONAL", "encapsulation_type":"GRE", "gre_key" : 5 }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
PortMirroringProfile+
PortMirroringProfile (schema)
Name | Description | Type | Notes |
---|---|---|---|
_create_time | Timestamp of resource creation | EpochMsTimestamp | Readonly Sortable |
_create_user | ID of the user who created this resource | string | Readonly |
_last_modified_time | Timestamp of last modification | EpochMsTimestamp | Readonly Sortable |
_last_modified_user | ID of the user who last modified this resource | string | Readonly |
_links | References related to this resource The server will populate this field when returing the resource. Ignored on PUT and POST. |
array of ResourceLink | Readonly |
_protection | Indicates protection status of this resource Protection status is one of the following: PROTECTED - the client who retrieved the entity is not allowed to modify it. NOT_PROTECTED - the client who retrieved the entity is allowed to modify it REQUIRE_OVERRIDE - the client who retrieved the entity is a super user and can modify it, but only when providing the request header X-Allow-Overwrite=true. UNKNOWN - the _protection field could not be determined for this entity. |
string | Readonly |
_revision | Generation of this resource config The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected. |
int | |
_schema | Schema for this resource | string | Readonly |
_self | Link to this resource | SelfResourceLink | Readonly |
_system_owned | Indicates system owned resource | boolean | Readonly |
children | Subtree for this type within policy tree Subtree for this type within policy tree containing nested elements. Note that this type is applicable to be used in Hierarchical API only. |
array of ChildPolicyConfigResource Children are not allowed for this type |
|
description | Description of this resource | string | Maximum length: 1024 Sortable |
destination_group | Destination group path Data from source group will be copied to members of destination group. Only IPSET group and group with membership criteria VM is supported. IPSET group allows only three ip's. |
string | Required |
direction | Direction Port mirroring profile direction |
string | Enum: INGRESS, EGRESS, BIDIRECTIONAL Default: "BIDIRECTIONAL" |
display_name | Identifier to use when displaying entity in logs or GUI Defaults to ID if not set |
string | Maximum length: 255 Sortable |
encapsulation_type | Mirror Destination encapsulation type User can provide Mirror Destination type e.g GRE, ERSPAN_TWO or ERSPAN_THREE.If profile type is REMOTE_L3_SPAN, encapsulation type is used else ignored. |
string | Enum: GRE, ERSPAN_TWO, ERSPAN_THREE Default: "GRE" |
erspan_id | ERSPAN session id Used by physical switch for the mirror traffic forwarding. Must be provided and only effective when encapsulation type is ERSPAN type II or type III. |
int | Minimum: 0 Maximum: 1023 Default: "0" |
filter_action | Action to include or exclude traffic for all filter in port_mirroring_filters If set to INCLUDE, packets matching all filters will be mirrored. If set to EXCLUDE, packets NOT matching any filters will be mirrored. |
string | Enum: INCLUDE, EXCLUDE Default: "INCLUDE" |
gre_key | GRE encapsulation key User-configurable 32-bit key only for GRE |
int | Minimum: 0 Default: "0" |
id | Unique identifier of this resource | string | Sortable |
marked_for_delete | Indicates whether the intent object is marked for deletion Intent objects are not directly deleted from the system when a delete is invoked on them. They are marked for deletion and only when all the realized entities for that intent object gets deleted, the intent object is deleted. Objects that are marked for deletion are not returned in GET call. One can use the search API to get these objects. |
boolean | Readonly Default: "False" |
origin_site_id | A unique identifier assigned by the system for knowing which site owns an object This is a UUID generated by the system for knowing which site owns an object. This is used in NSX+. |
string | Readonly |
overridden | Indicates whether this object is the overridden intent object Global intent objects cannot be modified by the user. However, certain global intent objects can be overridden locally by use of this property. In such cases, the overridden local values take precedence over the globally defined values for the properties. |
boolean | Readonly Default: "False" |
owner_id | A unique identifier assigned by the system for the ownership of an object This is a UUID generated by the system for knowing who owns this object. This is used in NSX+. |
string | Readonly |
parent_path | Path of its parent Path of its parent |
string | Readonly |
path | Absolute path of this object Absolute path of this object |
string | Readonly |
port_mirroring_filters | Port mirroring filter An array of 5-tuples used to filter packets for the mirror session. If not provided, all the packets will be mirrored. This field is with filter_action which defines whether packets matching the filter will be included or excluded |
array of PortMirrorFilter | Minimum items: 0 Maximum items: 1 |
profile_type | Allows user to select type of port mirroring session. | string | Enum: REMOTE_L3_SPAN, LOGICAL_SPAN Default: "REMOTE_L3_SPAN" |
realization_id | A unique identifier assigned by the system for realizing intent This is a UUID generated by the system for realizing the entity object. In most cases this should be same as 'unique_id' of the entity. However, in some cases this can be different because of entities have migrated their unique identifier to NSX Policy intent objects later in the timeline and did not use unique_id for realization. Realization id is helpful for users to debug data path to correlate the configuration with corresponding intent. |
string | Readonly |
relative_path | Relative path of this object Path relative from its parent |
string | Readonly |
remote_path | Path of the object on the remote end. This path is populated only in case of multi-site scenario. Currently it is supported only for LM objects. When LM is onboarded to multi-site platform like NAPP or GM, remote_path will be set to the globally unique path across multi-site topology . It is generated based on local site-name and uses /org tree namespace. Note: It is populated only for LM objects. Not supported on the GM. |
string | Readonly |
resource_type | Must be set to the value PortMirroringProfile | string | |
snap_length | Maximum packet length for packet truncation If this property is set, the packet will be truncated to the provided length. If this property is unset, entire packet will be mirrored. |
int | Minimum: 60 Maximum: 65535 |
tags | Opaque identifiers meaningful to the API user | array of Tag | Maximum items: 30 |
tcp_ip_stack | Mirror Destination encapsulation type User can provide Mirror stack or Default stack to send mirror traffic. If profile type is REMOTE_L3_SPAN, tcp_ip_stack type is used else ignored. |
string | Enum: Default, Mirror Default: "Default" |
unique_id | A unique identifier assigned by the system This is a UUID generated by the GM/LM to uniquely identify entities in a federated environment. For entities that are stretched across multiple sites, the same ID will be used on all the stretched sites. |
string | Readonly |