Avi NatPolicy Object API

CLI ``` - configure natpolicy - show natpolicy ```
More information: https://avinetworks.com/contact-us
Contact Info: support@avinetworks.com
Version: 21.1.6
BasePath:/api
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. HTTP Basic Authentication

Methods

[ Jump to Models ]

Table of Contents

  1. get /natpolicy
  2. post /natpolicy
  3. delete /natpolicy/{uuid}
  4. get /natpolicy/{uuid}
  5. patch /natpolicy/{uuid}
  6. put /natpolicy/{uuid}
Up
get /natpolicy
(natpolicyGet)

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name
refers_to (optional)
Query Parameter — Filter to request all objects that refers to another Avi resource. Its syntax is refers_to=<obj_type>:<obj_uuid>. Eg. get all virtual services referring to pool p1 will be refers_to=pool:pool_p1_uuid
referred_by (optional)
Query Parameter — Filter to request all objects that are referred by another Avi resource. Its syntax is referred_by=<obj_type>:<obj_uuid>. Eg. get all pools referred_by virtual service vs1 - referred_by=virtualservice:vs_vs1_uuid
fields (optional)
Query Parameter — List of fields to be returned for the resource. Some fields like name, URL, uuid etc. are always returned.
include_name (optional)
Query Parameter — All the Avi REST reference URIs have a name suffix as URI#name. It is useful to get the referenced resource name without performing get on that object.
skip_default (optional)
Query Parameter — Default values are not set.
join_subresources (optional)
Query Parameter — It automatically returns additional dependent resources like runtime. Eg. join_subresources=runtime.

Return type

NatPolicyApiResponse

Example data

Content-Type: application/json
{
  "next" : "aeiou",
  "count" : 123,
  "results" : [ {
    "tenant_ref" : "aeiou",
    "name" : "aeiou",
    "configpb_attributes" : {
      "version" : 123
    },
    "description" : "aeiou",
    "rules" : [ {
      "enable" : true,
      "match" : {
        "destination_ip" : {
          "group_refs" : [ "aeiou" ],
          "match_criteria" : "aeiou",
          "prefixes" : [ {
            "ip_addr" : "",
            "mask" : 123
          } ],
          "ranges" : [ "" ],
          "addrs" : [ "" ]
        },
        "services" : {
          "protocol" : {
            "match_criteria" : "aeiou",
            "protocol" : "aeiou"
          },
          "destination_port" : {
            "match_criteria" : "aeiou",
            "ports" : [ "" ]
          },
          "source_port" : ""
        },
        "source_ip" : ""
      },
      "name" : "aeiou",
      "action" : {
        "nat_info" : [ {
          "nat_ip" : {
            "addr" : "aeiou",
            "type" : "aeiou"
          },
          "nat_ip_range" : {
            "end" : "",
            "begin" : ""
          }
        } ],
        "type" : "aeiou"
      },
      "index" : 123,
      "created_by" : "aeiou"
    } ],
    "markers" : [ {
      "values" : [ "aeiou" ],
      "key" : "aeiou"
    } ],
    "created_by" : "aeiou",
    "uuid" : "aeiou",
    "url" : "aeiou",
    "_last_modified" : "aeiou",
    "labels" : [ {
      "value" : "aeiou",
      "key" : "aeiou"
    } ]
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK NatPolicyApiResponse

401

log in failed

Up
post /natpolicy
(natpolicyPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — NatPolicy object creation

Return type

NatPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "configpb_attributes" : {
    "version" : 123
  },
  "description" : "aeiou",
  "rules" : [ {
    "enable" : true,
    "match" : {
      "destination_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ "" ],
        "addrs" : [ "" ]
      },
      "services" : {
        "protocol" : {
          "match_criteria" : "aeiou",
          "protocol" : "aeiou"
        },
        "destination_port" : {
          "match_criteria" : "aeiou",
          "ports" : [ "" ]
        },
        "source_port" : ""
      },
      "source_ip" : ""
    },
    "name" : "aeiou",
    "action" : {
      "nat_info" : [ {
        "nat_ip" : {
          "addr" : "aeiou",
          "type" : "aeiou"
        },
        "nat_ip_range" : {
          "end" : "",
          "begin" : ""
        }
      } ],
      "type" : "aeiou"
    },
    "index" : 123,
    "created_by" : "aeiou"
  } ],
  "markers" : [ {
    "values" : [ "aeiou" ],
    "key" : "aeiou"
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou",
  "_last_modified" : "aeiou",
  "labels" : [ {
    "value" : "aeiou",
    "key" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK NatPolicy

401

log in failed

Up
delete /natpolicy/{uuid}
(natpolicyUuidDelete)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

204

object deleted String

404

not found

Up
get /natpolicy/{uuid}
(natpolicyUuidGet)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name
fields (optional)
Query Parameter — List of fields to be returned for the resource. Some fields like name, URL, uuid etc. are always returned.
include_name (optional)
Query Parameter — All the Avi REST reference URIs have a name suffix as URI#name. It is useful to get the referenced resource name without performing get on that object.
skip_default (optional)
Query Parameter — Default values are not set.
join_subresources (optional)
Query Parameter — It automatically returns additional dependent resources like runtime. Eg. join_subresources=runtime.

Return type

NatPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "configpb_attributes" : {
    "version" : 123
  },
  "description" : "aeiou",
  "rules" : [ {
    "enable" : true,
    "match" : {
      "destination_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ "" ],
        "addrs" : [ "" ]
      },
      "services" : {
        "protocol" : {
          "match_criteria" : "aeiou",
          "protocol" : "aeiou"
        },
        "destination_port" : {
          "match_criteria" : "aeiou",
          "ports" : [ "" ]
        },
        "source_port" : ""
      },
      "source_ip" : ""
    },
    "name" : "aeiou",
    "action" : {
      "nat_info" : [ {
        "nat_ip" : {
          "addr" : "aeiou",
          "type" : "aeiou"
        },
        "nat_ip_range" : {
          "end" : "",
          "begin" : ""
        }
      } ],
      "type" : "aeiou"
    },
    "index" : 123,
    "created_by" : "aeiou"
  } ],
  "markers" : [ {
    "values" : [ "aeiou" ],
    "key" : "aeiou"
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou",
  "_last_modified" : "aeiou",
  "labels" : [ {
    "value" : "aeiou",
    "key" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK NatPolicy

401

log in failed

Up
patch /natpolicy/{uuid}
(natpolicyUuidPatch)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — NatPolicy object creation

Query parameters

name (optional)
Query Parameter — object name

Return type

NatPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "configpb_attributes" : {
    "version" : 123
  },
  "description" : "aeiou",
  "rules" : [ {
    "enable" : true,
    "match" : {
      "destination_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ "" ],
        "addrs" : [ "" ]
      },
      "services" : {
        "protocol" : {
          "match_criteria" : "aeiou",
          "protocol" : "aeiou"
        },
        "destination_port" : {
          "match_criteria" : "aeiou",
          "ports" : [ "" ]
        },
        "source_port" : ""
      },
      "source_ip" : ""
    },
    "name" : "aeiou",
    "action" : {
      "nat_info" : [ {
        "nat_ip" : {
          "addr" : "aeiou",
          "type" : "aeiou"
        },
        "nat_ip_range" : {
          "end" : "",
          "begin" : ""
        }
      } ],
      "type" : "aeiou"
    },
    "index" : 123,
    "created_by" : "aeiou"
  } ],
  "markers" : [ {
    "values" : [ "aeiou" ],
    "key" : "aeiou"
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou",
  "_last_modified" : "aeiou",
  "labels" : [ {
    "value" : "aeiou",
    "key" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK NatPolicy

401

log in failed

Up
put /natpolicy/{uuid}
(natpolicyUuidPut)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — NatPolicy object creation

Query parameters

name (optional)
Query Parameter — object name

Return type

NatPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "configpb_attributes" : {
    "version" : 123
  },
  "description" : "aeiou",
  "rules" : [ {
    "enable" : true,
    "match" : {
      "destination_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ "" ],
        "addrs" : [ "" ]
      },
      "services" : {
        "protocol" : {
          "match_criteria" : "aeiou",
          "protocol" : "aeiou"
        },
        "destination_port" : {
          "match_criteria" : "aeiou",
          "ports" : [ "" ]
        },
        "source_port" : ""
      },
      "source_ip" : ""
    },
    "name" : "aeiou",
    "action" : {
      "nat_info" : [ {
        "nat_ip" : {
          "addr" : "aeiou",
          "type" : "aeiou"
        },
        "nat_ip_range" : {
          "end" : "",
          "begin" : ""
        }
      } ],
      "type" : "aeiou"
    },
    "index" : 123,
    "created_by" : "aeiou"
  } ],
  "markers" : [ {
    "values" : [ "aeiou" ],
    "key" : "aeiou"
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou",
  "_last_modified" : "aeiou",
  "labels" : [ {
    "value" : "aeiou",
    "key" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK NatPolicy

401

log in failed

Up

Models

[ Jump to Methods ]

Table of Contents

  1. ConfigPbAttributes
  2. IpAddr
  3. IpAddrMatch
  4. IpAddrPrefix
  5. IpAddrRange
  6. KeyValue
  7. L4RuleProtocolMatch
  8. NatAddrInfo
  9. NatMatchTarget
  10. NatPolicy
  11. NatPolicyAction
  12. NatPolicyApiResponse
  13. NatRule
  14. PortMatch
  15. RoleFilterMatchLabel
  16. ServiceMatch

ConfigPbAttributes Up

version (optional)
Integer Protobuf version number. Gets incremented if there is se Diff of federated diff in config pbs.This field will be a monotonically increasing number indicating the number of Config Update operations. Field introduced in 21.1.1. Allowed in Enterprise edition with any value, Essentials edition with any value, Basic edition with any value, Enterprise with Cloud Services edition. format: int32

IpAddr Up

addr
String IP address. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
type
String Enum options - V4, DNS, V6. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

IpAddrMatch Up

addrs (optional)
array[IpAddr] IP address(es). Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
group_refs (optional)
array[String] UUID of IP address group(s). It is a reference to an object of type IpAddrGroup. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
match_criteria
String Criterion to use for IP address matching the HTTP request. Enum options - IS_IN, IS_NOT_IN. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
prefixes (optional)
array[IpAddrPrefix] IP address prefix(es). Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
ranges (optional)
array[IpAddrRange] IP address range(s). Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

IpAddrPrefix Up

ip_addr
IpAddr Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
mask
Integer Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition. format: int32

IpAddrRange Up

begin
IpAddr Starting IP address of the range. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
end
IpAddr Ending IP address of the range. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

KeyValue Up

key
String Key. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
value (optional)
String Value. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

L4RuleProtocolMatch Up

match_criteria
String Criterion to use for transport protocol matching. Enum options - IS_IN, IS_NOT_IN. Field introduced in 17.2.7. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
protocol
String Transport protocol to match. Enum options - PROTOCOL_ICMP, PROTOCOL_TCP, PROTOCOL_UDP. Field introduced in 17.2.7. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

NatAddrInfo Up

nat_ip (optional)
IpAddr Nat IP address. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
nat_ip_range (optional)
IpAddrRange Nat IP address range. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

NatMatchTarget Up

destination_ip (optional)
IpAddrMatch Destination IP of the packet. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
services (optional)
ServiceMatch Services like port-matching and protocol. Field introduced in 18.2.5. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
source_ip (optional)
IpAddrMatch Source IP of the packet. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

NatPolicy Up

_last_modified (optional)
String UNIX time since epoch in microseconds. Units(MICROSECONDS).
configpb_attributes (optional)
ConfigPbAttributes Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed in Enterprise edition with any value, Essentials edition with any value, Basic edition with any value, Enterprise with Cloud Services edition.
created_by (optional)
String Creator name. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
description (optional)
String Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
labels (optional)
array[KeyValue] Key value pairs for granular object access control. Also allows for classification and tagging of similar objects. Field deprecated in 20.1.5. Field introduced in 20.1.2. Maximum of 4 items allowed. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.
markers (optional)
array[RoleFilterMatchLabel] List of labels to be used for granular RBAC. Field introduced in 20.1.5. Allowed in Enterprise edition with any value, Essentials edition with any value, Basic edition with any value, Enterprise with Cloud Services edition.
name (optional)
String Name of the Nat policy. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
rules (optional)
array[NatRule] Nat policy Rules. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
tenant_ref (optional)
String It is a reference to an object of type Tenant. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
url (optional)
String url
uuid (optional)
String UUID of the Nat policy. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

NatPolicyAction Up

nat_info (optional)
array[NatAddrInfo] Pool of IP Addresses used for Nat. Field introduced in 18.2.5. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
type
String Nat Action Type. Enum options - NAT_POLICY_ACTION_TYPE_DYNAMIC_IP_PORT. Field introduced in 18.2.5. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

NatPolicyApiResponse Up

count
Integer format: int32
results
next (optional)

NatRule Up

action
NatPolicyAction Nat rule Action Information. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
created_by (optional)
String Creator name. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
enable
Boolean Nat rule enable flag. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
index
Integer Nat rule Index. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition. format: int32
match
NatMatchTarget Nat rule Match Criteria. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
name
String Nat rule Name. Field introduced in 18.2.3. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

PortMatch Up

match_criteria
String Criterion to use for port matching the HTTP request. Enum options - IS_IN, IS_NOT_IN. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
ports (optional)
array[Integer] Listening TCP port(s). Allowed values are 1-65535. Minimum of 1 items required. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.

RoleFilterMatchLabel Up

key
String Key for filter match. Field introduced in 20.1.3. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.
values (optional)
array[String] Values for filter match. Multiple values will be evaluated as OR. Example key = value1 OR key = value2. Behavior for match is key = * if this field is empty. Field introduced in 20.1.3. Allowed in Enterprise edition with any value, Enterprise with Cloud Services edition.

ServiceMatch Up

destination_port (optional)
PortMatch Destination Port of the packet. Field introduced in 18.2.5. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
protocol (optional)
L4RuleProtocolMatch Protocol to match. Supported protocols are TCP, UDP and ICMP. Field introduced in 20.1.1. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.
source_port (optional)
PortMatch Source Port of the packet. Field introduced in 18.2.5. Allowed in Enterprise edition with any value, Essentials, Basic, Enterprise with Cloud Services edition.