Policy > Security > Service Insertion > Redirection Policies

Create or update redirection policy

Create or update the redirection policy.
Performance Note: If you want to edit several rules in a redirection policy
use this API. It will perform better than several individual rule APIs.
Just pass all the rules which you wish to edit as embedded rules to it.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/domains/<domain-id>/redirection-policies/<redirection-policy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
RedirectionPolicy+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/domains/default/redirection-policies/RedirectionPolicy_12 { "rules": [ { "action": "REDIRECT", "resource_type": "RedirectionRule", "id": "Rule-1", "display_name": "Rule-1", "description": "Rule 1 - ANY to Web", "sequence_number": 1, "sources_excluded": false, "destinations_excluded": false, "source_groups": [ "ANY" ], "destination_groups": [ "/infra/domains/default/groups/web" ], "services": [ "/infra/services/ORACLE-FORM-SERVICES" ], "profiles": [ "ANY" ], "logged": false, "scope": [ "/infra/tier-0s/tier0/locale-services/1-policyconnectivity-1383/interfaces/1-policyconnectivity-658" ], "disabled": true, "direction": "IN_OUT", "ip_protocol": "IPV4_IPV6" } ], "redirect_to": [ "/infra/tier-0s/tier0/locale-services/1-policyconnectivity-1383/service-instances/PSI-1" ], "resource_type": "RedirectionPolicy", "display_name": "RedirectionPolicy_12", "description": "Test Redirection Policy", "parent_path": "/infra/domains/default", "marked_for_delete": false, "sequence_number": 0, "category": "Application", "stateful": true, "locked": false }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RedirectionPolicy+

Example Response:

{ "rules": [ { "action": "REDIRECT", "resource_type": "RedirectionRule", "id": "Rule-1", "display_name": "Rule-1", "description": "Rule 1 - ANY to Web", "path": "/infra/domains/default/redirection-policies/RedirectionPolicy_12/rules/Rule-1", "relative_path": "Rule-1", "parent_path": "/infra/domains/default/redirection-policies/RedirectionPolicy_12", "marked_for_delete": false, "rule_id": 56842019, "sequence_number": 1, "sources_excluded": false, "destinations_excluded": false, "source_groups": [ "ANY" ], "destination_groups": [ "/infra/domains/default/groups/web" ], "services": [ "/infra/services/ORACLE-FORM-SERVICES" ], "profiles": [ "ANY" ], "logged": false, "scope": [ "/infra/tier-0s/tier0/locale-services/1-policyconnectivity-1383/interfaces/1-policyconnectivity-658" ], "disabled": true, "direction": "IN_OUT", "ip_protocol": "IPV4_IPV6", "_system_owned": false, "_create_user": "admin", "_create_time": 1566307301463, "_last_modified_user": "admin", "_last_modified_time": 1566307301463, "_protection": "NOT_PROTECTED", "_revision": 0 } ], "redirect_to": [ "/infra/tier-0s/tier0/locale-services/1-policyconnectivity-1383/service-instances/PAN-1" ], # Flag to denote N-S direction is set. "north_south": true, "resource_type": "RedirectionPolicy", "id": "RedirectionPolicy_12", "display_name": "RedirectionPolicy_12", "description": "Test Redirection Policy", "path": "/infra/domains/default/redirection-policies/RedirectionPolicy_12", "relative_path": "RedirectionPolicy_12", "parent_path": "/infra/domains/default", "unique_id": "4d0a51a6-a6f8-4bca-83d8-b58ee831ce00", "marked_for_delete": false, "sequence_number": 0, "internal_sequence_number": 13000000, "category": "Application", "stateful": true, "locked": false, "lock_modified_time": 0, # Scope set to any as none was passed in the request. "scope": [ "ANY" ], "_system_owned": false, "_create_user": "admin", "_create_time": 1566307301455, "_last_modified_user": "admin", "_last_modified_time": 1566307301455, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

policy_ni

Additional Errors: