openapi: 3.0.1 info: title: Nutanix Networking APIs description: "Manage networking configuration on Nutanix clusters, including AHV\ \ and advanced networking." version: 1.0.0 x-logo: altText: Networking Logo url: https://developers.nutanix.com/api/v1/namespaces/networking/images/networking-logo-img.svg x-repo-name: networking x-minimum-negotiation-version: v4.2 servers: - url: "https://{host}:{port}/api" security: - basicAuthScheme: [] - apiKeyAuthScheme: [] tags: - name: BgpSessions description: | BGP (Border Gateway Protocol) gateways automate the exchange of externally routable IP address/prefix (ERP), routes, and IP address/prefix sets of infrastructure routers. x-displayName: Bgp Sessions - name: BgpRoutes description: | In the intricate tapestry of networking protocols, the Border Gateway Protocol (BGP) stands as a beacon of intelligence and adaptability. BGP routes are managed through BGP sessions, and they can fall into one of three categories: received, received but ignored, or advertised. Each BGP route includes a destination and a nexthop IP address. x-displayName: Bgp Routes - name: ClusterCapabilities description: | Networking-related capabilities of a cluster returned as pairs of capability name and boolean value. For example SUPPORTS_SPAN_V2 is a capability that is returned as True or False. x-displayName: Cluster Capabilities - name: FloatingIps description: | Floating IP addresses are accessible from the Internet. A Floating IP address is associated with the private IP address of the virtual NIC of the VM. This association makes the VM accessible from the Internet. x-displayName: Floating Ips - name: Gateways description: | Network Gateway VMs are used to create VPN, VTEP, or BGP gateways to connect subnets using VPN connections, Layer2 subnet extensions over VPN or VTEP, or BGP sessions. x-displayName: Gateways - name: IPFIXExporters description: | The service that exports IPFIX messages of the operations and data associated with flows in AHV clusters. x-displayName: IPFIX Exporters - name: Layer2Stretches description: | Represents the operations involved in stretching of a Layer2 (L2) network between two racks in the same datacenter. x-displayName: Layer2 Stretches - name: LoadBalancerSessions description: | Load Balancer sessions belonging to a Virtual Private Cloud. x-displayName: Load Balancer Sessions - name: MacAddresses description: | MAC addresses and their Layer2 stretch properties include details about the remote VTEP (Virtual Tunnel Endpoint) gateway. x-displayName: Mac Addresses - name: NetworkControllers description: | A Network Controller provides advanced networking capabilities, manages and controls configuration, monitoring and optimization of network resources for Flow Virtual Networking VPCs and VLAN subnets. x-displayName: Network Controllers - name: NicProfiles description: | A NIC Profile is a configuration template that defines capabilities, such as SR-IOV or DP offload, which can be applied to host NICs. x-displayName: Nic Profiles - name: RemoteEntities description: | Represents info about remote subnets (VLAN IDs, etc), VPN connections (clusters, VPCs, etc), and VTEP gateways (VXLAN, etc). x-displayName: Remote Entities - name: Routes description: | Routes are associated with a route table and can be either active or inactive in the forwarding plane. Each route has a priority and must be categorized as dynamic, status, or local. Clients can only create, update, or delete static routes. Every route has a specified destination and nexthop. x-displayName: Routes - name: RouteTables description: | Represents the routing tables used and operations on them. These tables include VPC and cluster information. x-displayName: Route Tables - name: RoutingPolicies description: | The Network Controller uses policy based routing on VPC networks. A Routing Policy belongs to a VPC and is described by one or more match rules and actions. x-displayName: Routing Policies - name: Subnets description: | Network subnet configuration and usage status. x-displayName: Subnets - name: SubnetMigrations description: | Operations to migrate VLAN Basic subnets to VLAN Advanced subnets, or migrate vNICs from VLAN subnets to overlay subnets. x-displayName: Subnet Migrations - name: TrafficMirrors description: | Mirroring of traffic from a set of source ports to a set of destination ports. x-displayName: Traffic Mirrors - name: UplinkBonds description: | Uplink Bonds group host NICs to function as a singular entity. x-displayName: Uplink Bonds - name: VirtualSwitches description: | Virtual Switches manage multiple bridges and uplinks in Prism. A Virtual Switch defines a collection of AHV nodes and the uplink ports on each node. x-displayName: Virtual Switches - name: Vpcs description: | A Virtual Private Cloud (VPC) is an independent and isolated IP address space that functions as a logically isolated virtual network. x-displayName: Vpcs - name: VpcVirtualSwitchMappings description: | Describes the VPC Virtual Switch mappings traffic configuration. x-displayName: Vpc Virtual Switch Mappings - name: VpnConnections description: | VPN Connections are managed with create, update, delete, and get operations. The VPN Connection's received route priority is assigned to routes received on this VPN connection over eBGP. Routes with higher priority value take precedence in the VPC route table. The gateways are assigned either the acceptor or initiator role via the VPN Connection. IPSec, DPD, and QoS are also configured as part of the VPN Connection. x-displayName: Vpn Connections paths: /networking/v4.3/aws/config/subnets: get: tags: - AwsSubnets summary: Get NC2A subnets. description: Get list of NC2 AWS subnets. operationId: listAwsSubnets parameters: - name: X-Cluster-Id in: header description: Target cluster UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 75fdad80-07af-437e-8eea-cffdbafe70e9 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cidr example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$filter=cidr\ \ eq '10.192.0.0/24'" - name: vpcId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$filter=vpcId\ \ eq 'vpc-123abc678'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cidr example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$orderby=cidr" - name: subnetId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$orderby=subnetId" - name: vpcId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$orderby=vpcId" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: annotation example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=annotation" - name: availabilityZone example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=availabilityZone" - name: cidr example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=cidr" - name: cloudType example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=cloudType" - name: extId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=extId" - name: gatewayIp example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=gatewayIp" - name: links example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=links" - name: subnetId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=subnetId" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=tenantId" - name: vpcId example: "https://{host}:{port}/api/networking/v4.3/aws/config/subnets?$select=vpcId" responses: "200": description: List of NC2 AWS subnets. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 50 type: array items: $ref: '#/components/schemas/networking.v4.3.aws.config.AwsSubnet' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/subnets Get operation "4XX": description: 4XX error response from NC2 Networking API content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/subnets Get operation "5XX": description: 5XX error response from NC2 Networking API content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/subnets Get operation x-permissions: operationName: View NC2 AWS Subnets deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin x-rate-limit: - type: xsmall count: 10 timeUnit: minutes - type: small count: 10 timeUnit: minutes - type: large count: 10 timeUnit: minutes - type: xlarge count: 10 timeUnit: minutes x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.AwsSubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.AwsSubnets.ListAwsSubnetsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.aws.config.ListAwsSubnetsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ AwsSubnetsApi awsSubnetsApi = new AwsSubnetsApi(apiClient);\n\n \ \ \n int page = 0;\n \n int limit = 50;\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListAwsSubnetsApiResponse\ \ listAwsSubnetsApiResponse = awsSubnetsApi.listAwsSubnets(ListAwsSubnetsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listAwsSubnetsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, AwsSubnetsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let awsSubnetsApi = new AwsSubnetsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; awsSubnetsApi.listAwsSubnets(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ aws_subnets_api = ntnx_networking_py_client.AwsSubnetsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = aws_subnets_api.list_aws_subnets(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/awssubnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/aws/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n AwsSubnetsServiceApiInstance\ \ *api.AwsSubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ AwsSubnetsServiceApiInstance = api.NewAwsSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := awssubnets.ListAwsSubnetsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := AwsSubnetsServiceApiInstance.ListAwsSubnets(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.AwsSubnet)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/aws/config/subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: c9EC6d2f-ff97-eF8e-C9bb-bbBEADdccD80' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: 7ACdD5c8-D123-c4bD-492F-DAbb4fEacf2A' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/aws/config/subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Aws;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ AwsSubnetsApi awsSubnetsApi = new AwsSubnetsApi(client);\n\n int\ \ page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListAwsSubnetsRequest {\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Select = select\n };\n try {\n \ \ ListAwsSubnetsApiResponse listAwsSubnetsApiResponse = awsSubnetsApi.ListAwsSubnets(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/aws/config/vpcs: get: tags: - AwsVpcs summary: Get NC2A VPCs. description: Get the list of NC2 AWS VPCs associated with a Cluster. operationId: listAwsVpcs parameters: - name: X-Cluster-Id in: header description: Target cluster UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b35163fb-73d9-42fa-b822-a0757c0ed705 responses: "200": description: List of NC2 AWS VPCs. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 1 minItems: 1 type: array items: $ref: '#/components/schemas/networking.v4.3.aws.config.AwsVpc' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/vpcs Get operation "4XX": description: 4XX error response from NC2 Networking API content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/vpcs Get operation "5XX": description: 5XX error response from NC2 Networking API content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/vpcs Get operation x-permissions: operationName: View NC2 AWS VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin x-rate-limit: - type: xsmall count: 10 timeUnit: minutes - type: small count: 10 timeUnit: minutes - type: large count: 10 timeUnit: minutes - type: xlarge count: 10 timeUnit: minutes x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.AwsVpcsApi; import com.nutanix.dp1.networking.networking.v4.request.AwsVpcs.ListAwsVpcsRequest; import com.nutanix.dp1.networking.networking.v4.aws.config.ListAwsVpcsApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. AwsVpcsApi awsVpcsApi = new AwsVpcsApi(apiClient); try { // Pass in parameters using the request builder object associated with the operation. ListAwsVpcsApiResponse listAwsVpcsApiResponse = awsVpcsApi.listAwsVpcs(ListAwsVpcsRequest.builder() .build()); System.out.println(listAwsVpcsApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, AwsVpcsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let awsVpcsApi = new AwsVpcsApi(apiClientInstance); function sample() { awsVpcsApi.listAwsVpcs().then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) aws_vpcs_api = ntnx_networking_py_client.AwsVpcsApi(api_client=client) try: api_response = aws_vpcs_api.list_aws_vpcs() print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/awsvpcs" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/aws/config" ) var ( ApiClientInstance *client.ApiClient AwsVpcsServiceApiInstance *api.AwsVpcsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. AwsVpcsServiceApiInstance = api.NewAwsVpcsServiceApi(ApiClientInstance) ctx := context.Background() request := awsvpcs.ListAwsVpcsRequest{ } response, error := AwsVpcsServiceApiInstance.ListAwsVpcs(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().([]import1.AwsVpc) fmt.Println(data) } - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/aws/config/vpcs" \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: AC9c7FBC-AEdE-8DDc-bFd9-39B1BcdC64cC' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: B032faa4-f77f-E9D5-Ca5D-5F8be9dE346D' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/aws/config/vpcs" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Aws;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ AwsVpcsApi awsVpcsApi = new AwsVpcsApi(client);\n\n\n try {\n\ \ ListAwsVpcsApiResponse listAwsVpcsApiResponse = awsVpcsApi.ListAwsVpcs();\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes: get: tags: - BgpRoutes summary: Lists routes of the specified BGP session description: Lists read-only routes of the specified BGP session. operationId: listRoutesByBgpSessionId parameters: - name: bgpSessionExtId in: path description: Reference for the BGP session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: bgpRouteType example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=bgpRouteType\ \ eq Networking.Config.BgpRouteType'ADVERTISED'" - name: bgpSessionReference example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=bgpSessionReference\ \ eq '87ad5d63-2dd6-492b-a11e-efcfb70dd0ec'" - name: destination example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=destination/ipv4/prefixLength\ \ eq 24" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=name\ \ eq 'route1'" - name: nexthop/nexthopName example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=nexthop/nexthopName\ \ eq 'string'" - name: nexthop/nexthopReference example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=nexthop/nexthopReference\ \ eq '61837fa5-e160-427f-9fe1-f1dec94a2bcd'" - name: nexthop/nexthopType example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$filter=nexthop/nexthopType\ \ eq Networking.Config.NexthopType'IP_ADDRESS'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: bgpRouteType example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$orderby=bgpRouteType" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes?$orderby=name" responses: "200": description: Returns a list of read-only routes of the specified BGP session. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.BgpRoute' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes\ \ Get operation" x-permissions: operationName: View Bgp Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpRoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpRoutes.ListRoutesByBgpSessionIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListBgpRoutesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpRoutesApi bgpRoutesApi = new BgpRoutesApi(apiClient);\n\n \ \ \n String bgpSessionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListBgpRoutesApiResponse\ \ listBgpRoutesApiResponse = bgpRoutesApi.listRoutesByBgpSessionId(ListRoutesByBgpSessionIdRequest.builder()\n\ \ .bgpSessionExtId(bgpSessionExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listBgpRoutesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BgpRoutesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let bgpRoutesApi = new BgpRoutesApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let bgpSessionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n bgpRoutesApi.listRoutesByBgpSessionId(bgpSessionExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_routes_api = ntnx_networking_py_client.BgpRoutesApi(api_client=client)\n\ \ \n bgp_session_ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = bgp_routes_api.list_routes_by_bgp_session_id(bgpSessionExtId=bgp_session_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgproutes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpRoutesServiceApiInstance\ \ *api.BgpRoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpRoutesServiceApiInstance = api.NewBgpRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n bgpSessionExtId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := bgproutes.ListRoutesByBgpSessionIdRequest{\ \ BgpSessionExtId: &bgpSessionExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := BgpRoutesServiceApiInstance.ListRoutesByBgpSessionId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.BgpRoute)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions/7f66e20f-67f4-473f-96bb-c4fcfd487f16/bgp-routes?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/bgp-sessions/7f66e20f-67f4-473f-96bb-c4fcfd487f16/bgp-routes?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpRoutesApi bgpRoutesApi = new BgpRoutesApi(client);\n\n String\ \ bgpSessionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n int\ \ page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRoutesByBgpSessionIdRequest\ \ {\n BgpSessionExtId = bgpSessionExtId,\n Page =\ \ page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby\n };\n try {\n ListBgpRoutesApiResponse\ \ listBgpRoutesApiResponse = bgpRoutesApi.ListRoutesByBgpSessionId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes/{extId}: get: tags: - BgpRoutes summary: Get the specified route of the specified BGP session description: Get the specified read-only route of the specified BGP session. operationId: getRouteForBgpSessionById parameters: - name: extId in: path description: Reference for the route. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: bgpSessionExtId in: path description: Reference for the BGP session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b responses: "200": description: Returns the specified read-only route of the specified BGP session. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.BgpRoute' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes/{extId}\ \ Get operation" x-permissions: operationName: View Bgp Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpRoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpRoutes.GetRouteForBgpSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetBgpRouteApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpRoutesApi bgpRoutesApi = new BgpRoutesApi(apiClient);\n\n \ \ \n String extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n\ \ \n String bgpSessionExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetBgpRouteApiResponse\ \ getBgpRouteApiResponse = bgpRoutesApi.getRouteForBgpSessionById(GetRouteForBgpSessionByIdRequest.builder()\n\ \ .extId(extId)\n .bgpSessionExtId(bgpSessionExtId)\n\ \ .build());\n\n System.out.println(getBgpRouteApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BgpRoutesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let bgpRoutesApi = new BgpRoutesApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n\ \ \n let bgpSessionExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n\n\n\n\n bgpRoutesApi.getRouteForBgpSessionById(extId, bgpSessionExtId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_routes_api = ntnx_networking_py_client.BgpRoutesApi(api_client=client)\n\ \ \n ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\n \n \ \ bgp_session_ext_id = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\n\n \ \ try:\n api_response = bgp_routes_api.get_route_for_bgp_session_by_id(extId=ext_id,\ \ bgpSessionExtId=bgp_session_ext_id)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgproutes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpRoutesServiceApiInstance\ \ *api.BgpRoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpRoutesServiceApiInstance = api.NewBgpRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n bgpSessionExtId := \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\ \n\n request := bgproutes.GetRouteForBgpSessionByIdRequest{ ExtId: &extId,\ \ BgpSessionExtId: &bgpSessionExtId }\n response, error := BgpRoutesServiceApiInstance.GetRouteForBgpSessionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.BgpRoute)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/bgp-routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/bgp-sessions/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/bgp-routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpRoutesApi bgpRoutesApi = new BgpRoutesApi(client);\n\n String\ \ extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n String bgpSessionExtId\ \ = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\";\n\n // Create request\ \ object with parameters\n var request = new GetRouteForBgpSessionByIdRequest\ \ {\n ExtId = extId,\n BgpSessionExtId = bgpSessionExtId\n\ \ };\n try {\n GetBgpRouteApiResponse getBgpRouteApiResponse\ \ = bgpRoutesApi.GetRouteForBgpSessionById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/bgp-sessions: get: tags: - BgpSessions summary: List BGP sessions request. description: List BGP sessions request. operationId: listBgpSessions parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: advertisedRoutesCommunities/autonomousSystemNumber example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=advertisedRoutesCommunities/any(a:a/autonomousSystemNumber\ \ eq 45035)" - name: advertisedRoutesCommunities/communityValue example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=advertisedRoutesCommunities/any(a:a/communityValue\ \ eq 45035)" - name: dynamicRoutePriority example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=dynamicRoutePriority\ \ eq 450" - name: localGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=localGatewayReference\ \ eq '2e300195-ea08-4d83-a094-7d88e4816439'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=name\ \ eq 'session-3'" - name: remoteGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$filter=remoteGatewayReference\ \ eq '3374324f-a05e-42e8-ac29-298997fd07c3'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: dynamicRoutePriority example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$orderby=dynamicRoutePriority" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$orderby=name" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: localGateway example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$expand=localGateway" - name: remoteGateway example: "https://{host}:{port}/api/networking/v4.3/config/bgp-sessions?$expand=remoteGateway" responses: "200": description: List BGP sessions response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.BgpSession' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/bgp-sessions Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/bgp-sessions Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/bgp-sessions Get operation x-permissions: operationName: View Bgp Session deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 3 timeUnit: seconds - type: xlarge count: 3 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpSessionsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpSessions.ListBgpSessionsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListBgpSessionsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListBgpSessionsApiResponse\ \ listBgpSessionsApiResponse = bgpSessionsApi.listBgpSessions(ListBgpSessionsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .build());\n\n System.out.println(listBgpSessionsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, BgpSessionsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let bgpSessionsApi = new BgpSessionsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; bgpSessionsApi.listBgpSessions(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_sessions_api = ntnx_networking_py_client.BgpSessionsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = bgp_sessions_api.list_bgp_sessions(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgpsessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpSessionsServiceApiInstance\ \ *api.BgpSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpSessionsServiceApiInstance = api.NewBgpSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := bgpsessions.ListBgpSessionsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil }\n response,\ \ error := BgpSessionsServiceApiInstance.ListBgpSessions(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.BgpSession)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/bgp-sessions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListBgpSessionsRequest {\n Page =\ \ page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Expand = expand\n };\n \ \ try {\n ListBgpSessionsApiResponse listBgpSessionsApiResponse\ \ = bgpSessionsApi.ListBgpSessions(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - BgpSessions summary: Create BGP session. description: Create BGP session. operationId: createBgpSession parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 24d3d8dc-fa07-4f87-a136-a13b43a944b9 requestBody: description: Create BGP session request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.BgpSession' required: true responses: "202": description: Create BGP session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Bgp Session deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.BgpSessionsApi; import com.nutanix.dp1.networking.networking.v4.request.BgpSessions.CreateBgpSessionRequest; import com.nutanix.dp1.networking.networking.v4.config.BgpSession; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(apiClient); BgpSession bgpSession = new BgpSession(); // BgpSession object initializations here... bgpSession.setLocalGatewayReference("31bCAEcD-4bCF-aAe4-f1cc-A7c54EeE5bB1"); // required field bgpSession.setName("session-3"); // required field bgpSession.setRemoteGatewayReference("9c27bfBB-F34e-D36E-FCFA-CEe6eFE967a1"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = bgpSessionsApi.createBgpSession(CreateBgpSessionRequest.builder() .build(), bgpSession); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, BgpSessionsApi, BgpSession } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let bgpSessionsApi = new BgpSessionsApi(apiClientInstance); function sample() { let bgpSession = new BgpSession(); // BgpSession object initializations here... bgpSession.setLocalGatewayReference("7cEBFaFc-7C06-fa8d-6Dc5-f55C3dfFa48A"); // required field bgpSession.setName("session-3"); // required field bgpSession.setRemoteGatewayReference("b07f261E-cA90-a8A1-b14f-E881FEBAAEbB"); // required field bgpSession = JSON.stringify(bgpSession); bgpSessionsApi.createBgpSession(bgpSession).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) bgp_sessions_api = ntnx_networking_py_client.BgpSessionsApi(api_client=client) bgpSession = ntnx_networking_py_client.BgpSession() # BgpSession object initializations here... bgpSession.local_gateway_reference = "5a3D2DEC-Aabe-fAbA-CC2f-3FcebE0C8ce7" # required field bgpSession.name = "session-3" # required field bgpSession.remote_gateway_reference = "adcdce04-Ead8-fC8B-bF20-fC5C80C03eE0" # required field try: api_response = bgp_sessions_api.create_bgp_session(body=bgpSession) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgpsessions" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient BgpSessionsServiceApiInstance *api.BgpSessionsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. BgpSessionsServiceApiInstance = api.NewBgpSessionsServiceApi(ApiClientInstance) ctx := context.Background() bgpSession := import1.NewBgpSession() // BgpSession object initializations here... request := bgpsessions.CreateBgpSessionRequest{ Body: bgpSession } response, error := BgpSessionsServiceApiInstance.CreateBgpSession(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"session-3","description":"BGPsessiondescription","localGatewayReference":"string","remoteGatewayReference":"string","localGatewayInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"password":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"localGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"remoteGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"shouldAdvertiseAllExternallyRoutablePrefixes":true,"externallyRoutablePrefixesToAdvertise":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"prependedAutonomousSystemPath":[45035],"advertisedRoutesCommunities":[{"$objectType":"networking.v4.config.BgpCommunity"}],"$objectType":"networking.v4.config.BgpSession"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"session-3","description":"BGPsessiondescription","localGatewayReference":"string","remoteGatewayReference":"string","localGatewayInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"password":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"localGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"remoteGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"shouldAdvertiseAllExternallyRoutablePrefixes":true,"externallyRoutablePrefixesToAdvertise":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"prependedAutonomousSystemPath":[45035],"advertisedRoutesCommunities":[{"$objectType":"networking.v4.config.BgpCommunity"}],"$objectType":"networking.v4.config.BgpSession"} \ - "https://host:port/api/networking/v4.3/config/bgp-sessions" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(client);\n\n \ \ BgpSession bgpSession = new BgpSession();\n\n // BgpSession object\ \ initializations here...\n bgpSession.LocalGatewayReference = \"0eeCC6Da-bfD0-bB81-63fD-b2Dce7FEBaCc\"\ ; // required field\n bgpSession.Name = \"session-3\"; // required\ \ field\n bgpSession.RemoteGatewayReference = \"997eBcd6-CF47-4dd6-3Ee0-C3Bed8FbfcA6\"\ ; // required field\n\n\n // Create request object with parameters\n\ \ var request = new CreateBgpSessionRequest {\n Body =\ \ bgpSession\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = bgpSessionsApi.CreateBgpSession(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/bgp-sessions/{extId}: get: tags: - BgpSessions summary: Get BGP session request. description: "Get BGP session for the specified {extId}." operationId: getBgpSessionById parameters: - name: extId in: path description: BGP session UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b582da2f-2ffa-45a7-a224-ba4b76c0087f responses: "200": description: Get BGP session response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.BgpSession' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{extId}\ \ Get operation" x-permissions: operationName: View Bgp Session deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 3 timeUnit: seconds - type: xlarge count: 3 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpSessionsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpSessions.GetBgpSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetBgpSessionApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(apiClient);\n\n\ \ \n String extId = \"fBa2FC7b-cD9a-DCda-44DC-BA8E35Deb34f\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetBgpSessionApiResponse\ \ getBgpSessionApiResponse = bgpSessionsApi.getBgpSessionById(GetBgpSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getBgpSessionApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BgpSessionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let bgpSessionsApi = new BgpSessionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"faD3A3Be-AFdb-ebE3-CD75-2EC2d4c244a9\"\ ;\n\n\n\n\n\n bgpSessionsApi.getBgpSessionById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_sessions_api = ntnx_networking_py_client.BgpSessionsApi(api_client=client)\n\ \ \n ext_id = \"2Afeacbd-aE68-dD67-bdfE-D9AaceF1f7Ac\"\n\n\n try:\n\ \ api_response = bgp_sessions_api.get_bgp_session_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgpsessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpSessionsServiceApiInstance\ \ *api.BgpSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpSessionsServiceApiInstance = api.NewBgpSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"Da239fb9-eAc0-Dbde-Eae3-Ed1aa3De386D\"\ \n\n\n request := bgpsessions.GetBgpSessionByIdRequest{ ExtId: &extId\ \ }\n response, error := BgpSessionsServiceApiInstance.GetBgpSessionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.BgpSession)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions/c5F550CE-0F51-aDb1-00Ab-Fcd5Fcb2eaCf" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/bgp-sessions/FdEcEbe2-c323-05FB-db7B-dB9e0b17d3C8" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(client);\n\n \ \ String extId = \"d4AecEE5-FD0e-2Ee2-eE5C-ECCCBE94EbA2\";\n\n \ \ // Create request object with parameters\n var request = new GetBgpSessionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetBgpSessionApiResponse\ \ getBgpSessionApiResponse = bgpSessionsApi.GetBgpSessionById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - BgpSessions summary: Update BGP session request. description: "Update BGP session for the specified {extId}." operationId: updateBgpSessionById parameters: - name: extId in: path description: BGP session UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a0fbff8b-dfdd-4fb4-aa4a-cb621bca8efe - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: ff1d81c9-614e-43ee-8121-d282f5bc845d requestBody: description: Update BGP session request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.BgpSession' required: true responses: "202": description: Update BGP session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Bgp Session deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpSessionsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpSessions.UpdateBgpSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.BgpSessions.GetBgpSessionByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.BgpSession;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetBgpSessionApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(apiClient);\n\n\ \ BgpSession bgpSession = new BgpSession();\n\n // BgpSession\ \ object initializations here...\n bgpSession.setLocalGatewayReference(\"\ EBF043fF-Aee1-C9a8-fFBD-4c8dDdEe0Bc0\"); // required field\n bgpSession.setName(\"\ session-3\"); // required field\n bgpSession.setRemoteGatewayReference(\"\ FFf05fce-A71F-CBA3-1490-9ADF5F30d4fa\"); // required field\n \n\ \ String extId = \"F9DAF79b-DBcf-FFaE-B04D-F056Cb9AcaeB\";\n\n \ \ // perform GET call\n GetBgpSessionApiResponse getResponse\ \ = null;\n try {\n getResponse = bgpSessionsApi.getBgpSessionById(GetBgpSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = bgpSessionsApi.updateBgpSessionById(UpdateBgpSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build(), bgpSession, opts);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BgpSessionsApi, BgpSession, GetBgpSessionApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let bgpSessionsApi = new BgpSessionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let bgpSession = new BgpSession();\n\n // BgpSession\ \ object initializations here...\n bgpSession.setLocalGatewayReference(\"\ aaA5Cba6-AC74-EBA6-C925-FF6751B25cC2\"); // required field\n bgpSession.setName(\"\ session-3\"); // required field\n bgpSession.setRemoteGatewayReference(\"\ 4dE2B9fE-C0F4-2ff7-Ed4E-35C6afDA8cab\"); // required field\n bgpSession\ \ = JSON.stringify(bgpSession);\n\n \n let extId = \"FCb480Cb-588E-fCB5-748a-Bbec9beC2A8A\"\ ;\n\n\n // Perform Get call\n bgpSessionsApi.getBgpSessionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n bgpSessionsApi.updateBgpSessionById(extId, bgpSession,\ \ args).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_sessions_api = ntnx_networking_py_client.BgpSessionsApi(api_client=client)\n\ \ bgpSession = ntnx_networking_py_client.BgpSession()\n\n # BgpSession\ \ object initializations here...\n bgpSession.local_gateway_reference\ \ = \"f6f32Ed7-f46e-CdFD-FD6B-Ff3b0D38B28E\" # required field\n bgpSession.name\ \ = \"session-3\" # required field\n bgpSession.remote_gateway_reference\ \ = \"Ef2eccb6-4d7a-FCC3-03f4-fca532F0aEce\" # required field\n \n \ \ ext_id = \"CA0aCCf9-aEaA-BAbF-B9dc-B3ce1B4aBaB3\"\n\n try:\n \ \ api_response = bgp_sessions_api.get_bgp_session_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = bgp_sessions_api.update_bgp_session_by_id(extId=ext_id,\ \ body=bgpSession, if_match=etag_value)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgpsessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpSessionsServiceApiInstance\ \ *api.BgpSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpSessionsServiceApiInstance = api.NewBgpSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n bgpSession := import1.NewBgpSession()\n\ \n // BgpSession object initializations here...\n\n \n extId :=\ \ \"5EEA6f4A-B5Bd-1Cd9-e9D0-Be1aAdcaBfBe\"\n\n getRequest := bgpsessions.GetBgpSessionByIdRequest{\ \ extId: &extId }\n getResponse, err := BgpSessionsServiceApiInstance.GetBgpSessionById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := bgpsessions.UpdateBgpSessionByIdRequest{ ExtId: &extId,\ \ Body: bgpSession }\n response, error := BgpSessionsServiceApiInstance.UpdateBgpSessionById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions/fCDaD03e-cdD5-6Bf9-6A1c-5AFab368d22e" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"session-3","description":"BGPsessiondescription","localGatewayReference":"string","remoteGatewayReference":"string","localGatewayInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"password":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"localGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"remoteGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"shouldAdvertiseAllExternallyRoutablePrefixes":true,"externallyRoutablePrefixesToAdvertise":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"prependedAutonomousSystemPath":[45035],"advertisedRoutesCommunities":[{"$objectType":"networking.v4.config.BgpCommunity"}],"$objectType":"networking.v4.config.BgpSession"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"session-3","description":"BGPsessiondescription","localGatewayReference":"string","remoteGatewayReference":"string","localGatewayInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"password":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"localGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"remoteGateway":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"},"shouldAdvertiseAllExternallyRoutablePrefixes":true,"externallyRoutablePrefixesToAdvertise":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"prependedAutonomousSystemPath":[45035],"advertisedRoutesCommunities":[{"$objectType":"networking.v4.config.BgpCommunity"}],"$objectType":"networking.v4.config.BgpSession"} \ - "https://host:port/api/networking/v4.3/config/bgp-sessions/ed3fBfD3-3ddb-8983-a942-cE9B5Be1C0e5" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(client);\n\n \ \ BgpSession bgpSession = new BgpSession();\n\n // BgpSession object\ \ initializations here...\n bgpSession.LocalGatewayReference = \"AE1CeCec-6dC1-cC59-86CC-Ef70fC34A6fd\"\ ; // required field\n bgpSession.Name = \"session-3\"; // required\ \ field\n bgpSession.RemoteGatewayReference = \"095008Eb-AACA-BBeD-DEb7-FbA3dEda096F\"\ ; // required field\n\n String extId = \"8B2cCFee-8DbA-CB5b-AF9b-58DE4bBABe5D\"\ ;\n\n // perform GET call\n var getRequest = new GetBgpSessionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetBgpSessionApiResponse\ \ getResponse = bgpSessionsApi.GetBgpSessionById(getRequest);\n }\ \ catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateBgpSessionByIdRequest {\n ExtId = extId,\n\ \ Body = bgpSession,\n \n \n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = bgpSessionsApi.UpdateBgpSessionById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - BgpSessions summary: Delete BGP session request. description: "Delete BGP session for the specified {extId}." operationId: deleteBgpSessionById parameters: - name: extId in: path description: BGP session UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a32dcbaf-5556-48e1-b223-5c6e30f31430 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 47247852-4a26-4e59-b5d1-a9dd952609ff responses: "202": description: Delete BGP session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Bgp Session deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.BgpSessionsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.BgpSessions.DeleteBgpSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(apiClient);\n\n\ \ \n String extId = \"1fffaFc6-Ad4F-B21b-bdc8-beeEFF3a1aF6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = bgpSessionsApi.deleteBgpSessionById(DeleteBgpSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BgpSessionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let bgpSessionsApi = new BgpSessionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"Ec1eac3A-a9De-B77A-1D9f-4cDc3FdB5Bda\"\ ;\n\n\n\n\n\n bgpSessionsApi.deleteBgpSessionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ bgp_sessions_api = ntnx_networking_py_client.BgpSessionsApi(api_client=client)\n\ \ \n ext_id = \"9ED8AEBF-0DCa-Eef4-Aeb3-64Bbca7FDBF3\"\n\n\n try:\n\ \ api_response = bgp_sessions_api.delete_bgp_session_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bgpsessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BgpSessionsServiceApiInstance\ \ *api.BgpSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ BgpSessionsServiceApiInstance = api.NewBgpSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"cD3f3BbB-e0F9-7Db8-FE2E-Bc740E6edbA2\"\ \n\n\n request := bgpsessions.DeleteBgpSessionByIdRequest{ ExtId: &extId\ \ }\n response, error := BgpSessionsServiceApiInstance.DeleteBgpSessionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/bgp-sessions/e0fBE9Df-ae6C-fFDc-1bad-aDCdbca2f07C" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/bgp-sessions/54BFc2B1-fa7a-7DA9-2CE5-0BeBB58AFcC2" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BgpSessionsApi bgpSessionsApi = new BgpSessionsApi(client);\n\n \ \ String extId = \"a0bDA6eE-E3de-FB0A-Aa66-d7d2B50FFad9\";\n\n \ \ // Create request object with parameters\n var request = new DeleteBgpSessionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = bgpSessionsApi.DeleteBgpSessionById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/capabilities: get: tags: - ClusterCapabilities summary: Get cluster capabilities description: List the capabilities for one or more cluster UUIDs. operationId: listClusterCapabilities parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterId example: "https://{host}:{port}/api/networking/v4.3/config/capabilities?$filter=clusterId\ \ eq '5daf4647-161e-4961-a60f-234146423353'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterId example: "https://{host}:{port}/api/networking/v4.3/config/capabilities?$orderby=clusterId" responses: "200": description: List of all capabilities with cluster UUID as key. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.ClusterCapability' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/capabilities Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/capabilities Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/capabilities Get operation x-permissions: operationName: View Cluster Networking Capabilities deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.ClusterCapabilitiesApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.ClusterCapabilities.ListClusterCapabilitiesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListClusterCapabilitiesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ ClusterCapabilitiesApi clusterCapabilitiesApi = new ClusterCapabilitiesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListClusterCapabilitiesApiResponse\ \ listClusterCapabilitiesApiResponse = clusterCapabilitiesApi.listClusterCapabilities(ListClusterCapabilitiesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listClusterCapabilitiesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClusterCapabilitiesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let clusterCapabilitiesApi = new ClusterCapabilitiesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; clusterCapabilitiesApi.listClusterCapabilities(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ cluster_capabilities_api = ntnx_networking_py_client.ClusterCapabilitiesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = cluster_capabilities_api.list_cluster_capabilities(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/clustercapabilities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterCapabilitiesServiceApiInstance\ \ *api.ClusterCapabilitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ ClusterCapabilitiesServiceApiInstance = api.NewClusterCapabilitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := clustercapabilities.ListClusterCapabilitiesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := ClusterCapabilitiesServiceApiInstance.ListClusterCapabilities(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.ClusterCapability)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/capabilities?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/capabilities?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ ClusterCapabilitiesApi clusterCapabilitiesApi = new ClusterCapabilitiesApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListClusterCapabilitiesRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListClusterCapabilitiesApiResponse listClusterCapabilitiesApiResponse\ \ = clusterCapabilitiesApi.ListClusterCapabilities(request);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/floating-ips: get: tags: - FloatingIps summary: Get a list of floating IPs description: Get a list of floating IPs. operationId: listFloatingIps parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: association/VmNicAssociation/vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=isof($it/association,\ \ Networking.Config.VmNicAssociation) and association/vpcReference eq\ \ '3139f5a1-b217-4219-b69a-326f3f9cc741'" - name: associationStatus example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=associationStatus\ \ eq Networking.Config.AssociationStatus'NOT_ASSOCIATED'" - name: externalSubnetReference example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=externalSubnetReference\ \ eq '182a00ec-6894-4571-9ca0-ee1be77432f3'" - name: floatingIp/ipv4/value example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=floatingIp/ipv4/value\ \ eq '200.88.216.126'" - name: floatingIp/ipv6/value example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=floatingIp/ipv6/value\ \ eq '0ba4:eaeb:6ec9:eaaf:1620:733c:7320:0f0c'" - name: loadBalancerSessionReference example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=loadBalancerSessionReference\ \ eq '526e8538-f550-41b4-b31d-f6992da784a1'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=name\ \ eq 'floating-ip-1'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$filter=vpcReference\ \ eq '47f3bf2b-22bd-4777-bab7-2fe8aaedf07b'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: floatingIp/ipv4/value example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$orderby=floatingIp/ipv4/value" - name: floatingIp/ipv6/value example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$orderby=floatingIp/ipv6/value" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$orderby=name" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: externalSubnet example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$expand=externalSubnet" - name: vmNic example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$expand=vmNic" - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/floating-ips?$expand=vpc" responses: "200": description: List of floating IPs queried. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/floating-ips Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/floating-ips Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/floating-ips Get operation x-permissions: operationName: View Floating Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.FloatingIpsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.FloatingIps.ListFloatingIpsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListFloatingIpsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListFloatingIpsApiResponse\ \ listFloatingIpsApiResponse = floatingIpsApi.listFloatingIps(ListFloatingIpsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .build());\n\n System.out.println(listFloatingIpsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, FloatingIpsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let floatingIpsApi = new FloatingIpsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; floatingIpsApi.listFloatingIps(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ floating_ips_api = ntnx_networking_py_client.FloatingIpsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = floating_ips_api.list_floating_ips(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/floatingips\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n FloatingIpsServiceApiInstance\ \ *api.FloatingIpsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ FloatingIpsServiceApiInstance = api.NewFloatingIpsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := floatingips.ListFloatingIpsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil }\n response,\ \ error := FloatingIpsServiceApiInstance.ListFloatingIps(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.FloatingIp)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/floating-ips?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/floating-ips?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListFloatingIpsRequest {\n Page =\ \ page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Expand = expand\n };\n \ \ try {\n ListFloatingIpsApiResponse listFloatingIpsApiResponse\ \ = floatingIpsApi.ListFloatingIps(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - FloatingIps summary: Create a floating IP description: Configure a floating IP. operationId: createFloatingIp parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: eeb3a42b-b13c-43dc-9cb4-1a82339c32d4 requestBody: description: Task Id corresponding to the Create Floating IP operation. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' required: true responses: "202": description: Task Id corresponding to the Create Floating IP operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Floating Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.FloatingIpsApi; import com.nutanix.dp1.networking.networking.v4.request.FloatingIps.CreateFloatingIpRequest; import com.nutanix.dp1.networking.networking.v4.config.FloatingIp; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. FloatingIpsApi floatingIpsApi = new FloatingIpsApi(apiClient); FloatingIp floatingIp = new FloatingIp(); // FloatingIp object initializations here... floatingIp.setName("floating-ip-1"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = floatingIpsApi.createFloatingIp(CreateFloatingIpRequest.builder() .build(), floatingIp); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, FloatingIpsApi, FloatingIp } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let floatingIpsApi = new FloatingIpsApi(apiClientInstance); function sample() { let floatingIp = new FloatingIp(); // FloatingIp object initializations here... floatingIp.setName("floating-ip-1"); // required field floatingIp = JSON.stringify(floatingIp); floatingIpsApi.createFloatingIp(floatingIp).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) floating_ips_api = ntnx_networking_py_client.FloatingIpsApi(api_client=client) floatingIp = ntnx_networking_py_client.FloatingIp() # FloatingIp object initializations here... floatingIp.name = "floating-ip-1" # required field try: api_response = floating_ips_api.create_floating_ip(body=floatingIp) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/floatingips" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient FloatingIpsServiceApiInstance *api.FloatingIpsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. FloatingIpsServiceApiInstance = api.NewFloatingIpsServiceApi(ApiClientInstance) ctx := context.Background() floatingIp := import1.NewFloatingIp() // FloatingIp object initializations here... request := floatingips.CreateFloatingIpRequest{ Body: floatingIp } response, error := FloatingIpsServiceApiInstance.CreateFloatingIp(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/floating-ips" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"floating-ip-1","description":"FloatingIPforVM1","association":{"vmNicReference":"string","vpcReference":"string","privateIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VmNicAssociation"},"floatingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"networking.v4.config.FloatingIPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"networking.v4.config.FloatingIPv6Address"},"$objectType":"networking.v4.config.FloatingIPAddress"},"externalSubnetReference":"string","externalSubnet":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"},"privateIp":"string","floatingIpValue":"string","associationStatus":"$UNKNOWN","vpcReference":"string","vmNicReference":"string","loadBalancerSessionReference":"string","vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vmNic":{"privateIp":"string","$objectType":"networking.v4.config.VmNic"},"$objectType":"networking.v4.config.FloatingIp"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"floating-ip-1","description":"FloatingIPforVM1","association":{"vmNicReference":"string","vpcReference":"string","privateIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VmNicAssociation"},"floatingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"networking.v4.config.FloatingIPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"networking.v4.config.FloatingIPv6Address"},"$objectType":"networking.v4.config.FloatingIPAddress"},"externalSubnetReference":"string","externalSubnet":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"},"privateIp":"string","floatingIpValue":"string","associationStatus":"$UNKNOWN","vpcReference":"string","vmNicReference":"string","loadBalancerSessionReference":"string","vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vmNic":{"privateIp":"string","$objectType":"networking.v4.config.VmNic"},"$objectType":"networking.v4.config.FloatingIp"} \ - "https://host:port/api/networking/v4.3/config/floating-ips" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(client);\n\n \ \ FloatingIp floatingIp = new FloatingIp();\n\n // FloatingIp object\ \ initializations here...\n floatingIp.Name = \"floating-ip-1\"; //\ \ required field\n\n\n // Create request object with parameters\n\ \ var request = new CreateFloatingIpRequest {\n Body =\ \ floatingIp\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = floatingIpsApi.CreateFloatingIp(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/floating-ips/{extId}: get: tags: - FloatingIps summary: Get the floating IP for this extId description: Get the floating IP for the specific extId. operationId: getFloatingIpById parameters: - name: extId in: path description: ExtId of the floating IP. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6b798a47-d1af-4e57-b76b-fd1421fa83c1 responses: "200": description: Get the floating IP Response for the specific extId. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/floating-ips/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/floating-ips/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/floating-ips/{extId}\ \ Get operation" x-permissions: operationName: View Floating Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.FloatingIpsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.FloatingIps.GetFloatingIpByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetFloatingIpApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(apiClient);\n\n\ \ \n String extId = \"CCb66Dd2-84aa-47E3-e3a2-D22E8ebf8b3a\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetFloatingIpApiResponse\ \ getFloatingIpApiResponse = floatingIpsApi.getFloatingIpById(GetFloatingIpByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getFloatingIpApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, FloatingIpsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let floatingIpsApi = new FloatingIpsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"D12902fE-B81f-bfFd-71fd-4Ad6eBbaBcDD\"\ ;\n\n\n\n\n\n floatingIpsApi.getFloatingIpById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ floating_ips_api = ntnx_networking_py_client.FloatingIpsApi(api_client=client)\n\ \ \n ext_id = \"3cD7E68c-Fa73-aAD1-FF6D-f272df2D68dF\"\n\n\n try:\n\ \ api_response = floating_ips_api.get_floating_ip_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/floatingips\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n FloatingIpsServiceApiInstance\ \ *api.FloatingIpsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ FloatingIpsServiceApiInstance = api.NewFloatingIpsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"DBBBDaCc-7fBE-0bc9-fc59-EA3d5D1B87cf\"\ \n\n\n request := floatingips.GetFloatingIpByIdRequest{ ExtId: &extId\ \ }\n response, error := FloatingIpsServiceApiInstance.GetFloatingIpById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.FloatingIp)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/floating-ips/72a7761a-0aC5-fDFB-9A19-eCCC6Df0DCbb" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/floating-ips/fAE84Fbc-D98b-BE52-0FDF-a63E232Dae1A" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(client);\n\n \ \ String extId = \"5c63C9eC-8EDa-bD46-febc-1F7BEd9CBcBf\";\n\n \ \ // Create request object with parameters\n var request = new GetFloatingIpByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetFloatingIpApiResponse\ \ getFloatingIpApiResponse = floatingIpsApi.GetFloatingIpById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - FloatingIps summary: Update the floating IP for this extId description: Update the floating IP for this extId. operationId: updateFloatingIpById parameters: - name: extId in: path description: ExtId of the floating IP. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: aee5555c-358a-4c87-bb6d-d4fe95161bd8 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: c0e94b2e-1808-4c16-9d86-22b05360fcb6 requestBody: description: Configure a floating IP. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' required: true responses: "202": description: Task Id corresponding to the update floating IP request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Floating Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.FloatingIpsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.FloatingIps.UpdateFloatingIpByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.FloatingIps.GetFloatingIpByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.FloatingIp;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetFloatingIpApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(apiClient);\n\n\ \ FloatingIp floatingIp = new FloatingIp();\n\n // FloatingIp\ \ object initializations here...\n floatingIp.setName(\"floating-ip-1\"\ ); // required field\n \n String extId = \"8FEf1DbD-CEBd-A7DB-BB7C-a6Fea7FCda7c\"\ ;\n\n // perform GET call\n GetFloatingIpApiResponse getResponse\ \ = null;\n try {\n getResponse = floatingIpsApi.getFloatingIpById(GetFloatingIpByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = floatingIpsApi.updateFloatingIpById(UpdateFloatingIpByIdRequest.builder()\n\ \ .extId(extId)\n .build(), floatingIp, opts);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, FloatingIpsApi, FloatingIp, GetFloatingIpApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let floatingIpsApi = new FloatingIpsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let floatingIp = new FloatingIp();\n\n // FloatingIp\ \ object initializations here...\n floatingIp.setName(\"floating-ip-1\"\ ); // required field\n floatingIp = JSON.stringify(floatingIp);\n\n\ \ \n let extId = \"CCdbdaf9-38A7-4FF0-4fDd-FcA7ebfcF0C6\";\n\n\n \ \ // Perform Get call\n floatingIpsApi.getFloatingIpById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n floatingIpsApi.updateFloatingIpById(extId, floatingIp,\ \ args).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ floating_ips_api = ntnx_networking_py_client.FloatingIpsApi(api_client=client)\n\ \ floatingIp = ntnx_networking_py_client.FloatingIp()\n\n # FloatingIp\ \ object initializations here...\n floatingIp.name = \"floating-ip-1\"\ \ # required field\n \n ext_id = \"a635aDF8-Be9F-f698-FcCA-7a6aFceaDCfD\"\ \n\n try:\n api_response = floating_ips_api.get_floating_ip_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = floating_ips_api.update_floating_ip_by_id(extId=ext_id,\ \ body=floatingIp, if_match=etag_value)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/floatingips\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n FloatingIpsServiceApiInstance\ \ *api.FloatingIpsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ FloatingIpsServiceApiInstance = api.NewFloatingIpsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n floatingIp := import1.NewFloatingIp()\n\ \n // FloatingIp object initializations here...\n\n \n extId :=\ \ \"C99fABC1-BdAe-BE2C-9FDA-eFD1ad4e7eeb\"\n\n getRequest := floatingips.GetFloatingIpByIdRequest{\ \ extId: &extId }\n getResponse, err := FloatingIpsServiceApiInstance.GetFloatingIpById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := floatingips.UpdateFloatingIpByIdRequest{ ExtId: &extId,\ \ Body: floatingIp }\n response, error := FloatingIpsServiceApiInstance.UpdateFloatingIpById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/floating-ips/Dbfb2592-1cdA-DA3A-A6d1-9aF6BcAAFBeA" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"floating-ip-1","description":"FloatingIPforVM1","association":{"vmNicReference":"string","vpcReference":"string","privateIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VmNicAssociation"},"floatingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"networking.v4.config.FloatingIPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"networking.v4.config.FloatingIPv6Address"},"$objectType":"networking.v4.config.FloatingIPAddress"},"externalSubnetReference":"string","externalSubnet":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"},"privateIp":"string","floatingIpValue":"string","associationStatus":"$UNKNOWN","vpcReference":"string","vmNicReference":"string","loadBalancerSessionReference":"string","vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vmNic":{"privateIp":"string","$objectType":"networking.v4.config.VmNic"},"$objectType":"networking.v4.config.FloatingIp"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"floating-ip-1","description":"FloatingIPforVM1","association":{"vmNicReference":"string","vpcReference":"string","privateIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VmNicAssociation"},"floatingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"networking.v4.config.FloatingIPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"networking.v4.config.FloatingIPv6Address"},"$objectType":"networking.v4.config.FloatingIPAddress"},"externalSubnetReference":"string","externalSubnet":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"},"privateIp":"string","floatingIpValue":"string","associationStatus":"$UNKNOWN","vpcReference":"string","vmNicReference":"string","loadBalancerSessionReference":"string","vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vmNic":{"privateIp":"string","$objectType":"networking.v4.config.VmNic"},"$objectType":"networking.v4.config.FloatingIp"} \ - "https://host:port/api/networking/v4.3/config/floating-ips/0c6Ff575-AcBD-D8C9-dDe6-c3d4EF6DeDf4" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(client);\n\n \ \ FloatingIp floatingIp = new FloatingIp();\n\n // FloatingIp object\ \ initializations here...\n floatingIp.Name = \"floating-ip-1\"; //\ \ required field\n\n String extId = \"1FF98BAD-bc5c-d0CF-EaB5-4a9cb77a0B06\"\ ;\n\n // perform GET call\n var getRequest = new GetFloatingIpByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetFloatingIpApiResponse\ \ getResponse = floatingIpsApi.GetFloatingIpById(getRequest);\n }\ \ catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateFloatingIpByIdRequest {\n ExtId = extId,\n\ \ Body = floatingIp,\n \n \n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = floatingIpsApi.UpdateFloatingIpById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - FloatingIps summary: Delete the floating IP corresponding to the extId description: Delete the floating IP corresponding to the extId. operationId: deleteFloatingIpById parameters: - name: extId in: path description: ExtId of the floating IP. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5aa38fe6-c6a6-4cf4-b837-9cdb0595d1db - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: dd4b04a9-91a6-4f06-b4c7-79585d85d6c0 responses: "202": description: Task Id corresponding to the delete floating IP operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Floating Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.FloatingIpsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.FloatingIps.DeleteFloatingIpByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(apiClient);\n\n\ \ \n String extId = \"DC8e09d3-Cf69-A05A-9D6a-cFAD9F9Cc4C5\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = floatingIpsApi.deleteFloatingIpById(DeleteFloatingIpByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, FloatingIpsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let floatingIpsApi = new FloatingIpsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"C9aAcF9D-bd96-d03D-f2B2-EDcCaeA5C5dd\"\ ;\n\n\n\n\n\n floatingIpsApi.deleteFloatingIpById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ floating_ips_api = ntnx_networking_py_client.FloatingIpsApi(api_client=client)\n\ \ \n ext_id = \"d8aC45c0-Aa5F-bCA8-Edfa-DC74ee7A0F0a\"\n\n\n try:\n\ \ api_response = floating_ips_api.delete_floating_ip_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/floatingips\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n FloatingIpsServiceApiInstance\ \ *api.FloatingIpsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ FloatingIpsServiceApiInstance = api.NewFloatingIpsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"edEDabaB-ffcA-8b4B-3c6f-9Cd38Cf9260F\"\ \n\n\n request := floatingips.DeleteFloatingIpByIdRequest{ ExtId: &extId\ \ }\n response, error := FloatingIpsServiceApiInstance.DeleteFloatingIpById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/floating-ips/bB0E71ec-93CD-39f0-Ebd4-D3bfaDBbBE50" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/floating-ips/4Ee4c6cD-a07A-CBfE-dBba-6d62Be7b6c1B" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ FloatingIpsApi floatingIpsApi = new FloatingIpsApi(client);\n\n \ \ String extId = \"8dCB2A3A-bE7E-EAcb-2fdD-D27aDeDdEEeb\";\n\n \ \ // Create request object with parameters\n var request = new DeleteFloatingIpByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = floatingIpsApi.DeleteFloatingIpById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/gateways: get: tags: - Gateways summary: List network gateways. description: Get the list of the existing Network gateways. operationId: listGateways parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cloudNetworkReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=cloudNetworkReference\ \ eq '1b3c7d97-7e27-4d11-9f2a-7071f3650776'" - name: gatewayDeviceVendor example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=gatewayDeviceVendor\ \ eq 'Arista'" - name: highAvailabilityGroup/isHaEnabled example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=highAvailabilityGroup/isHaEnabled\ \ eq true" - name: highAvailabilityGroup/peeredGateways/extId example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=highAvailabilityGroup/peeredGateways/any(a:a/extId\ \ eq 'a19075de-4e58-4d43-8c60-4bf3b3805ff8')" - name: installedSoftwareVersion example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=installedSoftwareVersion\ \ eq 'string'" - name: isActive example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=isActive\ \ eq false" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=metadata/categoryIds/any(a:a\ \ eq 'f5ff4d64-b985-498b-9276-040f53ff5df9')" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=name\ \ eq 'gateway-a'" - name: supportedSoftwareVersion example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=supportedSoftwareVersion\ \ eq 'string'" - name: vmReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=vmReference\ \ eq 'string'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$filter=vpcReference\ \ eq '674e0afd-c4ed-4986-9ec6-b245f8de32e2'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$orderby=name" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: vm example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$expand=vm" - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$expand=vpc" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cloudNetworkReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=cloudNetworkReference" - name: description example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=description" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=extId" - name: gatewayDeviceVendor example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=gatewayDeviceVendor" - name: highAvailabilityGroup/algorithm example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=highAvailabilityGroup/algorithm" - name: highAvailabilityGroup/isHaEnabled example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=highAvailabilityGroup/isHaEnabled" - name: highAvailabilityGroup/peeredGateways example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=highAvailabilityGroup/peeredGateways" - name: installedSoftwareVersion example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=installedSoftwareVersion" - name: isActive example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=isActive" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=links" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=metadata/projectReferenceId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=name" - name: supportedSoftwareVersion example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=supportedSoftwareVersion" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=tenantId" - name: vm example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=vm" - name: vmReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=vmReference" - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=vpc" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/gateways?$select=vpcReference" responses: "200": description: List of all gateways. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Gateway' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/gateways Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/gateways Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/gateways Get operation x-permissions: operationName: View Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.GatewaysApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Gateways.ListGatewaysRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListGatewaysApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(apiClient);\n\n \n\ \ int page = 0;\n \n int limit = 50;\n\n try\ \ {\n // Pass in parameters using the request builder object\ \ associated with the operation.\n ListGatewaysApiResponse listGatewaysApiResponse\ \ = gatewaysApi.listGateways(ListGatewaysRequest.builder()\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .$expand(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listGatewaysApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, GatewaysApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let gatewaysApi = new GatewaysApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; gatewaysApi.listGateways(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = gateways_api.list_gateways(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n GatewaysServiceApiInstance\ \ *api.GatewaysServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := gateways.ListGatewaysRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil, Select_: nil\ \ }\n response, error := GatewaysServiceApiInstance.ListGateways(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Gateway)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/gateways?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/gateways?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n int page\ \ = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListGatewaysRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListGatewaysApiResponse listGatewaysApiResponse\ \ = gatewaysApi.ListGateways(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" post: tags: - Gateways summary: Create network gateway. description: Create gateway. operationId: createGateway parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 33dd143d-0be4-49cb-8c75-713b7b3e2f4a requestBody: description: Create gateway request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Gateway' required: true responses: "202": description: Create gateway response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.GatewaysApi; import com.nutanix.dp1.networking.networking.v4.request.Gateways.CreateGatewayRequest; import com.nutanix.dp1.networking.networking.v4.config.Gateway; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. GatewaysApi gatewaysApi = new GatewaysApi(apiClient); Gateway gateway = new Gateway(); // Gateway object initializations here... try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = gatewaysApi.createGateway(CreateGatewayRequest.builder() .build(), gateway); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, GatewaysApi, Gateway } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let gatewaysApi = new GatewaysApi(apiClientInstance); function sample() { let gateway = new Gateway(); // Gateway object initializations here... gateway = JSON.stringify(gateway); gatewaysApi.createGateway(gateway).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client) gateway = ntnx_networking_py_client.Gateway() # Gateway object initializations here... try: api_response = gateways_api.create_gateway(body=gateway) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient GatewaysServiceApiInstance *api.GatewaysServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance) ctx := context.Background() gateway := import1.NewGateway() // Gateway object initializations here... request := gateways.CreateGatewayRequest{ Body: gateway } response, error := GatewaysServiceApiInstance.CreateGateway(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/gateways" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"} \ - "https://host:port/api/networking/v4.3/config/gateways" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n Gateway\ \ gateway = new Gateway();\n\n // Gateway object initializations here...\n\ \n\n // Create request object with parameters\n var request\ \ = new CreateGatewayRequest {\n Body = gateway\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = gatewaysApi.CreateGateway(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /networking/v4.3/config/gateways/{extId}: get: tags: - Gateways summary: Get network gateway. description: Get the gateway for the specified extId. operationId: getGatewayById parameters: - name: extId in: path description: Gateway UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a5a82069-382b-4f5f-8ed6-88325a4e5878 responses: "200": description: gateway details for the specified extId. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.Gateway' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/gateways/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/gateways/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/gateways/{extId}\ \ Get operation" x-permissions: operationName: View Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.GatewaysApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Gateways.GetGatewayByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetGatewayApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(apiClient);\n\n \n\ \ String extId = \"feFB73f6-ada9-d00b-FC7F-C31cDcdFFAa3\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetGatewayApiResponse\ \ getGatewayApiResponse = gatewaysApi.getGatewayById(GetGatewayByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getGatewayApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, GatewaysApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let gatewaysApi = new GatewaysApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"6bcfbde4-Dfa7-b86e-A7af-F340bBfFD6fa\";\n\ \n\n\n\n\n gatewaysApi.getGatewayById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client)\n\ \ \n ext_id = \"7fcF3de6-9dE5-699d-AdC0-57d1FE27a118\"\n\n\n try:\n\ \ api_response = gateways_api.get_gateway_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n GatewaysServiceApiInstance\ \ *api.GatewaysServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"fBd84bF4-ffFD-Ca51-b76F-4E0AcCa9f5ed\"\ \n\n\n request := gateways.GetGatewayByIdRequest{ ExtId: &extId }\n \ \ response, error := GatewaysServiceApiInstance.GetGatewayById(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.Gateway)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/gateways/f6eFffa7-E7b3-E3dD-4FF8-01EBb1b04Fa6" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/gateways/E0Db6836-0D09-6bbA-B464-cC20602FCBCB" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n String\ \ extId = \"3AA8d09E-bB5A-1ede-aa4a-Ec918fE95dCb\";\n\n // Create\ \ request object with parameters\n var request = new GetGatewayByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetGatewayApiResponse\ \ getGatewayApiResponse = gatewaysApi.GetGatewayById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - Gateways summary: Update network gateway. description: Update gateway. operationId: updateGatewayById parameters: - name: extId in: path description: Gateway UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: dd295181-f81e-457b-a4bc-977ad9b37966 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 65d103b1-014b-4cf5-ab10-7f822fc0d531 requestBody: description: Update gateway request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Gateway' required: true responses: "202": description: Update gateway response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.GatewaysApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Gateways.UpdateGatewayByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.Gateways.GetGatewayByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.Gateway;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetGatewayApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(apiClient);\n\n Gateway\ \ gateway = new Gateway();\n\n // Gateway object initializations\ \ here...\n \n String extId = \"bfDDdda5-fD6C-40A6-53aA-CBAfc5c5f2EE\"\ ;\n\n // perform GET call\n GetGatewayApiResponse getResponse\ \ = null;\n try {\n getResponse = gatewaysApi.getGatewayById(GetGatewayByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = gatewaysApi.updateGatewayById(UpdateGatewayByIdRequest.builder()\n\ \ .extId(extId)\n .build(), gateway, opts);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, GatewaysApi, Gateway, GetGatewayApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let gatewaysApi = new GatewaysApi(apiClientInstance);\n\nfunction sample()\ \ {\n let gateway = new Gateway();\n\n // Gateway object initializations\ \ here...\n gateway = JSON.stringify(gateway);\n\n \n let extId\ \ = \"Ac8DdCEF-E8eB-f6fC-b9BE-B8Dc0dc3E8e2\";\n\n\n // Perform Get call\n\ \ gatewaysApi.getGatewayById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ // Extract E-Tag Header\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n\n gatewaysApi.updateGatewayById(extId,\ \ gateway, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client)\n\ \ gateway = ntnx_networking_py_client.Gateway()\n\n # Gateway object\ \ initializations here...\n \n ext_id = \"fa1BCdb3-247C-039f-d5B9-f9cEaCee7eFA\"\ \n\n try:\n api_response = gateways_api.get_gateway_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = gateways_api.update_gateway_by_id(extId=ext_id,\ \ body=gateway, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n GatewaysServiceApiInstance\ \ *api.GatewaysServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n gateway := import1.NewGateway()\n\ \n // Gateway object initializations here...\n\n \n extId := \"\ ABedddB7-BD81-EeBA-E70A-315691dcDd7b\"\n\n getRequest := gateways.GetGatewayByIdRequest{\ \ extId: &extId }\n getResponse, err := GatewaysServiceApiInstance.GetGatewayById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := gateways.UpdateGatewayByIdRequest{ ExtId: &extId, Body:\ \ gateway }\n response, error := GatewaysServiceApiInstance.UpdateGatewayById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/gateways/3360e1Ca-EB20-AC6c-BFb1-EcCfaea67dFB" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"gateway-a","description":"Networkgatewaydescription","vpcReference":"string","cloudNetworkReference":"string","installedSoftwareVersion":"string","supportedSoftwareVersion":"string","vmReference":"string","deployment":{"clusterReference":"string","managementInterface":{"subnetReference":"string","address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGateway":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayManagementInterface"},"interfaces":[{"subnetReference":"string","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"macAddress":"string","$objectType":"networking.v4.config.GatewayInterface"}],"vcenterDatastoreName":"myDatastore","shouldSynchronizeSystemNtpServers":false,"ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"}],"shouldSynchronizeSystemDnsServers":false,"dnsServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.GatewayDeployment"},"gatewayDeviceVendor":"Arista","services":{"serviceAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"serviceAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"localVpnService":{"ebgpConfig":{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"$objectType":"networking.v4.config.BgpConfig"},"peerIgpConfig":{"ospfConfig":{"areaId":"string","authenticationType":"$UNKNOWN","password":"string","$objectType":"networking.v4.config.OspfConfig"},"ibgpConfigList":[{"asn":45035,"password":"string","shouldRedistributeRoutes":false,"peerIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.IbgpConfig"}],"localPrefixList":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"$objectType":"networking.v4.config.InternalRoutingConfig"},"$objectType":"networking.v4.config.LocalVpnService"},"localVtepService":{"vxlanPort":4789,"$objectType":"networking.v4.config.LocalVtepService"},"localBgpService":{"vpcReference":"string","asn":45035,"isBgpAddPathEnabled":false,"$objectType":"networking.v4.config.LocalBgpService"},"$objectType":"networking.v4.config.LocalNetworkServices"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"isActive":true,"status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"vm":{"name":"user-vm-1","$objectType":"networking.v4.config.Vm"},"$objectType":"networking.v4.config.Gateway"} \ - "https://host:port/api/networking/v4.3/config/gateways/DdDCB9EC-9Df5-DEF9-AEeb-DcfEf1C4aC04" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n Gateway\ \ gateway = new Gateway();\n\n // Gateway object initializations here...\n\ \n String extId = \"9ABaCBdc-F3bc-a15D-DBd9-E2e0eebBb578\";\n\n \ \ // perform GET call\n var getRequest = new GetGatewayByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetGatewayApiResponse\ \ getResponse = gatewaysApi.GetGatewayById(getRequest);\n } catch(ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n \ \ // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateGatewayByIdRequest {\n ExtId = extId,\n\ \ Body = gateway,\n \n \n };\n \ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = gatewaysApi.UpdateGatewayById(request, opts);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - Gateways summary: Delete network gateway. description: Delete gateway for the specified UUID. operationId: deleteGatewayById parameters: - name: extId in: path description: Gateway UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 95c649e5-0ec9-4699-b4ca-fc4fc9e4ce74 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 11636642-669a-4e92-9f66-fe143ec87e43 responses: "202": description: Delete gateway response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.GatewaysApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Gateways.DeleteGatewayByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(apiClient);\n\n \n\ \ String extId = \"FdAfb4bE-dEFe-5f7b-2cA4-baDcC0CcAcC6\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = gatewaysApi.deleteGatewayById(DeleteGatewayByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, GatewaysApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let gatewaysApi = new GatewaysApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"feE9dd3b-2e9A-C556-eefF-6DbfCeBCAEaa\";\n\ \n\n\n\n\n gatewaysApi.deleteGatewayById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client)\n\ \ \n ext_id = \"f7Af19BC-B3de-CdDA-e61f-Ebc0d0ea1b04\"\n\n\n try:\n\ \ api_response = gateways_api.delete_gateway_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n GatewaysServiceApiInstance\ \ *api.GatewaysServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"3eB343dC-cecC-DABd-ACc0-DbE926EbaB1E\"\ \n\n\n request := gateways.DeleteGatewayByIdRequest{ ExtId: &extId }\n\ \ response, error := GatewaysServiceApiInstance.DeleteGatewayById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/gateways/fBd5dDaA-8eb4-EdaE-cA8F-dCfDDF0De0EF" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/gateways/EadF0FA7-eEDd-2EFE-BaaD-bfEcD03CA4FD" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n String\ \ extId = \"CD5cBf1b-5AC8-F5De-77Ba-B997Dcf8BEbE\";\n\n // Create\ \ request object with parameters\n var request = new DeleteGatewayByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = gatewaysApi.DeleteGatewayById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/gateways/{extId}/$actions/upgrade: post: tags: - Gateways summary: Upgrade network gateway. description: Upgrade the gateway for the specified UUID. operationId: upgradeGatewayById parameters: - name: extId in: path description: Gateway UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7add96fb-8803-4bd0-beed-684ca8362f4c - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 3c5f5d28-35eb-407f-b13a-14e337ee0ea5 responses: "202": description: Upgrade gateway response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Upgrade Network Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.GatewaysApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Gateways.UpgradeGatewayByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(apiClient);\n\n \n\ \ String extId = \"DD65EA78-84fE-dBf6-cc55-CDa17aEe9B3a\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = gatewaysApi.upgradeGatewayById(UpgradeGatewayByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, GatewaysApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let gatewaysApi = new GatewaysApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"a58f7BBD-2e75-dBBa-9c18-cBfb55DFbAF6\";\n\ \n\n\n\n\n gatewaysApi.upgradeGatewayById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ gateways_api = ntnx_networking_py_client.GatewaysApi(api_client=client)\n\ \ \n ext_id = \"1Ae14D7A-Bf5D-EDEc-aeC2-dfADaBfEeceB\"\n\n\n try:\n\ \ api_response = gateways_api.upgrade_gateway_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/gateways\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n GatewaysServiceApiInstance\ \ *api.GatewaysServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ GatewaysServiceApiInstance = api.NewGatewaysServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"f01CDd0E-AdEd-f96d-eceD-AcBDcebdB6AB\"\ \n\n\n request := gateways.UpgradeGatewayByIdRequest{ ExtId: &extId }\n\ \ response, error := GatewaysServiceApiInstance.UpgradeGatewayById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/gateways/b4b30dBF-dD6A-bd51-A8e3-af7EdFe87Cb6/$actions/upgrade" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/gateways/aAeA4a91-F06f-91fc-0CFD-cbbb99ce626b/$actions/upgrade" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ GatewaysApi gatewaysApi = new GatewaysApi(client);\n\n String\ \ extId = \"50cF49dc-F4a8-6f82-3F2f-Bbacec83cdA6\";\n\n // Create\ \ request object with parameters\n var request = new UpgradeGatewayByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = gatewaysApi.UpgradeGatewayById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/ipfix-exporters: get: tags: - IPFIXExporters summary: Get the list of existing IPFIX Exporters. description: Get the list of existing IPFIX exporters. operationId: listIpfixExporters parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/ipfix-exporters?$filter=name\ \ eq 'LB-stats-exporter'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/ipfix-exporters?$orderby=name" responses: "200": description: List of IPFIX exporters. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters Get operation x-permissions: operationName: View Ipfix Exporter deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.IPFIXExportersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.ListIpfixExportersRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListIPFIXExportersApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListIPFIXExportersApiResponse\ \ listIPFIXExportersApiResponse = iPFIXExportersApi.listIpfixExporters(ListIpfixExportersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listIPFIXExportersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, IPFIXExportersApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let iPFIXExportersApi = new IPFIXExportersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; iPFIXExportersApi.listIpfixExporters(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ i_pfix_exporters_api = ntnx_networking_py_client.IPFIXExportersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = i_pfix_exporters_api.list_ipfix_exporters(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/ipfixexporters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IPFIXExportersServiceApiInstance\ \ *api.IPFIXExportersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IPFIXExportersServiceApiInstance = api.NewIPFIXExportersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := ipfixexporters.ListIpfixExportersRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := IPFIXExportersServiceApiInstance.ListIpfixExporters(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.IPFIXExporter)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/ipfix-exporters?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/ipfix-exporters?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListIpfixExportersRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListIPFIXExportersApiResponse listIPFIXExportersApiResponse\ \ = iPFIXExportersApi.ListIpfixExporters(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - IPFIXExporters summary: Create an IPFIX Exporter. description: Create an IPFIX Exporter. operationId: createIpfixExporter parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 63cd3f20-f54d-49a8-943a-f70898ea69dc requestBody: description: Request schema to create the IPFIX exporter. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' required: true responses: "202": description: Task Id corresponding to create IPFIX exporter operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Ipfix Exporter deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.IPFIXExportersApi; import com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.CreateIpfixExporterRequest; import com.nutanix.dp1.networking.networking.v4.config.ExporterProtocol; import com.nutanix.dp1.networking.networking.v4.config.IPFIXExporter; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(apiClient); IPFIXExporter iPFIXExporter = new IPFIXExporter(); // IPFIXExporter object initializations here... iPFIXExporter.setCollectorIp("?:?:254.?:75.?:4.29"); // required field iPFIXExporter.setCollectorPort(1); // required field iPFIXExporter.setExportScopes(new ArrayList<>()); // required field iPFIXExporter.setName("LB-stats-exporter"); // required field iPFIXExporter.setProtocol(ExporterProtocol.UNKNOWN); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = iPFIXExportersApi.createIpfixExporter(CreateIpfixExporterRequest.builder() .build(), iPFIXExporter); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, IPFIXExportersApi, ExporterProtocol, IPFIXExporter } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let iPFIXExportersApi = new IPFIXExportersApi(apiClientInstance); function sample() { let iPFIXExporter = new IPFIXExporter(); // IPFIXExporter object initializations here... iPFIXExporter.setCollectorIp("?:85.?:165.?:?:250.29"); // required field iPFIXExporter.setCollectorPort(1); // required field iPFIXExporter.setExportScopes([]); // required field iPFIXExporter.setName("LB-stats-exporter"); // required field iPFIXExporter.setProtocol(ExporterProtocol.UNKNOWN); // required field iPFIXExporter = JSON.stringify(iPFIXExporter); iPFIXExportersApi.createIpfixExporter(iPFIXExporter).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) i_pfix_exporters_api = ntnx_networking_py_client.IPFIXExportersApi(api_client=client) iPFIXExporter = ntnx_networking_py_client.IPFIXExporter() # IPFIXExporter object initializations here... iPFIXExporter.collector_ip = "?:9.?:?:251.?:7.?:254" # required field iPFIXExporter.collector_port = 1 # required field iPFIXExporter.export_scopes = [] # required field iPFIXExporter.name = "LB-stats-exporter" # required field iPFIXExporter.protocol = ntnx_networking_py_client.ExporterProtocol._UNKNOWN # required field try: api_response = i_pfix_exporters_api.create_ipfix_exporter(body=iPFIXExporter) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/ipfixexporters" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient IPFIXExportersServiceApiInstance *api.IPFIXExportersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. IPFIXExportersServiceApiInstance = api.NewIPFIXExportersServiceApi(ApiClientInstance) ctx := context.Background() iPFIXExporter := import1.NewIPFIXExporter() // IPFIXExporter object initializations here... request := ipfixexporters.CreateIpfixExporterRequest{ Body: iPFIXExporter } response, error := IPFIXExportersServiceApiInstance.CreateIpfixExporter(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/ipfix-exporters" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"LB-stats-exporter","collectorIp":"string","protocol":"$UNKNOWN","collectorPort":0,"exportRateLimitPerNodeBps":0,"exportScopes":[{"uuid":"string","scopeType":"$UNKNOWN","ipFamily":"$UNKNOWN","$objectType":"networking.v4.config.ExportScope"}],"description":"IPFIXexporterdescription","$objectType":"networking.v4.config.IPFIXExporter"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"LB-stats-exporter","collectorIp":"string","protocol":"$UNKNOWN","collectorPort":0,"exportRateLimitPerNodeBps":0,"exportScopes":[{"uuid":"string","scopeType":"$UNKNOWN","ipFamily":"$UNKNOWN","$objectType":"networking.v4.config.ExportScope"}],"description":"IPFIXexporterdescription","$objectType":"networking.v4.config.IPFIXExporter"} \ - "https://host:port/api/networking/v4.3/config/ipfix-exporters" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(client);\n\ \n IPFIXExporter iPFIXExporter = new IPFIXExporter();\n\n // IPFIXExporter\ \ object initializations here...\n iPFIXExporter.CollectorIp = \"?:?:251.?:09.?:21.012\"\ ; // required field\n iPFIXExporter.CollectorPort = 1; // required\ \ field\n iPFIXExporter.ExportScopes = new ArrayList(); // required\ \ field\n iPFIXExporter.Name = \"LB-stats-exporter\"; // required\ \ field\n iPFIXExporter.Protocol = ExporterProtocol.UNKNOWN; // required\ \ field\n\n\n // Create request object with parameters\n var\ \ request = new CreateIpfixExporterRequest {\n Body = iPFIXExporter\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = iPFIXExportersApi.CreateIpfixExporter(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/ipfix-exporters/{extId}: get: tags: - IPFIXExporters summary: Get the specified IPFIX Exporter. description: Get the IPFIX exporter for the given extId. operationId: getIpfixExporterById parameters: - name: extId in: path description: UUID of IPFIX exporter. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5c27d36c-b340-4807-b2bb-2153b90c3256 responses: "200": description: The IPFIX exporter object returned by the get operation. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters/{extId}\ \ Get operation" x-permissions: operationName: View Ipfix Exporter deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.IPFIXExportersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.GetIpfixExporterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetIPFIXExporterApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(apiClient);\n\ \n \n String extId = \"cAF1cCA6-b35b-DCfB-1Fa6-Ebd61c1f9CE0\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetIPFIXExporterApiResponse\ \ getIPFIXExporterApiResponse = iPFIXExportersApi.getIpfixExporterById(GetIpfixExporterByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getIPFIXExporterApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, IPFIXExportersApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let iPFIXExportersApi = new IPFIXExportersApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"8aBbEc6a-3Bf0-CdA3-DFf5-cCAC5acdaFEE\"\ ;\n\n\n\n\n\n iPFIXExportersApi.getIpfixExporterById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ i_pfix_exporters_api = ntnx_networking_py_client.IPFIXExportersApi(api_client=client)\n\ \ \n ext_id = \"4d54D4eB-efae-9dac-bAFb-A5aBba8625D4\"\n\n\n try:\n\ \ api_response = i_pfix_exporters_api.get_ipfix_exporter_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/ipfixexporters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IPFIXExportersServiceApiInstance\ \ *api.IPFIXExportersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IPFIXExportersServiceApiInstance = api.NewIPFIXExportersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"5fEfcFbE-2AC7-76f4-EEdC-B48bbaaaFBEF\"\ \n\n\n request := ipfixexporters.GetIpfixExporterByIdRequest{ ExtId:\ \ &extId }\n response, error := IPFIXExportersServiceApiInstance.GetIpfixExporterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.IPFIXExporter)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/ipfix-exporters/7Ed2aAFB-AA40-600a-E69B-EbEbbbdDb5bC" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/ipfix-exporters/dCD87bBB-E9EF-3DEB-2d60-97FfAd12f6Ff" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(client);\n\ \n String extId = \"cb2fae5d-7dbF-a2bC-c3Aa-cb3cCeAeD3Ea\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetIpfixExporterByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetIPFIXExporterApiResponse getIPFIXExporterApiResponse\ \ = iPFIXExportersApi.GetIpfixExporterById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - IPFIXExporters summary: Update the specified IPFIX Exporter. description: Update the specified IPFIX exporter. operationId: updateIpfixExporterById parameters: - name: extId in: path description: UUID of IPFIX exporter. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5e3328da-2c31-47d1-a050-9294e114a6c3 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 5d33c89c-8243-4187-b98f-9f6188ac3e9d requestBody: description: Request schema to update the specified IPFIX exporter. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' required: true responses: "202": description: Task Id corresponding to update IPFIX exporter operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Ipfix Exporter deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.IPFIXExportersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.UpdateIpfixExporterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.GetIpfixExporterByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.ExporterProtocol;\n\ import com.nutanix.dp1.networking.networking.v4.config.IPFIXExporter;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetIPFIXExporterApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(apiClient);\n\ \n IPFIXExporter iPFIXExporter = new IPFIXExporter();\n\n \ \ // IPFIXExporter object initializations here...\n iPFIXExporter.setCollectorIp(\"\ ?:?:251.?:136.?:?:254.60\"); // required field\n iPFIXExporter.setCollectorPort(1);\ \ // required field\n iPFIXExporter.setExportScopes(new ArrayList<>());\ \ // required field\n iPFIXExporter.setName(\"LB-stats-exporter\"\ ); // required field\n iPFIXExporter.setProtocol(ExporterProtocol.UNKNOWN);\ \ // required field\n \n String extId = \"D70D90F6-62a0-e47c-f16b-Fabdcefb9711\"\ ;\n\n // perform GET call\n GetIPFIXExporterApiResponse getResponse\ \ = null;\n try {\n getResponse = iPFIXExportersApi.getIpfixExporterById(GetIpfixExporterByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = iPFIXExportersApi.updateIpfixExporterById(UpdateIpfixExporterByIdRequest.builder()\n\ \ .extId(extId)\n .build(), iPFIXExporter,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, IPFIXExportersApi, ExporterProtocol, IPFIXExporter,\ \ GetIPFIXExporterApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let iPFIXExportersApi = new IPFIXExportersApi(apiClientInstance);\n\nfunction\ \ sample() {\n let iPFIXExporter = new IPFIXExporter();\n\n // IPFIXExporter\ \ object initializations here...\n iPFIXExporter.setCollectorIp(\"?:24.?:0.?:?:254.?:250\"\ ); // required field\n iPFIXExporter.setCollectorPort(1); // required\ \ field\n iPFIXExporter.setExportScopes([]); // required field\n \ \ iPFIXExporter.setName(\"LB-stats-exporter\"); // required field\n \ \ iPFIXExporter.setProtocol(ExporterProtocol.UNKNOWN); // required field\n\ \ iPFIXExporter = JSON.stringify(iPFIXExporter);\n\n \n let extId\ \ = \"cEDB1Bdc-aF34-BFAa-0F1a-bB4Bd1AFABC7\";\n\n\n // Perform Get call\n\ \ iPFIXExportersApi.getIpfixExporterById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ // Extract E-Tag Header\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n\n iPFIXExportersApi.updateIpfixExporterById(extId,\ \ iPFIXExporter, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ i_pfix_exporters_api = ntnx_networking_py_client.IPFIXExportersApi(api_client=client)\n\ \ iPFIXExporter = ntnx_networking_py_client.IPFIXExporter()\n\n #\ \ IPFIXExporter object initializations here...\n iPFIXExporter.collector_ip\ \ = \"?:72.?:117.?:?:252.55\" # required field\n iPFIXExporter.collector_port\ \ = 1 # required field\n iPFIXExporter.export_scopes = [] # required\ \ field\n iPFIXExporter.name = \"LB-stats-exporter\" # required field\n\ \ iPFIXExporter.protocol = ntnx_networking_py_client.ExporterProtocol._UNKNOWN\ \ # required field\n \n ext_id = \"bfaf3e34-BC0E-16ae-bbeF-79bfAbBC1C39\"\ \n\n try:\n api_response = i_pfix_exporters_api.get_ipfix_exporter_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = i_pfix_exporters_api.update_ipfix_exporter_by_id(extId=ext_id,\ \ body=iPFIXExporter, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/ipfixexporters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IPFIXExportersServiceApiInstance\ \ *api.IPFIXExportersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IPFIXExportersServiceApiInstance = api.NewIPFIXExportersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n iPFIXExporter := import1.NewIPFIXExporter()\n\ \n // IPFIXExporter object initializations here...\n\n \n extId\ \ := \"09Cd8eD2-cffb-beBD-DEbA-dE4caCBfA5E8\"\n\n getRequest := ipfixexporters.GetIpfixExporterByIdRequest{\ \ extId: &extId }\n getResponse, err := IPFIXExportersServiceApiInstance.GetIpfixExporterById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := ipfixexporters.UpdateIpfixExporterByIdRequest{ ExtId: &extId,\ \ Body: iPFIXExporter }\n response, error := IPFIXExportersServiceApiInstance.UpdateIpfixExporterById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/ipfix-exporters/D3ab1e4E-ceaE-f2Eb-B3CF-02E0EEcAcdE7" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"LB-stats-exporter","collectorIp":"string","protocol":"$UNKNOWN","collectorPort":0,"exportRateLimitPerNodeBps":0,"exportScopes":[{"uuid":"string","scopeType":"$UNKNOWN","ipFamily":"$UNKNOWN","$objectType":"networking.v4.config.ExportScope"}],"description":"IPFIXexporterdescription","$objectType":"networking.v4.config.IPFIXExporter"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"LB-stats-exporter","collectorIp":"string","protocol":"$UNKNOWN","collectorPort":0,"exportRateLimitPerNodeBps":0,"exportScopes":[{"uuid":"string","scopeType":"$UNKNOWN","ipFamily":"$UNKNOWN","$objectType":"networking.v4.config.ExportScope"}],"description":"IPFIXexporterdescription","$objectType":"networking.v4.config.IPFIXExporter"} \ - "https://host:port/api/networking/v4.3/config/ipfix-exporters/0A31b26C-958A-F9Eb-8eF9-ADFecDb9Ac2f" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(client);\n\ \n IPFIXExporter iPFIXExporter = new IPFIXExporter();\n\n // IPFIXExporter\ \ object initializations here...\n iPFIXExporter.CollectorIp = \"?:92.?:221.?:65.92\"\ ; // required field\n iPFIXExporter.CollectorPort = 1; // required\ \ field\n iPFIXExporter.ExportScopes = new ArrayList(); // required\ \ field\n iPFIXExporter.Name = \"LB-stats-exporter\"; // required\ \ field\n iPFIXExporter.Protocol = ExporterProtocol.UNKNOWN; // required\ \ field\n\n String extId = \"C3aCefca-FD8E-6d07-Fd9d-Ab476872893c\"\ ;\n\n // perform GET call\n var getRequest = new GetIpfixExporterByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetIPFIXExporterApiResponse\ \ getResponse = iPFIXExportersApi.GetIpfixExporterById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateIpfixExporterByIdRequest {\n ExtId = extId,\n\ \ Body = iPFIXExporter,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = iPFIXExportersApi.UpdateIpfixExporterById(request, opts);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - IPFIXExporters summary: Delete the specified IPFIX Exporter. description: Delete the specified IPFIX exporter. operationId: deleteIpfixExporterById parameters: - name: extId in: path description: UUID of IPFIX exporter. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 324c0a3c-c53f-49d3-916a-82d30e5c7060 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 5d0d09f1-bdfd-4a5d-b048-d86912beef69 responses: "202": description: Task Id corresponding to delete IPFIX exporter. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Ipfix Exporter deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.IPFIXExportersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.IPFIXExporters.DeleteIpfixExporterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(apiClient);\n\ \n \n String extId = \"BEbECBbd-DCF3-ce7C-bEef-A19EBA4bB1DE\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = iPFIXExportersApi.deleteIpfixExporterById(DeleteIpfixExporterByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, IPFIXExportersApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let iPFIXExportersApi = new IPFIXExportersApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"fe4DA8fF-3cA4-fB88-3cB1-0F5C1bCF90FF\"\ ;\n\n\n\n\n\n iPFIXExportersApi.deleteIpfixExporterById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ i_pfix_exporters_api = ntnx_networking_py_client.IPFIXExportersApi(api_client=client)\n\ \ \n ext_id = \"ABeFAfAD-DfCC-0EBc-3E4F-ae61D1c8ccCa\"\n\n\n try:\n\ \ api_response = i_pfix_exporters_api.delete_ipfix_exporter_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/ipfixexporters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IPFIXExportersServiceApiInstance\ \ *api.IPFIXExportersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IPFIXExportersServiceApiInstance = api.NewIPFIXExportersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"FeD8daFc-afd7-AEbC-eff5-2bFF95BDf3ca\"\ \n\n\n request := ipfixexporters.DeleteIpfixExporterByIdRequest{ ExtId:\ \ &extId }\n response, error := IPFIXExportersServiceApiInstance.DeleteIpfixExporterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/ipfix-exporters/5faACCAb-66af-DFfF-7fFB-4c3BA6d0CcBF" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/ipfix-exporters/aaF3BbdE-BdCa-Bcb1-4EaF-4dA0b6dc7A55" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IPFIXExportersApi iPFIXExportersApi = new IPFIXExportersApi(client);\n\ \n String extId = \"4DfAC475-CfcF-aDFA-bABc-c0EC1edef8E7\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteIpfixExporterByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = iPFIXExportersApi.DeleteIpfixExporterById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/stats/layer2-stretches/{extId}: get: tags: - Layer2Stretches summary: Get Layer2Stretch statistics description: Get Layer2Stretch statistics. operationId: getLayer2StretchStats parameters: - name: extId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9960a585-52a1-4ded-8c49-444af7cd8b64 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 41 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId - name: links - name: rtt - name: statType - name: tenantId - name: throughputRxKbps - name: throughputTxKbps responses: "200": description: Get Layer2Stretch statistics response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.stats.Layer2StretchStats' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/layer2-stretches/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/layer2-stretches/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/layer2-stretches/{extId}\ \ Get operation" x-permissions: operationName: View Layer2 Stretch Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.Layer2StretchStatsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.Layer2StretchStats.GetLayer2StretchStatsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.stats.GetLayer2StretchStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ Layer2StretchStatsApi layer2StretchStatsApi = new Layer2StretchStatsApi(apiClient);\n\ \n \n String extId = \"0F0Bc3CD-dF13-679C-D0b3-EdE63DacC2bB\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n \n int page = 0;\n \n int\ \ limit = 50;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetLayer2StretchStatsApiResponse getLayer2StretchStatsApiResponse = layer2StretchStatsApi.getLayer2StretchStats(GetLayer2StretchStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .$page(page)\n \ \ .$limit(limit)\n .$select(null)\n \ \ .build());\n\n System.out.println(getLayer2StretchStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, Layer2StretchStatsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let layer2StretchStatsApi = new Layer2StretchStatsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"efFDAac9-Dabf-BCc5-4ac5-dEa6Af1B4b0B\"\ ;\n //Datetime needs to be in RFC3339 format\n let $startTime = \"\ 2021-01-01T00:00:00-08:00\";\n //Datetime needs to be in RFC3339 format\n\ \ let $endTime = \"2021-01-01T00:00:00-08:00\";\n\n // Construct Optional\ \ Parameters\n var opts = {};\n opts[\"$samplingInterval\"] = 1;\n\ \ opts[\"$statType\"] = SOME_RAW_DATA;\n opts[\"$page\"] = 0;\n \ \ opts[\"$limit\"] = 50;\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n layer2StretchStatsApi.getLayer2StretchStats(extId, $startTime,\ \ $endTime, opts).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ layer2_stretch_stats_api = ntnx_networking_py_client.Layer2StretchStatsApi(api_client=client)\n\ \ \n ext_id = \"6beefC33-2ABb-D5Ca-D3ae-d2f5D4EdD5DF\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = layer2_stretch_stats_api.get_layer2_stretch_stats(extId=ext_id, _startTime=start_time,\ \ _endTime=end_time, _samplingInterval=sampling_interval, _statType=stat_type,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretchstats\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n Layer2StretchStatsServiceApiInstance\ \ *api.Layer2StretchStatsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ Layer2StretchStatsServiceApiInstance = api.NewLayer2StretchStatsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"d7ccf0Bd-6Bb6-5ecB-94Ef-EcA10BE8Ef9F\"\ \n // Datetime needs to be in RFC3339 format\n startTime_ := time.Now()\n\ \ // Datetime needs to be in RFC3339 format\n endTime_ := time.Now()\n\ \ \n samplingInterval_ := 1\n \n statType_ := SOME_RAW_DATA\n\ \ \n page_ := 0\n \n limit_ := 50\n\n\n request := layer2stretchstats.GetLayer2StretchStatsRequest{\ \ ExtId: &extId, StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_:\ \ &samplingInterval_, StatType_: &statType_, Page_: &page_, Limit_: &limit_,\ \ Select_: nil }\n response, error := Layer2StretchStatsServiceApiInstance.GetLayer2StretchStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Layer2StretchStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/stats/layer2-stretches/aa789b37-EcaF-14ba-daB2-9AFF1d78D55d?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/stats/layer2-stretches/dDAEfA5A-6DDf-A1a6-e56E-fdeEdcDDBdeE?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchStatsApi layer2StretchStatsApi = new Layer2StretchStatsApi(client);\n\ \n String extId = \"10BE3BFC-e0CC-CcD4-7bbb-Ff5b52E1AB74\";\n \ \ String startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime\ \ = \"2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n \ \ Object statType = SOME_RAW_DATA;\n int page = 0;\n int limit\ \ = 50;\n String select = \"string_sample_data\";\n\n // Create\ \ request object with parameters\n var request = new GetLayer2StretchStatsRequest\ \ {\n ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType,\n Page = page,\n \ \ Limit = limit,\n Select = select\n };\n try\ \ {\n GetLayer2StretchStatsApiResponse getLayer2StretchStatsApiResponse\ \ = layer2StretchStatsApi.GetLayer2StretchStats(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/layer2-stretches: get: tags: - Layer2Stretches summary: Get the list of existing Layer2Stretch configurations. description: Get the list of existing Layer2Stretch configurations. operationId: listLayer2Stretches parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: localSiteParams/highAvailabilityGroup/isHaEnabled example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=localSiteParams/highAvailabilityGroup/isHaEnabled\ \ eq true" - name: localSiteParams/highAvailabilityGroup/peeredGateways/extId example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=localSiteParams/highAvailabilityGroup/peeredGateways/any(a:a/extId\ \ eq 'a19075de-4e58-4d43-8c60-4bf3b3805ff8')" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=metadata/categoryIds/any(a:a\ \ eq 'f5ff4d64-b985-498b-9276-040f53ff5df9')" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=name\ \ eq 'subnet-extension-4'" - name: remoteSiteParams/highAvailabilityGroup/isHaEnabled example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=remoteSiteParams/highAvailabilityGroup/isHaEnabled\ \ eq true" - name: remoteSiteParams/highAvailabilityGroup/peeredGateways/extId example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=remoteSiteParams/highAvailabilityGroup/peeredGateways/any(a:a/extId\ \ eq 'a19075de-4e58-4d43-8c60-4bf3b3805ff8')" - name: vni example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$filter=vni\ \ eq 111" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$orderby=name" - name: vni example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches?$orderby=vni" responses: "200": description: Paginated list of Layer2Stretch configurations. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/layer2-stretches Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/layer2-stretches Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/layer2-stretches Get operation x-permissions: operationName: View Layer2 Stretch deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.Layer2StretchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.ListLayer2StretchesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListLayer2StretchesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListLayer2StretchesApiResponse\ \ listLayer2StretchesApiResponse = layer2StretchesApi.listLayer2Stretches(ListLayer2StretchesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listLayer2StretchesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, Layer2StretchesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let layer2StretchesApi = new Layer2StretchesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; layer2StretchesApi.listLayer2Stretches(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ layer2_stretches_api = ntnx_networking_py_client.Layer2StretchesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = layer2_stretches_api.list_layer2_stretches(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n Layer2StretchesServiceApiInstance\ \ *api.Layer2StretchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ Layer2StretchesServiceApiInstance = api.NewLayer2StretchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := layer2stretches.ListLayer2StretchesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := Layer2StretchesServiceApiInstance.ListLayer2Stretches(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.Layer2Stretch)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/layer2-stretches?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListLayer2StretchesRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListLayer2StretchesApiResponse listLayer2StretchesApiResponse\ \ = layer2StretchesApi.ListLayer2Stretches(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - Layer2Stretches summary: Create a Layer2Stretch configuration description: Create a Layer2Stretch configuration. operationId: createLayer2Stretch parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: ecf413cb-7183-4333-8d3e-70289d26c6cc requestBody: description: Request schema to create the Layer2Stretch configuration. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' required: true responses: "202": description: Task Id corresponding with the create Layer2Stretch operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Layer2 Stretch deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.Layer2StretchesApi; import com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.CreateLayer2StretchRequest; import com.nutanix.dp1.networking.networking.v4.config.Layer2Stretch; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(apiClient); Layer2Stretch layer2Stretch = new Layer2Stretch(); // Layer2Stretch object initializations here... layer2Stretch.setName("subnet-extension-4"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = layer2StretchesApi.createLayer2Stretch(CreateLayer2StretchRequest.builder() .build(), layer2Stretch); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, Layer2StretchesApi, Layer2Stretch } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let layer2StretchesApi = new Layer2StretchesApi(apiClientInstance); function sample() { let layer2Stretch = new Layer2Stretch(); // Layer2Stretch object initializations here... layer2Stretch.setName("subnet-extension-4"); // required field layer2Stretch = JSON.stringify(layer2Stretch); layer2StretchesApi.createLayer2Stretch(layer2Stretch).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) layer2_stretches_api = ntnx_networking_py_client.Layer2StretchesApi(api_client=client) layer2Stretch = ntnx_networking_py_client.Layer2Stretch() # Layer2Stretch object initializations here... layer2Stretch.name = "subnet-extension-4" # required field try: api_response = layer2_stretches_api.create_layer2_stretch(body=layer2Stretch) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretches" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient Layer2StretchesServiceApiInstance *api.Layer2StretchesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. Layer2StretchesServiceApiInstance = api.NewLayer2StretchesServiceApi(ApiClientInstance) ctx := context.Background() layer2Stretch := import1.NewLayer2Stretch() // Layer2Stretch object initializations here... request := layer2stretches.CreateLayer2StretchRequest{ Body: layer2Stretch } response, error := Layer2StretchesServiceApiInstance.CreateLayer2Stretch(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"} \ - "https://host:port/api/networking/v4.3/config/layer2-stretches" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(client);\n\ \n Layer2Stretch layer2Stretch = new Layer2Stretch();\n\n // Layer2Stretch\ \ object initializations here...\n layer2Stretch.Name = \"subnet-extension-4\"\ ; // required field\n\n\n // Create request object with parameters\n\ \ var request = new CreateLayer2StretchRequest {\n Body\ \ = layer2Stretch\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = layer2StretchesApi.CreateLayer2Stretch(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/layer2-stretches/{extId}: get: tags: - Layer2Stretches summary: Get the Layer2Stretch configuration for the specified reference description: Get the Layer2Stretch configuration for the specified reference. operationId: getLayer2StretchById parameters: - name: extId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9af524ea-40ba-4d3b-9048-84ec33e26fe3 responses: "200": description: Docref(GetLayer2StretchByUuidResponse) content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{extId}\ \ Get operation" x-permissions: operationName: View Layer2 Stretch deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.Layer2StretchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.GetLayer2StretchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetLayer2StretchApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(apiClient);\n\ \n \n String extId = \"FaEf4d1b-dCC0-A6bB-6Fe0-9BfcbDc4a2A3\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetLayer2StretchApiResponse\ \ getLayer2StretchApiResponse = layer2StretchesApi.getLayer2StretchById(GetLayer2StretchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getLayer2StretchApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, Layer2StretchesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let layer2StretchesApi = new Layer2StretchesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"43B5e20B-1bdd-F5Cc-Fb3C-535eabcc1deE\"\ ;\n\n\n\n\n\n layer2StretchesApi.getLayer2StretchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ layer2_stretches_api = ntnx_networking_py_client.Layer2StretchesApi(api_client=client)\n\ \ \n ext_id = \"AbcFaafA-EaEB-CfC7-BcEC-A8Ef04B8dCbC\"\n\n\n try:\n\ \ api_response = layer2_stretches_api.get_layer2_stretch_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n Layer2StretchesServiceApiInstance\ \ *api.Layer2StretchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ Layer2StretchesServiceApiInstance = api.NewLayer2StretchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"BeEA8Fdc-1fca-C3de-B2E1-ba3E1A84dabb\"\ \n\n\n request := layer2stretches.GetLayer2StretchByIdRequest{ ExtId:\ \ &extId }\n response, error := Layer2StretchesServiceApiInstance.GetLayer2StretchById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Layer2Stretch)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches/A2E03BaA-dDAc-d15A-2bD0-ecA8baf9d5Ff" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/layer2-stretches/bcaeb6ea-eAa6-Ea23-fAA5-C9b73Dd13cFf" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(client);\n\ \n String extId = \"ae2FE859-ed61-ED64-df88-C3Fd0b7FCcB7\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetLayer2StretchByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetLayer2StretchApiResponse getLayer2StretchApiResponse\ \ = layer2StretchesApi.GetLayer2StretchById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Layer2Stretches summary: Update the specified Layer2Stretch configuration description: Update the specified Layer2Stretch configuration. operationId: updateLayer2StretchById parameters: - name: extId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 19779ae8-8179-4abe-bdee-106f8dbbe4e1 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 4f8f3445-fc63-4a10-a2d0-177bd241a325 requestBody: description: Request schema to update the specified Layer2Stretch configuration. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' required: true responses: "202": description: Task Id corresponding to update Layer2Stretch operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Layer2 Stretch deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.Layer2StretchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.UpdateLayer2StretchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.GetLayer2StretchByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.Layer2Stretch;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetLayer2StretchApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(apiClient);\n\ \n Layer2Stretch layer2Stretch = new Layer2Stretch();\n\n \ \ // Layer2Stretch object initializations here...\n layer2Stretch.setName(\"\ subnet-extension-4\"); // required field\n \n String extId\ \ = \"f5752CbA-9Ae8-E174-DfCB-44DEC671Cd6f\";\n\n // perform GET\ \ call\n GetLayer2StretchApiResponse getResponse = null;\n \ \ try {\n getResponse = layer2StretchesApi.getLayer2StretchById(GetLayer2StretchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = layer2StretchesApi.updateLayer2StretchById(UpdateLayer2StretchByIdRequest.builder()\n\ \ .extId(extId)\n .build(), layer2Stretch,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, Layer2StretchesApi, Layer2Stretch, GetLayer2StretchApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let layer2StretchesApi = new Layer2StretchesApi(apiClientInstance);\n\n\ function sample() {\n let layer2Stretch = new Layer2Stretch();\n\n \ \ // Layer2Stretch object initializations here...\n layer2Stretch.setName(\"\ subnet-extension-4\"); // required field\n layer2Stretch = JSON.stringify(layer2Stretch);\n\ \n \n let extId = \"4D0AC10d-C74E-c53f-C9dE-cA8FfbF2Cd24\";\n\n\n\ \ // Perform Get call\n layer2StretchesApi.getLayer2StretchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n layer2StretchesApi.updateLayer2StretchById(extId,\ \ layer2Stretch, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ layer2_stretches_api = ntnx_networking_py_client.Layer2StretchesApi(api_client=client)\n\ \ layer2Stretch = ntnx_networking_py_client.Layer2Stretch()\n\n #\ \ Layer2Stretch object initializations here...\n layer2Stretch.name =\ \ \"subnet-extension-4\" # required field\n \n ext_id = \"A8eF5bC0-e1fc-6e4C-FfA6-FbFCbDEfe5Cf\"\ \n\n try:\n api_response = layer2_stretches_api.get_layer2_stretch_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = layer2_stretches_api.update_layer2_stretch_by_id(extId=ext_id,\ \ body=layer2Stretch, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n Layer2StretchesServiceApiInstance\ \ *api.Layer2StretchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ Layer2StretchesServiceApiInstance = api.NewLayer2StretchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n layer2Stretch := import1.NewLayer2Stretch()\n\ \n // Layer2Stretch object initializations here...\n\n \n extId\ \ := \"CBB5ea2E-d6F5-cfa5-D0d1-C7feDeecEeF7\"\n\n getRequest := layer2stretches.GetLayer2StretchByIdRequest{\ \ extId: &extId }\n getResponse, err := Layer2StretchesServiceApiInstance.GetLayer2StretchById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := layer2stretches.UpdateLayer2StretchByIdRequest{ ExtId:\ \ &extId, Body: layer2Stretch }\n response, error := Layer2StretchesServiceApiInstance.UpdateLayer2StretchById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches/aA6B9D0C-1cAc-ABcF-c2D3-Dc7A7730cEeC" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"} \ - "https://host:port/api/networking/v4.3/config/layer2-stretches/c43d76f9-E2fA-b21e-e6BD-B409a4A3cD0b" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(client);\n\ \n Layer2Stretch layer2Stretch = new Layer2Stretch();\n\n // Layer2Stretch\ \ object initializations here...\n layer2Stretch.Name = \"subnet-extension-4\"\ ; // required field\n\n String extId = \"CE6bd55a-DBca-2bE1-5a4E-Da9B5Ba5eAbb\"\ ;\n\n // perform GET call\n var getRequest = new GetLayer2StretchByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetLayer2StretchApiResponse\ \ getResponse = layer2StretchesApi.GetLayer2StretchById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateLayer2StretchByIdRequest {\n ExtId = extId,\n\ \ Body = layer2Stretch,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = layer2StretchesApi.UpdateLayer2StretchById(request, opts);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - Layer2Stretches summary: Delete the specified Layer2Stretch configuration description: Delete the specified Layer2Stretch configuration. operationId: deleteLayer2StretchById parameters: - name: extId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 79eaa8da-9780-46ff-ad32-b9475007d2e8 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 4e04576b-6d07-45f9-930c-602f49c1b086 responses: "202": description: Task Id corresponding with the delete Layer2Stretch operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Layer2 Stretch deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.Layer2StretchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.Layer2Stretches.DeleteLayer2StretchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(apiClient);\n\ \n \n String extId = \"bFE6e5Dd-dBdf-aeab-Ba5B-D8cDacfdc6CE\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = layer2StretchesApi.deleteLayer2StretchById(DeleteLayer2StretchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, Layer2StretchesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let layer2StretchesApi = new Layer2StretchesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"cFA1CC9d-c1B3-6Bdb-decC-ddc9Ad2743BE\"\ ;\n\n\n\n\n\n layer2StretchesApi.deleteLayer2StretchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ layer2_stretches_api = ntnx_networking_py_client.Layer2StretchesApi(api_client=client)\n\ \ \n ext_id = \"BBFbeBc9-AEDd-a55F-E4Ef-8deeFF5Bb3cA\"\n\n\n try:\n\ \ api_response = layer2_stretches_api.delete_layer2_stretch_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/layer2stretches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n Layer2StretchesServiceApiInstance\ \ *api.Layer2StretchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ Layer2StretchesServiceApiInstance = api.NewLayer2StretchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"ccD2acDD-db7b-29Fb-1D1B-FCeD5f3dAaF7\"\ \n\n\n request := layer2stretches.DeleteLayer2StretchByIdRequest{ ExtId:\ \ &extId }\n response, error := Layer2StretchesServiceApiInstance.DeleteLayer2StretchById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches/CCdaf7Ad-f39b-6d5c-C400-13cd16dba1d1" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/layer2-stretches/3cbbbD65-cdc4-ad85-Faa3-EefEcfA62cFA" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ Layer2StretchesApi layer2StretchesApi = new Layer2StretchesApi(client);\n\ \n String extId = \"7F7BDAff-10BC-febD-0bCe-feaEADAaEafb\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteLayer2StretchByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = layer2StretchesApi.DeleteLayer2StretchById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/stats/load-balancer-sessions/{extId}: get: tags: - LoadBalancerSessions summary: Get load balancer session listener and target statistics description: Get load balancer session listener and target statistics operationId: getLoadBalancerSessionStats parameters: - name: extId in: path description: The UUID of the load balancer subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 509d2d78-1c0c-4073-b791-f98f50e514a8 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 85 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId - name: links - name: listenerStats - name: statType - name: targetStats - name: tenantId responses: "200": description: API response for Load balancer session's statistics content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.stats.LoadBalancerSessionStats' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/load-balancer-sessions/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/load-balancer-sessions/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/load-balancer-sessions/{extId}\ \ Get operation" x-permissions: operationName: View Load Balancer Session Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.LoadBalancerSessionStatsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessionStats.GetLoadBalancerSessionStatsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.stats.LoadBalancerSessionStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoadBalancerSessionStatsApi loadBalancerSessionStatsApi = new LoadBalancerSessionStatsApi(apiClient);\n\ \n \n String extId = \"E9f2fAa1-b674-65DD-3a6C-CFcfFF1aa4A1\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ LoadBalancerSessionStatsApiResponse loadBalancerSessionStatsApiResponse\ \ = loadBalancerSessionStatsApi.getLoadBalancerSessionStats(GetLoadBalancerSessionStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .$select(null)\n\ \ .build());\n\n System.out.println(loadBalancerSessionStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, LoadBalancerSessionStatsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let loadBalancerSessionStatsApi = new LoadBalancerSessionStatsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"cbeDB4d2-8fdF-51f7-ADFc-5D4DfEf0aAFe\"\ ;\n //Datetime needs to be in RFC3339 format\n let $startTime = \"\ 2021-01-01T00:00:00-08:00\";\n //Datetime needs to be in RFC3339 format\n\ \ let $endTime = \"2021-01-01T00:00:00-08:00\";\n\n // Construct Optional\ \ Parameters\n var opts = {};\n opts[\"$samplingInterval\"] = 1;\n\ \ opts[\"$statType\"] = SOME_RAW_DATA;\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n loadBalancerSessionStatsApi.getLoadBalancerSessionStats(extId,\ \ $startTime, $endTime, opts).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ load_balancer_session_stats_api = ntnx_networking_py_client.LoadBalancerSessionStatsApi(api_client=client)\n\ \ \n ext_id = \"FEcABA86-0ABf-11B9-b1FD-09aC8F6e2EB0\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\n\ \n try:\n api_response = load_balancer_session_stats_api.get_load_balancer_session_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessionstats\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoadBalancerSessionStatsServiceApiInstance\ \ *api.LoadBalancerSessionStatsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoadBalancerSessionStatsServiceApiInstance = api.NewLoadBalancerSessionStatsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"B6A3A470-3fd5-1eFe-B2a4-1FeBd9Efd4fb\"\ \n // Datetime needs to be in RFC3339 format\n startTime_ := time.Now()\n\ \ // Datetime needs to be in RFC3339 format\n endTime_ := time.Now()\n\ \ \n samplingInterval_ := 1\n \n statType_ := SOME_RAW_DATA\n\ \n\n request := loadbalancersessionstats.GetLoadBalancerSessionStatsRequest{\ \ ExtId: &extId, StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_:\ \ &samplingInterval_, StatType_: &statType_, Select_: nil }\n response,\ \ error := LoadBalancerSessionStatsServiceApiInstance.GetLoadBalancerSessionStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.LoadBalancerSessionStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/stats/load-balancer-sessions/fcFBBb93-2Dcf-C3Cb-AD6B-Aa9aC8ebEBB4?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/stats/load-balancer-sessions/24bd43D3-4DE2-9eD3-Ad1a-b4AEDe0DDc4F?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionStatsApi loadBalancerSessionStatsApi = new LoadBalancerSessionStatsApi(client);\n\ \n String extId = \"cfCB05Ff-c71B-fCae-3b3A-aaBb4EacE8e2\";\n \ \ String startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime\ \ = \"2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n \ \ Object statType = SOME_RAW_DATA;\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetLoadBalancerSessionStatsRequest {\n ExtId = extId,\n\ \ StartTime = startTime,\n EndTime = endTime,\n \ \ SamplingInterval = samplingInterval,\n StatType =\ \ statType,\n Select = select\n };\n try {\n \ \ LoadBalancerSessionStatsApiResponse loadBalancerSessionStatsApiResponse\ \ = loadBalancerSessionStatsApi.GetLoadBalancerSessionStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/load-balancer-sessions: get: tags: - LoadBalancerSessions summary: Get the list of existing load balancer sessions. description: Fetches the list of existing load balancer sessions. operationId: listLoadBalancerSessions parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=extId\ \ eq '0079ebc4-467c-48cf-91cb-7e2f2a7b2363'" - name: listener/protocol example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=listener/protocol\ \ eq Networking.Config.Protocol'TCP'" - name: listener/virtualIP/ipAddress/ipv4/value example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=listener/virtualIP/ipAddress/ipv4/value\ \ eq '40.204.87.101'" - name: listener/virtualIP/ipAddress/ipv6/value example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=listener/virtualIP/ipAddress/ipv6/value\ \ eq '7f8b:7a40:8c4e:ea2c:d804:15e9:1d2c:b338'" - name: listener/virtualIP/subnetReference example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=listener/virtualIP/subnetReference\ \ eq '3d9aba4d-c862-44ee-81ee-5d5db950d257'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=name\ \ eq 'tcp-load-balancer-session'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$filter=vpcReference\ \ eq '0c81204f-0228-4074-9a33-87b9f344ec65'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: listener/protocol example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$orderby=listener/protocol" - name: listener/virtualIP/ipAddress/ipv4/value example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$orderby=listener/virtualIP/ipAddress/ipv4/value" - name: listener/virtualIP/ipAddress/ipv6/value example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$orderby=listener/virtualIP/ipAddress/ipv6/value" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: algorithm example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=algorithm" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=extId" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=links" - name: listener/portRanges example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=listener/portRanges" - name: listener/protocol example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=listener/protocol" - name: listener/virtualIP/assignmentType example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=listener/virtualIP/assignmentType" - name: listener/virtualIP/ipAddress example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=listener/virtualIP/ipAddress" - name: listener/virtualIP/subnetReference example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=listener/virtualIP/subnetReference" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=metadata/projectReferenceId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=name" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=tenantId" - name: type example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=type" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/load-balancer-sessions?$select=vpcReference" responses: "200": description: Paginated list of load balancer sessions. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions Get operation x-permissions: operationName: View Load Balancer Session deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin - name: User - name: Prism Viewer x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.LoadBalancerSessionsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.ListLoadBalancerSessionsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListLoadBalancerSessionsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListLoadBalancerSessionsApiResponse\ \ listLoadBalancerSessionsApiResponse = loadBalancerSessionsApi.listLoadBalancerSessions(ListLoadBalancerSessionsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listLoadBalancerSessionsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, LoadBalancerSessionsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; loadBalancerSessionsApi.listLoadBalancerSessions(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ load_balancer_sessions_api = ntnx_networking_py_client.LoadBalancerSessionsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = load_balancer_sessions_api.list_load_balancer_sessions(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoadBalancerSessionsServiceApiInstance\ \ *api.LoadBalancerSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoadBalancerSessionsServiceApiInstance = api.NewLoadBalancerSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := loadbalancersessions.ListLoadBalancerSessionsRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_:\ \ nil }\n response, error := LoadBalancerSessionsServiceApiInstance.ListLoadBalancerSessions(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.LoadBalancerSession)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/load-balancer-sessions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/load-balancer-sessions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListLoadBalancerSessionsRequest {\n \ \ Page = page,\n Limit = limit,\n Filter = filter,\n\ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListLoadBalancerSessionsApiResponse listLoadBalancerSessionsApiResponse\ \ = loadBalancerSessionsApi.ListLoadBalancerSessions(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - LoadBalancerSessions summary: Create a load balancer session. description: Create a load balancer session. operationId: createLoadBalancerSession parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: e8a8c13c-4a2f-4739-8d02-1ef8759e0955 requestBody: description: Request schema to create the load balancer session. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' required: true responses: "202": description: Task Id corresponding to the create load balancer session request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Load Balancer Session deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.LoadBalancerSessionsApi; import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.CreateLoadBalancerSessionRequest; import com.nutanix.dp1.networking.networking.v4.config.HealthCheck; import com.nutanix.dp1.networking.networking.v4.config.Listener; import com.nutanix.dp1.networking.networking.v4.config.Target; import com.nutanix.dp1.networking.networking.v4.config.LoadBalancerSession; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClient); LoadBalancerSession loadBalancerSession = new LoadBalancerSession(); // LoadBalancerSession object initializations here... loadBalancerSession.setDescription("TCP Load Balancer Session"); // required field loadBalancerSession.setHealthCheckConfig(new HealthCheck()); // required field loadBalancerSession.setListener(new Listener()); // required field loadBalancerSession.setName("tcp-load-balancer-session"); // required field loadBalancerSession.setTargetsConfig(new Target()); // required field loadBalancerSession.setVpcReference("Ed389eBa-E5dd-c627-DC26-7aBe60FDC9Fe"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = loadBalancerSessionsApi.createLoadBalancerSession(CreateLoadBalancerSessionRequest.builder() .build(), loadBalancerSession); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, LoadBalancerSessionsApi, HealthCheck, Listener, Target, LoadBalancerSession } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClientInstance); function sample() { let loadBalancerSession = new LoadBalancerSession(); // LoadBalancerSession object initializations here... loadBalancerSession.setDescription("TCP Load Balancer Session"); // required field loadBalancerSession.setHealthCheckConfig(new HealthCheck()); // required field loadBalancerSession.setListener(new Listener()); // required field loadBalancerSession.setName("tcp-load-balancer-session"); // required field loadBalancerSession.setTargetsConfig(new Target()); // required field loadBalancerSession.setVpcReference("Ff25ca2B-Ab0f-b7fC-BCBf-5AE84bfC4FFD"); // required field loadBalancerSession = JSON.stringify(loadBalancerSession); loadBalancerSessionsApi.createLoadBalancerSession(loadBalancerSession).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) load_balancer_sessions_api = ntnx_networking_py_client.LoadBalancerSessionsApi(api_client=client) loadBalancerSession = ntnx_networking_py_client.LoadBalancerSession() # LoadBalancerSession object initializations here... loadBalancerSession.description = "TCP Load Balancer Session" # required field loadBalancerSession.health_check_config = ntnx_networking_py_client.HealthCheck() # required field loadBalancerSession.listener = ntnx_networking_py_client.Listener() # required field loadBalancerSession.name = "tcp-load-balancer-session" # required field loadBalancerSession.targets_config = ntnx_networking_py_client.Target() # required field loadBalancerSession.vpc_reference = "03bAF8DF-fD9D-9eBd-Deb7-8d99bFC585e8" # required field try: api_response = load_balancer_sessions_api.create_load_balancer_session(body=loadBalancerSession) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessions" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient LoadBalancerSessionsServiceApiInstance *api.LoadBalancerSessionsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. LoadBalancerSessionsServiceApiInstance = api.NewLoadBalancerSessionsServiceApi(ApiClientInstance) ctx := context.Background() loadBalancerSession := import1.NewLoadBalancerSession() // LoadBalancerSession object initializations here... request := loadbalancersessions.CreateLoadBalancerSessionRequest{ Body: loadBalancerSession } response, error := LoadBalancerSessionsServiceApiInstance.CreateLoadBalancerSession(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/load-balancer-sessions" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"tcp-load-balancer-session","description":"TCPLoadBalancerSession","type":"$UNKNOWN","vpcReference":"string","listener":{"virtualIP":{"subnetReference":"string","assignmentType":"$UNKNOWN","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VirtualIP"},"protocol":"$UNKNOWN","portRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.Listener"},"algorithm":"$UNKNOWN","targetsConfig":{"nicTargets":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"categoryTargets":[{"matchAll":[{"scope":"$UNKNOWN","extId":"string","$objectType":"networking.v4.config.CategoryVnicSelector"}],"nics":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"$objectType":"networking.v4.config.CategoryTarget"}],"$objectType":"networking.v4.config.Target"},"healthCheckConfig":{"$objectType":"networking.v4.config.HealthCheck"},"$objectType":"networking.v4.config.LoadBalancerSession"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"tcp-load-balancer-session","description":"TCPLoadBalancerSession","type":"$UNKNOWN","vpcReference":"string","listener":{"virtualIP":{"subnetReference":"string","assignmentType":"$UNKNOWN","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VirtualIP"},"protocol":"$UNKNOWN","portRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.Listener"},"algorithm":"$UNKNOWN","targetsConfig":{"nicTargets":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"categoryTargets":[{"matchAll":[{"scope":"$UNKNOWN","extId":"string","$objectType":"networking.v4.config.CategoryVnicSelector"}],"nics":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"$objectType":"networking.v4.config.CategoryTarget"}],"$objectType":"networking.v4.config.Target"},"healthCheckConfig":{"$objectType":"networking.v4.config.HealthCheck"},"$objectType":"networking.v4.config.LoadBalancerSession"} \ - "https://host:port/api/networking/v4.3/config/load-balancer-sessions" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(client);\n\ \n LoadBalancerSession loadBalancerSession = new LoadBalancerSession();\n\ \n // LoadBalancerSession object initializations here...\n loadBalancerSession.Description\ \ = \"TCP Load Balancer Session\"; // required field\n loadBalancerSession.HealthCheckConfig\ \ = new HealthCheck(); // required field\n loadBalancerSession.Listener\ \ = new Listener(); // required field\n loadBalancerSession.Name =\ \ \"tcp-load-balancer-session\"; // required field\n loadBalancerSession.TargetsConfig\ \ = new Target(); // required field\n loadBalancerSession.VpcReference\ \ = \"A2cFFfbD-1fB3-309F-BdFb-dDf092C91D3D\"; // required field\n\n\n \ \ // Create request object with parameters\n var request =\ \ new CreateLoadBalancerSessionRequest {\n Body = loadBalancerSession\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = loadBalancerSessionsApi.CreateLoadBalancerSession(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/load-balancer-sessions/{extId}: get: tags: - LoadBalancerSessions summary: Get the load balancer session with the specified UUID. description: Get a load balancer session with the specified UUID. operationId: getLoadBalancerSessionById parameters: - name: extId in: path description: The UUID of the load balancer subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f495b1a-ba39-4bba-a759-da1424182032 - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: algorithm - name: extId - name: links - name: listener/portRanges - name: listener/protocol - name: listener/virtualIP/assignmentType - name: listener/virtualIP/ipAddress - name: listener/virtualIP/subnetReference - name: metadata/categoryIds - name: metadata/ownerReferenceId - name: metadata/ownerUserName - name: metadata/projectName - name: metadata/projectReferenceId - name: name - name: tenantId - name: type - name: vpcReference responses: "200": description: The load balancer session object returned by the get request. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions/{extId}\ \ Get operation" x-permissions: operationName: View Load Balancer Session deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin - name: User - name: Prism Viewer x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.LoadBalancerSessionsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.GetLoadBalancerSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetLoadBalancerSessionApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClient);\n\ \n \n String extId = \"ccdd2dbE-C04E-15bd-bFEc-d1f1CBe5395B\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetLoadBalancerSessionApiResponse\ \ getLoadBalancerSessionApiResponse = loadBalancerSessionsApi.getLoadBalancerSessionById(GetLoadBalancerSessionByIdRequest.builder()\n\ \ .extId(extId)\n .$select(null)\n \ \ .build());\n\n System.out.println(getLoadBalancerSessionApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, LoadBalancerSessionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"cfDaFcDc-C3ae-e6DF-F20d-3cfBfbB28FDd\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $select\"] = \"string_sample_data\";\n\n\n\n\n loadBalancerSessionsApi.getLoadBalancerSessionById(extId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ load_balancer_sessions_api = ntnx_networking_py_client.LoadBalancerSessionsApi(api_client=client)\n\ \ \n ext_id = \"6A1EeBbD-C9eb-aE77-dFAC-DcEB47b8423e\"\n\n\n try:\n\ \ api_response = load_balancer_sessions_api.get_load_balancer_session_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoadBalancerSessionsServiceApiInstance\ \ *api.LoadBalancerSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoadBalancerSessionsServiceApiInstance = api.NewLoadBalancerSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"CdBfBeb1-Cb73-A44d-AfB4-BA85Ec188C8c\"\ \n\n\n request := loadbalancersessions.GetLoadBalancerSessionByIdRequest{\ \ ExtId: &extId, Select_: nil }\n response, error := LoadBalancerSessionsServiceApiInstance.GetLoadBalancerSessionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.LoadBalancerSession)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/load-balancer-sessions/ad7D41A0-7aCC-3f06-bB12-a89Cfada23EC?$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/load-balancer-sessions/A7DFcF5A-Fc1A-F1Af-b1B6-ABFdfbd7bFF0?$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(client);\n\ \n String extId = \"4bBbaA9b-Fc9d-55E5-CEbf-C9C7f81834fa\";\n \ \ String select = \"string_sample_data\";\n\n // Create request object\ \ with parameters\n var request = new GetLoadBalancerSessionByIdRequest\ \ {\n ExtId = extId,\n Select = select\n };\n\ \ try {\n GetLoadBalancerSessionApiResponse getLoadBalancerSessionApiResponse\ \ = loadBalancerSessionsApi.GetLoadBalancerSessionById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - LoadBalancerSessions summary: Update the specified load balancer session. description: Update the specified load balancer session. operationId: updateLoadBalancerSessionById parameters: - name: extId in: path description: The UUID of the load balancer subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 67cd099f-6e26-481c-b6a1-96af69ef8dca - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 8f67f842-6aec-4ea9-b419-5e7606be7dea requestBody: description: Request schema to update the specified load balancer session. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' required: true responses: "202": description: Task Id corresponding to update load balancer session. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Load Balancer Session deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.LoadBalancerSessionsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.UpdateLoadBalancerSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.GetLoadBalancerSessionByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.HealthCheck;\n\ import com.nutanix.dp1.networking.networking.v4.config.Listener;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.Target;\nimport com.nutanix.dp1.networking.networking.v4.config.LoadBalancerSession;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetLoadBalancerSessionApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClient);\n\ \n LoadBalancerSession loadBalancerSession = new LoadBalancerSession();\n\ \n // LoadBalancerSession object initializations here...\n \ \ loadBalancerSession.setDescription(\"TCP Load Balancer Session\"); //\ \ required field\n loadBalancerSession.setHealthCheckConfig(new HealthCheck());\ \ // required field\n loadBalancerSession.setListener(new Listener());\ \ // required field\n loadBalancerSession.setName(\"tcp-load-balancer-session\"\ ); // required field\n loadBalancerSession.setTargetsConfig(new\ \ Target()); // required field\n loadBalancerSession.setVpcReference(\"\ e5afC0cf-7Ee0-cd6F-bA91-f6ef39DDCDAD\"); // required field\n \n\ \ String extId = \"ec9Ce25a-c8B5-aEAC-d24A-d3BE3a2Cbdab\";\n\n \ \ // perform GET call\n GetLoadBalancerSessionApiResponse getResponse\ \ = null;\n try {\n getResponse = loadBalancerSessionsApi.getLoadBalancerSessionById(GetLoadBalancerSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = loadBalancerSessionsApi.updateLoadBalancerSessionById(UpdateLoadBalancerSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build(), loadBalancerSession,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, LoadBalancerSessionsApi, HealthCheck, Listener,\ \ Target, LoadBalancerSession, GetLoadBalancerSessionApiResponse } from\ \ \"@nutanix-api/networking-js-client\";\n\n// Configure the client\nlet\ \ apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClientInstance);\n\ \nfunction sample() {\n let loadBalancerSession = new LoadBalancerSession();\n\ \n // LoadBalancerSession object initializations here...\n loadBalancerSession.setDescription(\"\ TCP Load Balancer Session\"); // required field\n loadBalancerSession.setHealthCheckConfig(new\ \ HealthCheck()); // required field\n loadBalancerSession.setListener(new\ \ Listener()); // required field\n loadBalancerSession.setName(\"tcp-load-balancer-session\"\ ); // required field\n loadBalancerSession.setTargetsConfig(new Target());\ \ // required field\n loadBalancerSession.setVpcReference(\"c5eEFfEA-e7af-86DF-3bAb-DD5EA01bE3E2\"\ ); // required field\n loadBalancerSession = JSON.stringify(loadBalancerSession);\n\ \n \n let extId = \"EC5FCBfD-fAaD-a85F-BFa4-0c4Af602683e\";\n\n\n\ \ // Perform Get call\n loadBalancerSessionsApi.getLoadBalancerSessionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n loadBalancerSessionsApi.updateLoadBalancerSessionById(extId,\ \ loadBalancerSession, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ load_balancer_sessions_api = ntnx_networking_py_client.LoadBalancerSessionsApi(api_client=client)\n\ \ loadBalancerSession = ntnx_networking_py_client.LoadBalancerSession()\n\ \n # LoadBalancerSession object initializations here...\n loadBalancerSession.description\ \ = \"TCP Load Balancer Session\" # required field\n loadBalancerSession.health_check_config\ \ = ntnx_networking_py_client.HealthCheck() # required field\n loadBalancerSession.listener\ \ = ntnx_networking_py_client.Listener() # required field\n loadBalancerSession.name\ \ = \"tcp-load-balancer-session\" # required field\n loadBalancerSession.targets_config\ \ = ntnx_networking_py_client.Target() # required field\n loadBalancerSession.vpc_reference\ \ = \"DDb0B7FA-ecAE-DfE5-EF4B-aaeeeD51ce65\" # required field\n \n \ \ ext_id = \"3CB1FfDA-8F70-BfeB-bb4a-AFb1Ae35cedA\"\n\n try:\n \ \ api_response = load_balancer_sessions_api.get_load_balancer_session_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = load_balancer_sessions_api.update_load_balancer_session_by_id(extId=ext_id,\ \ body=loadBalancerSession, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoadBalancerSessionsServiceApiInstance\ \ *api.LoadBalancerSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoadBalancerSessionsServiceApiInstance = api.NewLoadBalancerSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n loadBalancerSession := import1.NewLoadBalancerSession()\n\ \n // LoadBalancerSession object initializations here...\n\n \n \ \ extId := \"e48C3Bb8-1aac-d3dE-8FA3-d128EEb52fD8\"\n\n getRequest :=\ \ loadbalancersessions.GetLoadBalancerSessionByIdRequest{ extId: &extId\ \ }\n getResponse, err := LoadBalancerSessionsServiceApiInstance.GetLoadBalancerSessionById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := loadbalancersessions.UpdateLoadBalancerSessionByIdRequest{\ \ ExtId: &extId, Body: loadBalancerSession }\n response, error := LoadBalancerSessionsServiceApiInstance.UpdateLoadBalancerSessionById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/load-balancer-sessions/5633ABCF-80Bc-B9fA-C9Ca-aefdF3bAcf00" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"tcp-load-balancer-session","description":"TCPLoadBalancerSession","type":"$UNKNOWN","vpcReference":"string","listener":{"virtualIP":{"subnetReference":"string","assignmentType":"$UNKNOWN","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VirtualIP"},"protocol":"$UNKNOWN","portRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.Listener"},"algorithm":"$UNKNOWN","targetsConfig":{"nicTargets":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"categoryTargets":[{"matchAll":[{"scope":"$UNKNOWN","extId":"string","$objectType":"networking.v4.config.CategoryVnicSelector"}],"nics":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"$objectType":"networking.v4.config.CategoryTarget"}],"$objectType":"networking.v4.config.Target"},"healthCheckConfig":{"$objectType":"networking.v4.config.HealthCheck"},"$objectType":"networking.v4.config.LoadBalancerSession"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"tcp-load-balancer-session","description":"TCPLoadBalancerSession","type":"$UNKNOWN","vpcReference":"string","listener":{"virtualIP":{"subnetReference":"string","assignmentType":"$UNKNOWN","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.VirtualIP"},"protocol":"$UNKNOWN","portRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.Listener"},"algorithm":"$UNKNOWN","targetsConfig":{"nicTargets":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"categoryTargets":[{"matchAll":[{"scope":"$UNKNOWN","extId":"string","$objectType":"networking.v4.config.CategoryVnicSelector"}],"nics":[{"virtualNicReference":"string","vmReference":"string","health":"$UNKNOWN","$objectType":"networking.v4.config.NicTarget"}],"$objectType":"networking.v4.config.CategoryTarget"}],"$objectType":"networking.v4.config.Target"},"healthCheckConfig":{"$objectType":"networking.v4.config.HealthCheck"},"$objectType":"networking.v4.config.LoadBalancerSession"} \ - "https://host:port/api/networking/v4.3/config/load-balancer-sessions/5ADC5Ceb-8bD1-a0c4-4ef7-ECbEdEb3Ebf6" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(client);\n\ \n LoadBalancerSession loadBalancerSession = new LoadBalancerSession();\n\ \n // LoadBalancerSession object initializations here...\n loadBalancerSession.Description\ \ = \"TCP Load Balancer Session\"; // required field\n loadBalancerSession.HealthCheckConfig\ \ = new HealthCheck(); // required field\n loadBalancerSession.Listener\ \ = new Listener(); // required field\n loadBalancerSession.Name =\ \ \"tcp-load-balancer-session\"; // required field\n loadBalancerSession.TargetsConfig\ \ = new Target(); // required field\n loadBalancerSession.VpcReference\ \ = \"DeCffFbF-2A5A-9aEA-d5a4-DcADAC2F0d5F\"; // required field\n\n \ \ String extId = \"Bd67e6dA-cF36-3beA-c1dF-Ae5F2fb1B6c5\";\n\n \ \ // perform GET call\n var getRequest = new GetLoadBalancerSessionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetLoadBalancerSessionApiResponse\ \ getResponse = loadBalancerSessionsApi.GetLoadBalancerSessionById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateLoadBalancerSessionByIdRequest {\n ExtId\ \ = extId,\n Body = loadBalancerSession,\n \n \ \ \n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = loadBalancerSessionsApi.UpdateLoadBalancerSessionById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - LoadBalancerSessions summary: Delete the specified load balancer session. description: Delete the specified load balancer session. operationId: deleteLoadBalancerSessionById parameters: - name: extId in: path description: The UUID of the load balancer subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: acea0696-8c9c-499e-b3a4-7186a11d49c0 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: b5ac6864-9fe8-4e28-81ee-2c596c8ce210 responses: "202": description: Task Id corresponding to delete load balancer session request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Load Balancer Session deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.LoadBalancerSessionsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.LoadBalancerSessions.DeleteLoadBalancerSessionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClient);\n\ \n \n String extId = \"2092dA7a-d75E-eAFD-ecEB-6FebDe3efc3e\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = loadBalancerSessionsApi.deleteLoadBalancerSessionById(DeleteLoadBalancerSessionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, LoadBalancerSessionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let loadBalancerSessionsApi = new LoadBalancerSessionsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"1c593cef-3Db2-8724-0dEf-4DDCBBBDAFEc\"\ ;\n\n\n\n\n\n loadBalancerSessionsApi.deleteLoadBalancerSessionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ load_balancer_sessions_api = ntnx_networking_py_client.LoadBalancerSessionsApi(api_client=client)\n\ \ \n ext_id = \"fbdE80Cd-CaD0-eb1C-9eDF-8Cb27E1e7358\"\n\n\n try:\n\ \ api_response = load_balancer_sessions_api.delete_load_balancer_session_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/loadbalancersessions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoadBalancerSessionsServiceApiInstance\ \ *api.LoadBalancerSessionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoadBalancerSessionsServiceApiInstance = api.NewLoadBalancerSessionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"DeD1b0FC-1Efe-Cc3F-5cb2-FECaC0CdeEFA\"\ \n\n\n request := loadbalancersessions.DeleteLoadBalancerSessionByIdRequest{\ \ ExtId: &extId }\n response, error := LoadBalancerSessionsServiceApiInstance.DeleteLoadBalancerSessionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/load-balancer-sessions/eEC2C2dE-a8fF-5b8B-3aAC-cFA4cce2C1fd" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/load-balancer-sessions/BabD7BA9-c4AA-bCBd-Ac5F-cdCBdAebcEBf" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ LoadBalancerSessionsApi loadBalancerSessionsApi = new LoadBalancerSessionsApi(client);\n\ \n String extId = \"e8B714BC-fF74-c3d7-1d2E-ee1cEBA9EaFb\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteLoadBalancerSessionByIdRequest {\n ExtId = extId\n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = loadBalancerSessionsApi.DeleteLoadBalancerSessionById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses: get: tags: - MacAddresses summary: Get learned MAC addresses of the specified Layer2Stretch description: "Get the MAC addresses that the specified Layer2Stretch has learned\ \ (i.e. ARP broadcasts, manual configuration)." operationId: listLearnedMacAddressesByLayer2StretchId parameters: - name: layer2StretchExtId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5e64feee-45ed-4335-9401-88717192096c - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: remoteGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses?$filter=remoteGatewayReference\ \ eq 'c682f494-f6e7-44c7-a50f-5aebc483b33a'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: remoteGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses?$orderby=remoteGatewayReference" responses: "200": description: List of learned MAC addresses for the specified Layer2Stretch. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.LearnedMacAddress' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses\ \ Get operation" x-permissions: operationName: View Layer2 Stretch Mac Address deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.MacAddressesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.MacAddresses.ListLearnedMacAddressesByLayer2StretchIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListLearnedMacAddressesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ MacAddressesApi macAddressesApi = new MacAddressesApi(apiClient);\n\ \n \n String layer2StretchExtId = \"04Af85bD-Da0a-ff24-BFa2-dB2D9bA9ED9b\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListLearnedMacAddressesApiResponse\ \ listLearnedMacAddressesApiResponse = macAddressesApi.listLearnedMacAddressesByLayer2StretchId(ListLearnedMacAddressesByLayer2StretchIdRequest.builder()\n\ \ .layer2StretchExtId(layer2StretchExtId)\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .build());\n\n \ \ System.out.println(listLearnedMacAddressesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, MacAddressesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let macAddressesApi = new MacAddressesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let layer2StretchExtId = \"Fc637915-5cef-9E2f-D1fa-d8ABeCa81eCF\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n macAddressesApi.listLearnedMacAddressesByLayer2StretchId(layer2StretchExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ mac_addresses_api = ntnx_networking_py_client.MacAddressesApi(api_client=client)\n\ \ \n layer2_stretch_ext_id = \"89dE4Dfb-0Efd-FaBb-E4e7-2884FfF73CCf\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = mac_addresses_api.list_learned_mac_addresses_by_layer2_stretch_id(layer2StretchExtId=layer2_stretch_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/macaddresses\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n MacAddressesServiceApiInstance\ \ *api.MacAddressesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ MacAddressesServiceApiInstance = api.NewMacAddressesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n layer2StretchExtId := \"83ea6973-95bf-5f2a-DbC3-5a5CcAFbbEda\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := macaddresses.ListLearnedMacAddressesByLayer2StretchIdRequest{\ \ Layer2StretchExtId: &layer2StretchExtId, Page_: &page_, Limit_: &limit_,\ \ Filter_: nil, Orderby_: nil }\n response, error := MacAddressesServiceApiInstance.ListLearnedMacAddressesByLayer2StretchId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.LearnedMacAddress)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches/be5b3066-eacF-3B2E-e2fB-e2fbEd27baD6/learned-mac-addresses?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/layer2-stretches/EaebFcfA-9AFF-B0db-2Ca5-FCa2cA4E5eDD/learned-mac-addresses?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ MacAddressesApi macAddressesApi = new MacAddressesApi(client);\n\n\ \ String layer2StretchExtId = \"0d6B92bf-Ce0C-caC2-e20F-54C6fC5E6Af2\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListLearnedMacAddressesByLayer2StretchIdRequest {\n Layer2StretchExtId\ \ = layer2StretchExtId,\n Page = page,\n Limit = limit,\n\ \ Filter = filter,\n Orderby = orderby\n };\n\ \ try {\n ListLearnedMacAddressesApiResponse listLearnedMacAddressesApiResponse\ \ = macAddressesApi.ListLearnedMacAddressesByLayer2StretchId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses/{extId}: get: tags: - MacAddresses summary: Get a specified learned MAC address of the specified Layer2Stretch description: "Get a specified MAC address that the specified Layer2Stretch has\ \ learned (i.e. ARP broadcasts, manual configuration)." operationId: getLearnedMacAddressForLayer2StretchById parameters: - name: layer2StretchExtId in: path description: External ID of the Layer2Stretch configuration. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9e8d9c5f-62f8-4e2f-89fe-ed052988bd49 - name: extId in: path description: External ID of the specified learned MAC address. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b37a51c7-cb05-4998-9861-d8c105818640 responses: "200": description: The specified learned MAC address for the specified Layer2Stretch. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.LearnedMacAddress' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses/{extId}\ \ Get operation" x-permissions: operationName: View Layer2 Stretch Mac Address deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.MacAddressesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.MacAddresses.GetLearnedMacAddressForLayer2StretchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetLearnedMacAddressApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ MacAddressesApi macAddressesApi = new MacAddressesApi(apiClient);\n\ \n \n String layer2StretchExtId = \"cb2cF4d1-aDcF-8FFf-c4CD-64B1c513CB36\"\ ;\n \n String extId = \"aaF720eE-4DA1-ecDf-8Cab-C4Afa46E17fD\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetLearnedMacAddressApiResponse\ \ getLearnedMacAddressApiResponse = macAddressesApi.getLearnedMacAddressForLayer2StretchById(GetLearnedMacAddressForLayer2StretchByIdRequest.builder()\n\ \ .layer2StretchExtId(layer2StretchExtId)\n \ \ .extId(extId)\n .build());\n\n System.out.println(getLearnedMacAddressApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, MacAddressesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let macAddressesApi = new MacAddressesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let layer2StretchExtId = \"7B2dFCB7-9DB6-999e-9AEC-5d1aefE9aE96\"\ ;\n \n let extId = \"DAA151AC-66cd-Af9e-bE1a-0629C304dE7E\";\n\n\n\ \n\n\n macAddressesApi.getLearnedMacAddressForLayer2StretchById(layer2StretchExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ mac_addresses_api = ntnx_networking_py_client.MacAddressesApi(api_client=client)\n\ \ \n layer2_stretch_ext_id = \"FC4AdfB6-2dEa-a6ae-0BBD-Ffc2cEbcE92a\"\ \n \n ext_id = \"0ac25Afc-537E-E6Cf-e3ad-c6eFBdFAFBA2\"\n\n\n try:\n\ \ api_response = mac_addresses_api.get_learned_mac_address_for_layer2_stretch_by_id(layer2StretchExtId=layer2_stretch_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/macaddresses\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n MacAddressesServiceApiInstance\ \ *api.MacAddressesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ MacAddressesServiceApiInstance = api.NewMacAddressesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n layer2StretchExtId := \"38A0Cc48-B21a-bfa8-F854-bDFDBBbbEeDE\"\ \n \n extId := \"84DeD4c1-BB7E-c3Fb-ccbD-FE2Ce1fFf47B\"\n\n\n request\ \ := macaddresses.GetLearnedMacAddressForLayer2StretchByIdRequest{ Layer2StretchExtId:\ \ &layer2StretchExtId, ExtId: &extId }\n response, error := MacAddressesServiceApiInstance.GetLearnedMacAddressForLayer2StretchById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.LearnedMacAddress)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/layer2-stretches/04E64fFb-98cA-fD49-C529-ecCa74cfbFA5/learned-mac-addresses/5DF8CbfB-aA1e-C71d-0DA2-eADe6DC0CEAf" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/layer2-stretches/fD0BB5Ed-eca8-a66a-fAef-da6bFa84A62a/learned-mac-addresses/c9cfebAe-6d2d-B3Ab-0Cd6-Aa9f12FBbaEB" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ MacAddressesApi macAddressesApi = new MacAddressesApi(client);\n\n\ \ String layer2StretchExtId = \"adA73dCD-cBEB-E2BF-491a-caAd4dAbDD5c\"\ ;\n String extId = \"CE6FdAd7-69c9-d75F-CceC-e2A6EfeAc693\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetLearnedMacAddressForLayer2StretchByIdRequest {\n Layer2StretchExtId\ \ = layer2StretchExtId,\n ExtId = extId\n };\n \ \ try {\n GetLearnedMacAddressApiResponse getLearnedMacAddressApiResponse\ \ = macAddressesApi.GetLearnedMacAddressForLayer2StretchById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/controllers: get: tags: - NetworkControllers summary: Gets the list of existing network controllers description: Gets the list of existing network controllers. operationId: listNetworkControllers parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 responses: "200": description: Paginated list of network controllers content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 1 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.NetworkController' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/controllers Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/controllers Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/controllers Get operation x-permissions: operationName: View Network Controller deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism User x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkControllersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.ListNetworkControllersRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListNetworkControllersApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListNetworkControllersApiResponse\ \ listNetworkControllersApiResponse = networkControllersApi.listNetworkControllers(ListNetworkControllersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .build());\n\n System.out.println(listNetworkControllersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, NetworkControllersApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let networkControllersApi = new NetworkControllersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; networkControllersApi.listNetworkControllers(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_controllers_api = ntnx_networking_py_client.NetworkControllersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = network_controllers_api.list_network_controllers(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkcontrollers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkControllersServiceApiInstance\ \ *api.NetworkControllersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkControllersServiceApiInstance = api.NewNetworkControllersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := networkcontrollers.ListNetworkControllersRequest{\ \ Page_: &page_, Limit_: &limit_ }\n response, error := NetworkControllersServiceApiInstance.ListNetworkControllers(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.NetworkController)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/controllers?$limit=50&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/controllers?$limit=50&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(client);\n\ \n int page = 0;\n int limit = 50;\n\n // Create request\ \ object with parameters\n var request = new ListNetworkControllersRequest\ \ {\n Page = page,\n Limit = limit\n };\n \ \ try {\n ListNetworkControllersApiResponse listNetworkControllersApiResponse\ \ = networkControllersApi.ListNetworkControllers(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" post: tags: - NetworkControllers summary: Create a network controller description: | Create a network controller. For large Prism Centrals, an additional 3GB of memory and 3 vCPUs are required, for each Prism Central node. For small Prism Centrals, an additional 1GB of memory and 1 vCPU is required, for each Prism Central node. operationId: createNetworkController parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: a4216a7e-5843-4715-babb-f1022f532267 requestBody: description: Network controller to create content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NetworkController' required: true responses: "202": description: Task Id corresponding to the create operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Network Controller deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.NetworkControllersApi; import com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.CreateNetworkControllerRequest; import com.nutanix.dp1.networking.networking.v4.config.NetworkController; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. NetworkControllersApi networkControllersApi = new NetworkControllersApi(apiClient); NetworkController networkController = new NetworkController(); // NetworkController object initializations here... try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = networkControllersApi.createNetworkController(CreateNetworkControllerRequest.builder() .build(), networkController); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, NetworkControllersApi, NetworkController } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let networkControllersApi = new NetworkControllersApi(apiClientInstance); function sample() { let networkController = new NetworkController(); // NetworkController object initializations here... networkController = JSON.stringify(networkController); networkControllersApi.createNetworkController(networkController).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) network_controllers_api = ntnx_networking_py_client.NetworkControllersApi(api_client=client) networkController = ntnx_networking_py_client.NetworkController() # NetworkController object initializations here... try: api_response = network_controllers_api.create_network_controller(body=networkController) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkcontrollers" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient NetworkControllersServiceApiInstance *api.NetworkControllersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. NetworkControllersServiceApiInstance = api.NewNetworkControllersServiceApi(ApiClientInstance) ctx := context.Background() networkController := import1.NewNetworkController() // NetworkController object initializations here... request := networkcontrollers.CreateNetworkControllerRequest{ Body: networkController } response, error := NetworkControllersServiceApiInstance.CreateNetworkController(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/controllers" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"controllerStatus":"$UNKNOWN","controllerVersion":"5.0.0","minimumAHVVersion":"10.0","minimumNOSVersion":"7.0","cloudSubstrate":"$UNKNOWN","defaultVlanStack":"$UNKNOWN","vpcGlobalConfig":{"isOverlappingErpsEnabled":false,"$objectType":"networking.v4.config.VpcGlobalConfig"},"$objectType":"networking.v4.config.NetworkController"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"controllerStatus":"$UNKNOWN","controllerVersion":"5.0.0","minimumAHVVersion":"10.0","minimumNOSVersion":"7.0","cloudSubstrate":"$UNKNOWN","defaultVlanStack":"$UNKNOWN","vpcGlobalConfig":{"isOverlappingErpsEnabled":false,"$objectType":"networking.v4.config.VpcGlobalConfig"},"$objectType":"networking.v4.config.NetworkController"} \ - "https://host:port/api/networking/v4.3/config/controllers" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(client);\n\ \n NetworkController networkController = new NetworkController();\n\ \n // NetworkController object initializations here...\n\n\n \ \ // Create request object with parameters\n var request = new CreateNetworkControllerRequest\ \ {\n Body = networkController\n };\n try {\n \ \ ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = networkControllersApi.CreateNetworkController(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/controllers/{extId}: get: tags: - NetworkControllers summary: Get the network controller with the specified UUID description: Get the network controller with the specified UUID. operationId: getNetworkControllerById parameters: - name: extId in: path description: The UUID of the network controller required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5cd7c518-4e84-4f27-8080-cf94935909d8 responses: "200": description: Network controller object content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.NetworkController' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/controllers/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/controllers/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/controllers/{extId}\ \ Get operation" x-permissions: operationName: View Network Controller deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism User x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkControllersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.GetNetworkControllerByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetNetworkControllerApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(apiClient);\n\ \n \n String extId = \"aee6BDcc-Dc75-bA8e-8eD3-ffAe7CCF3BdD\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetNetworkControllerApiResponse\ \ getNetworkControllerApiResponse = networkControllersApi.getNetworkControllerById(GetNetworkControllerByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getNetworkControllerApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkControllersApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkControllersApi = new NetworkControllersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"7FEFD2F1-1EAC-bbA0-4ECd-12eA1df7dDCe\"\ ;\n\n\n\n\n\n networkControllersApi.getNetworkControllerById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_controllers_api = ntnx_networking_py_client.NetworkControllersApi(api_client=client)\n\ \ \n ext_id = \"e1A3cfb0-AB4D-C3BC-aFB2-a17AC00F4aD7\"\n\n\n try:\n\ \ api_response = network_controllers_api.get_network_controller_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkcontrollers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkControllersServiceApiInstance\ \ *api.NetworkControllersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkControllersServiceApiInstance = api.NewNetworkControllersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"cFEab80E-4aBf-cEBF-0A1c-E4C6efeaebd4\"\ \n\n\n request := networkcontrollers.GetNetworkControllerByIdRequest{\ \ ExtId: &extId }\n response, error := NetworkControllersServiceApiInstance.GetNetworkControllerById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.NetworkController)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/controllers/bEAB76ae-139E-5Ea1-BeEB-Cb33F3E67b6f" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/controllers/C5Adf8fE-7EC4-059a-7e4f-DDC1e52EBBD0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(client);\n\ \n String extId = \"1c5da2b3-aAcd-6dcE-AcEe-99120Faa6f03\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetNetworkControllerByIdRequest {\n ExtId = extId\n \ \ };\n try {\n GetNetworkControllerApiResponse getNetworkControllerApiResponse\ \ = networkControllersApi.GetNetworkControllerById(request);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - NetworkControllers summary: Update a network controller summary description: Update a network controller. operationId: updateNetworkControllerById parameters: - name: extId in: path description: The UUID of the network controller required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: ffc14a17-ea2a-43e4-8475-5cb99d93d040 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 805aa186-6c98-42f6-85be-ead4579f3a7b requestBody: description: Network controller to update content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NetworkController' required: true responses: "202": description: Task Id corresponding to the update operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Network Controller deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkControllersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.UpdateNetworkControllerByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.GetNetworkControllerByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.NetworkController;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetNetworkControllerApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(apiClient);\n\ \n NetworkController networkController = new NetworkController();\n\ \n // NetworkController object initializations here...\n \n\ \ String extId = \"eECEcadd-0Bda-fbcc-B5c0-96dD548fdACf\";\n\n \ \ // perform GET call\n GetNetworkControllerApiResponse getResponse\ \ = null;\n try {\n getResponse = networkControllersApi.getNetworkControllerById(GetNetworkControllerByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkControllersApi.updateNetworkControllerById(UpdateNetworkControllerByIdRequest.builder()\n\ \ .extId(extId)\n .build(), networkController,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkControllersApi, NetworkController, GetNetworkControllerApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkControllersApi = new NetworkControllersApi(apiClientInstance);\n\ \nfunction sample() {\n let networkController = new NetworkController();\n\ \n // NetworkController object initializations here...\n networkController\ \ = JSON.stringify(networkController);\n\n \n let extId = \"5cdadedd-abf0-1dbB-C7CC-254FcBFBBaAc\"\ ;\n\n\n // Perform Get call\n networkControllersApi.getNetworkControllerById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n networkControllersApi.updateNetworkControllerById(extId,\ \ networkController, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_controllers_api = ntnx_networking_py_client.NetworkControllersApi(api_client=client)\n\ \ networkController = ntnx_networking_py_client.NetworkController()\n\ \n # NetworkController object initializations here...\n \n ext_id\ \ = \"08eaf0c5-8dbc-5ecA-CeF3-aeC9aE4BfdBF\"\n\n try:\n api_response\ \ = network_controllers_api.get_network_controller_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = network_controllers_api.update_network_controller_by_id(extId=ext_id,\ \ body=networkController, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkcontrollers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkControllersServiceApiInstance\ \ *api.NetworkControllersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkControllersServiceApiInstance = api.NewNetworkControllersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n networkController := import1.NewNetworkController()\n\ \n // NetworkController object initializations here...\n\n \n extId\ \ := \"beBE50C0-a5Cf-BD5b-B23d-cBdA4d37a3f2\"\n\n getRequest := networkcontrollers.GetNetworkControllerByIdRequest{\ \ extId: &extId }\n getResponse, err := NetworkControllersServiceApiInstance.GetNetworkControllerById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := networkcontrollers.UpdateNetworkControllerByIdRequest{\ \ ExtId: &extId, Body: networkController }\n response, error := NetworkControllersServiceApiInstance.UpdateNetworkControllerById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/controllers/bEaecc2e-e00f-28Ab-6Bec-2EC0ACddF59a" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"controllerStatus":"$UNKNOWN","controllerVersion":"5.0.0","minimumAHVVersion":"10.0","minimumNOSVersion":"7.0","cloudSubstrate":"$UNKNOWN","defaultVlanStack":"$UNKNOWN","vpcGlobalConfig":{"isOverlappingErpsEnabled":false,"$objectType":"networking.v4.config.VpcGlobalConfig"},"$objectType":"networking.v4.config.NetworkController"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"controllerStatus":"$UNKNOWN","controllerVersion":"5.0.0","minimumAHVVersion":"10.0","minimumNOSVersion":"7.0","cloudSubstrate":"$UNKNOWN","defaultVlanStack":"$UNKNOWN","vpcGlobalConfig":{"isOverlappingErpsEnabled":false,"$objectType":"networking.v4.config.VpcGlobalConfig"},"$objectType":"networking.v4.config.NetworkController"} \ - "https://host:port/api/networking/v4.3/config/controllers/bFCEE0C1-d789-EEDA-Afae-e9E7C0EeeeBb" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(client);\n\ \n NetworkController networkController = new NetworkController();\n\ \n // NetworkController object initializations here...\n\n String\ \ extId = \"fFF7dCCE-D5de-6e3D-d5d6-cB6EDEfDb8ef\";\n\n // perform\ \ GET call\n var getRequest = new GetNetworkControllerByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetNetworkControllerApiResponse\ \ getResponse = networkControllersApi.GetNetworkControllerById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateNetworkControllerByIdRequest {\n ExtId\ \ = extId,\n Body = networkController,\n \n \ \ \n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkControllersApi.UpdateNetworkControllerById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - NetworkControllers summary: Delete a network controller description: Delete a network controller. operationId: deleteNetworkControllerById parameters: - name: extId in: path description: The UUID of the network controller required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 50396864-e4d2-4cca-8503-a3a0b809355e - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: fe84bb38-e0d5-4cda-8580-2b32129c4fa5 responses: "202": description: Task Id corresponding to the delete operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Network Controller deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkControllersApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkControllers.DeleteNetworkControllerByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(apiClient);\n\ \n \n String extId = \"48F0Eaff-e0c8-4Eb9-b1cd-8aFB6C2ddEe1\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkControllersApi.deleteNetworkControllerById(DeleteNetworkControllerByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkControllersApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkControllersApi = new NetworkControllersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"D9F6bbAe-F503-fefa-eEED-bCD165B8C54b\"\ ;\n\n\n\n\n\n networkControllersApi.deleteNetworkControllerById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_controllers_api = ntnx_networking_py_client.NetworkControllersApi(api_client=client)\n\ \ \n ext_id = \"f7fB0ADB-bA4A-5fa6-C953-e5dCFdead1B6\"\n\n\n try:\n\ \ api_response = network_controllers_api.delete_network_controller_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkcontrollers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkControllersServiceApiInstance\ \ *api.NetworkControllersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkControllersServiceApiInstance = api.NewNetworkControllersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"9af5f592-25Ea-d49A-b1Cd-E8d5ECFABD09\"\ \n\n\n request := networkcontrollers.DeleteNetworkControllerByIdRequest{\ \ ExtId: &extId }\n response, error := NetworkControllersServiceApiInstance.DeleteNetworkControllerById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/controllers/a1DF00Be-C7cb-b23d-Dd8a-7ceFDCCb9Ec3" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/controllers/DbCbcF86-Fcda-baaF-EaD8-bEe0aCC0eee9" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkControllersApi networkControllersApi = new NetworkControllersApi(client);\n\ \n String extId = \"d8C1AEcd-8f5E-6bea-E9DC-7F2bAfddbCcd\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteNetworkControllerByIdRequest {\n ExtId = extId\n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = networkControllersApi.DeleteNetworkControllerById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/network-functions: get: tags: - NetworkFunctions summary: Get the list of existing network functions. description: Fetches the list of existing network functions. operationId: listNetworkFunctions parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/network-functions?$filter=extId\ \ eq '0079ebc4-467c-48cf-91cb-7e2f2a7b2363'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/network-functions?$filter=name\ \ eq 'samplenf'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/network-functions?$orderby=name" responses: "200": description: Paginated list of network functions. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/network-functions Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/network-functions Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/network-functions Get operation x-permissions: operationName: View Network Function deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: Flow Admin - name: User - name: Prism Viewer - name: Flow Viewer - name: Flow Policy Author x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkFunctionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.ListNetworkFunctionsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListNetworkFunctionsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListNetworkFunctionsApiResponse\ \ listNetworkFunctionsApiResponse = networkFunctionsApi.listNetworkFunctions(ListNetworkFunctionsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listNetworkFunctionsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, NetworkFunctionsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let networkFunctionsApi = new NetworkFunctionsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; networkFunctionsApi.listNetworkFunctions(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_functions_api = ntnx_networking_py_client.NetworkFunctionsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = network_functions_api.list_network_functions(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkfunctions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkFunctionsServiceApiInstance\ \ *api.NetworkFunctionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkFunctionsServiceApiInstance = api.NewNetworkFunctionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := networkfunctions.ListNetworkFunctionsRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := NetworkFunctionsServiceApiInstance.ListNetworkFunctions(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.NetworkFunction)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/network-functions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/network-functions?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListNetworkFunctionsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListNetworkFunctionsApiResponse listNetworkFunctionsApiResponse\ \ = networkFunctionsApi.ListNetworkFunctions(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" post: tags: - NetworkFunctions summary: Create a network function. description: Create a network function. operationId: createNetworkFunction parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 3c637c9f-2fd2-45f0-9eb3-9d6c4d421493 requestBody: description: Request schema to create the network function. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' required: true responses: "202": description: Task Id corresponding to the create network function request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Network Function deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: Flow Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.NetworkFunctionsApi; import com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.CreateNetworkFunctionRequest; import com.nutanix.dp1.networking.networking.v4.config.HighAvailabilityMode; import com.nutanix.dp1.networking.networking.v4.config.NetworkFunction; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(apiClient); NetworkFunction networkFunction = new NetworkFunction(); // NetworkFunction object initializations here... networkFunction.setHighAvailabilityMode(HighAvailabilityMode.UNKNOWN); // required field networkFunction.setName("samplenf"); // required field networkFunction.setNicPairs(new ArrayList<>()); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = networkFunctionsApi.createNetworkFunction(CreateNetworkFunctionRequest.builder() .build(), networkFunction); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, NetworkFunctionsApi, HighAvailabilityMode, NetworkFunction } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let networkFunctionsApi = new NetworkFunctionsApi(apiClientInstance); function sample() { let networkFunction = new NetworkFunction(); // NetworkFunction object initializations here... networkFunction.setHighAvailabilityMode(HighAvailabilityMode.UNKNOWN); // required field networkFunction.setName("samplenf"); // required field networkFunction.setNicPairs([]); // required field networkFunction = JSON.stringify(networkFunction); networkFunctionsApi.createNetworkFunction(networkFunction).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) network_functions_api = ntnx_networking_py_client.NetworkFunctionsApi(api_client=client) networkFunction = ntnx_networking_py_client.NetworkFunction() # NetworkFunction object initializations here... networkFunction.high_availability_mode = ntnx_networking_py_client.HighAvailabilityMode._UNKNOWN # required field networkFunction.name = "samplenf" # required field networkFunction.nic_pairs = [] # required field try: api_response = network_functions_api.create_network_function(body=networkFunction) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkfunctions" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient NetworkFunctionsServiceApiInstance *api.NetworkFunctionsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. NetworkFunctionsServiceApiInstance = api.NewNetworkFunctionsServiceApi(ApiClientInstance) ctx := context.Background() networkFunction := import1.NewNetworkFunction() // NetworkFunction object initializations here... request := networkfunctions.CreateNetworkFunctionRequest{ Body: networkFunction } response, error := NetworkFunctionsServiceApiInstance.CreateNetworkFunction(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/network-functions" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"samplenf","description":"Samplenetworkfunction","nicPairs":[{"ingressNicReference":"string","egressNicReference":"string","vmReference":"string","isEnabled":true,"highAvailabilityState":"$UNKNOWN","dataPlaneHealthStatus":"$UNKNOWN","$objectType":"networking.v4.config.NicPair"}],"highAvailabilityMode":"$UNKNOWN","failureHandling":"$UNKNOWN","trafficForwardingMode":"$UNKNOWN","dataPlaneHealthCheckConfig":{"$objectType":"networking.v4.config.DataPlaneHealthCheckConfig"},"$objectType":"networking.v4.config.NetworkFunction"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"samplenf","description":"Samplenetworkfunction","nicPairs":[{"ingressNicReference":"string","egressNicReference":"string","vmReference":"string","isEnabled":true,"highAvailabilityState":"$UNKNOWN","dataPlaneHealthStatus":"$UNKNOWN","$objectType":"networking.v4.config.NicPair"}],"highAvailabilityMode":"$UNKNOWN","failureHandling":"$UNKNOWN","trafficForwardingMode":"$UNKNOWN","dataPlaneHealthCheckConfig":{"$objectType":"networking.v4.config.DataPlaneHealthCheckConfig"},"$objectType":"networking.v4.config.NetworkFunction"} \ - "https://host:port/api/networking/v4.3/config/network-functions" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(client);\n\ \n NetworkFunction networkFunction = new NetworkFunction();\n\n \ \ // NetworkFunction object initializations here...\n networkFunction.HighAvailabilityMode\ \ = HighAvailabilityMode.UNKNOWN; // required field\n networkFunction.Name\ \ = \"samplenf\"; // required field\n networkFunction.NicPairs = new\ \ ArrayList(); // required field\n\n\n // Create request object\ \ with parameters\n var request = new CreateNetworkFunctionRequest\ \ {\n Body = networkFunction\n };\n try {\n \ \ ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = networkFunctionsApi.CreateNetworkFunction(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/network-functions/{extId}: get: tags: - NetworkFunctions summary: Get the network function with the specified UUID. description: Get a network function with the specified UUID. operationId: getNetworkFunctionById parameters: - name: extId in: path description: The UUID of the network function. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 150952c8-f3b4-4f69-bad9-d9bb5cc68d19 responses: "200": description: The network function object returned by the get request. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/network-functions/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/network-functions/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/network-functions/{extId}\ \ Get operation" x-permissions: operationName: View Network Function deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: Flow Admin - name: User - name: Prism Viewer - name: Flow Viewer - name: Flow Policy Author x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkFunctionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.GetNetworkFunctionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetNetworkFunctionApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(apiClient);\n\ \n \n String extId = \"A313eCBE-FfaE-595a-caDC-cf4E1dDC017A\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetNetworkFunctionApiResponse\ \ getNetworkFunctionApiResponse = networkFunctionsApi.getNetworkFunctionById(GetNetworkFunctionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getNetworkFunctionApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkFunctionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkFunctionsApi = new NetworkFunctionsApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"BB7484eC-F154-2FD4-FCfe-cfae0b59aA07\"\ ;\n\n\n\n\n\n networkFunctionsApi.getNetworkFunctionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_functions_api = ntnx_networking_py_client.NetworkFunctionsApi(api_client=client)\n\ \ \n ext_id = \"c3F49d7C-3cbF-1fb2-C4DF-2CfbB6DdeEc7\"\n\n\n try:\n\ \ api_response = network_functions_api.get_network_function_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkfunctions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkFunctionsServiceApiInstance\ \ *api.NetworkFunctionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkFunctionsServiceApiInstance = api.NewNetworkFunctionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"aC9B5E18-5599-D0cc-a0cb-8eC0Cfef22eB\"\ \n\n\n request := networkfunctions.GetNetworkFunctionByIdRequest{ ExtId:\ \ &extId }\n response, error := NetworkFunctionsServiceApiInstance.GetNetworkFunctionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.NetworkFunction)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/network-functions/EcEdfbfc-CFcd-c2Ca-60Fb-67F3BC5f6e24" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/network-functions/4dE8C465-29eE-f0Ef-CdeE-aaFDBea0CCBc" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(client);\n\ \n String extId = \"c7aaB850-caDe-aa8A-0bDd-2Cdfa3bfC6b5\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetNetworkFunctionByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetNetworkFunctionApiResponse getNetworkFunctionApiResponse\ \ = networkFunctionsApi.GetNetworkFunctionById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" put: tags: - NetworkFunctions summary: Update the specified network function. description: Update the specified network function. operationId: updateNetworkFunctionById parameters: - name: extId in: path description: The UUID of the network function. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 22c4f0bd-138e-4277-ab8c-039773b15bcf - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: c76ff219-f388-4aab-bf70-5b533b0d5845 requestBody: description: Request schema to update the specified network function. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' required: true responses: "202": description: Task Id corresponding to update network function. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Network Function deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: Flow Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkFunctionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.UpdateNetworkFunctionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.GetNetworkFunctionByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.HighAvailabilityMode;\n\ import com.nutanix.dp1.networking.networking.v4.config.NetworkFunction;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetNetworkFunctionApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(apiClient);\n\ \n NetworkFunction networkFunction = new NetworkFunction();\n\n \ \ // NetworkFunction object initializations here...\n networkFunction.setHighAvailabilityMode(HighAvailabilityMode.UNKNOWN);\ \ // required field\n networkFunction.setName(\"samplenf\"); //\ \ required field\n networkFunction.setNicPairs(new ArrayList<>());\ \ // required field\n \n String extId = \"1a8dD6F9-B2c6-22fA-DF30-De8B0CfAEFDC\"\ ;\n\n // perform GET call\n GetNetworkFunctionApiResponse\ \ getResponse = null;\n try {\n getResponse = networkFunctionsApi.getNetworkFunctionById(GetNetworkFunctionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkFunctionsApi.updateNetworkFunctionById(UpdateNetworkFunctionByIdRequest.builder()\n\ \ .extId(extId)\n .build(), networkFunction,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkFunctionsApi, HighAvailabilityMode,\ \ NetworkFunction, GetNetworkFunctionApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkFunctionsApi = new NetworkFunctionsApi(apiClientInstance);\n\n\ function sample() {\n let networkFunction = new NetworkFunction();\n\n\ \ // NetworkFunction object initializations here...\n networkFunction.setHighAvailabilityMode(HighAvailabilityMode.UNKNOWN);\ \ // required field\n networkFunction.setName(\"samplenf\"); // required\ \ field\n networkFunction.setNicPairs([]); // required field\n networkFunction\ \ = JSON.stringify(networkFunction);\n\n \n let extId = \"cbB88Edd-46C6-c5cE-779B-ff6E2ed70AF2\"\ ;\n\n\n // Perform Get call\n networkFunctionsApi.getNetworkFunctionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n networkFunctionsApi.updateNetworkFunctionById(extId,\ \ networkFunction, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_functions_api = ntnx_networking_py_client.NetworkFunctionsApi(api_client=client)\n\ \ networkFunction = ntnx_networking_py_client.NetworkFunction()\n\n \ \ # NetworkFunction object initializations here...\n networkFunction.high_availability_mode\ \ = ntnx_networking_py_client.HighAvailabilityMode._UNKNOWN # required\ \ field\n networkFunction.name = \"samplenf\" # required field\n \ \ networkFunction.nic_pairs = [] # required field\n \n ext_id = \"\ D0F6B839-EfC1-AEB4-eBBf-a4adA13cE4bA\"\n\n try:\n api_response\ \ = network_functions_api.get_network_function_by_id(extId=ext_id)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = network_functions_api.update_network_function_by_id(extId=ext_id,\ \ body=networkFunction, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkfunctions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkFunctionsServiceApiInstance\ \ *api.NetworkFunctionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkFunctionsServiceApiInstance = api.NewNetworkFunctionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n networkFunction := import1.NewNetworkFunction()\n\ \n // NetworkFunction object initializations here...\n\n \n extId\ \ := \"EfBAbacE-99be-33AA-aC0a-D57a3dda3c1f\"\n\n getRequest := networkfunctions.GetNetworkFunctionByIdRequest{\ \ extId: &extId }\n getResponse, err := NetworkFunctionsServiceApiInstance.GetNetworkFunctionById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := networkfunctions.UpdateNetworkFunctionByIdRequest{ ExtId:\ \ &extId, Body: networkFunction }\n response, error := NetworkFunctionsServiceApiInstance.UpdateNetworkFunctionById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/network-functions/feb762fc-Cf9C-f73A-dAcD-AAd515beDbd7" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"samplenf","description":"Samplenetworkfunction","nicPairs":[{"ingressNicReference":"string","egressNicReference":"string","vmReference":"string","isEnabled":true,"highAvailabilityState":"$UNKNOWN","dataPlaneHealthStatus":"$UNKNOWN","$objectType":"networking.v4.config.NicPair"}],"highAvailabilityMode":"$UNKNOWN","failureHandling":"$UNKNOWN","trafficForwardingMode":"$UNKNOWN","dataPlaneHealthCheckConfig":{"$objectType":"networking.v4.config.DataPlaneHealthCheckConfig"},"$objectType":"networking.v4.config.NetworkFunction"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"samplenf","description":"Samplenetworkfunction","nicPairs":[{"ingressNicReference":"string","egressNicReference":"string","vmReference":"string","isEnabled":true,"highAvailabilityState":"$UNKNOWN","dataPlaneHealthStatus":"$UNKNOWN","$objectType":"networking.v4.config.NicPair"}],"highAvailabilityMode":"$UNKNOWN","failureHandling":"$UNKNOWN","trafficForwardingMode":"$UNKNOWN","dataPlaneHealthCheckConfig":{"$objectType":"networking.v4.config.DataPlaneHealthCheckConfig"},"$objectType":"networking.v4.config.NetworkFunction"} \ - "https://host:port/api/networking/v4.3/config/network-functions/FaEF03bc-B9F7-1Ca6-85CC-CEcbc43DfF90" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(client);\n\ \n NetworkFunction networkFunction = new NetworkFunction();\n\n \ \ // NetworkFunction object initializations here...\n networkFunction.HighAvailabilityMode\ \ = HighAvailabilityMode.UNKNOWN; // required field\n networkFunction.Name\ \ = \"samplenf\"; // required field\n networkFunction.NicPairs = new\ \ ArrayList(); // required field\n\n String extId = \"cDCdFe8A-b8F3-A760-aDBF-E2EaB2B2dCac\"\ ;\n\n // perform GET call\n var getRequest = new GetNetworkFunctionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetNetworkFunctionApiResponse\ \ getResponse = networkFunctionsApi.GetNetworkFunctionById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateNetworkFunctionByIdRequest {\n ExtId =\ \ extId,\n Body = networkFunction,\n \n \ \ \n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkFunctionsApi.UpdateNetworkFunctionById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - NetworkFunctions summary: Delete the specified network function. description: Delete the specified network function. operationId: deleteNetworkFunctionById parameters: - name: extId in: path description: The UUID of the network function. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 2fc0ba1d-cf61-4a49-93f3-dbb57444aeeb - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 543a7f3b-a588-4bd0-9e41-779a4014a1b9 responses: "202": description: Task Id corresponding to delete network function request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Network Function deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: Flow Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NetworkFunctionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.NetworkFunctions.DeleteNetworkFunctionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(apiClient);\n\ \n \n String extId = \"1e89b2Bf-a4C0-Ebed-FECa-A3FA6B29b8aC\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = networkFunctionsApi.deleteNetworkFunctionById(DeleteNetworkFunctionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NetworkFunctionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let networkFunctionsApi = new NetworkFunctionsApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"7FF6b24C-4E3b-D3A0-7BAB-Cf6D5bb38bdb\"\ ;\n\n\n\n\n\n networkFunctionsApi.deleteNetworkFunctionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ network_functions_api = ntnx_networking_py_client.NetworkFunctionsApi(api_client=client)\n\ \ \n ext_id = \"7C94695D-EEeb-B201-cBb0-a8De195CbF61\"\n\n\n try:\n\ \ api_response = network_functions_api.delete_network_function_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/networkfunctions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NetworkFunctionsServiceApiInstance\ \ *api.NetworkFunctionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NetworkFunctionsServiceApiInstance = api.NewNetworkFunctionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"0F23CbDd-48A2-eeeC-Aafe-83fbCAbFd920\"\ \n\n\n request := networkfunctions.DeleteNetworkFunctionByIdRequest{\ \ ExtId: &extId }\n response, error := NetworkFunctionsServiceApiInstance.DeleteNetworkFunctionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/network-functions/A153BDFb-876D-aC08-0150-1f69fB1E40D9" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/network-functions/0F46FCBB-BBDD-0e1A-7dc8-CFAF4fbCCCf1" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NetworkFunctionsApi networkFunctionsApi = new NetworkFunctionsApi(client);\n\ \n String extId = \"E7f2CDEA-e0E6-FB5A-17Fd-8a7eBacDECDc\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteNetworkFunctionByIdRequest {\n ExtId = extId\n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = networkFunctionsApi.DeleteNetworkFunctionById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/nic-profiles: get: tags: - NicProfiles summary: Lists all NIC Profiles description: Lists all NIC Profiles with host NICs and capability. operationId: listNicProfiles parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: capabilityConfig/capabilityType example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$filter=capabilityConfig/capabilityType\ \ eq Networking.Config.CapabilityType'SRIOV'" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$filter=extId\ \ eq '0079ebc4-467c-48cf-91cb-7e2f2a7b2363'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$filter=name\ \ eq 'NICProfile1'" - name: nicFamily example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$filter=nicFamily\ \ eq '15b3:a2d6'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$orderby=extId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: capabilityConfig/capabilityType example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=capabilityConfig/capabilityType" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=extId" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=links" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=metadata/projectReferenceId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=name" - name: nicFamily example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=nicFamily" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/nic-profiles?$select=tenantId" responses: "200": description: Response for listing all NIC Profiles. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.NicProfile' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/nic-profiles Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/nic-profiles Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/nic-profiles Get operation x-permissions: operationName: View Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: User - name: Prism Viewer x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.ListNicProfilesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListNicProfilesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListNicProfilesApiResponse\ \ listNicProfilesApiResponse = nicProfilesApi.listNicProfiles(ListNicProfilesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listNicProfilesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, NicProfilesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let nicProfilesApi = new NicProfilesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; nicProfilesApi.listNicProfiles(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = nic_profiles_api.list_nic_profiles(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := nicprofiles.ListNicProfilesRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := NicProfilesServiceApiInstance.ListNicProfiles(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.NicProfile)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/nic-profiles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/nic-profiles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListNicProfilesRequest {\n Page =\ \ page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n \ \ try {\n ListNicProfilesApiResponse listNicProfilesApiResponse\ \ = nicProfilesApi.ListNicProfiles(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - NicProfiles summary: Create a NIC Profile description: "Create a NIC Profile with the given name, description and capability\ \ specifications." operationId: createNicProfile parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 91de8b9f-a1b5-4db4-a05f-391e538a0a9b requestBody: description: Request to create a NIC Profile. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NicProfile' required: true responses: "202": description: Response for creating a NIC Profile. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.NicProfilesApi; import com.nutanix.dp1.networking.networking.v4.request.NicProfiles.CreateNicProfileRequest; import com.nutanix.dp1.networking.networking.v4.config.CapabilityConfig; import com.nutanix.dp1.networking.networking.v4.config.NicProfile; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient); NicProfile nicProfile = new NicProfile(); // NicProfile object initializations here... nicProfile.setCapabilityConfig(new CapabilityConfig()); // required field nicProfile.setName("NICProfile1"); // required field nicProfile.setNicFamily("15b3:a2d6"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = nicProfilesApi.createNicProfile(CreateNicProfileRequest.builder() .build(), nicProfile); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, NicProfilesApi, CapabilityConfig, NicProfile } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let nicProfilesApi = new NicProfilesApi(apiClientInstance); function sample() { let nicProfile = new NicProfile(); // NicProfile object initializations here... nicProfile.setCapabilityConfig(new CapabilityConfig()); // required field nicProfile.setName("NICProfile1"); // required field nicProfile.setNicFamily("15b3:a2d6"); // required field nicProfile = JSON.stringify(nicProfile); nicProfilesApi.createNicProfile(nicProfile).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client) nicProfile = ntnx_networking_py_client.NicProfile() # NicProfile object initializations here... nicProfile.capability_config = ntnx_networking_py_client.CapabilityConfig() # required field nicProfile.name = "NICProfile1" # required field nicProfile.nic_family = "15b3:a2d6" # required field try: api_response = nic_profiles_api.create_nic_profile(body=nicProfile) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient NicProfilesServiceApiInstance *api.NicProfilesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance) ctx := context.Background() nicProfile := import1.NewNicProfile() // NicProfile object initializations here... request := nicprofiles.CreateNicProfileRequest{ Body: nicProfile } response, error := NicProfilesServiceApiInstance.CreateNicProfile(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/nic-profiles" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"NICProfile1","description":"NICProfileforSRIOV","capabilityConfig":{"capabilityType":"$UNKNOWN","$objectType":"networking.v4.config.CapabilityConfig"},"hostNicReferences":[{"extId":"string","associatedVmNicReferences":["string"],"complianceStatus":"$UNKNOWN","$objectType":"networking.v4.config.HostNicReference"}],"nicFamily":"15b3:a2d6","$objectType":"networking.v4.config.NicProfile"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"NICProfile1","description":"NICProfileforSRIOV","capabilityConfig":{"capabilityType":"$UNKNOWN","$objectType":"networking.v4.config.CapabilityConfig"},"hostNicReferences":[{"extId":"string","associatedVmNicReferences":["string"],"complianceStatus":"$UNKNOWN","$objectType":"networking.v4.config.HostNicReference"}],"nicFamily":"15b3:a2d6","$objectType":"networking.v4.config.NicProfile"} \ - "https://host:port/api/networking/v4.3/config/nic-profiles" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ NicProfile nicProfile = new NicProfile();\n\n // NicProfile object\ \ initializations here...\n nicProfile.CapabilityConfig = new CapabilityConfig();\ \ // required field\n nicProfile.Name = \"NICProfile1\"; // required\ \ field\n nicProfile.NicFamily = \"15b3:a2d6\"; // required field\n\ \n\n // Create request object with parameters\n var request\ \ = new CreateNicProfileRequest {\n Body = nicProfile\n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = nicProfilesApi.CreateNicProfile(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/nic-profiles/{extId}: get: tags: - NicProfiles summary: Get a NIC Profile description: Get a NIC Profile by UUID. operationId: getNicProfileById parameters: - name: extId in: path description: UUID of the NIC Profile. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e7a14b0f-4699-44f1-ba87-125b8e8d7367 responses: "200": description: Response for getting a NIC Profile by UUID. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.NicProfile' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/nic-profiles/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/nic-profiles/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/nic-profiles/{extId}\ \ Get operation" x-permissions: operationName: View Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: User - name: Prism Viewer x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.GetNicProfileByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetNicProfileApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ \n String extId = \"2fE0aBBD-aA05-acfD-eAB3-dDEFBF2BD2aA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetNicProfileApiResponse\ \ getNicProfileApiResponse = nicProfilesApi.getNicProfileById(GetNicProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getNicProfileApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NicProfilesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nicProfilesApi = new NicProfilesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"ADE10FDa-3Dc6-e00C-D726-aFdcA7a55B69\"\ ;\n\n\n\n\n\n nicProfilesApi.getNicProfileById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ \n ext_id = \"DC1dE07F-A883-5C4e-3bfa-3D2C7FAa27DB\"\n\n\n try:\n\ \ api_response = nic_profiles_api.get_nic_profile_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"CDaEc59F-E41A-3be6-cd2E-5cc3FDefCeDB\"\ \n\n\n request := nicprofiles.GetNicProfileByIdRequest{ ExtId: &extId\ \ }\n response, error := NicProfilesServiceApiInstance.GetNicProfileById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.NicProfile)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/nic-profiles/8bAceEDB-0905-BadF-a10f-Ceae1D1acCAe" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/nic-profiles/DE8DAfE1-DCdB-9Baa-e9fF-2B79Bad69Afd" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ String extId = \"d6D9cFBc-42b2-963C-5647-cceec2EBCfEF\";\n\n \ \ // Create request object with parameters\n var request = new GetNicProfileByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetNicProfileApiResponse\ \ getNicProfileApiResponse = nicProfilesApi.GetNicProfileById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - NicProfiles summary: Update a NIC Profile description: Update a NIC Profile with given specifications. Only name and description can be updated. operationId: updateNicProfileById parameters: - name: extId in: path description: UUID of the NIC Profile. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 03842a42-ff3e-4321-b125-7cd39e6fa6af - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 6e3d39f4-dd65-4258-865d-ec24dccc70fd requestBody: description: Request to update a NIC Profile. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.NicProfile' required: true responses: "202": description: Response for updating a NIC Profile. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.UpdateNicProfileByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.NicProfiles.GetNicProfileByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.CapabilityConfig;\n\ import com.nutanix.dp1.networking.networking.v4.config.NicProfile;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.GetNicProfileApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ NicProfile nicProfile = new NicProfile();\n\n // NicProfile\ \ object initializations here...\n nicProfile.setCapabilityConfig(new\ \ CapabilityConfig()); // required field\n nicProfile.setName(\"\ NICProfile1\"); // required field\n nicProfile.setNicFamily(\"15b3:a2d6\"\ ); // required field\n \n String extId = \"E0b7a9eA-aa23-aeAd-Fbca-F5EaccDCdd94\"\ ;\n\n // perform GET call\n GetNicProfileApiResponse getResponse\ \ = null;\n try {\n getResponse = nicProfilesApi.getNicProfileById(GetNicProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.updateNicProfileById(UpdateNicProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build(), nicProfile, opts);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NicProfilesApi, CapabilityConfig, NicProfile,\ \ GetNicProfileApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nicProfilesApi = new NicProfilesApi(apiClientInstance);\n\nfunction\ \ sample() {\n let nicProfile = new NicProfile();\n\n // NicProfile\ \ object initializations here...\n nicProfile.setCapabilityConfig(new\ \ CapabilityConfig()); // required field\n nicProfile.setName(\"NICProfile1\"\ ); // required field\n nicProfile.setNicFamily(\"15b3:a2d6\"); // required\ \ field\n nicProfile = JSON.stringify(nicProfile);\n\n \n let extId\ \ = \"EbDC0aEd-fC38-c6A4-Bb1C-2BA140c2Dd2C\";\n\n\n // Perform Get call\n\ \ nicProfilesApi.getNicProfileById(extId).then(({data, response}) =>\ \ {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ // Extract E-Tag Header\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n\n nicProfilesApi.updateNicProfileById(extId,\ \ nicProfile, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ nicProfile = ntnx_networking_py_client.NicProfile()\n\n # NicProfile\ \ object initializations here...\n nicProfile.capability_config = ntnx_networking_py_client.CapabilityConfig()\ \ # required field\n nicProfile.name = \"NICProfile1\" # required field\n\ \ nicProfile.nic_family = \"15b3:a2d6\" # required field\n \n \ \ ext_id = \"Bb27fce5-eAD0-E7Ed-74Bd-4E0cA3FF87A5\"\n\n try:\n \ \ api_response = nic_profiles_api.get_nic_profile_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = nic_profiles_api.update_nic_profile_by_id(extId=ext_id,\ \ body=nicProfile, if_match=etag_value)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nicProfile := import1.NewNicProfile()\n\ \n // NicProfile object initializations here...\n\n \n extId :=\ \ \"b5e74B1C-1cc8-aed3-eADA-894aceD42eB1\"\n\n getRequest := nicprofiles.GetNicProfileByIdRequest{\ \ extId: &extId }\n getResponse, err := NicProfilesServiceApiInstance.GetNicProfileById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := nicprofiles.UpdateNicProfileByIdRequest{ ExtId: &extId,\ \ Body: nicProfile }\n response, error := NicProfilesServiceApiInstance.UpdateNicProfileById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/nic-profiles/CcBC6ceb-6DAb-D5EA-50f9-bFd1dB767bCf" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"NICProfile1","description":"NICProfileforSRIOV","capabilityConfig":{"capabilityType":"$UNKNOWN","$objectType":"networking.v4.config.CapabilityConfig"},"hostNicReferences":[{"extId":"string","associatedVmNicReferences":["string"],"complianceStatus":"$UNKNOWN","$objectType":"networking.v4.config.HostNicReference"}],"nicFamily":"15b3:a2d6","$objectType":"networking.v4.config.NicProfile"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"NICProfile1","description":"NICProfileforSRIOV","capabilityConfig":{"capabilityType":"$UNKNOWN","$objectType":"networking.v4.config.CapabilityConfig"},"hostNicReferences":[{"extId":"string","associatedVmNicReferences":["string"],"complianceStatus":"$UNKNOWN","$objectType":"networking.v4.config.HostNicReference"}],"nicFamily":"15b3:a2d6","$objectType":"networking.v4.config.NicProfile"} \ - "https://host:port/api/networking/v4.3/config/nic-profiles/a59cEEAD-3aCd-c20E-4A83-fAE1ef0DDDEF" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ NicProfile nicProfile = new NicProfile();\n\n // NicProfile object\ \ initializations here...\n nicProfile.CapabilityConfig = new CapabilityConfig();\ \ // required field\n nicProfile.Name = \"NICProfile1\"; // required\ \ field\n nicProfile.NicFamily = \"15b3:a2d6\"; // required field\n\ \n String extId = \"C26cB8C8-DAB8-De6f-e7De-0fccbae3C7EE\";\n\n \ \ // perform GET call\n var getRequest = new GetNicProfileByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetNicProfileApiResponse\ \ getResponse = nicProfilesApi.GetNicProfileById(getRequest);\n }\ \ catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateNicProfileByIdRequest {\n ExtId = extId,\n\ \ Body = nicProfile,\n \n \n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = nicProfilesApi.UpdateNicProfileById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - NicProfiles summary: Delete a NIC Profile description: Delete a NIC Profile by UUID. operationId: deleteNicProfileById parameters: - name: extId in: path description: UUID of the NIC Profile. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f0e97ef4-913b-4c72-becc-07ae7d8e13c2 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 00a91a44-3ecb-4d00-a41b-85208c96dfb0 responses: "202": description: Response for deleting a NIC Profile. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.DeleteNicProfileByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ \n String extId = \"aa4BD5BB-10fD-DC9C-fE93-DaCaCAB783dA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.deleteNicProfileById(DeleteNicProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NicProfilesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nicProfilesApi = new NicProfilesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"aEb45E5c-7ffd-1F4c-966B-48Cdcc81DFBe\"\ ;\n\n\n\n\n\n nicProfilesApi.deleteNicProfileById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ \n ext_id = \"D733Dafa-bE5c-1DfE-a0d0-25fF953abdBA\"\n\n\n try:\n\ \ api_response = nic_profiles_api.delete_nic_profile_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"2CED4257-9EEb-31CA-fDFE-11ceC2BD7bAc\"\ \n\n\n request := nicprofiles.DeleteNicProfileByIdRequest{ ExtId: &extId\ \ }\n response, error := NicProfilesServiceApiInstance.DeleteNicProfileById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/nic-profiles/1bFbD7cB-De5D-CAC8-cf80-Cf86C6ccBD0B" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/nic-profiles/Ebcd7F8e-Ab8e-edbe-7aBa-8cbc8DEC4bCA" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ String extId = \"dbd341C0-CA21-e2Cd-E8Dc-fF74BBb4fFaD\";\n\n \ \ // Create request object with parameters\n var request = new DeleteNicProfileByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.DeleteNicProfileById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/nic-profiles/{extId}/$actions/associate-host-nic: post: tags: - NicProfiles summary: Associate a NIC Profile description: Associate a Host NIC to a NIC Profile. The capability will be enabled on the Host NIC. VMs can be associated with the Host NIC's VFs. operationId: associateHostNicToNicProfile parameters: - name: extId in: path description: UUID of the NIC Profile. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: d86fe2d8-cc78-4b70-aa33-2397787abfbb - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 854087e2-de99-42a3-809d-5a43adf1cde1 requestBody: description: Request to associate a Host NIC to a NIC Profile. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.HostNic' required: true responses: "202": description: Response for associating a Host NIC to a NIC Profile. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Associate Host Nic Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.AssociateHostNicToNicProfileRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.HostNic;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ HostNic hostNic = new HostNic();\n\n // HostNic object initializations\ \ here...\n \n String extId = \"eDeDaC3C-a7fA-cBAa-bdeF-f3569bcB0D82\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.associateHostNicToNicProfile(AssociateHostNicToNicProfileRequest.builder()\n\ \ .extId(extId)\n .build(), hostNic);\n\n\ \ System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NicProfilesApi, HostNic } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nicProfilesApi = new NicProfilesApi(apiClientInstance);\n\nfunction\ \ sample() {\n let hostNic = new HostNic();\n\n // HostNic object\ \ initializations here...\n hostNic = JSON.stringify(hostNic);\n\n \ \ \n let extId = \"ccdd481E-adc9-0fFA-F2a2-AACC48aBEFeF\";\n\n\n\n\n\ \n nicProfilesApi.associateHostNicToNicProfile(extId, hostNic).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ hostNic = ntnx_networking_py_client.HostNic()\n\n # HostNic object\ \ initializations here...\n \n ext_id = \"aF9A57eD-dBd0-4bff-3df7-FCeC872FeE5d\"\ \n\n\n try:\n api_response = nic_profiles_api.associate_host_nic_to_nic_profile(extId=ext_id,\ \ body=hostNic)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n hostNic := import1.NewHostNic()\n\ \n // HostNic object initializations here...\n\n \n extId := \"\ Abf3b7eb-fC3F-cFCf-DC6b-5793bFdcc12e\"\n\n\n request := nicprofiles.AssociateHostNicToNicProfileRequest{\ \ ExtId: &extId, Body: hostNic }\n response, error := NicProfilesServiceApiInstance.AssociateHostNicToNicProfile(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/nic-profiles/7Bdc6FeC-dAA5-01D9-Ee6A-CA11FbEAeb0f/$actions/associate-host-nic" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"hostNicExtId":"string","$objectType":"networking.v4.config.HostNic"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"hostNicExtId":"string","$objectType":"networking.v4.config.HostNic"} \ - "https://host:port/api/networking/v4.3/config/nic-profiles/69EC0d0E-2eF9-cda1-E3eE-fFB4aF23d7fc/$actions/associate-host-nic" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ HostNic hostNic = new HostNic();\n\n // HostNic object initializations\ \ here...\n\n String extId = \"fBBE2da9-25eD-cdFF-6FfF-EdF461E0b6CB\"\ ;\n\n // Create request object with parameters\n var request\ \ = new AssociateHostNicToNicProfileRequest {\n ExtId = extId,\n\ \ Body = hostNic\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.AssociateHostNicToNicProfile(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/nic-profiles/{extId}/$actions/disassociate-host-nic: post: tags: - NicProfiles summary: Disassociate a Host NIC from a NIC Profile description: Disassociate a Host NIC from a NIC Profile. The capability will be disabled on the Host NIC. operationId: disassociateHostNicFromNicProfile parameters: - name: extId in: path description: UUID of the NIC Profile. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 63b0511b-d3a6-440d-bc64-862700eed504 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 988e6141-8adb-4431-8a6b-137dec86fc5a requestBody: description: Request to disassociate a Host NIC from a NIC Profile. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.HostNic' required: true responses: "202": description: Response for disassociating a Host NIC from a NIC Profile. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Disassociate Host Nic Nic Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.NicProfilesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.NicProfiles.DisassociateHostNicFromNicProfileRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.HostNic;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(apiClient);\n\n\ \ HostNic hostNic = new HostNic();\n\n // HostNic object initializations\ \ here...\n \n String extId = \"A3E8bEdC-c25c-aFEd-4EF5-c4055F8ceDE6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = nicProfilesApi.disassociateHostNicFromNicProfile(DisassociateHostNicFromNicProfileRequest.builder()\n\ \ .extId(extId)\n .build(), hostNic);\n\n\ \ System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NicProfilesApi, HostNic } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nicProfilesApi = new NicProfilesApi(apiClientInstance);\n\nfunction\ \ sample() {\n let hostNic = new HostNic();\n\n // HostNic object\ \ initializations here...\n hostNic = JSON.stringify(hostNic);\n\n \ \ \n let extId = \"A47Df73c-4aE4-5f1e-b7fb-A73cED903DaD\";\n\n\n\n\n\ \n nicProfilesApi.disassociateHostNicFromNicProfile(extId, hostNic).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ nic_profiles_api = ntnx_networking_py_client.NicProfilesApi(api_client=client)\n\ \ hostNic = ntnx_networking_py_client.HostNic()\n\n # HostNic object\ \ initializations here...\n \n ext_id = \"e0CC5baC-b9Fc-b3cb-d9ec-0dA3dDe5FfdF\"\ \n\n\n try:\n api_response = nic_profiles_api.disassociate_host_nic_from_nic_profile(extId=ext_id,\ \ body=hostNic)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/nicprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NicProfilesServiceApiInstance\ \ *api.NicProfilesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NicProfilesServiceApiInstance = api.NewNicProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n hostNic := import1.NewHostNic()\n\ \n // HostNic object initializations here...\n\n \n extId := \"\ Cfcfeb6D-A508-dc89-bFa7-c8E6a7A0f71a\"\n\n\n request := nicprofiles.DisassociateHostNicFromNicProfileRequest{\ \ ExtId: &extId, Body: hostNic }\n response, error := NicProfilesServiceApiInstance.DisassociateHostNicFromNicProfile(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/nic-profiles/2C83Cf1f-ed4B-CfcD-aFa1-d3B6cb7Ffcca/$actions/disassociate-host-nic" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"hostNicExtId":"string","$objectType":"networking.v4.config.HostNic"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"hostNicExtId":"string","$objectType":"networking.v4.config.HostNic"} \ - "https://host:port/api/networking/v4.3/config/nic-profiles/425eff57-5eDc-9A1b-4aec-Fb8ebAA3EEbB/$actions/disassociate-host-nic" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NicProfilesApi nicProfilesApi = new NicProfilesApi(client);\n\n \ \ HostNic hostNic = new HostNic();\n\n // HostNic object initializations\ \ here...\n\n String extId = \"e67f2f3D-2Da1-faf2-fCAd-e4FDb7Fb8DEd\"\ ;\n\n // Create request object with parameters\n var request\ \ = new DisassociateHostNicFromNicProfileRequest {\n ExtId =\ \ extId,\n Body = hostNic\n };\n try {\n \ \ ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = nicProfilesApi.DisassociateHostNicFromNicProfile(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets: get: tags: - RemoteEntities summary: List remote subnets description: Lists subnets from the specified Prism Central cluster. operationId: listRemoteSubnetsByClusterId parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e5443f0e-e28e-4934-b0a4-8e7c6cf05637 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-subnets?$filter=name\ \ eq 'subnet-1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-subnets?$orderby=name" responses: "200": description: List of remote subnets. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteSubnet' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets\ \ Get operation" x-permissions: operationName: View Remote Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.ListRemoteSubnetsByClusterIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListRemoteSubnetsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"d01ead8D-feC6-cFCb-8CbE-8B8EAb1BbbaA\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListRemoteSubnetsApiResponse\ \ listRemoteSubnetsApiResponse = remoteEntitiesApi.listRemoteSubnetsByClusterId(ListRemoteSubnetsByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listRemoteSubnetsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"Da2Ca4B9-c4ea-Eddd-bbe9-cceF9B1BF0a7\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n remoteEntitiesApi.listRemoteSubnetsByClusterId(clusterExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"9BbbEc19-3DD2-aa3B-E9f6-3D5cBBCdbCac\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = remote_entities_api.list_remote_subnets_by_cluster_id(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"4f0aB2F1-bad1-Da4f-bfB9-1d8Fc8D5db7c\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := remoteentities.ListRemoteSubnetsByClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := RemoteEntitiesServiceApiInstance.ListRemoteSubnetsByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RemoteSubnet)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/Ff0e7Aa3-FDFf-5FAc-D8a0-A49AfcC5EE8f/remote-subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/EF8FdFaa-c0f3-78C0-ffEE-E7eFBE6Cd77c/remote-subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"BbbAF2cB-D64f-FCcB-eafA-1AaFBacfd7F8\";\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRemoteSubnetsByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId,\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby\n };\n try {\n ListRemoteSubnetsApiResponse\ \ listRemoteSubnetsApiResponse = remoteEntitiesApi.ListRemoteSubnetsByClusterId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets/{extId}: get: tags: - RemoteEntities summary: Get remote subnet description: Information about a subnet from the specified Prism Central cluster. operationId: getRemoteSubnetForClusterById parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 0117d3f1-d5b0-481a-8619-131eca8c717e - name: extId in: path description: Reference to the specified remote subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b40b2520-b8ee-4398-aa69-4d8a7134e95d responses: "200": description: A remote subnet. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.RemoteSubnet' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets/{extId}\ \ Get operation" x-permissions: operationName: View Remote Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.GetRemoteSubnetForClusterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetRemoteSubnetApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"deAdB494-Abfa-fB36-BF7E-D7Bdc118287B\"\ ;\n \n String extId = \"b4E60Ae5-d5fA-Bb80-5c2d-2Ee2fDC5feaC\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRemoteSubnetApiResponse\ \ getRemoteSubnetApiResponse = remoteEntitiesApi.getRemoteSubnetForClusterById(GetRemoteSubnetForClusterByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getRemoteSubnetApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"BF079bd9-eBbf-ED2F-Ec4A-BfCeADCd2EA8\"\ ;\n \n let extId = \"e4Dd2eb6-7bAc-cFFa-B0fD-bebCaf2aaB9d\";\n\n\n\ \n\n\n remoteEntitiesApi.getRemoteSubnetForClusterById(clusterExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"b775cD1F-30eE-E11e-BaCD-3BCa6D9Bc42e\"\n \ \ \n ext_id = \"efdDEA3e-0B3A-bA68-f5BF-F07DB6EBA62D\"\n\n\n try:\n\ \ api_response = remote_entities_api.get_remote_subnet_for_cluster_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"d72c12eC-c1b2-d9e0-9AED-ECbD57cAbdBb\"\ \n \n extId := \"CaCfCe5E-a1fD-0ecD-A88C-BAFEDeC29C8d\"\n\n\n request\ \ := remoteentities.GetRemoteSubnetForClusterByIdRequest{ ClusterExtId:\ \ &clusterExtId, ExtId: &extId }\n response, error := RemoteEntitiesServiceApiInstance.GetRemoteSubnetForClusterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RemoteSubnet)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/DCDcD0De-fFEF-95Ca-A20a-4Be0ff2CBA46/remote-subnets/9Eeb7cFB-b483-DaaA-A68d-59acEdAFa278" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/70D9a9bA-ef88-cDb7-ef5b-CEbfcdc20cCc/remote-subnets/dAC6963B-d871-E13f-0CcB-dc3F0eeAea7c" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"daB2a6ea-eD95-1eC5-ac7C-eafaC93cF3EC\";\n\ \ String extId = \"CFf2E1fE-46c4-f3FB-ebAD-F1FFFBD00872\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetRemoteSubnetForClusterByIdRequest {\n ClusterExtId = clusterExtId,\n\ \ ExtId = extId\n };\n try {\n GetRemoteSubnetApiResponse\ \ getRemoteSubnetApiResponse = remoteEntitiesApi.GetRemoteSubnetForClusterById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections: get: tags: - RemoteEntities summary: List remote VPN connections description: Lists VPN connections from the specified Prism Central cluster. operationId: listRemoteVpnConnectionsByClusterId parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 98e49df9-daf7-4671-bad9-8f7d48373fd7 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections?$filter=name\ \ eq 'vpn-connection-1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections?$orderby=name" responses: "200": description: List of remote VPN connections. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteVpnConnection' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections\ \ Get operation" x-permissions: operationName: View Remote Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.ListRemoteVpnConnectionsByClusterIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.RemoteVpnConnectionListApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"deBDBBd6-aeBe-7d6b-beB6-c82dDA85eCF6\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n RemoteVpnConnectionListApiResponse\ \ remoteVpnConnectionListApiResponse = remoteEntitiesApi.listRemoteVpnConnectionsByClusterId(ListRemoteVpnConnectionsByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(remoteVpnConnectionListApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"eEEBcBeb-fedd-Ad2F-Dc4e-fdACF1DaDFa6\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n remoteEntitiesApi.listRemoteVpnConnectionsByClusterId(clusterExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"aeF84f6A-de40-b7e4-D6f2-AF93BA64Dc1e\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = remote_entities_api.list_remote_vpn_connections_by_cluster_id(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"bc9b313C-21DB-8CAe-3baE-BB386AAC4a3e\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := remoteentities.ListRemoteVpnConnectionsByClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := RemoteEntitiesServiceApiInstance.ListRemoteVpnConnectionsByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RemoteVpnConnection)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/5a9dbE1E-b9AB-1BE0-04Bf-DfA16fbfCBA8/remote-vpn-connections?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/eCAE40D9-c6Df-AAAc-CcCF-CFbbcA7fcB3e/remote-vpn-connections?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"3125BC40-dEF0-c34B-dDfA-f93eC0fEbbC1\";\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRemoteVpnConnectionsByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId,\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby\n };\n try {\n RemoteVpnConnectionListApiResponse\ \ remoteVpnConnectionListApiResponse = remoteEntitiesApi.ListRemoteVpnConnectionsByClusterId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections/{extId}: get: tags: - RemoteEntities summary: Get a remote VPN connection description: Get a VPN connection from the specified Prism Central cluster. operationId: getRemoteVpnConnectionForClusterById parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 2b14d492-d2b2-4120-aa20-e5159a335dc9 - name: extId in: path description: Reference to the specified remote VPN connection. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 702b42d2-4ae9-48f0-a98d-b28dabb8961f responses: "200": description: A remote VPN connection. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.RemoteVpnConnection' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections/{extId}\ \ Get operation" x-permissions: operationName: View Remote Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.GetRemoteVpnConnectionForClusterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.RemoteVpnConnectionApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"CBFBc0cF-aeF7-98e9-a8Cd-65AEDAbBA157\"\ ;\n \n String extId = \"e8BeBBC9-E77A-fdF1-EB01-FF0FBB87D799\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n RemoteVpnConnectionApiResponse\ \ remoteVpnConnectionApiResponse = remoteEntitiesApi.getRemoteVpnConnectionForClusterById(GetRemoteVpnConnectionForClusterByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(remoteVpnConnectionApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"c8fe99f3-CFAc-43CC-77f4-caFD9caE7CEa\"\ ;\n \n let extId = \"DDcCa588-EbAd-Fc1A-CECC-E9cfE2EA8CDa\";\n\n\n\ \n\n\n remoteEntitiesApi.getRemoteVpnConnectionForClusterById(clusterExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"D7dB8aba-2aFc-2bf9-Ae2c-8AbbaAECbDf6\"\n \ \ \n ext_id = \"dcACdACf-AEce-ff2C-7A2a-5fA96dcfcf26\"\n\n\n try:\n\ \ api_response = remote_entities_api.get_remote_vpn_connection_for_cluster_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"ECabf0a5-ABD2-dFfe-C8c4-bf2FbfFCe9AA\"\ \n \n extId := \"f1ae2EA7-0f3B-0DC9-7acB-bbcAba3BC8f9\"\n\n\n request\ \ := remoteentities.GetRemoteVpnConnectionForClusterByIdRequest{ ClusterExtId:\ \ &clusterExtId, ExtId: &extId }\n response, error := RemoteEntitiesServiceApiInstance.GetRemoteVpnConnectionForClusterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RemoteVpnConnection)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/6E1A2CCD-3f2b-02eB-9fDD-F7B6D3CBaDbB/remote-vpn-connections/71d1edDc-5c1F-B0d3-EfF4-D8cFFBE7A8Bb" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/16d2AfeA-Cd0d-78cb-BbCF-aE72d9cCe547/remote-vpn-connections/fFDcFaAe-d59c-3128-EebC-cC9E9fbCdB92" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"cDbb4F6b-5319-AADb-ab8a-dBEfffEEDdC7\";\n\ \ String extId = \"cbcfE0EC-adfE-7789-9E7c-fe7abBE7bcAD\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetRemoteVpnConnectionForClusterByIdRequest {\n ClusterExtId\ \ = clusterExtId,\n ExtId = extId\n };\n try {\n\ \ RemoteVpnConnectionApiResponse remoteVpnConnectionApiResponse\ \ = remoteEntitiesApi.GetRemoteVpnConnectionForClusterById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways: get: tags: - RemoteEntities summary: List remote VTEP gateways description: Lists VTEP gateways from the specified Prism Central cluster. operationId: listRemoteVtepGatewaysByClusterId parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8abd7581-0b22-488d-adc7-b16bb7064c47 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isActive example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways?$filter=isActive\ \ eq true" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways?$filter=name\ \ eq 'vtep-gw'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways?$orderby=name" responses: "200": description: List of remote VTEP gateways. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepGateway' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways\ \ Get operation" x-permissions: operationName: View Remote Vtep Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.ListRemoteVtepGatewaysByClusterIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.RemoteVtepGatewayListApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"DfFBAAC6-2Da5-e5B1-E42c-CfaeeBFEE3aB\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n RemoteVtepGatewayListApiResponse\ \ remoteVtepGatewayListApiResponse = remoteEntitiesApi.listRemoteVtepGatewaysByClusterId(ListRemoteVtepGatewaysByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(remoteVtepGatewayListApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"9A431aBD-2F2C-C2eb-bc6b-4a746Dbf7fCb\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n remoteEntitiesApi.listRemoteVtepGatewaysByClusterId(clusterExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"545DEb1e-7f3F-a9dF-BAEd-ECDFDDcFCfBF\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = remote_entities_api.list_remote_vtep_gateways_by_cluster_id(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"6dF964bd-0ad1-f97a-2086-Da974C5EcECD\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := remoteentities.ListRemoteVtepGatewaysByClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := RemoteEntitiesServiceApiInstance.ListRemoteVtepGatewaysByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RemoteVtepGateway)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/e85906d6-1aAc-4fcC-Ec4E-3bA77BF3F4ED/remote-vtep-gateways?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/949EdCfE-1cD2-ddac-56f3-eeDBAAa0DDdF/remote-vtep-gateways?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"CA57B6EA-eAae-FdEc-eFCe-EBACbf4CCa16\";\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRemoteVtepGatewaysByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId,\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby\n };\n try {\n RemoteVtepGatewayListApiResponse\ \ remoteVtepGatewayListApiResponse = remoteEntitiesApi.ListRemoteVtepGatewaysByClusterId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways/{extId}: get: tags: - RemoteEntities summary: Get a remote VTEP gateway description: Get a VTEP gateway from the specified Prism Central cluster. operationId: getRemoteVtepGatewayForClusterById parameters: - name: clusterExtId in: path description: Reference to the Prism Central cluster. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1ea8c37c-1cbb-43d3-9654-e0ae0b7e1d78 - name: extId in: path description: Reference to the specified remote VTEP gateway. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5cc1b500-8340-45e9-b433-75a320de4976 responses: "200": description: A remote VTEP gateway. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepGateway' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways/{extId}\ \ Get operation" x-permissions: operationName: View Remote Vtep Gateway deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RemoteEntitiesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RemoteEntities.GetRemoteVtepGatewayForClusterByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.RemoteVtepGatewayApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(apiClient);\n\ \n \n String clusterExtId = \"aaF23CC4-292f-f2bA-FC6E-A68d9CfDe54F\"\ ;\n \n String extId = \"Aa7ecCad-ECae-c30f-bfE0-dC7644d44fd7\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n RemoteVtepGatewayApiResponse\ \ remoteVtepGatewayApiResponse = remoteEntitiesApi.getRemoteVtepGatewayForClusterById(GetRemoteVtepGatewayForClusterByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(remoteVtepGatewayApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RemoteEntitiesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let remoteEntitiesApi = new RemoteEntitiesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"adbb0BCc-86b2-C84D-CcFD-3cFcCF7eed7c\"\ ;\n \n let extId = \"fEcdCA75-8aef-0E5E-56Aa-8744EEBdABa2\";\n\n\n\ \n\n\n remoteEntitiesApi.getRemoteVtepGatewayForClusterById(clusterExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ remote_entities_api = ntnx_networking_py_client.RemoteEntitiesApi(api_client=client)\n\ \ \n cluster_ext_id = \"c772d015-8f53-f0fa-aE8c-Ebda3D0BCCC3\"\n \ \ \n ext_id = \"3eff1bbA-61cE-eD44-CFce-aDFD41fdaA4c\"\n\n\n try:\n\ \ api_response = remote_entities_api.get_remote_vtep_gateway_for_cluster_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/remoteentities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RemoteEntitiesServiceApiInstance\ \ *api.RemoteEntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RemoteEntitiesServiceApiInstance = api.NewRemoteEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"7EaADECF-a2bf-CCfD-8A1F-bEBaD2c9fcED\"\ \n \n extId := \"dF7a6D59-AA1b-DFE4-0ACB-6EaCde07Cd1e\"\n\n\n request\ \ := remoteentities.GetRemoteVtepGatewayForClusterByIdRequest{ ClusterExtId:\ \ &clusterExtId, ExtId: &extId }\n response, error := RemoteEntitiesServiceApiInstance.GetRemoteVtepGatewayForClusterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RemoteVtepGateway)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/clusters/42d3EEe7-A95b-b590-FBE2-C961759bAfBd/remote-vtep-gateways/5fb79EF9-Acda-fd4B-Eda7-db4Ea73fFa8D" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/clusters/6BFbcd39-C3cE-F0cb-1F0E-dDbBaAb0DB84/remote-vtep-gateways/dbeeA4c3-bbEf-d1aF-81eA-B5c6eaCbDF3E" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RemoteEntitiesApi remoteEntitiesApi = new RemoteEntitiesApi(client);\n\ \n String clusterExtId = \"08fcfB10-EACD-9C3E-eF9e-CCfAEcbCCeDD\";\n\ \ String extId = \"5ecFc82F-f2BC-DCAf-f6A8-Be6A38f8229E\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetRemoteVtepGatewayForClusterByIdRequest {\n ClusterExtId\ \ = clusterExtId,\n ExtId = extId\n };\n try {\n\ \ RemoteVtepGatewayApiResponse remoteVtepGatewayApiResponse =\ \ remoteEntitiesApi.GetRemoteVtepGatewayForClusterById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/route-tables: get: tags: - RouteTables summary: List route tables description: List route tables. operationId: listRouteTables parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: externalRoutingDomainReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables?$filter=externalRoutingDomainReference\ \ eq '66b7646f-cdd2-48fc-ac90-a58c2337835a'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables?$filter=vpcReference\ \ eq 'fee6b15e-c4ca-40c1-b5c9-a84c1e750820'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables?$orderby=vpcReference" responses: "200": description: List of route tables content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.RouteTable' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/route-tables Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/route-tables Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/route-tables Get operation x-permissions: operationName: View VPC Route Table deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RouteTablesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.RouteTables.ListRouteTablesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListRouteTablesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RouteTablesApi routeTablesApi = new RouteTablesApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListRouteTablesApiResponse\ \ listRouteTablesApiResponse = routeTablesApi.listRouteTables(ListRouteTablesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listRouteTablesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, RouteTablesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let routeTablesApi = new RouteTablesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; routeTablesApi.listRouteTables(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ route_tables_api = ntnx_networking_py_client.RouteTablesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = route_tables_api.list_route_tables(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routetables\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RouteTablesServiceApiInstance\ \ *api.RouteTablesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RouteTablesServiceApiInstance = api.NewRouteTablesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := routetables.ListRouteTablesRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response, error :=\ \ RouteTablesServiceApiInstance.ListRouteTables(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().([]import1.RouteTable)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/route-tables?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/route-tables?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RouteTablesApi routeTablesApi = new RouteTablesApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRouteTablesRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListRouteTablesApiResponse listRouteTablesApiResponse = routeTablesApi.ListRouteTables(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/route-tables/{extId}: get: tags: - RouteTables summary: Get route table description: Get the route table for the specified extId. operationId: getRouteTableById parameters: - name: extId in: path description: Route table UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f9ebcb99-46b4-457b-956f-cdfdd9402424 responses: "200": description: Route table content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.RouteTable' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{extId}\ \ Get operation" x-permissions: operationName: View VPC Route Table deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RouteTablesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.RouteTables.GetRouteTableByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetRouteTableApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RouteTablesApi routeTablesApi = new RouteTablesApi(apiClient);\n\n\ \ \n String extId = \"e45ebe14-Dc1C-2fEc-E1BA-fA8AaeCbebA2\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRouteTableApiResponse\ \ getRouteTableApiResponse = routeTablesApi.getRouteTableById(GetRouteTableByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getRouteTableApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RouteTablesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routeTablesApi = new RouteTablesApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"0e901571-cAb9-Afa9-DeAb-2b4dBBfeCfAC\"\ ;\n\n\n\n\n\n routeTablesApi.getRouteTableById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ route_tables_api = ntnx_networking_py_client.RouteTablesApi(api_client=client)\n\ \ \n ext_id = \"7cacB5AB-decD-d1fe-A5eE-AD6D4cB47B4B\"\n\n\n try:\n\ \ api_response = route_tables_api.get_route_table_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routetables\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RouteTablesServiceApiInstance\ \ *api.RouteTablesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RouteTablesServiceApiInstance = api.NewRouteTablesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"F9eB70BA-Cb49-49bb-a545-A1DCfbFBFB7d\"\ \n\n\n request := routetables.GetRouteTableByIdRequest{ ExtId: &extId\ \ }\n response, error := RouteTablesServiceApiInstance.GetRouteTableById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RouteTable)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/route-tables/07CF8eeD-Ff5B-ED59-FdcF-43effc8cEDB0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/route-tables/a48Afc1b-6BA7-eEe0-CDAF-bBBCEdc75Fdd" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RouteTablesApi routeTablesApi = new RouteTablesApi(client);\n\n \ \ String extId = \"fCc2DDDa-c1C9-e33A-a8aD-bBefb4A9B25d\";\n\n \ \ // Create request object with parameters\n var request = new GetRouteTableByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetRouteTableApiResponse\ \ getRouteTableApiResponse = routeTablesApi.GetRouteTableById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/route-tables/{routeTableExtId}/routes: get: tags: - Routes summary: Lists routes of the specified route table description: Lists user/system-configured routes of the specified route table. operationId: listRoutesByRouteTableId parameters: - name: routeTableExtId in: path description: Reference for the route table. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: destination example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=destination/ipv4/prefixLength\ \ eq 24" - name: externalRoutingDomainReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=externalRoutingDomainReference\ \ eq '3967f5eb-577f-4c3f-8bb1-046af83109b1'" - name: isActive example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=isActive\ \ eq true" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=name\ \ eq 'route1'" - name: nexthop/nexthopName example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=nexthop/nexthopName\ \ eq 'string'" - name: nexthop/nexthopReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=nexthop/nexthopReference\ \ eq '61837fa5-e160-427f-9fe1-f1dec94a2bcd'" - name: nexthop/nexthopType example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=nexthop/nexthopType\ \ eq Networking.Config.NexthopType'IP_ADDRESS'" - name: priority example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=priority\ \ eq 50" - name: routeTableReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=routeTableReference\ \ eq 'e20db6e5-3066-4cbf-b1ed-cc99104895c7'" - name: routeType example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=routeType\ \ eq Networking.Config.RouteType'DYNAMIC'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$filter=vpcReference\ \ eq 'c1640b17-5ff1-4a47-a71b-c1ff075accbd'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isActive example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$orderby=isActive" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$orderby=name" - name: priority example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$orderby=priority" - name: routeType example: "https://{host}:{port}/api/networking/v4.3/config/route-tables/{routeTableExtId}/routes?$orderby=routeType" responses: "200": description: Returns a list of user/system-configured routes of the specified route table. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Route' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes\ \ Get operation" x-permissions: operationName: View Route Table Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Routes.ListRoutesByRouteTableIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListRoutesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutesApi routesApi = new RoutesApi(apiClient);\n\n \n \ \ String routeTableExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListRoutesApiResponse\ \ listRoutesApiResponse = routesApi.listRoutesByRouteTableId(ListRoutesByRouteTableIdRequest.builder()\n\ \ .routeTableExtId(routeTableExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listRoutesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routesApi = new RoutesApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let routeTableExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n routesApi.listRoutesByRouteTableId(routeTableExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routes_api = ntnx_networking_py_client.RoutesApi(api_client=client)\n\ \ \n route_table_ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = routes_api.list_routes_by_route_table_id(routeTableExtId=route_table_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutesServiceApiInstance\ \ *api.RoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RoutesServiceApiInstance = api.NewRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n routeTableExtId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := routes.ListRoutesByRouteTableIdRequest{\ \ RouteTableExtId: &routeTableExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := RoutesServiceApiInstance.ListRoutesByRouteTableId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Route)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/route-tables/7f66e20f-67f4-473f-96bb-c4fcfd487f16/routes?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/route-tables/7f66e20f-67f4-473f-96bb-c4fcfd487f16/routes?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutesApi routesApi = new RoutesApi(client);\n\n String routeTableExtId\ \ = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n int page = 0;\n \ \ int limit = 50;\n String filter = \"string_sample_data\";\n \ \ String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListRoutesByRouteTableIdRequest\ \ {\n RouteTableExtId = routeTableExtId,\n Page =\ \ page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby\n };\n try {\n ListRoutesApiResponse\ \ listRoutesApiResponse = routesApi.ListRoutesByRouteTableId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - Routes summary: Create a route for the specified route table description: Create a user-configured route for a specified . operationId: createRouteForRouteTable parameters: - name: routeTableExtId in: path description: Reference for the route table. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 5010040e-d4e8-4489-8b97-18e9acf69ee0 requestBody: description: Request body for creating a route for a specified route table. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Route' required: true responses: "202": description: Task Id corresponding to the create route request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Route Table Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Routes.CreateRouteForRouteTableRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.RouteType;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.Route;\nimport com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutesApi routesApi = new RoutesApi(apiClient);\n\n Route route\ \ = new Route();\n\n // Route object initializations here...\n \ \ route.setRouteType(RouteType.UNKNOWN); // required field\n \ \ \n String routeTableExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routesApi.createRouteForRouteTable(CreateRouteForRouteTableRequest.builder()\n\ \ .routeTableExtId(routeTableExtId)\n .build(),\ \ route);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutesApi, RouteType, Route } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routesApi = new RoutesApi(apiClientInstance);\n\nfunction sample() {\n\ \ let route = new Route();\n\n // Route object initializations here...\n\ \ route.setRouteType(RouteType.UNKNOWN); // required field\n route\ \ = JSON.stringify(route);\n\n \n let routeTableExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n\n\n\n\n\n routesApi.createRouteForRouteTable(routeTableExtId, route).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routes_api = ntnx_networking_py_client.RoutesApi(api_client=client)\n\ \ route = ntnx_networking_py_client.Route()\n\n # Route object initializations\ \ here...\n route.route_type = ntnx_networking_py_client.RouteType._UNKNOWN\ \ # required field\n \n route_table_ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n\n\n try:\n api_response = routes_api.create_route_for_route_table(routeTableExtId=route_table_ext_id,\ \ body=route)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutesServiceApiInstance\ \ *api.RoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RoutesServiceApiInstance = api.NewRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n route := import1.NewRoute()\n\n\ \ // Route object initializations here...\n\n \n routeTableExtId\ \ := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\n\n\n request := routes.CreateRouteForRouteTableRequest{\ \ RouteTableExtId: &routeTableExtId, Body: route }\n response, error\ \ := RoutesServiceApiInstance.CreateRouteForRouteTable(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import2.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/route-tables/7f66e20f-67f4-473f-96bb-c4fcfd487f16/routes" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"route1","description":"Routetopeer","destination":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"nexthop":{"nexthopType":"$UNKNOWN","nexthopReference":"string","nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nexthopName":"string","$objectType":"networking.v4.config.Nexthop"},"routeTableReference":"string","vpcReference":"string","externalRoutingDomainReference":"string","routeType":"$UNKNOWN","isActive":true,"$objectType":"networking.v4.config.Route"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"route1","description":"Routetopeer","destination":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"nexthop":{"nexthopType":"$UNKNOWN","nexthopReference":"string","nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nexthopName":"string","$objectType":"networking.v4.config.Nexthop"},"routeTableReference":"string","vpcReference":"string","externalRoutingDomainReference":"string","routeType":"$UNKNOWN","isActive":true,"$objectType":"networking.v4.config.Route"} \ - "https://host:port/api/networking/v4.3/config/route-tables/7f66e20f-67f4-473f-96bb-c4fcfd487f16/routes" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutesApi routesApi = new RoutesApi(client);\n\n Route route =\ \ new Route();\n\n // Route object initializations here...\n route.RouteType\ \ = RouteType.UNKNOWN; // required field\n\n String routeTableExtId\ \ = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n\n // Create request\ \ object with parameters\n var request = new CreateRouteForRouteTableRequest\ \ {\n RouteTableExtId = routeTableExtId,\n Body =\ \ route\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routesApi.CreateRouteForRouteTable(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/route-tables/{routeTableExtId}/routes/{extId}: get: tags: - Routes summary: Get the specified route of the specified route table description: Get the specified user/system-configured route of the specified route table. operationId: getRouteForRouteTableById parameters: - name: extId in: path description: Reference for the route. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: routeTableExtId in: path description: Reference for the route table. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b responses: "200": description: Returns the specified route of the specified route table. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.Route' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes/{extId}\ \ Get operation" x-permissions: operationName: View Route Table Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Routes.GetRouteForRouteTableByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetRouteApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutesApi routesApi = new RoutesApi(apiClient);\n\n \n \ \ String extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n \n\ \ String routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRouteApiResponse\ \ getRouteApiResponse = routesApi.getRouteForRouteTableById(GetRouteForRouteTableByIdRequest.builder()\n\ \ .extId(extId)\n .routeTableExtId(routeTableExtId)\n\ \ .build());\n\n System.out.println(getRouteApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routesApi = new RoutesApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n \n\ \ let routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\";\n\n\ \n\n\n\n routesApi.getRouteForRouteTableById(extId, routeTableExtId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routes_api = ntnx_networking_py_client.RoutesApi(api_client=client)\n\ \ \n ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\n \n \ \ route_table_ext_id = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\n\n \ \ try:\n api_response = routes_api.get_route_for_route_table_by_id(extId=ext_id,\ \ routeTableExtId=route_table_ext_id)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutesServiceApiInstance\ \ *api.RoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RoutesServiceApiInstance = api.NewRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n routeTableExtId := \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\ \n\n request := routes.GetRouteForRouteTableByIdRequest{ ExtId: &extId,\ \ RouteTableExtId: &routeTableExtId }\n response, error := RoutesServiceApiInstance.GetRouteForRouteTableById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Route)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutesApi routesApi = new RoutesApi(client);\n\n String extId\ \ = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n String routeTableExtId\ \ = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\";\n\n // Create request\ \ object with parameters\n var request = new GetRouteForRouteTableByIdRequest\ \ {\n ExtId = extId,\n RouteTableExtId = routeTableExtId\n\ \ };\n try {\n GetRouteApiResponse getRouteApiResponse\ \ = routesApi.GetRouteForRouteTableById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Routes summary: Update the specified route of the specified route table description: Update the specified user-configured route of the specified route table. operationId: updateRouteForRouteTableById parameters: - name: extId in: path description: Reference for the route. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: routeTableExtId in: path description: Reference for the route table. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 1a2a4b30-b457-460b-b007-1dca58f1d097 requestBody: description: Request body of the route to update. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Route' required: true responses: "202": description: Task Id corresponding to the update route request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Route Table Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Routes.UpdateRouteForRouteTableByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.Routes.GetRouteForRouteTableByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.RouteType;\n\ import com.nutanix.dp1.networking.networking.v4.config.Route;\nimport com.nutanix.dp1.networking.networking.v4.config.GetRouteApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutesApi routesApi = new RoutesApi(apiClient);\n\n Route route\ \ = new Route();\n\n // Route object initializations here...\n \ \ route.setRouteType(RouteType.UNKNOWN); // required field\n \ \ \n String extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n\ \ \n String routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n // perform GET call\n GetRouteApiResponse getResponse\ \ = null;\n try {\n getResponse = routesApi.getRouteForRouteTableById(GetRouteForRouteTableByIdRequest.builder()\n\ \ .extId(extId)\n .routeTableExtId(routeTableExtId)\n\ \ .build());\n } catch(RestClientException ex) {\n\ \ System.out.println(ex.getMessage());\n }\n //\ \ Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routesApi.updateRouteForRouteTableById(UpdateRouteForRouteTableByIdRequest.builder()\n\ \ .extId(extId)\n .routeTableExtId(routeTableExtId)\n\ \ .build(), route, opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutesApi, RouteType, Route, GetRouteApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routesApi = new RoutesApi(apiClientInstance);\n\nfunction sample() {\n\ \ let route = new Route();\n\n // Route object initializations here...\n\ \ route.setRouteType(RouteType.UNKNOWN); // required field\n route\ \ = JSON.stringify(route);\n\n \n let extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n \n let routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n\n // Perform Get call\n routesApi.getRouteForRouteTableById(extId,\ \ routeTableExtId).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n //\ \ Extract E-Tag Header\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n\n routesApi.updateRouteForRouteTableById(extId,\ \ routeTableExtId, route, args).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n\ \ console.log(`Error is: ${error}`);\n });\n });\n\n\ }\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routes_api = ntnx_networking_py_client.RoutesApi(api_client=client)\n\ \ route = ntnx_networking_py_client.Route()\n\n # Route object initializations\ \ here...\n route.route_type = ntnx_networking_py_client.RouteType._UNKNOWN\ \ # required field\n \n ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n route_table_ext_id = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ \n\n try:\n api_response = routes_api.get_route_for_route_table_by_id(extId=ext_id,\ \ routeTableExtId=route_table_ext_id)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n # Extract E-Tag Header\n etag_value =\ \ ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\n try:\n\ \ api_response = routes_api.update_route_for_route_table_by_id(extId=ext_id,\ \ routeTableExtId=route_table_ext_id, body=route, if_match=etag_value)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutesServiceApiInstance\ \ *api.RoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RoutesServiceApiInstance = api.NewRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n route := import1.NewRoute()\n\n\ \ // Route object initializations here...\n\n \n extId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n routeTableExtId := \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\ \n getRequest := routes.GetRouteForRouteTableByIdRequest{ extId: &extId,\ \ routeTableExtId: &routeTableExtId }\n getResponse, err := RoutesServiceApiInstance.GetRouteForRouteTableById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := routes.UpdateRouteForRouteTableByIdRequest{ ExtId: &extId,\ \ RouteTableExtId: &routeTableExtId, Body: route }\n response, error\ \ := RoutesServiceApiInstance.UpdateRouteForRouteTableById(ctx, &request,\ \ args)\n if error != nil {\n fmt.Println(error)\n return\n\ \ }\n data, _ := response.GetData().(import2.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"route1","description":"Routetopeer","destination":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"nexthop":{"nexthopType":"$UNKNOWN","nexthopReference":"string","nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nexthopName":"string","$objectType":"networking.v4.config.Nexthop"},"routeTableReference":"string","vpcReference":"string","externalRoutingDomainReference":"string","routeType":"$UNKNOWN","isActive":true,"$objectType":"networking.v4.config.Route"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"route1","description":"Routetopeer","destination":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"nexthop":{"nexthopType":"$UNKNOWN","nexthopReference":"string","nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nexthopName":"string","$objectType":"networking.v4.config.Nexthop"},"routeTableReference":"string","vpcReference":"string","externalRoutingDomainReference":"string","routeType":"$UNKNOWN","isActive":true,"$objectType":"networking.v4.config.Route"} \ - "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutesApi routesApi = new RoutesApi(client);\n\n Route route =\ \ new Route();\n\n // Route object initializations here...\n route.RouteType\ \ = RouteType.UNKNOWN; // required field\n\n String extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n String routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n // perform GET call\n var getRequest = new GetRouteForRouteTableByIdRequest\ \ {\n ExtId = extId,\n RouteTableExtId = routeTableExtId,\n\ \ };\n var getRequest = new GetRouteForRouteTableByIdRequest\ \ {\n ExtId = extId,\n RouteTableExtId = routeTableExtId\n\ \ };\n try {\n GetRouteApiResponse getResponse\ \ = routesApi.GetRouteForRouteTableById(getRequestgetRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateRouteForRouteTableByIdRequest {\n ExtId\ \ = extId,\n RouteTableExtId = routeTableExtId,\n \ \ Body = route,\n \n \n };\n try {\n\ \ ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = routesApi.UpdateRouteForRouteTableById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - Routes summary: Delete the specified route of the specified route table description: "Delete route for the specified {extId}." operationId: deleteRouteForRouteTableById parameters: - name: extId in: path description: Reference for the route. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: routeTableExtId in: path description: Reference for the route table. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: a685238a-37d3-475b-b36a-a0b27817a7cf responses: "202": description: Task Id corresponding to the delete route request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Route Table Route deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutesApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Routes.DeleteRouteForRouteTableByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutesApi routesApi = new RoutesApi(apiClient);\n\n \n \ \ String extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n \n\ \ String routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routesApi.deleteRouteForRouteTableById(DeleteRouteForRouteTableByIdRequest.builder()\n\ \ .extId(extId)\n .routeTableExtId(routeTableExtId)\n\ \ .build());\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routesApi = new RoutesApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n \n\ \ let routeTableExtId = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\";\n\n\ \n\n\n\n routesApi.deleteRouteForRouteTableById(extId, routeTableExtId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routes_api = ntnx_networking_py_client.RoutesApi(api_client=client)\n\ \ \n ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\n \n \ \ route_table_ext_id = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\n\n \ \ try:\n api_response = routes_api.delete_route_for_route_table_by_id(extId=ext_id,\ \ routeTableExtId=route_table_ext_id)\n print(api_response)\n \ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routes\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutesServiceApiInstance\ \ *api.RoutesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RoutesServiceApiInstance = api.NewRoutesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n routeTableExtId := \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\"\n\ \n\n request := routes.DeleteRouteForRouteTableByIdRequest{ ExtId: &extId,\ \ RouteTableExtId: &routeTableExtId }\n response, error := RoutesServiceApiInstance.DeleteRouteForRouteTableById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/route-tables/a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b/routes/7f66e20f-67f4-473f-96bb-c4fcfd487f16" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutesApi routesApi = new RoutesApi(client);\n\n String extId\ \ = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\";\n String routeTableExtId\ \ = \"a8fe48c4-f0d3-49c7-a017-efc30dd8fb2b\";\n\n // Create request\ \ object with parameters\n var request = new DeleteRouteForRouteTableByIdRequest\ \ {\n ExtId = extId,\n RouteTableExtId = routeTableExtId\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = routesApi.DeleteRouteForRouteTableById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/routing-policies: get: tags: - RoutingPolicies summary: Get a list of Routing Policies description: Get a list of routing policies. operationId: listRoutingPolicies parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=name\ \ eq 'RoutingPolicy1'" - name: policies/policyAction/actionType example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=policies/any(a:a/policyAction/actionType\ \ eq Networking.Config.RoutingPolicyActionType'PERMIT')" - name: policies/policyMatch/protocolType example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=policies/any(a:a/policyMatch/protocolType\ \ eq Networking.Config.ProtocolType'ANY')" - name: policies/policyMatch/source example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=policies/any(a:a/policyMatch/source/subnetPrefix/ipv4/prefixLength\ \ eq 24)" - name: priority example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=priority\ \ eq 70" - name: vpcExtId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$filter=vpcExtId\ \ eq 'aacf4a91-8d42-484a-811e-b21c9ea110ce'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$orderby=name" - name: priority example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$orderby=priority" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$expand=vpc" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: description example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=description" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=extId" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=links" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=metadata/projectReferenceId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=name" - name: policies example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=policies" - name: priority example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=priority" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=tenantId" - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=vpc" - name: vpcExtId example: "https://{host}:{port}/api/networking/v4.3/config/routing-policies?$select=vpcExtId" responses: "200": description: List of routing policies queried. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/routing-policies Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/routing-policies Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/routing-policies Get operation x-permissions: operationName: View Routing Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutingPoliciesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.ListRoutingPoliciesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListRoutingPoliciesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListRoutingPoliciesApiResponse\ \ listRoutingPoliciesApiResponse = routingPoliciesApi.listRoutingPolicies(ListRoutingPoliciesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .$select(null)\n .build());\n\ \n System.out.println(listRoutingPoliciesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, RoutingPoliciesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let routingPoliciesApi = new RoutingPoliciesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; routingPoliciesApi.listRoutingPolicies(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routing_policies_api = ntnx_networking_py_client.RoutingPoliciesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = routing_policies_api.list_routing_policies(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutingPoliciesServiceApiInstance\ \ *api.RoutingPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RoutingPoliciesServiceApiInstance = api.NewRoutingPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := routingpolicies.ListRoutingPoliciesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_:\ \ nil, Select_: nil }\n response, error := RoutingPoliciesServiceApiInstance.ListRoutingPolicies(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RoutingPolicy)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/routing-policies?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/routing-policies?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListRoutingPoliciesRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Expand = expand,\n Select = select\n\ \ };\n try {\n ListRoutingPoliciesApiResponse listRoutingPoliciesApiResponse\ \ = routingPoliciesApi.ListRoutingPolicies(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - RoutingPolicies summary: Create a Routing Policy description: Create a routing policy. operationId: createRoutingPolicy parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: c893a890-1709-475b-8230-ec395ad26b2a requestBody: description: Schema to configure a routing policy. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' required: true responses: "202": description: Task Id corresponding to the create Routing Policy request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Routing Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.RoutingPoliciesApi; import com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.CreateRoutingPolicyRequest; import com.nutanix.dp1.networking.networking.v4.config.RoutingPolicy; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(apiClient); RoutingPolicy routingPolicy = new RoutingPolicy(); // RoutingPolicy object initializations here... routingPolicy.setName("RoutingPolicy1"); // required field routingPolicy.setPolicies(new ArrayList<>()); // required field routingPolicy.setPriority(1); // required field routingPolicy.setVpcExtId("BFaa6D0c-A4DC-fccB-bebC-1e9e701EEebB"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = routingPoliciesApi.createRoutingPolicy(CreateRoutingPolicyRequest.builder() .build(), routingPolicy); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, RoutingPoliciesApi, RoutingPolicy } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let routingPoliciesApi = new RoutingPoliciesApi(apiClientInstance); function sample() { let routingPolicy = new RoutingPolicy(); // RoutingPolicy object initializations here... routingPolicy.setName("RoutingPolicy1"); // required field routingPolicy.setPolicies([]); // required field routingPolicy.setPriority(1); // required field routingPolicy.setVpcExtId("a5Ebb5bb-fD6d-7dFF-b2bC-FfeCd7efEb3B"); // required field routingPolicy = JSON.stringify(routingPolicy); routingPoliciesApi.createRoutingPolicy(routingPolicy).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) routing_policies_api = ntnx_networking_py_client.RoutingPoliciesApi(api_client=client) routingPolicy = ntnx_networking_py_client.RoutingPolicy() # RoutingPolicy object initializations here... routingPolicy.name = "RoutingPolicy1" # required field routingPolicy.policies = [] # required field routingPolicy.priority = 1 # required field routingPolicy.vpc_ext_id = "46DDdfdA-fB7F-c2Cb-aB0c-b6fABdAab1fE" # required field try: api_response = routing_policies_api.create_routing_policy(body=routingPolicy) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicies" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient RoutingPoliciesServiceApiInstance *api.RoutingPoliciesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. RoutingPoliciesServiceApiInstance = api.NewRoutingPoliciesServiceApi(ApiClientInstance) ctx := context.Background() routingPolicy := import1.NewRoutingPolicy() // RoutingPolicy object initializations here... request := routingpolicies.CreateRoutingPolicyRequest{ Body: routingPolicy } response, error := RoutingPoliciesServiceApiInstance.CreateRoutingPolicy(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/routing-policies" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"RoutingPolicy1","description":"RoutingPolicyDescription","policies":[{"policyMatch":{"source":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"destination":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"protocolType":"$UNKNOWN","protocolParameters":{"sourcePortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"destinationPortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.LayerFourProtocolObject"},"$objectType":"networking.v4.config.RoutingPolicyMatchCondition"},"policyAction":{"actionType":"$UNKNOWN","rerouteParams":[{"serviceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"rerouteFallbackAction":"PASSTHROUGH","ingressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"egressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RerouteParam"}],"nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RoutingPolicyAction"},"isBidirectional":false,"$objectType":"networking.v4.config.RoutingPolicyRule"}],"vpcExtId":"string","vpc":{"name":"VPC1","$objectType":"networking.v4.config.VpcName"},"$objectType":"networking.v4.config.RoutingPolicy"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"RoutingPolicy1","description":"RoutingPolicyDescription","policies":[{"policyMatch":{"source":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"destination":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"protocolType":"$UNKNOWN","protocolParameters":{"sourcePortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"destinationPortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.LayerFourProtocolObject"},"$objectType":"networking.v4.config.RoutingPolicyMatchCondition"},"policyAction":{"actionType":"$UNKNOWN","rerouteParams":[{"serviceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"rerouteFallbackAction":"PASSTHROUGH","ingressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"egressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RerouteParam"}],"nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RoutingPolicyAction"},"isBidirectional":false,"$objectType":"networking.v4.config.RoutingPolicyRule"}],"vpcExtId":"string","vpc":{"name":"VPC1","$objectType":"networking.v4.config.VpcName"},"$objectType":"networking.v4.config.RoutingPolicy"} \ - "https://host:port/api/networking/v4.3/config/routing-policies" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(client);\n\ \n RoutingPolicy routingPolicy = new RoutingPolicy();\n\n // RoutingPolicy\ \ object initializations here...\n routingPolicy.Name = \"RoutingPolicy1\"\ ; // required field\n routingPolicy.Policies = new ArrayList(); //\ \ required field\n routingPolicy.Priority = 1; // required field\n\ \ routingPolicy.VpcExtId = \"DC7deC79-9ED9-D7c3-1B26-2Dc11CCb3CCB\"\ ; // required field\n\n\n // Create request object with parameters\n\ \ var request = new CreateRoutingPolicyRequest {\n Body\ \ = routingPolicy\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routingPoliciesApi.CreateRoutingPolicy(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/routing-policies/{extId}: get: tags: - RoutingPolicies summary: Get a single Routing Policy corresponding to the extId description: Get a single routing policy corresponding to the extId. operationId: getRoutingPolicyById parameters: - name: extId in: path description: ExtId of the Routing Policy. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f883f091-9c30-44c4-8a23-b8179a7f6376 responses: "200": description: Routing policy queried. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/routing-policies/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/routing-policies/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/routing-policies/{extId}\ \ Get operation" x-permissions: operationName: View Routing Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutingPoliciesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.GetRoutingPolicyByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetRoutingPolicyApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(apiClient);\n\ \n \n String extId = \"CdddBbf7-F200-C107-E861-0B2FEbc9bF35\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRoutingPolicyApiResponse\ \ getRoutingPolicyApiResponse = routingPoliciesApi.getRoutingPolicyById(GetRoutingPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getRoutingPolicyApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutingPoliciesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routingPoliciesApi = new RoutingPoliciesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"9f58c7eA-cdDf-564E-EBdd-BDCbE6EbCDbb\"\ ;\n\n\n\n\n\n routingPoliciesApi.getRoutingPolicyById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routing_policies_api = ntnx_networking_py_client.RoutingPoliciesApi(api_client=client)\n\ \ \n ext_id = \"D7BD2afF-D879-2Abe-5CD9-80Ab7DFDAdd6\"\n\n\n try:\n\ \ api_response = routing_policies_api.get_routing_policy_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutingPoliciesServiceApiInstance\ \ *api.RoutingPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RoutingPoliciesServiceApiInstance = api.NewRoutingPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"a8246fff-2c7A-539D-feEa-4Fc0F5BD2b5a\"\ \n\n\n request := routingpolicies.GetRoutingPolicyByIdRequest{ ExtId:\ \ &extId }\n response, error := RoutingPoliciesServiceApiInstance.GetRoutingPolicyById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RoutingPolicy)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/routing-policies/A1DdE1bf-4bE9-CEbF-dA2f-Fe8edD0B544b" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/routing-policies/72d2Bd9C-FF7B-23eE-a5FE-38A52557Eed5" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(client);\n\ \n String extId = \"e3fbb94A-fe4c-e57f-1cef-eCC7F5c3cBDE\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetRoutingPolicyByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetRoutingPolicyApiResponse getRoutingPolicyApiResponse\ \ = routingPoliciesApi.GetRoutingPolicyById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - RoutingPolicies summary: Update the Routing Policy corresponding to the extId description: Update the Routing Policy corresponding to the extId. operationId: updateRoutingPolicyById parameters: - name: extId in: path description: ExtId of the Routing Policy. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: d645974e-dfe8-4972-abf8-2df7f7bd7828 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: f94062c9-749b-4c66-b65f-3795900ba10b requestBody: description: Schema to configure a routing policy. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' required: true responses: "202": description: Task Id corresponding to the update routing policy request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Routing Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 3 timeUnit: seconds - type: xlarge count: 3 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutingPoliciesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.UpdateRoutingPolicyByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.GetRoutingPolicyByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.RoutingPolicy;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetRoutingPolicyApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(apiClient);\n\ \n RoutingPolicy routingPolicy = new RoutingPolicy();\n\n \ \ // RoutingPolicy object initializations here...\n routingPolicy.setName(\"\ RoutingPolicy1\"); // required field\n routingPolicy.setPolicies(new\ \ ArrayList<>()); // required field\n routingPolicy.setPriority(1);\ \ // required field\n routingPolicy.setVpcExtId(\"1fbBbFE6-FbD1-BaF0-DCc2-1fCfBff3bDBF\"\ ); // required field\n \n String extId = \"5ABafAef-D4f5-dceb-DDcE-1dfD80b00A3d\"\ ;\n\n // perform GET call\n GetRoutingPolicyApiResponse getResponse\ \ = null;\n try {\n getResponse = routingPoliciesApi.getRoutingPolicyById(GetRoutingPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routingPoliciesApi.updateRoutingPolicyById(UpdateRoutingPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build(), routingPolicy,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutingPoliciesApi, RoutingPolicy, GetRoutingPolicyApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routingPoliciesApi = new RoutingPoliciesApi(apiClientInstance);\n\n\ function sample() {\n let routingPolicy = new RoutingPolicy();\n\n \ \ // RoutingPolicy object initializations here...\n routingPolicy.setName(\"\ RoutingPolicy1\"); // required field\n routingPolicy.setPolicies([]);\ \ // required field\n routingPolicy.setPriority(1); // required field\n\ \ routingPolicy.setVpcExtId(\"5E3CDebB-FeE1-EBED-fbEC-Ca6DebAC68Da\"\ ); // required field\n routingPolicy = JSON.stringify(routingPolicy);\n\ \n \n let extId = \"c0aF8720-bddc-12c6-BdBe-c7D6cfcFeC4e\";\n\n\n\ \ // Perform Get call\n routingPoliciesApi.getRoutingPolicyById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n routingPoliciesApi.updateRoutingPolicyById(extId,\ \ routingPolicy, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routing_policies_api = ntnx_networking_py_client.RoutingPoliciesApi(api_client=client)\n\ \ routingPolicy = ntnx_networking_py_client.RoutingPolicy()\n\n #\ \ RoutingPolicy object initializations here...\n routingPolicy.name =\ \ \"RoutingPolicy1\" # required field\n routingPolicy.policies = []\ \ # required field\n routingPolicy.priority = 1 # required field\n\ \ routingPolicy.vpc_ext_id = \"CE2d8939-8e0B-41AB-E008-fD2fDfC1CD4D\"\ \ # required field\n \n ext_id = \"Ac76ef97-DF1f-1BcC-Ab7a-DFE5B96e51E6\"\ \n\n try:\n api_response = routing_policies_api.get_routing_policy_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = routing_policies_api.update_routing_policy_by_id(extId=ext_id,\ \ body=routingPolicy, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutingPoliciesServiceApiInstance\ \ *api.RoutingPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RoutingPoliciesServiceApiInstance = api.NewRoutingPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n routingPolicy := import1.NewRoutingPolicy()\n\ \n // RoutingPolicy object initializations here...\n\n \n extId\ \ := \"eCda8fBa-062F-238F-E4cF-DDaEEEaCe85f\"\n\n getRequest := routingpolicies.GetRoutingPolicyByIdRequest{\ \ extId: &extId }\n getResponse, err := RoutingPoliciesServiceApiInstance.GetRoutingPolicyById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := routingpolicies.UpdateRoutingPolicyByIdRequest{ ExtId:\ \ &extId, Body: routingPolicy }\n response, error := RoutingPoliciesServiceApiInstance.UpdateRoutingPolicyById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/routing-policies/E7e0BFaA-D4B9-9Dd8-44Ee-1aFFCdb94f1A" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"RoutingPolicy1","description":"RoutingPolicyDescription","policies":[{"policyMatch":{"source":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"destination":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"protocolType":"$UNKNOWN","protocolParameters":{"sourcePortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"destinationPortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.LayerFourProtocolObject"},"$objectType":"networking.v4.config.RoutingPolicyMatchCondition"},"policyAction":{"actionType":"$UNKNOWN","rerouteParams":[{"serviceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"rerouteFallbackAction":"PASSTHROUGH","ingressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"egressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RerouteParam"}],"nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RoutingPolicyAction"},"isBidirectional":false,"$objectType":"networking.v4.config.RoutingPolicyRule"}],"vpcExtId":"string","vpc":{"name":"VPC1","$objectType":"networking.v4.config.VpcName"},"$objectType":"networking.v4.config.RoutingPolicy"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"RoutingPolicy1","description":"RoutingPolicyDescription","policies":[{"policyMatch":{"source":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"destination":{"addressType":"$UNKNOWN","subnetPrefix":{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"},"$objectType":"networking.v4.config.AddressTypeObject"},"protocolType":"$UNKNOWN","protocolParameters":{"sourcePortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"destinationPortRanges":[{"$objectType":"networking.v4.config.PortRange"}],"$objectType":"networking.v4.config.LayerFourProtocolObject"},"$objectType":"networking.v4.config.RoutingPolicyMatchCondition"},"policyAction":{"actionType":"$UNKNOWN","rerouteParams":[{"serviceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"rerouteFallbackAction":"PASSTHROUGH","ingressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"egressServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RerouteParam"}],"nexthopIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.RoutingPolicyAction"},"isBidirectional":false,"$objectType":"networking.v4.config.RoutingPolicyRule"}],"vpcExtId":"string","vpc":{"name":"VPC1","$objectType":"networking.v4.config.VpcName"},"$objectType":"networking.v4.config.RoutingPolicy"} \ - "https://host:port/api/networking/v4.3/config/routing-policies/8AC4ad1f-cDaA-80fc-3Faa-fe0A92cd5A3E" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(client);\n\ \n RoutingPolicy routingPolicy = new RoutingPolicy();\n\n // RoutingPolicy\ \ object initializations here...\n routingPolicy.Name = \"RoutingPolicy1\"\ ; // required field\n routingPolicy.Policies = new ArrayList(); //\ \ required field\n routingPolicy.Priority = 1; // required field\n\ \ routingPolicy.VpcExtId = \"4FBDe67d-0D2C-FE7E-7bFB-aB3df4dB5a9F\"\ ; // required field\n\n String extId = \"Cc28Ab5A-cFA3-bdE1-5cEb-e9bAF1aCEBBf\"\ ;\n\n // perform GET call\n var getRequest = new GetRoutingPolicyByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetRoutingPolicyApiResponse\ \ getResponse = routingPoliciesApi.GetRoutingPolicyById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateRoutingPolicyByIdRequest {\n ExtId = extId,\n\ \ Body = routingPolicy,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = routingPoliciesApi.UpdateRoutingPolicyById(request, opts);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - RoutingPolicies summary: Delete the Routing Policy corresponding to the extId description: Delete the routing policy corresponding to the extId. operationId: deleteRoutingPolicyById parameters: - name: extId in: path description: ExtId of the Routing Policy. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a9b10d9e-f859-44b3-bb53-3c199b0f0402 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: b11aea66-f6c3-4982-9415-a1257da4c421 responses: "202": description: Task Id corresponding to the delete routing policy request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Routing Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.RoutingPoliciesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.RoutingPolicies.DeleteRoutingPolicyByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(apiClient);\n\ \n \n String extId = \"CE03C460-69CF-bdE6-Df33-24BAaF724Fcc\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = routingPoliciesApi.deleteRoutingPolicyById(DeleteRoutingPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RoutingPoliciesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let routingPoliciesApi = new RoutingPoliciesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"eA6EedAA-cF36-0b9b-EFFd-1BCa8Fa1Da8b\"\ ;\n\n\n\n\n\n routingPoliciesApi.deleteRoutingPolicyById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ routing_policies_api = ntnx_networking_py_client.RoutingPoliciesApi(api_client=client)\n\ \ \n ext_id = \"2Afa7ADE-54Fe-fD5C-fBBE-Aa832f6eaAC5\"\n\n\n try:\n\ \ api_response = routing_policies_api.delete_routing_policy_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RoutingPoliciesServiceApiInstance\ \ *api.RoutingPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ RoutingPoliciesServiceApiInstance = api.NewRoutingPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"aFDEbEA2-858F-BE7f-4f53-e0D3e5Df6eba\"\ \n\n\n request := routingpolicies.DeleteRoutingPolicyByIdRequest{ ExtId:\ \ &extId }\n response, error := RoutingPoliciesServiceApiInstance.DeleteRoutingPolicyById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/routing-policies/0C6C2eea-b802-bCfd-c9d4-205aF9CB1EE3" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/routing-policies/BEe662b8-b19b-fcdd-21Cc-F4E40BdBEd7b" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPoliciesApi routingPoliciesApi = new RoutingPoliciesApi(client);\n\ \n String extId = \"80c20eA0-c648-B698-b3f6-b1BD9acA5cBb\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteRoutingPolicyByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = routingPoliciesApi.DeleteRoutingPolicyById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/stats/routing-policies/$actions/clear: post: tags: - RoutingPolicies summary: Clear the value in packet and byte counters of all Routing Policies in the chosen VPC or particular routing policy description: Clear the value in packet and byte counters of all Routing Policies in the chosen VPC or a particular routing policy in the chosen VPC. operationId: clearRoutingPolicyCounters requestBody: description: VPC UUID to reset all routing policy counters to zero. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.stats.RoutingPolicyClearCountersSpec' required: true responses: "202": description: Task Id corresponding to the clear routing policy counter request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/stats/routing-policies/$actions/clear Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/stats/routing-policies/$actions/clear Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/stats/routing-policies/$actions/clear Post operation x-permissions: operationName: Clear Routing Policy Counters deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.RoutingPolicyStatsApi; import com.nutanix.dp1.networking.networking.v4.request.RoutingPolicyStats.ClearRoutingPolicyCountersRequest; import com.nutanix.dp1.networking.networking.v4.stats.RoutingPolicyClearCountersSpec; import com.nutanix.dp1.networking.networking.v4.stats.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. RoutingPolicyStatsApi routingPolicyStatsApi = new RoutingPolicyStatsApi(apiClient); RoutingPolicyClearCountersSpec routingPolicyClearCountersSpec = new RoutingPolicyClearCountersSpec(); // RoutingPolicyClearCountersSpec object initializations here... routingPolicyClearCountersSpec.setVpcExtId("c48fFe81-c402-3D8F-dadE-DDfaAf1DBecd"); // required field try { // Pass in parameters using the request builder object associated with the operation. StatsTaskReferenceApiResponse statsTaskReferenceApiResponse = routingPolicyStatsApi.clearRoutingPolicyCounters(ClearRoutingPolicyCountersRequest.builder() .build(), routingPolicyClearCountersSpec); System.out.println(statsTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, RoutingPolicyStatsApi, RoutingPolicyClearCountersSpec } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let routingPolicyStatsApi = new RoutingPolicyStatsApi(apiClientInstance); function sample() { let routingPolicyClearCountersSpec = new RoutingPolicyClearCountersSpec(); // RoutingPolicyClearCountersSpec object initializations here... routingPolicyClearCountersSpec.setVpcExtId("43C73D5f-3Cbc-bFCd-bfdD-874e18Ad7F79"); // required field routingPolicyClearCountersSpec = JSON.stringify(routingPolicyClearCountersSpec); routingPolicyStatsApi.clearRoutingPolicyCounters(routingPolicyClearCountersSpec).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) routing_policy_stats_api = ntnx_networking_py_client.RoutingPolicyStatsApi(api_client=client) routingPolicyClearCountersSpec = ntnx_networking_py_client.RoutingPolicyClearCountersSpec() # RoutingPolicyClearCountersSpec object initializations here... routingPolicyClearCountersSpec.vpc_ext_id = "1faDF05d-DdE4-CfDf-Fc6E-924E0d3DA7f8" # required field try: api_response = routing_policy_stats_api.clear_routing_policy_counters(body=routingPolicyClearCountersSpec) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/routingpolicystats" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient RoutingPolicyStatsServiceApiInstance *api.RoutingPolicyStatsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. RoutingPolicyStatsServiceApiInstance = api.NewRoutingPolicyStatsServiceApi(ApiClientInstance) ctx := context.Background() routingPolicyClearCountersSpec := import1.NewRoutingPolicyClearCountersSpec() // RoutingPolicyClearCountersSpec object initializations here... request := routingpolicystats.ClearRoutingPolicyCountersRequest{ Body: routingPolicyClearCountersSpec } response, error := RoutingPolicyStatsServiceApiInstance.ClearRoutingPolicyCounters(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/stats/routing-policies/$actions/clear" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"vpcExtId":"string","routingPolicyExtId":"string","$objectType":"networking.v4.stats.RoutingPolicyClearCountersSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"vpcExtId":"string","routingPolicyExtId":"string","$objectType":"networking.v4.stats.RoutingPolicyClearCountersSpec"} \ - "https://host:port/api/networking/v4.3/stats/routing-policies/$actions/clear" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ RoutingPolicyStatsApi routingPolicyStatsApi = new RoutingPolicyStatsApi(client);\n\ \n RoutingPolicyClearCountersSpec routingPolicyClearCountersSpec =\ \ new RoutingPolicyClearCountersSpec();\n\n // RoutingPolicyClearCountersSpec\ \ object initializations here...\n routingPolicyClearCountersSpec.VpcExtId\ \ = \"EfD555dD-7Be4-94dD-Abaa-EAdf0cACBe6C\"; // required field\n\n\n \ \ // Create request object with parameters\n var request =\ \ new ClearRoutingPolicyCountersRequest {\n Body = routingPolicyClearCountersSpec\n\ \ };\n try {\n StatsTaskReferenceApiResponse statsTaskReferenceApiResponse\ \ = routingPolicyStatsApi.ClearRoutingPolicyCounters(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/vnics/{extId}/$actions/migrate: post: tags: - SubnetMigrations summary: Migrate vNICs from Acropolis to Atlas or vice-versa description: Migrate vNICs from Acropolis to Atlas or vice-versa. operationId: migrateVnicById parameters: - name: extId in: path description: UUID of NIC to be migrated. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7da276a0-cb09-41f3-9453-8f9e58bf3f03 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 313faa87-6286-4eb1-9a2e-6badbb4bbd89 requestBody: description: Request body for the vNIC migrate operation. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VnicMigrationItemSpec' required: true responses: "202": description: Response of the migrate vNIC request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Migrate VNIC deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetMigrationsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.SubnetMigrations.MigrateVnicByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.VnicMigrationItemSpec;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetMigrationsApi subnetMigrationsApi = new SubnetMigrationsApi(apiClient);\n\ \n VnicMigrationItemSpec vnicMigrationItemSpec = new VnicMigrationItemSpec();\n\ \n // VnicMigrationItemSpec object initializations here...\n \ \ \n String extId = \"dADCfaAC-B3EF-Be5e-595e-54ACCec09F9f\";\n\ \n try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetMigrationsApi.migrateVnicById(MigrateVnicByIdRequest.builder()\n\ \ .extId(extId)\n .build(), vnicMigrationItemSpec);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetMigrationsApi, VnicMigrationItemSpec\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetMigrationsApi = new SubnetMigrationsApi(apiClientInstance);\n\n\ function sample() {\n let vnicMigrationItemSpec = new VnicMigrationItemSpec();\n\ \n // VnicMigrationItemSpec object initializations here...\n vnicMigrationItemSpec\ \ = JSON.stringify(vnicMigrationItemSpec);\n\n \n let extId = \"BcC0F7fb-aEa4-8d5b-a74F-0DdeF5712FB7\"\ ;\n\n\n\n\n\n subnetMigrationsApi.migrateVnicById(extId, vnicMigrationItemSpec).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnet_migrations_api = ntnx_networking_py_client.SubnetMigrationsApi(api_client=client)\n\ \ vnicMigrationItemSpec = ntnx_networking_py_client.VnicMigrationItemSpec()\n\ \n # VnicMigrationItemSpec object initializations here...\n \n \ \ ext_id = \"d98EdC8c-cad4-FBaC-eDCD-cB9C18ed8A65\"\n\n\n try:\n \ \ api_response = subnet_migrations_api.migrate_vnic_by_id(extId=ext_id,\ \ body=vnicMigrationItemSpec)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnetmigrations\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetMigrationsServiceApiInstance\ \ *api.SubnetMigrationsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SubnetMigrationsServiceApiInstance = api.NewSubnetMigrationsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vnicMigrationItemSpec := import1.NewVnicMigrationItemSpec()\n\ \n // VnicMigrationItemSpec object initializations here...\n\n \n\ \ extId := \"2BdAb943-7feF-d2dA-cb5C-F6d720D3C7Cb\"\n\n\n request\ \ := subnetmigrations.MigrateVnicByIdRequest{ ExtId: &extId, Body: vnicMigrationItemSpec\ \ }\n response, error := SubnetMigrationsServiceApiInstance.MigrateVnicById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/vnics/cFB7AaE9-CFCC-b9Ed-c14C-4f16b8C76B6d/$actions/migrate" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"networkUuid":"string","requestedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VnicMigrationItemSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"networkUuid":"string","requestedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VnicMigrationItemSpec"} \ - "https://host:port/api/networking/v4.3/config/vnics/32DF22ED-FBBb-37eA-c84A-Dfded7baA048/$actions/migrate" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetMigrationsApi subnetMigrationsApi = new SubnetMigrationsApi(client);\n\ \n VnicMigrationItemSpec vnicMigrationItemSpec = new VnicMigrationItemSpec();\n\ \n // VnicMigrationItemSpec object initializations here...\n\n \ \ String extId = \"9Fd95DFd-9cCC-DAE1-e210-1dE3f1eBec96\";\n\n //\ \ Create request object with parameters\n var request = new MigrateVnicByIdRequest\ \ {\n ExtId = extId,\n Body = vnicMigrationItemSpec\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = subnetMigrationsApi.MigrateVnicById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/$actions/migrate-subnets: post: tags: - SubnetMigrations summary: Migrate VLAN subnets from VLAN basic to VLAN advanced description: Migrate VLAN subnets from VLAN basic to VLAN advanced. operationId: migrateSubnets parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 3c187eb7-d079-4220-ad3b-c3077462a4a3 requestBody: description: Request body for subnet migrate operation. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VlanSubnetMigrationSpec' required: true responses: "202": description: Migrate VLAN request was accepted successfully. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Migrate Subnet deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.SubnetMigrationsApi; import com.nutanix.dp1.networking.networking.v4.request.SubnetMigrations.MigrateSubnetsRequest; import com.nutanix.dp1.networking.networking.v4.config.VlanSubnetMigrationSpec; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. SubnetMigrationsApi subnetMigrationsApi = new SubnetMigrationsApi(apiClient); VlanSubnetMigrationSpec vlanSubnetMigrationSpec = new VlanSubnetMigrationSpec(); // VlanSubnetMigrationSpec object initializations here... vlanSubnetMigrationSpec.setSubnets(new ArrayList<>()); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = subnetMigrationsApi.migrateSubnets(MigrateSubnetsRequest.builder() .build(), vlanSubnetMigrationSpec); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, SubnetMigrationsApi, VlanSubnetMigrationSpec } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let subnetMigrationsApi = new SubnetMigrationsApi(apiClientInstance); function sample() { let vlanSubnetMigrationSpec = new VlanSubnetMigrationSpec(); // VlanSubnetMigrationSpec object initializations here... vlanSubnetMigrationSpec.setSubnets([]); // required field vlanSubnetMigrationSpec = JSON.stringify(vlanSubnetMigrationSpec); subnetMigrationsApi.migrateSubnets(vlanSubnetMigrationSpec).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) subnet_migrations_api = ntnx_networking_py_client.SubnetMigrationsApi(api_client=client) vlanSubnetMigrationSpec = ntnx_networking_py_client.VlanSubnetMigrationSpec() # VlanSubnetMigrationSpec object initializations here... vlanSubnetMigrationSpec.subnets = [] # required field try: api_response = subnet_migrations_api.migrate_subnets(body=vlanSubnetMigrationSpec) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnetmigrations" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient SubnetMigrationsServiceApiInstance *api.SubnetMigrationsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. SubnetMigrationsServiceApiInstance = api.NewSubnetMigrationsServiceApi(ApiClientInstance) ctx := context.Background() vlanSubnetMigrationSpec := import1.NewVlanSubnetMigrationSpec() // VlanSubnetMigrationSpec object initializations here... request := subnetmigrations.MigrateSubnetsRequest{ Body: vlanSubnetMigrationSpec } response, error := SubnetMigrationsServiceApiInstance.MigrateSubnets(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/$actions/migrate-subnets" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"subnets":[{"subnetUuid":"string","$objectType":"networking.v4.config.SubnetInfo"}],"$objectType":"networking.v4.config.VlanSubnetMigrationSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"subnets":[{"subnetUuid":"string","$objectType":"networking.v4.config.SubnetInfo"}],"$objectType":"networking.v4.config.VlanSubnetMigrationSpec"} \ - "https://host:port/api/networking/v4.3/config/$actions/migrate-subnets" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetMigrationsApi subnetMigrationsApi = new SubnetMigrationsApi(client);\n\ \n VlanSubnetMigrationSpec vlanSubnetMigrationSpec = new VlanSubnetMigrationSpec();\n\ \n // VlanSubnetMigrationSpec object initializations here...\n \ \ vlanSubnetMigrationSpec.Subnets = new ArrayList(); // required field\n\ \n\n // Create request object with parameters\n var request\ \ = new MigrateSubnetsRequest {\n Body = vlanSubnetMigrationSpec\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = subnetMigrationsApi.MigrateSubnets(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/subnets/{extId}/addresses/$actions/reserve: post: tags: - Subnets summary: Reserve IP addresses on a subnet description: Reserve IP addresses on a subnet. operationId: reserveIpsBySubnetId parameters: - name: extId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5368a9af-b26e-4556-a328-320a24b7fd5e - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 186959f9-287a-4fb6-8548-8780661a57ff requestBody: description: Request schema to reserve IP addresses on a subnet. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.IpReserveSpec' required: true responses: "202": description: Task Id corresponding to the subnet reserve IP operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Reserve Subnet Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: small count: 4 timeUnit: seconds - type: large count: 4 timeUnit: seconds - type: xlarge count: 4 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetIPReservationApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.SubnetIPReservation.ReserveIpsBySubnetIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ReserveType;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.IpReserveSpec;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(apiClient);\n\ \n IpReserveSpec ipReserveSpec = new IpReserveSpec();\n\n \ \ // IpReserveSpec object initializations here...\n ipReserveSpec.setReserveType(ReserveType.UNKNOWN);\ \ // required field\n \n String extId = \"aDD050D3-AcFa-52bA-e225-Dcf5b0Ab786B\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetIPReservationApi.reserveIpsBySubnetId(ReserveIpsBySubnetIdRequest.builder()\n\ \ .extId(extId)\n .build(), ipReserveSpec);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetIPReservationApi, ReserveType, IpReserveSpec\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetIPReservationApi = new SubnetIPReservationApi(apiClientInstance);\n\ \nfunction sample() {\n let ipReserveSpec = new IpReserveSpec();\n\n\ \ // IpReserveSpec object initializations here...\n ipReserveSpec.setReserveType(ReserveType.UNKNOWN);\ \ // required field\n ipReserveSpec = JSON.stringify(ipReserveSpec);\n\ \n \n let extId = \"Fe3A6d10-4dCa-43Cd-aa4A-b9dbEaA217ae\";\n\n\n\n\ \n\n subnetIPReservationApi.reserveIpsBySubnetId(extId, ipReserveSpec).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnet_ip_reservation_api = ntnx_networking_py_client.SubnetIPReservationApi(api_client=client)\n\ \ ipReserveSpec = ntnx_networking_py_client.IpReserveSpec()\n\n #\ \ IpReserveSpec object initializations here...\n ipReserveSpec.reserve_type\ \ = ntnx_networking_py_client.ReserveType._UNKNOWN # required field\n \ \ \n ext_id = \"D7EdA4aD-2c1d-DCFc-E1aA-1f5f994a2Ecc\"\n\n\n try:\n\ \ api_response = subnet_ip_reservation_api.reserve_ips_by_subnet_id(extId=ext_id,\ \ body=ipReserveSpec)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnetipreservation\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetIPReservationServiceApiInstance\ \ *api.SubnetIPReservationServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SubnetIPReservationServiceApiInstance = api.NewSubnetIPReservationServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n ipReserveSpec := import1.NewIpReserveSpec()\n\ \n // IpReserveSpec object initializations here...\n\n \n extId\ \ := \"5C7484b1-5c5d-B3e6-DB0A-CFDb9AbAdf91\"\n\n\n request := subnetipreservation.ReserveIpsBySubnetIdRequest{\ \ ExtId: &extId, Body: ipReserveSpec }\n response, error := SubnetIPReservationServiceApiInstance.ReserveIpsBySubnetId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/subnets/BADAcddE-ebbd-0A77-19AF-AecdBa18cCff/addresses/$actions/reserve" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"count":0,"startIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"reserveType":"$UNKNOWN","clientContext":"reserved_ip_context","$objectType":"networking.v4.config.IpReserveSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"count":0,"startIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"reserveType":"$UNKNOWN","clientContext":"reserved_ip_context","$objectType":"networking.v4.config.IpReserveSpec"} \ - "https://host:port/api/networking/v4.3/config/subnets/f40f0FfC-CF0E-EbF4-185f-98ccfAC18C5D/addresses/$actions/reserve" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(client);\n\ \n IpReserveSpec ipReserveSpec = new IpReserveSpec();\n\n // IpReserveSpec\ \ object initializations here...\n ipReserveSpec.ReserveType = ReserveType.UNKNOWN;\ \ // required field\n\n String extId = \"F3dd4bCc-dDac-cBFF-cFAd-eBCdFFCB2CDa\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ReserveIpsBySubnetIdRequest {\n ExtId = extId,\n \ \ Body = ipReserveSpec\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetIPReservationApi.ReserveIpsBySubnetId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/subnets/{extId}/addresses/$actions/unreserve: post: tags: - Subnets summary: Unreserve IP addresses on a subnet description: Unreserve IP addresses on a subnet. operationId: unreserveIpsBySubnetId parameters: - name: extId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 09fca9c7-db51-4355-9b03-765b2c77d7d0 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 41f9b37f-30c9-4f80-8b6b-d5a435c041f7 requestBody: description: Request schema to unreserve IP addresses on a subnet. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.IpUnreserveSpec' required: true responses: "202": description: Task Id corresponding to the subnet unreserve IP operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Unreserve Subnet Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: small count: 4 timeUnit: seconds - type: large count: 4 timeUnit: seconds - type: xlarge count: 4 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetIPReservationApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.SubnetIPReservation.UnreserveIpsBySubnetIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.UnreserveType;\n\ import com.nutanix.dp1.networking.networking.v4.config.IpUnreserveSpec;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(apiClient);\n\ \n IpUnreserveSpec ipUnreserveSpec = new IpUnreserveSpec();\n\n \ \ // IpUnreserveSpec object initializations here...\n ipUnreserveSpec.setUnreserveType(UnreserveType.UNKNOWN);\ \ // required field\n \n String extId = \"5CF189AF-acaC-3b93-BC28-9eFc1FAf42cf\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetIPReservationApi.unreserveIpsBySubnetId(UnreserveIpsBySubnetIdRequest.builder()\n\ \ .extId(extId)\n .build(), ipUnreserveSpec);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetIPReservationApi, UnreserveType, IpUnreserveSpec\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetIPReservationApi = new SubnetIPReservationApi(apiClientInstance);\n\ \nfunction sample() {\n let ipUnreserveSpec = new IpUnreserveSpec();\n\ \n // IpUnreserveSpec object initializations here...\n ipUnreserveSpec.setUnreserveType(UnreserveType.UNKNOWN);\ \ // required field\n ipUnreserveSpec = JSON.stringify(ipUnreserveSpec);\n\ \n \n let extId = \"7Ef59Ec4-dfAe-EF4D-0AD4-c33aa6fa6efa\";\n\n\n\n\ \n\n subnetIPReservationApi.unreserveIpsBySubnetId(extId, ipUnreserveSpec).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnet_ip_reservation_api = ntnx_networking_py_client.SubnetIPReservationApi(api_client=client)\n\ \ ipUnreserveSpec = ntnx_networking_py_client.IpUnreserveSpec()\n\n \ \ # IpUnreserveSpec object initializations here...\n ipUnreserveSpec.unreserve_type\ \ = ntnx_networking_py_client.UnreserveType._UNKNOWN # required field\n\ \ \n ext_id = \"Bad6f9ED-A89d-Cd1E-5d00-4ab349bBbd97\"\n\n\n try:\n\ \ api_response = subnet_ip_reservation_api.unreserve_ips_by_subnet_id(extId=ext_id,\ \ body=ipUnreserveSpec)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnetipreservation\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetIPReservationServiceApiInstance\ \ *api.SubnetIPReservationServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SubnetIPReservationServiceApiInstance = api.NewSubnetIPReservationServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n ipUnreserveSpec := import1.NewIpUnreserveSpec()\n\ \n // IpUnreserveSpec object initializations here...\n\n \n extId\ \ := \"9A71bBf3-dDc4-c312-3eB8-D7EF0F044cbd\"\n\n\n request := subnetipreservation.UnreserveIpsBySubnetIdRequest{\ \ ExtId: &extId, Body: ipUnreserveSpec }\n response, error := SubnetIPReservationServiceApiInstance.UnreserveIpsBySubnetId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/subnets/dab4a47F-ECB0-Db5C-cB58-be9639D9EA6f/addresses/$actions/unreserve" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"count":0,"startIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"clientContext":"reserved_ip_context","unreserveType":"$UNKNOWN","$objectType":"networking.v4.config.IpUnreserveSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"count":0,"startIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"clientContext":"reserved_ip_context","unreserveType":"$UNKNOWN","$objectType":"networking.v4.config.IpUnreserveSpec"} \ - "https://host:port/api/networking/v4.3/config/subnets/dACABAEB-42A0-ddBC-bDd7-AfffCD7cB218/addresses/$actions/unreserve" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(client);\n\ \n IpUnreserveSpec ipUnreserveSpec = new IpUnreserveSpec();\n\n \ \ // IpUnreserveSpec object initializations here...\n ipUnreserveSpec.UnreserveType\ \ = UnreserveType.UNKNOWN; // required field\n\n String extId = \"\ FecCcEDd-c6eC-a1DE-37F9-CbCeF5Afcb92\";\n\n // Create request object\ \ with parameters\n var request = new UnreserveIpsBySubnetIdRequest\ \ {\n ExtId = extId,\n Body = ipUnreserveSpec\n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = subnetIPReservationApi.UnreserveIpsBySubnetId(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/subnets/{subnetExtId}/reserved-ips: get: tags: - Subnets summary: List reserved IPs of a managed subnet description: Fetches a list of reserved IP addresses on a particular managed subnet. operationId: listReservedIpsBySubnetId parameters: - name: subnetExtId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 03654933-2e8e-4f48-b4be-184509b574a2 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clientContext example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$filter=clientContext\ \ eq 'reserved_ip_context'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: ipv4Address example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$orderby=ipv4Address" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clientContext example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$select=clientContext" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$select=extId" - name: ipv4Address example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$select=ipv4Address" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$select=links" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/reserved-ips?$select=tenantId" responses: "200": description: Returns a list of requested IP addresses. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.ReservedIp' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/reserved-ips\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/reserved-ips\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/reserved-ips\ \ Get operation" x-permissions: operationName: View Subnet Reserved Ip deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetIPReservationApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.SubnetIPReservation.ListReservedIpsBySubnetIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListSubnetReservedIpsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(apiClient);\n\ \n \n String subnetExtId = \"DCceD9bA-2BEA-a22F-d585-ed8D8dfABaAC\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListSubnetReservedIpsApiResponse\ \ listSubnetReservedIpsApiResponse = subnetIPReservationApi.listReservedIpsBySubnetId(ListReservedIpsBySubnetIdRequest.builder()\n\ \ .subnetExtId(subnetExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listSubnetReservedIpsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetIPReservationApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetIPReservationApi = new SubnetIPReservationApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let subnetExtId = \"0B3E9AfF-cee7-dB1b-75CF-4ce5AbECEc2c\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n opts[\"$select\"\ ] = \"string_sample_data\";\n\n\n\n\n subnetIPReservationApi.listReservedIpsBySubnetId(subnetExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnet_ip_reservation_api = ntnx_networking_py_client.SubnetIPReservationApi(api_client=client)\n\ \ \n subnet_ext_id = \"CED2AAaf-5acD-aF7A-AC0D-d9deAC4Bbbfd\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = subnet_ip_reservation_api.list_reserved_ips_by_subnet_id(subnetExtId=subnet_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnetipreservation\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetIPReservationServiceApiInstance\ \ *api.SubnetIPReservationServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SubnetIPReservationServiceApiInstance = api.NewSubnetIPReservationServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n subnetExtId := \"eEf2bCdF-0a9e-589A-Eafc-AaDe2dcE2CBb\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := subnetipreservation.ListReservedIpsBySubnetIdRequest{\ \ SubnetExtId: &subnetExtId, Page_: &page_, Limit_: &limit_, Filter_: nil,\ \ Orderby_: nil, Select_: nil }\n response, error := SubnetIPReservationServiceApiInstance.ListReservedIpsBySubnetId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.ReservedIp)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/subnets/dFfDF319-E76e-1A15-F18c-bAEFCADD0FbF/reserved-ips?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/subnets/A3Dc4ac6-5b2D-e05F-10E6-d9757eeDfafC/reserved-ips?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetIPReservationApi subnetIPReservationApi = new SubnetIPReservationApi(client);\n\ \n String subnetExtId = \"DAfAEfBA-7aDb-60aD-ede4-5abCfEDB23EE\";\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListReservedIpsBySubnetIdRequest {\n \ \ SubnetExtId = subnetExtId,\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListSubnetReservedIpsApiResponse\ \ listSubnetReservedIpsApiResponse = subnetIPReservationApi.ListReservedIpsBySubnetId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/subnets: get: tags: - Subnets summary: Get the list of existing subnets description: | Get the list of existing subnets. With filtering, the following rules apply: VLAN (subnet_type==[no_val] OR subnet_type==VLAN) AND (is_external==[no_val] OR is_external==false) OVERLAY (subnet_type==OVERLAY) AND (is_external==[no_val] OR is_external==false) External is_external==true operationId: listSubnets parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterNameList example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=clusterNameList/any(a:a\ \ eq 'string')" - name: clusterReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=clusterReference\ \ eq '4899c6a1-19d5-43ab-9289-9e30e4ace068'" - name: clusterReferenceList example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=clusterReferenceList/any(a:a\ \ eq '60b4e03a-a15a-4375-834d-d04ad89053bc')" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=extId\ \ eq '0079ebc4-467c-48cf-91cb-7e2f2a7b2363'" - name: externalDhcpServers/externalDhcpServerIpAddress/ipv4/value example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=externalDhcpServers/any(a:a/externalDhcpServerIpAddress/ipv4/value\ \ eq '40.204.87.101')" - name: externalDhcpServers/externalDhcpServerIpAddress/ipv6/value example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=externalDhcpServers/any(a:a/externalDhcpServerIpAddress/ipv6/value\ \ eq '7f8b:7a40:8c4e:ea2c:d804:15e9:1d2c:b338')" - name: externalDhcpServers/externalDhcpServerPort example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=externalDhcpServers/any(a:a/externalDhcpServerPort\ \ eq 20)" - name: hypervisorType example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=hypervisorType\ \ eq 'acropolis'" - name: isExternal example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=isExternal\ \ eq false" - name: migrationState example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=migrationState\ \ eq Networking.Config.MigrationState'IN_PROGRESS'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=name\ \ eq 'subnet-1'" - name: networkId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=networkId\ \ eq 36" - name: subnetType example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=subnetType\ \ eq Networking.Config.SubnetType'OVERLAY'" - name: virtualSwitchReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=virtualSwitchReference\ \ eq '210ec6ee-b615-447c-b856-173c7be92336'" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$filter=vpcReference\ \ eq '7cbb9bf4-a6eb-4ae5-bf9e-56177b9e7180'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$orderby=name" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: layer2StretchReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$expand=layer2StretchReference" - name: virtualSwitch example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$expand=virtualSwitch" - name: vpc example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$expand=vpc" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterName example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=clusterName" - name: clusterNameList example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=clusterNameList" - name: clusterReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=clusterReference" - name: clusterReferenceList example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=clusterReferenceList" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=extId" - name: externalDhcpServers example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=externalDhcpServers" - name: hypervisorType example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=hypervisorType" - name: ipPrefix example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=ipPrefix" - name: isAdvancedNetworking example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=isAdvancedNetworking" - name: isExternal example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=isExternal" - name: isNatEnabled example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=isNatEnabled" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=links" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=metadata/projectReferenceId" - name: migrationState example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=migrationState" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=name" - name: networkId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=networkId" - name: subnetType example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=subnetType" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=tenantId" - name: virtualSwitchReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=virtualSwitchReference" - name: vpcReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets?$select=vpcReference" responses: "200": description: Paginated list of subnets. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Subnet' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/subnets Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/subnets Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/subnets Get operation x-permissions: operationName: View Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Developer - name: Prism Viewer - name: Prism Admin - name: Super Admin - name: Consumer - name: Project Admin - name: Operator - name: Network Infra Admin - name: Objects Admin - name: Files Admin - name: CSI System - name: Kubernetes Data Services System - name: Kubernetes Infrastructure Provision - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: VPC Admin - name: Network Shared Resources Viewer - name: Project Manager - name: Account Owner - name: Administrator - name: Backup Admin - name: NCM Connector x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Subnets.ListSubnetsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListSubnetsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetsApi subnetsApi = new SubnetsApi(apiClient);\n\n \n \ \ int page = 0;\n \n int limit = 50;\n\n try {\n\ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ListSubnetsApiResponse listSubnetsApiResponse\ \ = subnetsApi.listSubnets(ListSubnetsRequest.builder()\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .$expand(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listSubnetsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, SubnetsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let subnetsApi = new SubnetsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; subnetsApi.listSubnets(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = subnets_api.list_subnets(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetsServiceApiInstance\ \ *api.SubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := subnets.ListSubnetsRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Expand_: nil, Select_: nil }\n \ \ response, error := SubnetsServiceApiInstance.ListSubnets(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.Subnet)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/subnets?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n int page =\ \ 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListSubnetsRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListSubnetsApiResponse listSubnetsApiResponse\ \ = subnetsApi.ListSubnets(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" post: tags: - Subnets summary: Create a subnet description: Create a subnet. operationId: createSubnet parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 238937e5-e2bb-46d6-84e5-50c192d17147 requestBody: description: Request schema to create the subnet. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Subnet' required: true responses: "202": description: Task Id corresponding to the create subnet request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin - name: User x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 3 timeUnit: seconds - type: xlarge count: 3 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.SubnetsApi; import com.nutanix.dp1.networking.networking.v4.request.Subnets.CreateSubnetRequest; import com.nutanix.dp1.networking.networking.v4.config.Subnet; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. SubnetsApi subnetsApi = new SubnetsApi(apiClient); Subnet subnet = new Subnet(); // Subnet object initializations here... try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = subnetsApi.createSubnet(CreateSubnetRequest.builder() .build(), subnet); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, SubnetsApi, Subnet } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let subnetsApi = new SubnetsApi(apiClientInstance); function sample() { let subnet = new Subnet(); // Subnet object initializations here... subnet = JSON.stringify(subnet); subnetsApi.createSubnet(subnet).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client) subnet = ntnx_networking_py_client.Subnet() # Subnet object initializations here... try: api_response = subnets_api.create_subnet(body=subnet) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient SubnetsServiceApiInstance *api.SubnetsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance) ctx := context.Background() subnet := import1.NewSubnet() // Subnet object initializations here... request := subnets.CreateSubnetRequest{ Body: subnet } response, error := SubnetsServiceApiInstance.CreateSubnet(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/subnets" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"} \ - "https://host:port/api/networking/v4.3/config/subnets" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n Subnet subnet\ \ = new Subnet();\n\n // Subnet object initializations here...\n\n\n\ \ // Create request object with parameters\n var request =\ \ new CreateSubnetRequest {\n Body = subnet\n };\n \ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = subnetsApi.CreateSubnet(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /networking/v4.3/config/subnets/{extId}: get: tags: - Subnets summary: Get the subnet with the specified UUID description: Get a subnet with the specified UUID. operationId: getSubnetById parameters: - name: extId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: d84c5ddd-12a9-4c4d-8094-fa943f10f6fa responses: "200": description: The subnet object returned by the get request. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.Subnet' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{extId}\ \ Get operation" x-permissions: operationName: View Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Developer - name: Prism Viewer - name: Prism Admin - name: Super Admin - name: Consumer - name: Project Admin - name: Operator - name: Network Infra Admin - name: Objects Admin - name: Files Admin - name: CSI System - name: Kubernetes Data Services System - name: Kubernetes Infrastructure Provision - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: VPC Admin - name: Network Shared Resources Viewer - name: Project Manager - name: Account Owner - name: Administrator - name: NCM Connector x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Subnets.GetSubnetByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetSubnetApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetsApi subnetsApi = new SubnetsApi(apiClient);\n\n \n \ \ String extId = \"bC7a34B2-f5fA-99EC-7a49-fbFaeeEA9a68\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetSubnetApiResponse\ \ getSubnetApiResponse = subnetsApi.getSubnetById(GetSubnetByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getSubnetApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetsApi = new SubnetsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"cfE3dFfc-c4fD-DBaA-7cdE-9dFA0D3bC84E\";\n\ \n\n\n\n\n subnetsApi.getSubnetById(extId).then(({data, response}) =>\ \ {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client)\n\ \ \n ext_id = \"FaADd8Ab-Acfa-Cbff-2aA6-acDFF7aB316C\"\n\n\n try:\n\ \ api_response = subnets_api.get_subnet_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetsServiceApiInstance\ \ *api.SubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"cbAfE49B-dcCD-6e48-C33D-f31F5880dbcB\"\ \n\n\n request := subnets.GetSubnetByIdRequest{ ExtId: &extId }\n \ \ response, error := SubnetsServiceApiInstance.GetSubnetById(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.Subnet)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/subnets/bBe7E0df-FdeA-c3E1-aD75-e58BA386Ee2d" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/subnets/7D4B5AFb-9adb-0eaD-F0fd-3fD97afAaAFF" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n String extId\ \ = \"e3CA5E3a-5E73-dC74-e4DF-2CFbDDAFBd86\";\n\n // Create request\ \ object with parameters\n var request = new GetSubnetByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetSubnetApiResponse\ \ getSubnetApiResponse = subnetsApi.GetSubnetById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" put: tags: - Subnets summary: Update the specified subnet description: Update the specified subnet. operationId: updateSubnetById parameters: - name: extId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e2d9f470-2d58-4f1d-8f20-b796c4225d45 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: f053cc69-f435-4fc9-98ac-ee91c62b3b80 requestBody: description: Request schema to update the specified subnet. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Subnet' required: true responses: "202": description: Task Id corresponding to update subnet. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Subnets.UpdateSubnetByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.Subnets.GetSubnetByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.Subnet;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetSubnetApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetsApi subnetsApi = new SubnetsApi(apiClient);\n\n Subnet\ \ subnet = new Subnet();\n\n // Subnet object initializations here...\n\ \ \n String extId = \"02CB6Aff-2E9c-eD8F-5FE2-BfAE3a1DBcf0\"\ ;\n\n // perform GET call\n GetSubnetApiResponse getResponse\ \ = null;\n try {\n getResponse = subnetsApi.getSubnetById(GetSubnetByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetsApi.updateSubnetById(UpdateSubnetByIdRequest.builder()\n\ \ .extId(extId)\n .build(), subnet, opts);\n\ \n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetsApi, Subnet, GetSubnetApiResponse }\ \ from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetsApi = new SubnetsApi(apiClientInstance);\n\nfunction sample()\ \ {\n let subnet = new Subnet();\n\n // Subnet object initializations\ \ here...\n subnet = JSON.stringify(subnet);\n\n \n let extId =\ \ \"AF9f28D1-D5Be-fcEA-ae9F-FeaA8cddB6C6\";\n\n\n // Perform Get call\n\ \ subnetsApi.getSubnetById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ // Extract E-Tag Header\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n\n subnetsApi.updateSubnetById(extId,\ \ subnet, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client)\n\ \ subnet = ntnx_networking_py_client.Subnet()\n\n # Subnet object\ \ initializations here...\n \n ext_id = \"FCe8FbdB-Ea6d-1c6a-1DcF-1d8bE00a9AF3\"\ \n\n try:\n api_response = subnets_api.get_subnet_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = subnets_api.update_subnet_by_id(extId=ext_id,\ \ body=subnet, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetsServiceApiInstance\ \ *api.SubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n subnet := import1.NewSubnet()\n\n\ \ // Subnet object initializations here...\n\n \n extId := \"AF06EBdB-a4ae-cCDe-fAdd-C8FE102E10Ad\"\ \n\n getRequest := subnets.GetSubnetByIdRequest{ extId: &extId }\n \ \ getResponse, err := SubnetsServiceApiInstance.GetSubnetById(ctx, &getRequest)\n\ \ if err != nil {\n fmt.Println(err)\n return\n }\n\n\ \ // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := subnets.UpdateSubnetByIdRequest{ ExtId: &extId, Body: subnet\ \ }\n response, error := SubnetsServiceApiInstance.UpdateSubnetById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/subnets/a9c30A11-2e6A-ebAF-75d3-EF2cbC9DbEeF" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-1","description":"Internalsubnet","subnetType":"$UNKNOWN","networkId":0,"dhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"domainName":"string","searchDomains":["string"],"tftpServerName":"abc.example.com","bootFileName":"boot.cfg","ntpServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.DhcpOptions"},"ipConfig":[{"ipv4":{"ipSubnet":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"dhcpServerAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"poolList":[{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"}],"$objectType":"networking.v4.config.IPv4Config"},"ipv6":{"ipSubnet":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"defaultGatewayIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"dhcpServerAddress":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"poolList":[{"startIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"endIp":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"networking.v4.config.IPv6Pool"}],"$objectType":"networking.v4.config.IPv6Config"},"$objectType":"networking.v4.config.IPConfig"}],"clusterReference":"string","clusterReferenceList":["string"],"clusterNameList":["string"],"virtualSwitchReference":"string","vpcReference":"string","isNatEnabled":true,"isExternal":true,"reservedIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"dynamicIpAddresses":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"networkFunctionChainReference":"string","bridgeName":"br0","isAdvancedNetworking":true,"clusterName":"cluster1","hypervisorType":"acropolis","virtualSwitch":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"},"vpc":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"},"layer2StretchReference":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"subnet-extension-4","description":"Subnetextensiondescription","localSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"remoteSiteParams":{"pcClusterReference":"string","stretchSubnetReference":"string","connectionReference":"string","stretchInterfaceIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"vpnInterfaceIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"defaultGatewayIPAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"highAvailabilityGroup":{"isHaEnabled":true,"algorithm":"$UNKNOWN","peeredGateways":[{"extId":"string","status":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.PeeredGateway"}],"$objectType":"networking.v4.config.HighAvailabilityGroup"},"$objectType":"networking.v4.config.SiteParams"},"connectionType":"$UNKNOWN","stretchStatus":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"remoteStretchStatus":[{"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"status":{"detail":"VxLANtunnelisdown","tunnelState":"$UNKNOWN","interfaceState":"$UNKNOWN","roundTripTimeMillis":123.45,"$objectType":"networking.v4.config.StretchStatus"},"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.RemoteVtepStretchStatus"}],"mtu":1500,"vni":111,"highAvailabilityStatus":{"state":"$UNKNOWN","errorDetails":"string","$objectType":"networking.v4.config.HighAvailabilityStatus"},"$objectType":"networking.v4.config.Layer2Stretch"},"ipPrefix":"255.255.255.0","ipUsage":{"numMacs":0,"numFreeIPs":0,"numAssignedIPs":0,"ipPoolUsages":[{"numFreeIPs":0,"numTotalIPs":0,"range":{"startIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"endIp":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.IPv4Pool"},"$objectType":"networking.v4.config.IPPoolUsage"}],"$objectType":"networking.v4.config.IPUsage"},"migrationState":"$UNKNOWN","externalDhcpServers":[{"externalDhcpServerIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.ExternalDhcpServer"}],"$objectType":"networking.v4.config.Subnet"} \ - "https://host:port/api/networking/v4.3/config/subnets/d9d5f9ed-8c67-BEeC-dbd2-cebdD6E8Fb5D" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n Subnet subnet\ \ = new Subnet();\n\n // Subnet object initializations here...\n\n\ \ String extId = \"AdaffCec-fCD9-D6FF-Fbcf-a484BFF6aDFD\";\n\n \ \ // perform GET call\n var getRequest = new GetSubnetByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetSubnetApiResponse\ \ getResponse = subnetsApi.GetSubnetById(getRequest);\n } catch(ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n \ \ // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateSubnetByIdRequest {\n ExtId = extId,\n\ \ Body = subnet,\n \n \n };\n \ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = subnetsApi.UpdateSubnetById(request, opts);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - Subnets summary: Delete the specified subnet description: Delete the specified subnet. operationId: deleteSubnetById parameters: - name: extId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 67142352-663f-43ef-b93d-da28ffe3a2e5 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 0d5833be-5c4c-4759-9fca-3ad3e286c715 responses: "202": description: Task Id corresponding to delete subnet request. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Subnet deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: small count: 4 timeUnit: seconds - type: large count: 4 timeUnit: seconds - type: xlarge count: 4 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Subnets.DeleteSubnetByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetsApi subnetsApi = new SubnetsApi(apiClient);\n\n \n \ \ String extId = \"fECA4EED-1FBC-73d7-aBB8-a1acBD07747c\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetsApi.deleteSubnetById(DeleteSubnetByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetsApi = new SubnetsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"eceF2b4d-ccFC-4cCF-d06a-9BcB1Afcc5d2\";\n\ \n\n\n\n\n subnetsApi.deleteSubnetById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client)\n\ \ \n ext_id = \"cdefEcDd-F8dd-5E5B-7DDE-8db1fcceaaD4\"\n\n\n try:\n\ \ api_response = subnets_api.delete_subnet_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetsServiceApiInstance\ \ *api.SubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"Cf6caBea-fFEA-EcC5-cfbF-0FA3F1bc2DbE\"\ \n\n\n request := subnets.DeleteSubnetByIdRequest{ ExtId: &extId }\n\ \ response, error := SubnetsServiceApiInstance.DeleteSubnetById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/subnets/0eFC99cb-f6eD-e509-9eEe-afB01F082CED" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/subnets/cBAd2F96-35aE-CBA0-04Bc-ACE19fcCbCcE" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n String extId\ \ = \"bA1EFcf0-099C-a2AB-Fbcf-85bdc4979F5a\";\n\n // Create request\ \ object with parameters\n var request = new DeleteSubnetByIdRequest\ \ {\n ExtId = extId\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = subnetsApi.DeleteSubnetById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/subnets/{subnetExtId}/vnics: get: tags: - Subnets summary: List virtual NICs on a subnet description: Fetches a paginated list of virtual NICs belonging to a particular subnet. operationId: listVnicsBySubnetId parameters: - name: subnetExtId in: path description: UUID of the subnet. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: be43a15d-9d96-4826-b2ee-c6a7041fc335 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: vmReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$filter=vmReference\ \ eq '089fc9b2-e51f-4f6b-a4bc-60c9f2e3f1fb'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: macAddress example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$orderby=macAddress" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: assignedIpv4Addresses example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=assignedIpv4Addresses" - name: assignedSecondaryIpv4Addresses example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=assignedSecondaryIpv4Addresses" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=extId" - name: learnedIpv4Addresses example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=learnedIpv4Addresses" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=links" - name: macAddress example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=macAddress" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=metadata/projectReferenceId" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=tenantId" - name: vmReference example: "https://{host}:{port}/api/networking/v4.3/config/subnets/{subnetExtId}/vnics?$select=vmReference" responses: "200": description: Returns a list of virtual NICs on a subnet. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Vnic' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/vnics\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/vnics\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/vnics\ \ Get operation" x-permissions: operationName: View Subnet Vnic deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin - name: Backup Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.SubnetsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Subnets.ListVnicsBySubnetIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListSubnetVnicsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SubnetsApi subnetsApi = new SubnetsApi(apiClient);\n\n \n \ \ String subnetExtId = \"F50BEaE7-Ebe8-B3d6-DEfD-D7FDbCaaBCf8\";\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListSubnetVnicsApiResponse\ \ listSubnetVnicsApiResponse = subnetsApi.listVnicsBySubnetId(ListVnicsBySubnetIdRequest.builder()\n\ \ .subnetExtId(subnetExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listSubnetVnicsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SubnetsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let subnetsApi = new SubnetsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let subnetExtId = \"ebAe5FD1-CcFE-cDf7-D4f7-0bB8AabD2D15\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n opts[\"$select\"\ ] = \"string_sample_data\";\n\n\n\n\n subnetsApi.listVnicsBySubnetId(subnetExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ subnets_api = ntnx_networking_py_client.SubnetsApi(api_client=client)\n\ \ \n subnet_ext_id = \"a6ecADc7-F9CB-67e3-feef-f0cFcEfeB8ec\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = subnets_api.list_vnics_by_subnet_id(subnetExtId=subnet_ext_id, _page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/subnets\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SubnetsServiceApiInstance\ \ *api.SubnetsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ SubnetsServiceApiInstance = api.NewSubnetsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n subnetExtId := \"daBdcf6e-f114-fBD7-9f5d-3F06Ac421dba\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := subnets.ListVnicsBySubnetIdRequest{\ \ SubnetExtId: &subnetExtId, Page_: &page_, Limit_: &limit_, Filter_: nil,\ \ Orderby_: nil, Select_: nil }\n response, error := SubnetsServiceApiInstance.ListVnicsBySubnetId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Vnic)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/subnets/ccEa623D-2a89-0bBc-DDf4-523AFBAf2e26/vnics?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/subnets/b1E6Dd4A-bDC5-cD06-0d7D-Bc60cfd8D6b2/vnics?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ SubnetsApi subnetsApi = new SubnetsApi(client);\n\n String subnetExtId\ \ = \"8e53D9CA-aBad-A1fc-CFFc-D7DcAa02C3B6\";\n int page = 0;\n \ \ int limit = 50;\n String filter = \"string_sample_data\";\n \ \ String orderby = \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListVnicsBySubnetIdRequest {\n SubnetExtId = subnetExtId,\n\ \ Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby,\n Select = select\n\ \ };\n try {\n ListSubnetVnicsApiResponse listSubnetVnicsApiResponse\ \ = subnetsApi.ListVnicsBySubnetId(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/stats/traffic-mirrors/{extId}: get: tags: - TrafficMirrors summary: Get Traffic mirror session statistics. description: Get Traffic mirror session statistics. operationId: getTrafficMirrorStats parameters: - name: extId in: path description: UUID of the session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: da79ae67-21d9-4287-bba8-41e89dd2cb36 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 71 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId - name: links - name: statType - name: tenantId - name: transmitByteCount - name: transmitPacketCount responses: "200": description: Get Traffic mirror session statistics response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.stats.TrafficMirrorStats' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/traffic-mirrors/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/traffic-mirrors/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/traffic-mirrors/{extId}\ \ Get operation" x-permissions: operationName: View Traffic Mirror Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.TrafficMirrorStatsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.TrafficMirrorStats.GetTrafficMirrorStatsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.stats.GetTrafficMirrorStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ TrafficMirrorStatsApi trafficMirrorStatsApi = new TrafficMirrorStatsApi(apiClient);\n\ \n \n String extId = \"DcC7A633-2CBa-A2DD-FC1d-bef333d96DAD\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetTrafficMirrorStatsApiResponse getTrafficMirrorStatsApiResponse = trafficMirrorStatsApi.getTrafficMirrorStats(GetTrafficMirrorStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .$select(null)\n\ \ .build());\n\n System.out.println(getTrafficMirrorStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, TrafficMirrorStatsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let trafficMirrorStatsApi = new TrafficMirrorStatsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"9E9cfd94-aCE1-cFa5-3F6d-Aed53A51360A\"\ ;\n //Datetime needs to be in RFC3339 format\n let $startTime = \"\ 2021-01-01T00:00:00-08:00\";\n //Datetime needs to be in RFC3339 format\n\ \ let $endTime = \"2021-01-01T00:00:00-08:00\";\n\n // Construct Optional\ \ Parameters\n var opts = {};\n opts[\"$samplingInterval\"] = 1;\n\ \ opts[\"$statType\"] = SOME_RAW_DATA;\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n trafficMirrorStatsApi.getTrafficMirrorStats(extId, $startTime,\ \ $endTime, opts).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ traffic_mirror_stats_api = ntnx_networking_py_client.TrafficMirrorStatsApi(api_client=client)\n\ \ \n ext_id = \"BaCEdEff-7cd7-FAf6-FEdc-9f5B20b7BB4A\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\n\ \n try:\n api_response = traffic_mirror_stats_api.get_traffic_mirror_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrorstats\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n TrafficMirrorStatsServiceApiInstance\ \ *api.TrafficMirrorStatsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ TrafficMirrorStatsServiceApiInstance = api.NewTrafficMirrorStatsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"d2ECfbF8-38ab-8EbB-E6a4-f6B340d6fFeD\"\ \n // Datetime needs to be in RFC3339 format\n startTime_ := time.Now()\n\ \ // Datetime needs to be in RFC3339 format\n endTime_ := time.Now()\n\ \ \n samplingInterval_ := 1\n \n statType_ := SOME_RAW_DATA\n\ \n\n request := trafficmirrorstats.GetTrafficMirrorStatsRequest{ ExtId:\ \ &extId, StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_:\ \ &samplingInterval_, StatType_: &statType_, Select_: nil }\n response,\ \ error := TrafficMirrorStatsServiceApiInstance.GetTrafficMirrorStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TrafficMirrorStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/stats/traffic-mirrors/EEbdf9D1-FdB1-e3f5-9Fef-Aa7F5Bbc96Ff?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/stats/traffic-mirrors/dAbd1Cc7-9e01-95Ea-ef6a-5b82fFFBD8bB?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorStatsApi trafficMirrorStatsApi = new TrafficMirrorStatsApi(client);\n\ \n String extId = \"6f0eC359-DC4c-0D11-26B5-22cc9A02Fb28\";\n \ \ String startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime\ \ = \"2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n \ \ Object statType = SOME_RAW_DATA;\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetTrafficMirrorStatsRequest {\n ExtId = extId,\n \ \ StartTime = startTime,\n EndTime = endTime,\n \ \ SamplingInterval = samplingInterval,\n StatType = statType,\n\ \ Select = select\n };\n try {\n GetTrafficMirrorStatsApiResponse\ \ getTrafficMirrorStatsApiResponse = trafficMirrorStatsApi.GetTrafficMirrorStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/traffic-mirrors: get: tags: - TrafficMirrors summary: List Traffic mirror sessions. description: List Traffic mirror sessions. operationId: listTrafficMirrors parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isEnabled example: "https://{host}:{port}/api/networking/v4.3/config/traffic-mirrors?$filter=isEnabled\ \ eq true" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/traffic-mirrors?$filter=name\ \ eq 'TM1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/traffic-mirrors?$orderby=name" responses: "200": description: List of all the Traffic mirror sessions. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors Get operation x-permissions: operationName: View Traffic Mirror deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.TrafficMirrorsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.ListTrafficMirrorsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListTrafficMirrorsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListTrafficMirrorsApiResponse\ \ listTrafficMirrorsApiResponse = trafficMirrorsApi.listTrafficMirrors(ListTrafficMirrorsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listTrafficMirrorsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, TrafficMirrorsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let trafficMirrorsApi = new TrafficMirrorsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; trafficMirrorsApi.listTrafficMirrors(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ traffic_mirrors_api = ntnx_networking_py_client.TrafficMirrorsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = traffic_mirrors_api.list_traffic_mirrors(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrors\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n TrafficMirrorsServiceApiInstance\ \ *api.TrafficMirrorsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ TrafficMirrorsServiceApiInstance = api.NewTrafficMirrorsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := trafficmirrors.ListTrafficMirrorsRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := TrafficMirrorsServiceApiInstance.ListTrafficMirrors(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.TrafficMirror)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/traffic-mirrors?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/traffic-mirrors?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListTrafficMirrorsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListTrafficMirrorsApiResponse listTrafficMirrorsApiResponse\ \ = trafficMirrorsApi.ListTrafficMirrors(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - TrafficMirrors summary: Create Traffic mirror session. description: Create Traffic mirror session. operationId: createTrafficMirror parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 7e5db784-5de6-4fcc-8a3e-6259e10598ec requestBody: description: Create Traffic mirror session request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' required: true responses: "202": description: Create Traffic mirror session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Traffic Mirror deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.TrafficMirrorsApi; import com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.CreateTrafficMirrorRequest; import com.nutanix.dp1.networking.networking.v4.config.TrafficMirror; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(apiClient); TrafficMirror trafficMirror = new TrafficMirror(); // TrafficMirror object initializations here... try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = trafficMirrorsApi.createTrafficMirror(CreateTrafficMirrorRequest.builder() .build(), trafficMirror); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, TrafficMirrorsApi, TrafficMirror } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let trafficMirrorsApi = new TrafficMirrorsApi(apiClientInstance); function sample() { let trafficMirror = new TrafficMirror(); // TrafficMirror object initializations here... trafficMirror = JSON.stringify(trafficMirror); trafficMirrorsApi.createTrafficMirror(trafficMirror).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) traffic_mirrors_api = ntnx_networking_py_client.TrafficMirrorsApi(api_client=client) trafficMirror = ntnx_networking_py_client.TrafficMirror() # TrafficMirror object initializations here... try: api_response = traffic_mirrors_api.create_traffic_mirror(body=trafficMirror) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrors" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient TrafficMirrorsServiceApiInstance *api.TrafficMirrorsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. TrafficMirrorsServiceApiInstance = api.NewTrafficMirrorsServiceApi(ApiClientInstance) ctx := context.Background() trafficMirror := import1.NewTrafficMirror() // TrafficMirror object initializations here... request := trafficmirrors.CreateTrafficMirrorRequest{ Body: trafficMirror } response, error := TrafficMirrorsServiceApiInstance.CreateTrafficMirror(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/traffic-mirrors" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"TM1","description":"TM1description","sourceList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"direction":"$UNKNOWN","$objectType":"networking.v4.config.TrafficMirrorSourcePort"}],"destinationList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"$objectType":"networking.v4.config.TrafficMirrorPort"}],"isEnabled":true,"clusterReferenceList":["string"],"hostReferenceList":["string"],"virtualSwitchReference":"string","state":"$UNKNOWN","stateMessage":"string","$objectType":"networking.v4.config.TrafficMirror"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"TM1","description":"TM1description","sourceList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"direction":"$UNKNOWN","$objectType":"networking.v4.config.TrafficMirrorSourcePort"}],"destinationList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"$objectType":"networking.v4.config.TrafficMirrorPort"}],"isEnabled":true,"clusterReferenceList":["string"],"hostReferenceList":["string"],"virtualSwitchReference":"string","state":"$UNKNOWN","stateMessage":"string","$objectType":"networking.v4.config.TrafficMirror"} \ - "https://host:port/api/networking/v4.3/config/traffic-mirrors" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(client);\n\ \n TrafficMirror trafficMirror = new TrafficMirror();\n\n // TrafficMirror\ \ object initializations here...\n\n\n // Create request object with\ \ parameters\n var request = new CreateTrafficMirrorRequest {\n \ \ Body = trafficMirror\n };\n try {\n \ \ ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = trafficMirrorsApi.CreateTrafficMirror(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/traffic-mirrors/{extId}: get: tags: - TrafficMirrors summary: Get Traffic mirror session. description: Get Traffic mirror session. operationId: getTrafficMirrorById parameters: - name: extId in: path description: UUID of the session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 0967e07c-2654-47be-b5ae-67932ced122e responses: "200": description: Get a Traffic mirror session for the provided UUID. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors/{extId}\ \ Get operation" x-permissions: operationName: View Traffic Mirror deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.TrafficMirrorsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.GetTrafficMirrorByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetTrafficMirrorApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(apiClient);\n\ \n \n String extId = \"FC6D4fb0-B5Bd-2FeA-eeb2-dfcbcDd5F5BA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetTrafficMirrorApiResponse\ \ getTrafficMirrorApiResponse = trafficMirrorsApi.getTrafficMirrorById(GetTrafficMirrorByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getTrafficMirrorApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, TrafficMirrorsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let trafficMirrorsApi = new TrafficMirrorsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"aACF4c92-0acE-C9FF-582A-3DA9afFe3dAa\"\ ;\n\n\n\n\n\n trafficMirrorsApi.getTrafficMirrorById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ traffic_mirrors_api = ntnx_networking_py_client.TrafficMirrorsApi(api_client=client)\n\ \ \n ext_id = \"402dcCaB-45d6-Dab5-A4EE-fa9a1Ae2F30c\"\n\n\n try:\n\ \ api_response = traffic_mirrors_api.get_traffic_mirror_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrors\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n TrafficMirrorsServiceApiInstance\ \ *api.TrafficMirrorsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ TrafficMirrorsServiceApiInstance = api.NewTrafficMirrorsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"d0fBbDCF-F4Fb-F6B2-EF2a-3d90B47C44Da\"\ \n\n\n request := trafficmirrors.GetTrafficMirrorByIdRequest{ ExtId:\ \ &extId }\n response, error := TrafficMirrorsServiceApiInstance.GetTrafficMirrorById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TrafficMirror)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/traffic-mirrors/c34EC068-FdA0-C4Ca-b6F3-30A4B7404d4a" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/traffic-mirrors/abCeD9bB-Dee8-BeBe-E2fb-9EAcA49Cfa14" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(client);\n\ \n String extId = \"eF8d8BB1-72aa-8aAC-8ED1-0cD3EBFca4ae\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetTrafficMirrorByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetTrafficMirrorApiResponse getTrafficMirrorApiResponse\ \ = trafficMirrorsApi.GetTrafficMirrorById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - TrafficMirrors summary: Update a Traffic mirror session for the provided UUID. description: Update Traffic mirror session. operationId: updateTrafficMirrorById parameters: - name: extId in: path description: UUID of the session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5bca2d0b-9e81-4546-bbaf-d35701514b15 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 804d04ca-c096-48cc-84a0-06629be1de0d requestBody: description: Update Traffic mirror session request body. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' required: true responses: "202": description: Update Traffic mirror session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Traffic Mirror deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.TrafficMirrorsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.UpdateTrafficMirrorByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.GetTrafficMirrorByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.TrafficMirror;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetTrafficMirrorApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(apiClient);\n\ \n TrafficMirror trafficMirror = new TrafficMirror();\n\n \ \ // TrafficMirror object initializations here...\n \n String\ \ extId = \"Aef1c13C-c8cA-Ee5e-4dE0-DcdcbFffCdAD\";\n\n // perform\ \ GET call\n GetTrafficMirrorApiResponse getResponse = null;\n \ \ try {\n getResponse = trafficMirrorsApi.getTrafficMirrorById(GetTrafficMirrorByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = trafficMirrorsApi.updateTrafficMirrorById(UpdateTrafficMirrorByIdRequest.builder()\n\ \ .extId(extId)\n .build(), trafficMirror,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, TrafficMirrorsApi, TrafficMirror, GetTrafficMirrorApiResponse\ \ } from \"@nutanix-api/networking-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let trafficMirrorsApi = new TrafficMirrorsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let trafficMirror = new TrafficMirror();\n\n // TrafficMirror\ \ object initializations here...\n trafficMirror = JSON.stringify(trafficMirror);\n\ \n \n let extId = \"CD1bA5D9-EeAd-ac37-B7aa-FFB2DBf22e4E\";\n\n\n\ \ // Perform Get call\n trafficMirrorsApi.getTrafficMirrorById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n trafficMirrorsApi.updateTrafficMirrorById(extId,\ \ trafficMirror, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ traffic_mirrors_api = ntnx_networking_py_client.TrafficMirrorsApi(api_client=client)\n\ \ trafficMirror = ntnx_networking_py_client.TrafficMirror()\n\n #\ \ TrafficMirror object initializations here...\n \n ext_id = \"BE9ccD06-b9ba-a5fD-63c7-ebc5Ee9E7Df6\"\ \n\n try:\n api_response = traffic_mirrors_api.get_traffic_mirror_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = traffic_mirrors_api.update_traffic_mirror_by_id(extId=ext_id,\ \ body=trafficMirror, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrors\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n TrafficMirrorsServiceApiInstance\ \ *api.TrafficMirrorsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ TrafficMirrorsServiceApiInstance = api.NewTrafficMirrorsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n trafficMirror := import1.NewTrafficMirror()\n\ \n // TrafficMirror object initializations here...\n\n \n extId\ \ := \"FBFE5e19-A5dD-f7EE-Fd45-4BABdCEBdFFB\"\n\n getRequest := trafficmirrors.GetTrafficMirrorByIdRequest{\ \ extId: &extId }\n getResponse, err := TrafficMirrorsServiceApiInstance.GetTrafficMirrorById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := trafficmirrors.UpdateTrafficMirrorByIdRequest{ ExtId: &extId,\ \ Body: trafficMirror }\n response, error := TrafficMirrorsServiceApiInstance.UpdateTrafficMirrorById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/traffic-mirrors/C0FcDBff-Aa99-eca3-CbEB-Aa6E65B6FEBB" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"TM1","description":"TM1description","sourceList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"direction":"$UNKNOWN","$objectType":"networking.v4.config.TrafficMirrorSourcePort"}],"destinationList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"$objectType":"networking.v4.config.TrafficMirrorPort"}],"isEnabled":true,"clusterReferenceList":["string"],"hostReferenceList":["string"],"virtualSwitchReference":"string","state":"$UNKNOWN","stateMessage":"string","$objectType":"networking.v4.config.TrafficMirror"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"TM1","description":"TM1description","sourceList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"direction":"$UNKNOWN","$objectType":"networking.v4.config.TrafficMirrorSourcePort"}],"destinationList":[{"nicType":"$UNKNOWN","nicUuid":"string","isUp":true,"$objectType":"networking.v4.config.TrafficMirrorPort"}],"isEnabled":true,"clusterReferenceList":["string"],"hostReferenceList":["string"],"virtualSwitchReference":"string","state":"$UNKNOWN","stateMessage":"string","$objectType":"networking.v4.config.TrafficMirror"} \ - "https://host:port/api/networking/v4.3/config/traffic-mirrors/46Cc4A05-DecD-2c5E-CeA0-AbE74F02F23C" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(client);\n\ \n TrafficMirror trafficMirror = new TrafficMirror();\n\n // TrafficMirror\ \ object initializations here...\n\n String extId = \"05A7cf4b-2EEE-fc16-68e4-09deFcc2699d\"\ ;\n\n // perform GET call\n var getRequest = new GetTrafficMirrorByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetTrafficMirrorApiResponse\ \ getResponse = trafficMirrorsApi.GetTrafficMirrorById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateTrafficMirrorByIdRequest {\n ExtId = extId,\n\ \ Body = trafficMirror,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = trafficMirrorsApi.UpdateTrafficMirrorById(request, opts);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - TrafficMirrors summary: Delete Traffic mirror session. description: Delete Traffic mirror session request body. operationId: deleteTrafficMirrorById parameters: - name: extId in: path description: UUID of the session. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: ffc45aed-f530-4055-8e86-a605f2641d52 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: b79bafd9-2477-4399-919d-3ede2e2fbe43 responses: "202": description: Delete Traffic mirror session response. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Traffic Mirror deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Account Owner - name: Administrator - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.TrafficMirrorsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.TrafficMirrors.DeleteTrafficMirrorByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(apiClient);\n\ \n \n String extId = \"a4BeBAED-54b2-6BfA-60f8-fAD43C4542Ee\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = trafficMirrorsApi.deleteTrafficMirrorById(DeleteTrafficMirrorByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, TrafficMirrorsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let trafficMirrorsApi = new TrafficMirrorsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"0Db2Fa8b-EAFF-B4Fd-A39e-BeE5EBfE5Cd4\"\ ;\n\n\n\n\n\n trafficMirrorsApi.deleteTrafficMirrorById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ traffic_mirrors_api = ntnx_networking_py_client.TrafficMirrorsApi(api_client=client)\n\ \ \n ext_id = \"DcdF297F-b3f4-D0ee-8AD7-7DcED9ccE2cD\"\n\n\n try:\n\ \ api_response = traffic_mirrors_api.delete_traffic_mirror_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/trafficmirrors\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n TrafficMirrorsServiceApiInstance\ \ *api.TrafficMirrorsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ TrafficMirrorsServiceApiInstance = api.NewTrafficMirrorsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"f3dcEea4-2Bfb-0a46-2DBd-1DBBd7dcCCEf\"\ \n\n\n request := trafficmirrors.DeleteTrafficMirrorByIdRequest{ ExtId:\ \ &extId }\n response, error := TrafficMirrorsServiceApiInstance.DeleteTrafficMirrorById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/traffic-mirrors/e0c3D7fF-A916-cB7E-DAae-bFCdbaD2CcC8" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/traffic-mirrors/Dae1ff5B-cAAD-3bfF-FDa8-aDddEeBcbBC4" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ TrafficMirrorsApi trafficMirrorsApi = new TrafficMirrorsApi(client);\n\ \n String extId = \"Dd86588F-E840-BbC6-Ad49-626a4cf4aAbc\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteTrafficMirrorByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = trafficMirrorsApi.DeleteTrafficMirrorById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/uplink-bonds: get: tags: - UplinkBonds summary: List uplink bonds description: List uplink bonds. operationId: listUplinkBonds parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: hostReference example: "https://{host}:{port}/api/networking/v4.3/config/uplink-bonds?$filter=hostReference\ \ eq '37240ef4-a610-4c98-87de-9e61a1607868'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/uplink-bonds?$orderby=name" responses: "200": description: List of all uplink bonds content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.UplinkBond' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/uplink-bonds Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/uplink-bonds Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/uplink-bonds Get operation x-permissions: operationName: View Uplink Bond deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.UplinkBondsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.UplinkBonds.ListUplinkBondsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListUplinkBondsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UplinkBondsApi uplinkBondsApi = new UplinkBondsApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListUplinkBondsApiResponse\ \ listUplinkBondsApiResponse = uplinkBondsApi.listUplinkBonds(ListUplinkBondsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listUplinkBondsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, UplinkBondsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let uplinkBondsApi = new UplinkBondsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; uplinkBondsApi.listUplinkBonds(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ uplink_bonds_api = ntnx_networking_py_client.UplinkBondsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = uplink_bonds_api.list_uplink_bonds(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/uplinkbonds\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UplinkBondsServiceApiInstance\ \ *api.UplinkBondsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ UplinkBondsServiceApiInstance = api.NewUplinkBondsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := uplinkbonds.ListUplinkBondsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response, error :=\ \ UplinkBondsServiceApiInstance.ListUplinkBonds(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().([]import1.UplinkBond)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/uplink-bonds?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/uplink-bonds?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ UplinkBondsApi uplinkBondsApi = new UplinkBondsApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListUplinkBondsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListUplinkBondsApiResponse listUplinkBondsApiResponse = uplinkBondsApi.ListUplinkBonds(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/uplink-bonds/{extId}: get: tags: - UplinkBonds summary: Get uplink bond description: Get the uplink bond for the given extId. operationId: getUplinkBondById parameters: - name: extId in: path description: UUID of the bond required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1fbec3db-9a34-4361-8a58-7bcc8b122f10 responses: "200": description: Get uplink bond response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.UplinkBond' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/uplink-bonds/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/uplink-bonds/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/uplink-bonds/{extId}\ \ Get operation" x-permissions: operationName: View Uplink Bond deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.UplinkBondsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.UplinkBonds.GetUplinkBondByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetUplinkBondApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UplinkBondsApi uplinkBondsApi = new UplinkBondsApi(apiClient);\n\n\ \ \n String extId = \"5CDeCC3e-aE84-cfCE-eBCc-7b71Bfb4ca0B\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetUplinkBondApiResponse\ \ getUplinkBondApiResponse = uplinkBondsApi.getUplinkBondById(GetUplinkBondByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getUplinkBondApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UplinkBondsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let uplinkBondsApi = new UplinkBondsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"4b56dbA1-fA99-bBE4-EfcD-88Cc91c7cbae\"\ ;\n\n\n\n\n\n uplinkBondsApi.getUplinkBondById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ uplink_bonds_api = ntnx_networking_py_client.UplinkBondsApi(api_client=client)\n\ \ \n ext_id = \"e6aDDBBe-C2D8-dAAD-7eCF-2E1abA4ee3D1\"\n\n\n try:\n\ \ api_response = uplink_bonds_api.get_uplink_bond_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/uplinkbonds\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UplinkBondsServiceApiInstance\ \ *api.UplinkBondsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ UplinkBondsServiceApiInstance = api.NewUplinkBondsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"0AdA9ABb-6dBA-A8b8-c7FF-ef9DEf0CaBC7\"\ \n\n\n request := uplinkbonds.GetUplinkBondByIdRequest{ ExtId: &extId\ \ }\n response, error := UplinkBondsServiceApiInstance.GetUplinkBondById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.UplinkBond)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/uplink-bonds/91dDe82B-D50D-aFE6-7FD4-aC27eeAD3FE8" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/uplink-bonds/CAb7d94b-e46D-dCAf-9B39-BBa606c598AC" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ UplinkBondsApi uplinkBondsApi = new UplinkBondsApi(client);\n\n \ \ String extId = \"beC4D0dd-067b-fd93-EC25-5548CA2fbB1B\";\n\n \ \ // Create request object with parameters\n var request = new GetUplinkBondByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetUplinkBondApiResponse\ \ getUplinkBondApiResponse = uplinkBondsApi.GetUplinkBondById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/virtual-switches/$actions/migrate: post: tags: - VirtualSwitches summary: Create a Virtual Switch from an existing bridge description: Create a Virtual Switch from an existing bridge. operationId: migrateBridge parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 4339a243-72f8-430e-849e-3a0b2aa36f2a - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 77b8f3b6-d748-4779-8d44-f1fabedff497 requestBody: description: Schema of bridge to migrate to a Virtual Switch content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Bridge' required: true responses: "202": description: Task Id corresponding to the migrate Bridge to a Virtual Switch operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Migrate Bridge deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.BridgesApi; import com.nutanix.dp1.networking.networking.v4.request.Bridges.MigrateBridgeRequest; import com.nutanix.dp1.networking.networking.v4.config.Bridge; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. BridgesApi bridgesApi = new BridgesApi(apiClient); Bridge bridge = new Bridge(); // Bridge object initializations here... bridge.setExistingBridgeName("br1"); // required field bridge.setName("vs1"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = bridgesApi.migrateBridge(MigrateBridgeRequest.builder() .build(), bridge); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, BridgesApi, Bridge } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let bridgesApi = new BridgesApi(apiClientInstance); function sample() { let bridge = new Bridge(); // Bridge object initializations here... bridge.setExistingBridgeName("br1"); // required field bridge.setName("vs1"); // required field bridge = JSON.stringify(bridge); bridgesApi.migrateBridge(bridge).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) bridges_api = ntnx_networking_py_client.BridgesApi(api_client=client) bridge = ntnx_networking_py_client.Bridge() # Bridge object initializations here... bridge.existing_bridge_name = "br1" # required field bridge.name = "vs1" # required field try: api_response = bridges_api.migrate_bridge(body=bridge) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/bridges" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient BridgesServiceApiInstance *api.BridgesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. BridgesServiceApiInstance = api.NewBridgesServiceApi(ApiClientInstance) ctx := context.Background() bridge := import1.NewBridge() // Bridge object initializations here... request := bridges.MigrateBridgeRequest{ Body: bridge } response, error := BridgesServiceApiInstance.MigrateBridge(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/virtual-switches/$actions/migrate" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: D39ECAED-63f9-02Af-dfC3-7D9C293Ce43D' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs1","description":"Internalbridge","existingBridgeName":"br1","clusterReference":"string","$objectType":"networking.v4.config.Bridge"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: C0dB757D-2e63-ABBe-ea9d-fCDeA682c591' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs1","description":"Internalbridge","existingBridgeName":"br1","clusterReference":"string","$objectType":"networking.v4.config.Bridge"} \ - "https://host:port/api/networking/v4.3/config/virtual-switches/$actions/migrate" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ BridgesApi bridgesApi = new BridgesApi(client);\n\n Bridge bridge\ \ = new Bridge();\n\n // Bridge object initializations here...\n \ \ bridge.ExistingBridgeName = \"br1\"; // required field\n bridge.Name\ \ = \"vs1\"; // required field\n\n\n // Create request object with\ \ parameters\n var request = new MigrateBridgeRequest {\n \ \ Body = bridge\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = bridgesApi.MigrateBridge(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/node-schedulable-statuses: get: tags: - VirtualSwitches summary: Check whether a node in a cluster is a storage-only node or not description: Check to see whether a node in a cluster is a storage-only node or not operationId: listNodeSchedulableStatus parameters: - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 355db2ae-2cfd-45b8-8346-ce5570032d63 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isNeverSchedulable example: "https://{host}:{port}/api/networking/v4.3/config/node-schedulable-statuses?$filter=isNeverSchedulable\ \ eq true" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isNeverSchedulable example: "https://{host}:{port}/api/networking/v4.3/config/node-schedulable-statuses?$orderby=isNeverSchedulable" responses: "200": description: "Array of node UUIDs and boolean pairs, indicating whether\ \ the nodes are storage-only." content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.NodeSchedulableStatus' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/node-schedulable-statuses Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/node-schedulable-statuses Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/node-schedulable-statuses Get operation x-permissions: operationName: View Node Schedulable Status deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: small count: 10 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VirtualSwitchNodesInfoApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.VirtualSwitchNodesInfo.ListNodeSchedulableStatusRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListNodeSchedulableStatusesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VirtualSwitchNodesInfoApi virtualSwitchNodesInfoApi = new VirtualSwitchNodesInfoApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListNodeSchedulableStatusesApiResponse\ \ listNodeSchedulableStatusesApiResponse = virtualSwitchNodesInfoApi.listNodeSchedulableStatus(ListNodeSchedulableStatusRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listNodeSchedulableStatusesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VirtualSwitchNodesInfoApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let virtualSwitchNodesInfoApi = new VirtualSwitchNodesInfoApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; virtualSwitchNodesInfoApi.listNodeSchedulableStatus(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ virtual_switch_nodes_info_api = ntnx_networking_py_client.VirtualSwitchNodesInfoApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = virtual_switch_nodes_info_api.list_node_schedulable_status(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitchnodesinfo\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VirtualSwitchNodesInfoServiceApiInstance\ \ *api.VirtualSwitchNodesInfoServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VirtualSwitchNodesInfoServiceApiInstance = api.NewVirtualSwitchNodesInfoServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := virtualswitchnodesinfo.ListNodeSchedulableStatusRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := VirtualSwitchNodesInfoServiceApiInstance.ListNodeSchedulableStatus(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.NodeSchedulableStatus)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/node-schedulable-statuses?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: 8345aeBC-9aFa-cB4a-fF2c-9BeFA7ec6C37' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: Faf7f3fA-FEd8-18ba-ccfe-fe14cab484D1' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/node-schedulable-statuses?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchNodesInfoApi virtualSwitchNodesInfoApi = new VirtualSwitchNodesInfoApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListNodeSchedulableStatusRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListNodeSchedulableStatusesApiResponse listNodeSchedulableStatusesApiResponse\ \ = virtualSwitchNodesInfoApi.ListNodeSchedulableStatus(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/virtual-switches: get: tags: - VirtualSwitches summary: Get list of Virtual Switches description: Get list of Virtual Switches. operationId: listVirtualSwitches parameters: - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: cdd58ded-0d3a-4944-9dfa-f8072f282094 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: bondMode example: "https://{host}:{port}/api/networking/v4.3/config/virtual-switches?$filter=bondMode\ \ eq Networking.Config.BondModeType'ACTIVE_BACKUP'" - name: mtu example: "https://{host}:{port}/api/networking/v4.3/config/virtual-switches?$filter=mtu\ \ eq 1500" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/virtual-switches?$filter=name\ \ eq 'vs0'" - name: ownerType example: "https://{host}:{port}/api/networking/v4.3/config/virtual-switches?$filter=ownerType\ \ eq Networking.Config.OwnerType'PE'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/virtual-switches?$orderby=name" responses: "200": description: List of virtual switches queries content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 10 type: array items: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/virtual-switches Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/virtual-switches Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/virtual-switches Get operation x-permissions: operationName: View Virtual Switch deploymentList: - ON_PREM - CLOUD roleList: - name: Consumer - name: Developer - name: Operator - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: small count: 10 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VirtualSwitchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.ListVirtualSwitchesRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListVirtualSwitchesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVirtualSwitchesApiResponse\ \ listVirtualSwitchesApiResponse = virtualSwitchesApi.listVirtualSwitches(ListVirtualSwitchesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listVirtualSwitchesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VirtualSwitchesApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let virtualSwitchesApi = new VirtualSwitchesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; virtualSwitchesApi.listVirtualSwitches(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ virtual_switches_api = ntnx_networking_py_client.VirtualSwitchesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = virtual_switches_api.list_virtual_switches(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VirtualSwitchesServiceApiInstance\ \ *api.VirtualSwitchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VirtualSwitchesServiceApiInstance = api.NewVirtualSwitchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := virtualswitches.ListVirtualSwitchesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := VirtualSwitchesServiceApiInstance.ListVirtualSwitches(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.VirtualSwitch)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/virtual-switches?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: E8d74FBe-528c-BCfF-f2B2-6ABbcBa3cd27' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: Fa923Feb-aace-400e-c8Fb-ebB1Ff921db3' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/virtual-switches?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListVirtualSwitchesRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListVirtualSwitchesApiResponse listVirtualSwitchesApiResponse\ \ = virtualSwitchesApi.ListVirtualSwitches(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - VirtualSwitches summary: Create a Virtual Switch description: Create a Virtual Switch. operationId: createVirtualSwitch parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 2faf7a4b-abe2-468a-9389-995a17221618 - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e5c20bcd-deb4-479a-a886-99263b1c36e6 requestBody: description: Schema to configure a virtual switch content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' required: true responses: "202": description: Task Id corresponding to the Create Virtual Switch operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Add Virtual Switch deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.VirtualSwitchesApi; import com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.CreateVirtualSwitchRequest; import com.nutanix.dp1.networking.networking.v4.config.BondModeType; import com.nutanix.dp1.networking.networking.v4.config.VirtualSwitch; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(apiClient); VirtualSwitch virtualSwitch = new VirtualSwitch(); // VirtualSwitch object initializations here... virtualSwitch.setBondMode(BondModeType.UNKNOWN); // required field virtualSwitch.setClusters(new ArrayList<>()); // required field virtualSwitch.setName("vs0"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = virtualSwitchesApi.createVirtualSwitch(CreateVirtualSwitchRequest.builder() .build(), virtualSwitch); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, VirtualSwitchesApi, BondModeType, VirtualSwitch } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let virtualSwitchesApi = new VirtualSwitchesApi(apiClientInstance); function sample() { let virtualSwitch = new VirtualSwitch(); // VirtualSwitch object initializations here... virtualSwitch.setBondMode(BondModeType.UNKNOWN); // required field virtualSwitch.setClusters([]); // required field virtualSwitch.setName("vs0"); // required field virtualSwitch = JSON.stringify(virtualSwitch); virtualSwitchesApi.createVirtualSwitch(virtualSwitch).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) virtual_switches_api = ntnx_networking_py_client.VirtualSwitchesApi(api_client=client) virtualSwitch = ntnx_networking_py_client.VirtualSwitch() # VirtualSwitch object initializations here... virtualSwitch.bond_mode = ntnx_networking_py_client.BondModeType._UNKNOWN # required field virtualSwitch.clusters = [] # required field virtualSwitch.name = "vs0" # required field try: api_response = virtual_switches_api.create_virtual_switch(body=virtualSwitch) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitches" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient VirtualSwitchesServiceApiInstance *api.VirtualSwitchesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. VirtualSwitchesServiceApiInstance = api.NewVirtualSwitchesServiceApi(ApiClientInstance) ctx := context.Background() virtualSwitch := import1.NewVirtualSwitch() // VirtualSwitch object initializations here... request := virtualswitches.CreateVirtualSwitchRequest{ Body: virtualSwitch } response, error := VirtualSwitchesServiceApiInstance.CreateVirtualSwitch(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/virtual-switches" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: BD7DBA23-6BEa-6Cca-E9f8-cECFee5CFedd' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: 74FfED3e-6AB8-AaeD-dCb3-6D962E4aAeBB' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"} \ - "https://host:port/api/networking/v4.3/config/virtual-switches" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(client);\n\ \n VirtualSwitch virtualSwitch = new VirtualSwitch();\n\n // VirtualSwitch\ \ object initializations here...\n virtualSwitch.BondMode = BondModeType.UNKNOWN;\ \ // required field\n virtualSwitch.Clusters = new ArrayList(); //\ \ required field\n virtualSwitch.Name = \"vs0\"; // required field\n\ \n\n // Create request object with parameters\n var request\ \ = new CreateVirtualSwitchRequest {\n Body = virtualSwitch\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = virtualSwitchesApi.CreateVirtualSwitch(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /networking/v4.3/config/virtual-switches/{extId}: get: tags: - VirtualSwitches summary: Get single Virtual Switch given its UUID description: Get single Virtual Switch given its UUID. operationId: getVirtualSwitchById parameters: - name: extId in: path description: UUID of Virtual Switch required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 4baa583a-500d-4d42-acda-680f3503bf94 - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6a4125d1-a07c-47be-94b2-a9f79eddf49a responses: "200": description: Virtual Switch queried content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/virtual-switches/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/virtual-switches/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/virtual-switches/{extId}\ \ Get operation" x-permissions: operationName: View Virtual Switch deploymentList: - ON_PREM - CLOUD roleList: - name: Consumer - name: Developer - name: Operator - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Super Admin - name: Network Infra Admin - name: VPC Admin - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: small count: 10 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VirtualSwitchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.GetVirtualSwitchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetVirtualSwitchApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(apiClient);\n\ \n \n String extId = \"ca0Bd7D5-DdeB-0F7e-1CFE-c0c7BfDE4810\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVirtualSwitchApiResponse\ \ getVirtualSwitchApiResponse = virtualSwitchesApi.getVirtualSwitchById(GetVirtualSwitchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getVirtualSwitchApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VirtualSwitchesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let virtualSwitchesApi = new VirtualSwitchesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"e6bAD8A9-A7D6-4E38-Fedb-07e6d1Cfe27a\"\ ;\n\n\n\n\n\n virtualSwitchesApi.getVirtualSwitchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ virtual_switches_api = ntnx_networking_py_client.VirtualSwitchesApi(api_client=client)\n\ \ \n ext_id = \"Bc2a474e-cCeB-DadB-DEA3-a1cD9b31f4C6\"\n\n\n try:\n\ \ api_response = virtual_switches_api.get_virtual_switch_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VirtualSwitchesServiceApiInstance\ \ *api.VirtualSwitchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VirtualSwitchesServiceApiInstance = api.NewVirtualSwitchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"2FDdD7Db-E49a-a137-2bcE-DFdDf6aadCCF\"\ \n\n\n request := virtualswitches.GetVirtualSwitchByIdRequest{ ExtId:\ \ &extId }\n response, error := VirtualSwitchesServiceApiInstance.GetVirtualSwitchById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VirtualSwitch)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/virtual-switches/CeBfbbdA-aaAb-E196-EAc3-989dafdcb57a" \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: 301D3dcc-cBcc-2dbE-2aAB-43cD115C874C' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'X-Cluster-Id: ca74e1B3-cBC1-Eed7-DBBD-CCFB1b90D2DB' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/virtual-switches/bfcdB1B2-EDac-b32D-FAAF-b0Ba58fDEbEf" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(client);\n\ \n String extId = \"fAEbBdEC-ddae-caFb-adc0-CdcB6e8eFEba\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetVirtualSwitchByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetVirtualSwitchApiResponse getVirtualSwitchApiResponse\ \ = virtualSwitchesApi.GetVirtualSwitchById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - VirtualSwitches summary: Update a Virtual Switch description: Update a Virtual Switch. operationId: updateVirtualSwitchById parameters: - name: extId in: path description: UUID of Virtual Switch required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 97aba90a-f931-49e9-98e4-ac9cb8dc6ecc - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 158ff7ad-5da6-4e47-b57d-833f8ebff542 - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 84728c13-2599-4dbb-9b0f-7b1e92417e46 requestBody: description: Schema to configure a virtual switch content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' required: true responses: "202": description: Task Id corresponding to the Update Virtual Switches operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Virtual Switch deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VirtualSwitchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.UpdateVirtualSwitchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.GetVirtualSwitchByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.BondModeType;\n\ import com.nutanix.dp1.networking.networking.v4.config.VirtualSwitch;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetVirtualSwitchApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(apiClient);\n\ \n VirtualSwitch virtualSwitch = new VirtualSwitch();\n\n \ \ // VirtualSwitch object initializations here...\n virtualSwitch.setBondMode(BondModeType.UNKNOWN);\ \ // required field\n virtualSwitch.setClusters(new ArrayList<>());\ \ // required field\n virtualSwitch.setName(\"vs0\"); // required\ \ field\n \n String extId = \"fefbABbC-b5BE-eecB-F62E-f043719F6ECf\"\ ;\n\n // perform GET call\n GetVirtualSwitchApiResponse getResponse\ \ = null;\n try {\n getResponse = virtualSwitchesApi.getVirtualSwitchById(GetVirtualSwitchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = virtualSwitchesApi.updateVirtualSwitchById(UpdateVirtualSwitchByIdRequest.builder()\n\ \ .extId(extId)\n .build(), virtualSwitch,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VirtualSwitchesApi, BondModeType, VirtualSwitch,\ \ GetVirtualSwitchApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let virtualSwitchesApi = new VirtualSwitchesApi(apiClientInstance);\n\n\ function sample() {\n let virtualSwitch = new VirtualSwitch();\n\n \ \ // VirtualSwitch object initializations here...\n virtualSwitch.setBondMode(BondModeType.UNKNOWN);\ \ // required field\n virtualSwitch.setClusters([]); // required field\n\ \ virtualSwitch.setName(\"vs0\"); // required field\n virtualSwitch\ \ = JSON.stringify(virtualSwitch);\n\n \n let extId = \"5a2107B2-FB5d-AdeC-7F7f-D7baaD4f80cc\"\ ;\n\n\n // Perform Get call\n virtualSwitchesApi.getVirtualSwitchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n virtualSwitchesApi.updateVirtualSwitchById(extId,\ \ virtualSwitch, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ virtual_switches_api = ntnx_networking_py_client.VirtualSwitchesApi(api_client=client)\n\ \ virtualSwitch = ntnx_networking_py_client.VirtualSwitch()\n\n #\ \ VirtualSwitch object initializations here...\n virtualSwitch.bond_mode\ \ = ntnx_networking_py_client.BondModeType._UNKNOWN # required field\n\ \ virtualSwitch.clusters = [] # required field\n virtualSwitch.name\ \ = \"vs0\" # required field\n \n ext_id = \"bB5CcBB2-0fEa-B5F6-4FE2-bFD8a07C1CEF\"\ \n\n try:\n api_response = virtual_switches_api.get_virtual_switch_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = virtual_switches_api.update_virtual_switch_by_id(extId=ext_id,\ \ body=virtualSwitch, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VirtualSwitchesServiceApiInstance\ \ *api.VirtualSwitchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VirtualSwitchesServiceApiInstance = api.NewVirtualSwitchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n virtualSwitch := import1.NewVirtualSwitch()\n\ \n // VirtualSwitch object initializations here...\n\n \n extId\ \ := \"De5BFBFf-309a-fAcF-aBBf-7Ea33b63D4D7\"\n\n getRequest := virtualswitches.GetVirtualSwitchByIdRequest{\ \ extId: &extId }\n getResponse, err := VirtualSwitchesServiceApiInstance.GetVirtualSwitchById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := virtualswitches.UpdateVirtualSwitchByIdRequest{ ExtId:\ \ &extId, Body: virtualSwitch }\n response, error := VirtualSwitchesServiceApiInstance.UpdateVirtualSwitchById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/virtual-switches/Ee73ccdC-eEbd-0cEd-eDD4-3AaaCdeafD7A" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: c4FFF0ce-0beC-e5a1-FADd-BB6cDAdaDDcD' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: eABCCcBf-aBB6-dA4c-6E8f-dD54FA1bbc3b' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vs0","description":"Defaultvirtualswitch","isDefault":false,"isQuickMode":false,"hasDeploymentError":true,"mtu":1500,"bondMode":"$UNKNOWN","clusters":[{"extId":"string","hosts":[{"extId":"string","internalBridgeName":"br0","hostNics":["eth0"],"ipAddress":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"routeTable":0,"activeUplink":"eth0","$objectType":"networking.v4.config.Host"}],"gatewayIpAddress":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"networking.v4.config.Cluster"}],"igmpSpec":{"isSnoopingEnabled":false,"querierSpec":{"isQuerierEnabled":false,"vlanIdList":[1],"$objectType":"networking.v4.config.QuerierSpec"},"snoopingTimeout":300,"$objectType":"networking.v4.config.IgmpSpec"},"ownerType":"$UNKNOWN","hasUpdateInProgress":true,"hasDeleteInProgress":true,"$objectType":"networking.v4.config.VirtualSwitch"} \ - "https://host:port/api/networking/v4.3/config/virtual-switches/cDE24efF-DEEe-0bad-c3ab-fee1BADbCfe4" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(client);\n\ \n VirtualSwitch virtualSwitch = new VirtualSwitch();\n\n // VirtualSwitch\ \ object initializations here...\n virtualSwitch.BondMode = BondModeType.UNKNOWN;\ \ // required field\n virtualSwitch.Clusters = new ArrayList(); //\ \ required field\n virtualSwitch.Name = \"vs0\"; // required field\n\ \n String extId = \"b6bC5c1d-B1bA-D75F-FAd3-CfE2A1ee0Dc6\";\n\n \ \ // perform GET call\n var getRequest = new GetVirtualSwitchByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetVirtualSwitchApiResponse\ \ getResponse = virtualSwitchesApi.GetVirtualSwitchById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateVirtualSwitchByIdRequest {\n ExtId = extId,\n\ \ Body = virtualSwitch,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = virtualSwitchesApi.UpdateVirtualSwitchById(request, opts);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - VirtualSwitches summary: Delete a Virtual Switch description: Delete a Virtual Switch. operationId: deleteVirtualSwitchById parameters: - name: extId in: path description: UUID of Virtual Switch required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7816ff89-daee-4ac3-943b-58b3397d9e7d - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 9a06570b-e233-4e28-9479-8637d9150b31 - name: X-Cluster-Id in: header description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. required: false style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 55ee59ca-3f91-45d9-a6f2-10ee56f21302 responses: "202": description: Task Id corresponding to the Delete Virtual Switches operation headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Virtual Switch deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VirtualSwitchesApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VirtualSwitches.DeleteVirtualSwitchByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(apiClient);\n\ \n \n String extId = \"1Eaf7B11-Fbf0-C738-12C6-e5DdCFCcacA6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = virtualSwitchesApi.deleteVirtualSwitchById(DeleteVirtualSwitchByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VirtualSwitchesApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let virtualSwitchesApi = new VirtualSwitchesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"daBA0d84-CFCc-24FA-0f35-13FB4c6CD8aa\"\ ;\n\n\n\n\n\n virtualSwitchesApi.deleteVirtualSwitchById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ virtual_switches_api = ntnx_networking_py_client.VirtualSwitchesApi(api_client=client)\n\ \ \n ext_id = \"87dbFeFe-2baF-cBAB-aC6D-3e8B350d5bCB\"\n\n\n try:\n\ \ api_response = virtual_switches_api.delete_virtual_switch_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/virtualswitches\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VirtualSwitchesServiceApiInstance\ \ *api.VirtualSwitchesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VirtualSwitchesServiceApiInstance = api.NewVirtualSwitchesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"E6bBB08B-cb23-dFAd-FC9A-e0F77DFDCa1c\"\ \n\n\n request := virtualswitches.DeleteVirtualSwitchByIdRequest{ ExtId:\ \ &extId }\n response, error := VirtualSwitchesServiceApiInstance.DeleteVirtualSwitchById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/virtual-switches/C0bbBEc3-aBfb-EAb4-CDFA-cFda99aAB7f6" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: EaB4fA0a-dAaD-DbaA-fbEa-9DbAAEFfEAA4' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: 9Ea8De98-a8f1-d563-6c3F-64D53D9aD8EA' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/virtual-switches/DFd7a6f3-51FD-ec17-6AcA-eEc5d0Ec64d6" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VirtualSwitchesApi virtualSwitchesApi = new VirtualSwitchesApi(client);\n\ \n String extId = \"0f8BCBDE-6092-8F4c-DbEC-4cAB3315bE8a\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteVirtualSwitchByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = virtualSwitchesApi.DeleteVirtualSwitchById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/vpc-virtual-switch-mappings: get: tags: - VpcVirtualSwitchMappings summary: Get the VPC for virtual switch mappings config. description: Get the VPC for virtual switch mappings config. operationId: listVpcVirtualSwitchMappings parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isAllTrafficPermitted example: "https://{host}:{port}/api/networking/v4.3/config/vpc-virtual-switch-mappings?$filter=isAllTrafficPermitted\ \ eq false" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: isAllTrafficPermitted example: "https://{host}:{port}/api/networking/v4.3/config/vpc-virtual-switch-mappings?$orderby=isAllTrafficPermitted" responses: "200": description: Response of the VPC for virtual switch mappings config Get operation. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpcVirtualSwitchMapping' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpc-virtual-switch-mappings Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpc-virtual-switch-mappings Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpc-virtual-switch-mappings Get operation x-permissions: operationName: View Vpc Virtual Switch Mapping deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: VPC Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcVirtualSwitchMappingsApi;\n\ import com.nutanix.dp1.networking.networking.v4.request.VpcVirtualSwitchMappings.ListVpcVirtualSwitchMappingsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListVpcVirtualSwitchMappingsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcVirtualSwitchMappingsApi vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVpcVirtualSwitchMappingsApiResponse\ \ listVpcVirtualSwitchMappingsApiResponse = vpcVirtualSwitchMappingsApi.listVpcVirtualSwitchMappings(ListVpcVirtualSwitchMappingsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listVpcVirtualSwitchMappingsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VpcVirtualSwitchMappingsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; vpcVirtualSwitchMappingsApi.listVpcVirtualSwitchMappings(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpc_virtual_switch_mappings_api = ntnx_networking_py_client.VpcVirtualSwitchMappingsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpc_virtual_switch_mappings_api.list_vpc_virtual_switch_mappings(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcvirtualswitchmappings\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcVirtualSwitchMappingsServiceApiInstance\ \ *api.VpcVirtualSwitchMappingsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpcVirtualSwitchMappingsServiceApiInstance = api.NewVpcVirtualSwitchMappingsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := vpcvirtualswitchmappings.ListVpcVirtualSwitchMappingsRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := VpcVirtualSwitchMappingsServiceApiInstance.ListVpcVirtualSwitchMappings(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VpcVirtualSwitchMapping)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpc-virtual-switch-mappings?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpc-virtual-switch-mappings?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcVirtualSwitchMappingsApi vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListVpcVirtualSwitchMappingsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListVpcVirtualSwitchMappingsApiResponse listVpcVirtualSwitchMappingsApiResponse\ \ = vpcVirtualSwitchMappingsApi.ListVpcVirtualSwitchMappings(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - VpcVirtualSwitchMappings summary: Set VPC for virtual switch mappings traffic config. description: Set VPC for virtual switch mappings traffic config. operationId: createVpcVirtualSwitchMapping parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: a265fa62-35a6-4f0d-a2c5-80ed4a05c696 requestBody: description: Request body for setting VPC for virtual switch mappings traffic config. content: application/json: schema: maxItems: 200 minItems: 1 type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpcVirtualSwitchMapping' required: true responses: "202": description: Task Id corresponding to the Set VPC for virtual switch mappings config operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Vpc Virtual Switch Mapping deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: VPC Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.VpcVirtualSwitchMappingsApi; import com.nutanix.dp1.networking.networking.v4.request.VpcVirtualSwitchMappings.CreateVpcVirtualSwitchMappingRequest; import com.nutanix.dp1.networking.networking.v4.config.VpcVirtualSwitchMapping; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. VpcVirtualSwitchMappingsApi vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(apiClient); List vpcVirtualSwitchMappingList = new ArrayList<>(Arrays.asList(new VpcVirtualSwitchMapping())); // VpcVirtualSwitchMapping object initializations here... vpcVirtualSwitchMappingList.get(0).setVirtualSwitchUuid("1aaeEC7C-9E5E-2AdC-8DCf-aaf3DaA6B5bc"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = vpcVirtualSwitchMappingsApi.createVpcVirtualSwitchMapping(CreateVpcVirtualSwitchMappingRequest.builder() .build(), vpcVirtualSwitchMappingList); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, VpcVirtualSwitchMappingsApi, VpcVirtualSwitchMapping } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(apiClientInstance); function sample() { let vpcVirtualSwitchMappingList = [new VpcVirtualSwitchMapping()]; // VpcVirtualSwitchMapping object initializations here... vpcVirtualSwitchMappingList[0].setVirtualSwitchUuid("eFaDAe5f-5182-C4E6-5F9F-eEdF102CB39A"); // required field vpcVirtualSwitchMappingList = JSON.stringify(vpcVirtualSwitchMappingList); vpcVirtualSwitchMappingsApi.createVpcVirtualSwitchMapping(vpcVirtualSwitchMappingList).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) vpc_virtual_switch_mappings_api = ntnx_networking_py_client.VpcVirtualSwitchMappingsApi(api_client=client) vpcVirtualSwitchMappingList = [ntnx_networking_py_client.VpcVirtualSwitchMapping()] # VpcVirtualSwitchMapping object initializations here... vpcVirtualSwitchMappingList[0].virtual_switch_uuid = "c5ba9Fa5-7B18-f071-9BbE-FBcCB2E56CBF" # required field try: api_response = vpc_virtual_switch_mappings_api.create_vpc_virtual_switch_mapping(body=vpcVirtualSwitchMappingList) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcvirtualswitchmappings" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient VpcVirtualSwitchMappingsServiceApiInstance *api.VpcVirtualSwitchMappingsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. VpcVirtualSwitchMappingsServiceApiInstance = api.NewVpcVirtualSwitchMappingsServiceApi(ApiClientInstance) ctx := context.Background() vpcVirtualSwitchMappingList := []import1.VpcVirtualSwitchMapping {import1.NewVpcVirtualSwitchMapping()} // VpcVirtualSwitchMapping object initializations here... request := vpcvirtualswitchmappings.CreateVpcVirtualSwitchMappingRequest{ Body: vpcVirtualSwitchMappingList } response, error := VpcVirtualSwitchMappingsServiceApiInstance.CreateVpcVirtualSwitchMapping(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/vpc-virtual-switch-mappings" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data [{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"clusterUuids":["string"],"virtualSwitchUuid":"string","isAllTrafficPermitted":true,"$objectType":"networking.v4.config.VpcVirtualSwitchMapping"}] \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data [{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"clusterUuids":["string"],"virtualSwitchUuid":"string","isAllTrafficPermitted":true,"$objectType":"networking.v4.config.VpcVirtualSwitchMapping"}] \ - "https://host:port/api/networking/v4.3/config/vpc-virtual-switch-mappings" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcVirtualSwitchMappingsApi vpcVirtualSwitchMappingsApi = new VpcVirtualSwitchMappingsApi(client);\n\ \n List vpcVirtualSwitchMappingList = new\ \ ArrayList<>(Arrays.asList(new VpcVirtualSwitchMapping()));\n\n //\ \ VpcVirtualSwitchMapping object initializations here...\n vpcVirtualSwitchMappingList[0].VirtualSwitchUuid\ \ = \"dFFF823c-E2A4-B275-CecF-7Bd66c2bC6Ac\"; // required field\n\n\n\ \ // Create request object with parameters\n var request =\ \ new CreateVpcVirtualSwitchMappingRequest {\n Body = vpcVirtualSwitchMappingList\n\ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpcVirtualSwitchMappingsApi.CreateVpcVirtualSwitchMapping(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/stats/vpc/{vpcExtId}/external-subnets/{extId}: get: tags: - Vpcs summary: Get VPC North-South statistics description: Get VPC North-South statistics. operationId: getVpcNsStats parameters: - name: vpcExtId in: path description: The UUID of the VPC. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a8ec59ea-db31-449a-b360-82dc5f0e59d8 - name: extId in: path description: External ID of the subnet required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f722a528-bf1c-4c6c-824a-8ca24d036d75 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 83 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId - name: links - name: northSouthEgressBytesAbs - name: northSouthEgressBytesPerSec - name: northSouthEgressPacketsAbs - name: northSouthEgressPacketsPerSec - name: northSouthIngressBytesAbs - name: northSouthIngressBytesPerSec - name: northSouthIngressPacketsAbs - name: northSouthIngressPacketsPerSec - name: statType - name: tenantId responses: "200": description: Get VPC North-South statistics response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.stats.VpcNsStats' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpc/{vpcExtId}/external-subnets/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpc/{vpcExtId}/external-subnets/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpc/{vpcExtId}/external-subnets/{extId}\ \ Get operation" x-permissions: operationName: View VPC NS Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Prism Viewer - name: VPC Admin - name: Project Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcNsStatsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.VpcNsStats.GetVpcNsStatsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.stats.GetVpcNsStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcNsStatsApi vpcNsStatsApi = new VpcNsStatsApi(apiClient);\n\n \ \ \n String vpcExtId = \"aBC4DC75-dA46-2dfE-fcAb-bd93C2fCEbbb\"\ ;\n \n String extId = \"7A4aCFBD-8543-85aB-4E3F-FeEb68bbFd8a\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n \n int page = 0;\n \n int\ \ limit = 50;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetVpcNsStatsApiResponse getVpcNsStatsApiResponse = vpcNsStatsApi.getVpcNsStats(GetVpcNsStatsRequest.builder()\n\ \ .vpcExtId(vpcExtId)\n .extId(extId)\n \ \ .$startTime(startTime)\n .$endTime(endTime)\n\ \ .$samplingInterval(samplingInterval)\n .$statType(statType)\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$select(null)\n .build());\n\n System.out.println(getVpcNsStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpcNsStatsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpcNsStatsApi = new VpcNsStatsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let vpcExtId = \"eBf4931a-CA18-FCAA-Dcf2-EfadB1CbDf2D\"\ ;\n \n let extId = \"DBFC62A0-cbbd-eAfd-E7AA-E1Ef30ACCfD6\";\n \ \ //Datetime needs to be in RFC3339 format\n let $startTime = \"2021-01-01T00:00:00-08:00\"\ ;\n //Datetime needs to be in RFC3339 format\n let $endTime = \"2021-01-01T00:00:00-08:00\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $samplingInterval\"] = 1;\n opts[\"$statType\"] = SOME_RAW_DATA;\n \ \ opts[\"$page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$select\"\ ] = \"string_sample_data\";\n\n\n\n\n vpcNsStatsApi.getVpcNsStats(vpcExtId,\ \ extId, $startTime, $endTime, opts).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpc_ns_stats_api = ntnx_networking_py_client.VpcNsStatsApi(api_client=client)\n\ \ \n vpc_ext_id = \"1f85fCBf-aeA1-C5E2-4E2c-BbDB9E8c787d\"\n \n\ \ ext_id = \"9Ce9F0b3-eCD8-21Dd-bBFF-A763aacdAFeA\"\n # Datetime needs\ \ to be in RFC3339 format\n start_time = datetime.datetime.Now()\n \ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpc_ns_stats_api.get_vpc_ns_stats(vpcExtId=vpc_ext_id, extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type, _page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcnsstats\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcNsStatsServiceApiInstance\ \ *api.VpcNsStatsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpcNsStatsServiceApiInstance = api.NewVpcNsStatsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n vpcExtId := \"5Abf6de1-b56b-Adbb-a52A-CEfEbAbd0ED7\"\ \n \n extId := \"B2eFC1C1-6CcD-0aFA-eFEf-1cE2AdC5Dd26\"\n // Datetime\ \ needs to be in RFC3339 format\n startTime_ := time.Now()\n // Datetime\ \ needs to be in RFC3339 format\n endTime_ := time.Now()\n \n samplingInterval_\ \ := 1\n \n statType_ := SOME_RAW_DATA\n \n page_ := 0\n \ \ \n limit_ := 50\n\n\n request := vpcnsstats.GetVpcNsStatsRequest{\ \ VpcExtId: &vpcExtId, ExtId: &extId, StartTime_: &startTime_, EndTime_:\ \ &endTime_, SamplingInterval_: &samplingInterval_, StatType_: &statType_,\ \ Page_: &page_, Limit_: &limit_, Select_: nil }\n response, error :=\ \ VpcNsStatsServiceApiInstance.GetVpcNsStats(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.VpcNsStats)\n fmt.Println(data)\n\n\ }\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/stats/vpc/a16B7CD4-dC3A-DBBB-a3dF-f5Dfd9eDECAE/external-subnets/58EFc1dc-FE4E-Fcb8-fcb8-BfCDE11E7aeB?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/stats/vpc/D9b4BbDa-5AA2-aCAD-fC10-A4aA2aB12Fc2/external-subnets/f6DAF8cf-D7D0-fD13-DCBB-C6aC8C6B52B3?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcNsStatsApi vpcNsStatsApi = new VpcNsStatsApi(client);\n\n String\ \ vpcExtId = \"59dbBE34-fCaF-6EFd-6Ceb-AAcAaDb49198\";\n String extId\ \ = \"Db0Ce7fd-fcf2-fb7f-bfB9-72AbbdaD7DDD\";\n String startTime =\ \ \"2021-01-01T00:00:00-08:00\";\n String endTime = \"2021-01-01T00:00:00-08:00\"\ ;\n int samplingInterval = 1;\n Object statType = SOME_RAW_DATA;\n\ \ int page = 0;\n int limit = 50;\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetVpcNsStatsRequest {\n VpcExtId = vpcExtId,\n \ \ ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType,\n Page = page,\n \ \ Limit = limit,\n Select = select\n };\n try\ \ {\n GetVpcNsStatsApiResponse getVpcNsStatsApiResponse = vpcNsStatsApi.GetVpcNsStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/vpcs: get: tags: - Vpcs summary: Get the list of existing VPCs description: Get the list of existing VPCs. operationId: listVpcs parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$filter=extId\ \ eq '0079ebc4-467c-48cf-91cb-7e2f2a7b2363'" - name: externalSubnets/subnetReference example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$filter=externalSubnets/any(a:a/subnetReference\ \ eq '0aea62ef-e10a-4999-9ab7-d51cdf7f56d2')" - name: kubernetesClusters/extId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$filter=kubernetesClusters/any(a:a/extId\ \ eq '20538be6-26d2-440e-aa46-c7b557bc701c')" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$filter=name\ \ eq 'vpc-1'" - name: vpcType example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$filter=vpcType\ \ eq Networking.Config.VpcType'REGULAR'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: kubernetesClusters/extId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$orderby=kubernetesClusters/extId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: description example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=description" - name: extId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=extId" - name: externalRoutingDomainReference example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=externalRoutingDomainReference" - name: externalSubnets example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=externalSubnets" - name: kubernetesClusters example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=kubernetesClusters" - name: links example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=links" - name: metadata/categoryIds example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=metadata/categoryIds" - name: metadata/ownerReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=metadata/ownerReferenceId" - name: metadata/ownerUserName example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=metadata/ownerUserName" - name: metadata/projectName example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=metadata/projectName" - name: metadata/projectReferenceId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=metadata/projectReferenceId" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=name" - name: tenantId example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=tenantId" - name: vpcType example: "https://{host}:{port}/api/networking/v4.3/config/vpcs?$select=vpcType" responses: "200": description: Paginated list of VPCs. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.Vpc' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpcs Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpcs Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpcs Get operation x-permissions: operationName: View VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin - name: Consumer - name: Developer - name: Project Admin - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: Project Manager - name: Flow Admin - name: Flow Viewer - name: Flow Policy Author - name: Files Admin - name: Files Viewer - name: NCM Connector x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Vpcs.ListVpcsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListVpcsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcsApi vpcsApi = new VpcsApi(apiClient);\n\n \n int\ \ page = 0;\n \n int limit = 50;\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ListVpcsApiResponse listVpcsApiResponse\ \ = vpcsApi.listVpcs(ListVpcsRequest.builder()\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listVpcsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VpcsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpcsApi = new VpcsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; vpcsApi.listVpcs(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpcs_api = ntnx_networking_py_client.VpcsApi(api_client=client)\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpcs_api.list_vpcs(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcs\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcsServiceApiInstance\ \ *api.VpcsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ VpcsServiceApiInstance = api.NewVpcsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := vpcs.ListVpcsRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response, error\ \ := VpcsServiceApiInstance.ListVpcs(ctx, &request)\n if error != nil\ \ {\n fmt.Println(error)\n return\n }\n data, _ := response.GetData().([]import1.Vpc)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpcs?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpcs?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcsApi vpcsApi = new VpcsApi(client);\n\n int page = 0;\n \ \ int limit = 50;\n String filter = \"string_sample_data\";\n \ \ String orderby = \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListVpcsRequest {\n Page = page,\n Limit =\ \ limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListVpcsApiResponse\ \ listVpcsApiResponse = vpcsApi.ListVpcs(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - Vpcs summary: Create a VPC description: Create a VPC. operationId: createVpc parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 10908a14-0de2-469e-b7db-f718e6b73672 requestBody: description: Request schema to create the VPC. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Vpc' required: true responses: "202": description: Task Id corresponding to create VPC operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.VpcsApi; import com.nutanix.dp1.networking.networking.v4.request.Vpcs.CreateVpcRequest; import com.nutanix.dp1.networking.networking.v4.config.Vpc; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. VpcsApi vpcsApi = new VpcsApi(apiClient); Vpc vpc = new Vpc(); // Vpc object initializations here... try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = vpcsApi.createVpc(CreateVpcRequest.builder() .build(), vpc); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, VpcsApi, Vpc } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpcsApi = new VpcsApi(apiClientInstance); function sample() { let vpc = new Vpc(); // Vpc object initializations here... vpc = JSON.stringify(vpc); vpcsApi.createVpc(vpc).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) vpcs_api = ntnx_networking_py_client.VpcsApi(api_client=client) vpc = ntnx_networking_py_client.Vpc() # Vpc object initializations here... try: api_response = vpcs_api.create_vpc(body=vpc) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcs" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient VpcsServiceApiInstance *api.VpcsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. VpcsServiceApiInstance = api.NewVpcsServiceApi(ApiClientInstance) ctx := context.Background() vpc := import1.NewVpc() // Vpc object initializations here... request := vpcs.CreateVpcRequest{ Body: vpc } response, error := VpcsServiceApiInstance.CreateVpc(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/vpcs" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"} \ - "https://host:port/api/networking/v4.3/config/vpcs" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcsApi vpcsApi = new VpcsApi(client);\n\n Vpc vpc = new Vpc();\n\ \n // Vpc object initializations here...\n\n\n // Create request\ \ object with parameters\n var request = new CreateVpcRequest {\n\ \ Body = vpc\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = vpcsApi.CreateVpc(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/vpcs/{extId}: get: tags: - Vpcs summary: Get the VPC with the specified UUID description: Get the VPC for the specified UUID. operationId: getVpcById parameters: - name: extId in: path description: The UUID of the VPC. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f83e6672-7426-43a3-9419-3cecdaa54f69 responses: "200": description: The VPC object returned by the Get operation. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.Vpc' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpcs/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpcs/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpcs/{extId}\ \ Get operation" x-permissions: operationName: View VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: VPC Admin - name: Consumer - name: Developer - name: Project Admin - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: Project Manager - name: Flow Admin - name: Flow Policy Author - name: Flow Viewer - name: Files Admin - name: Files Viewer - name: NCM Connector x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Vpcs.GetVpcByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetVpcApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcsApi vpcsApi = new VpcsApi(apiClient);\n\n \n String\ \ extId = \"B4F3874f-1faC-c3A2-B2fD-A139AdeBaB5B\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n GetVpcApiResponse getVpcApiResponse =\ \ vpcsApi.getVpcById(GetVpcByIdRequest.builder()\n .extId(extId)\n\ \ .build());\n\n System.out.println(getVpcApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpcsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpcsApi = new VpcsApi(apiClientInstance);\n\nfunction sample() {\n\n\ \ \n let extId = \"Dc6D2Ba3-eded-67ad-eef4-dfd3FB0E2B19\";\n\n\n\n\ \n\n vpcsApi.getVpcById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpcs_api = ntnx_networking_py_client.VpcsApi(api_client=client)\n \ \ \n ext_id = \"B7968F4d-8Cb1-5b6B-bE0B-EeBAC6ABABff\"\n\n\n try:\n\ \ api_response = vpcs_api.get_vpc_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcs\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcsServiceApiInstance\ \ *api.VpcsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ VpcsServiceApiInstance = api.NewVpcsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"1a6aFeFf-a32f-cacB-2d3b-1dfAa4AC7eD3\"\ \n\n\n request := vpcs.GetVpcByIdRequest{ ExtId: &extId }\n response,\ \ error := VpcsServiceApiInstance.GetVpcById(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.Vpc)\n fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpcs/38500da3-F854-4A8c-2d1a-4F3ceB1EE80C" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpcs/Bc15DE9F-EeBe-Aa2f-FFe6-DD6C2Dbc3da8" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcsApi vpcsApi = new VpcsApi(client);\n\n String extId = \"FbCC6705-6DBA-D632-77F3-DcEe8B48a4cD\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetVpcByIdRequest {\n ExtId = extId\n };\n \ \ try {\n GetVpcApiResponse getVpcApiResponse = vpcsApi.GetVpcById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - Vpcs summary: Update the specified VPC description: Update the specified VPC. operationId: updateVpcById parameters: - name: extId in: path description: The UUID of the VPC. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6cdbd83c-d78b-4077-83e0-abfaaf7f55fc - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 15d2788e-d836-45e4-9a4a-d524ea6c54c9 requestBody: description: Request schema to update the specified VPC. content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.Vpc' required: true responses: "202": description: Task Id corresponding to update VPC operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 2 timeUnit: seconds - type: large count: 2 timeUnit: seconds - type: xlarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Vpcs.UpdateVpcByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.Vpcs.GetVpcByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.Vpc;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetVpcApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcsApi vpcsApi = new VpcsApi(apiClient);\n\n Vpc vpc = new\ \ Vpc();\n\n // Vpc object initializations here...\n \n \ \ String extId = \"086aCd1e-ebf4-6dca-b8DD-357EC2BDB98b\";\n\n \ \ // perform GET call\n GetVpcApiResponse getResponse = null;\n\ \ try {\n getResponse = vpcsApi.getVpcById(GetVpcByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = vpcsApi.updateVpcById(UpdateVpcByIdRequest.builder()\n\ \ .extId(extId)\n .build(), vpc, opts);\n\n\ \ System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpcsApi, Vpc, GetVpcApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpcsApi = new VpcsApi(apiClientInstance);\n\nfunction sample() {\n \ \ let vpc = new Vpc();\n\n // Vpc object initializations here...\n\ \ vpc = JSON.stringify(vpc);\n\n \n let extId = \"A0E0BdB1-fDa8-cDEF-45a5-AFCA2a30b2fc\"\ ;\n\n\n // Perform Get call\n vpcsApi.getVpcById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n vpcsApi.updateVpcById(extId, vpc, args).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpcs_api = ntnx_networking_py_client.VpcsApi(api_client=client)\n \ \ vpc = ntnx_networking_py_client.Vpc()\n\n # Vpc object initializations\ \ here...\n \n ext_id = \"f9C813ac-D9AD-0Eb1-F26e-e6B7cEBeAAB3\"\n\ \n try:\n api_response = vpcs_api.get_vpc_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = vpcs_api.update_vpc_by_id(extId=ext_id,\ \ body=vpc, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcs\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcsServiceApiInstance\ \ *api.VpcsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ VpcsServiceApiInstance = api.NewVpcsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vpc := import1.NewVpc()\n\n //\ \ Vpc object initializations here...\n\n \n extId := \"cCcCf6D9-Ed3E-FbAd-2bAf-29f2d5B0Dbe4\"\ \n\n getRequest := vpcs.GetVpcByIdRequest{ extId: &extId }\n getResponse,\ \ err := VpcsServiceApiInstance.GetVpcById(ctx, &getRequest)\n if err\ \ != nil {\n fmt.Println(err)\n return\n }\n\n // Extract\ \ E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := vpcs.UpdateVpcByIdRequest{ ExtId: &extId, Body: vpc }\n\ \ response, error := VpcsServiceApiInstance.UpdateVpcById(ctx, &request,\ \ args)\n if error != nil {\n fmt.Println(error)\n return\n\ \ }\n data, _ := response.GetData().(import2.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/vpcs/4BE7CdE4-0a0B-5ED3-f4CF-D2e3af5DC8C7" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpc-1","description":"VPCdescription","vpcType":"$UNKNOWN","commonDhcpOptions":{"domainNameServers":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"$objectType":"networking.v4.config.VpcDhcpOptions"},"snatIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"externalSubnets":[{"subnetReference":"string","externalIps":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"gatewayNodes":["string"],"activeGatewayNodes":[{"nodeId":"string","nodeIpAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"networking.v4.config.GatewayNodeReference"}],"activeGatewayCount":0,"$objectType":"networking.v4.config.ExternalSubnet"}],"externalRoutingDomainReference":"string","externallyRoutablePrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"kubernetesClusters":[{"extId":"string","gatewayNodesSelector":{"matchLabels":[{"name":"string","value":"","$objectType":"common.v1.config.KVStringPair"}],"$objectType":"networking.v4.config.GatewayNodesSelector"},"$objectType":"networking.v4.config.KubernetesCluster"}],"$objectType":"networking.v4.config.Vpc"} \ - "https://host:port/api/networking/v4.3/config/vpcs/7302bBf7-2fB3-bCe8-525f-8ADD8896Ab2e" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcsApi vpcsApi = new VpcsApi(client);\n\n Vpc vpc = new Vpc();\n\ \n // Vpc object initializations here...\n\n String extId = \"\ CbAcFA07-beDB-f1A3-D80e-5c0bB6dDabCd\";\n\n // perform GET call\n\ \ var getRequest = new GetVpcByIdRequest {\n ExtId = extId\n\ \ };\n try {\n GetVpcApiResponse getResponse =\ \ vpcsApi.GetVpcById(getRequest);\n } catch(ApiException ex) {\n\ \ Console.WriteLine(ex.Message);\n }\n // Extract\ \ E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateVpcByIdRequest {\n ExtId = extId,\n \ \ Body = vpc,\n \n \n };\n try\ \ {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpcsApi.UpdateVpcById(request, opts);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - Vpcs summary: Delete the specified VPC description: Delete the specified VPC. operationId: deleteVpcById parameters: - name: extId in: path description: The UUID of the VPC. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 65df5dff-195e-4572-9ea1-ba70d077d693 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 94264fa4-2c50-45b2-b2df-3fbba3fcdeb5 responses: "202": description: Task Id corresponding to delete VPC operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete VPC deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpcsApi;\nimport com.nutanix.dp1.networking.networking.v4.request.Vpcs.DeleteVpcByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpcsApi vpcsApi = new VpcsApi(apiClient);\n\n \n String\ \ extId = \"978EFCcA-8cbD-621c-7138-198FBAEdFC6f\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpcsApi.deleteVpcById(DeleteVpcByIdRequest.builder()\n \ \ .extId(extId)\n .build());\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpcsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpcsApi = new VpcsApi(apiClientInstance);\n\nfunction sample() {\n\n\ \ \n let extId = \"EfDBDC0e-41dC-742F-C6AB-eDeC83571da1\";\n\n\n\n\ \n\n vpcsApi.deleteVpcById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpcs_api = ntnx_networking_py_client.VpcsApi(api_client=client)\n \ \ \n ext_id = \"893cf1b8-c9Af-dEAd-D24D-A79ecdEBBEe5\"\n\n\n try:\n\ \ api_response = vpcs_api.delete_vpc_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpcs\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpcsServiceApiInstance\ \ *api.VpcsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ VpcsServiceApiInstance = api.NewVpcsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"B40FaeEB-386a-FdE3-aEFC-FefFc76dedD8\"\ \n\n\n request := vpcs.DeleteVpcByIdRequest{ ExtId: &extId }\n response,\ \ error := VpcsServiceApiInstance.DeleteVpcById(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/vpcs/bBBE11D6-76a1-D430-E6dA-6B5eFb5EbdDF" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpcs/BffCbEEb-fAaB-fcbE-dEbf-0bDeE09d9B49" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpcsApi vpcsApi = new VpcsApi(client);\n\n String extId = \"c5Bc0DA8-AbF1-CD58-d5da-C9AaB1cc957C\"\ ;\n\n // Create request object with parameters\n var request\ \ = new DeleteVpcByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpcsApi.DeleteVpcById(request);\n } catch (ApiException ex) {\n\ \ Console.WriteLine(ex.Message);\n }\n }\n }\n}\n" /networking/v4.3/stats/vpn-connections/{extId}: get: tags: - VpnConnections summary: Get VPN connection statistics description: Get VPN connection statistics. operationId: getVpnConnectionStats parameters: - name: extId in: path description: VPN connection UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 44d64b85-8876-425a-acf2-002e4d3dd12e - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 34 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId - name: links - name: statType - name: tenantId - name: throughputRxKbps - name: throughputTxKbps responses: "200": description: Get VPN connection statistics response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.stats.VpnConnectionStats' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpn-connections/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpn-connections/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpn-connections/{extId}\ \ Get operation" x-permissions: operationName: View Vpn Connection Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionStatsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnectionStats.GetVpnConnectionStatsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.stats.GetVpnConnectionStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionStatsApi vpnConnectionStatsApi = new VpnConnectionStatsApi(apiClient);\n\ \n \n String extId = \"71A1460a-baa1-c30c-C03D-769bCefa7dC0\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n \n int page = 0;\n \n int\ \ limit = 50;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetVpnConnectionStatsApiResponse getVpnConnectionStatsApiResponse = vpnConnectionStatsApi.getVpnConnectionStats(GetVpnConnectionStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .$page(page)\n \ \ .$limit(limit)\n .$select(null)\n \ \ .build());\n\n System.out.println(getVpnConnectionStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionStatsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionStatsApi = new VpnConnectionStatsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"7fdDcBD2-c540-bEba-5Ad7-eeFe5865aD7C\"\ ;\n //Datetime needs to be in RFC3339 format\n let $startTime = \"\ 2021-01-01T00:00:00-08:00\";\n //Datetime needs to be in RFC3339 format\n\ \ let $endTime = \"2021-01-01T00:00:00-08:00\";\n\n // Construct Optional\ \ Parameters\n var opts = {};\n opts[\"$samplingInterval\"] = 1;\n\ \ opts[\"$statType\"] = SOME_RAW_DATA;\n opts[\"$page\"] = 0;\n \ \ opts[\"$limit\"] = 50;\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n vpnConnectionStatsApi.getVpnConnectionStats(extId, $startTime,\ \ $endTime, opts).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connection_stats_api = ntnx_networking_py_client.VpnConnectionStatsApi(api_client=client)\n\ \ \n ext_id = \"BeCbA0EA-6c8a-2de0-ade3-1CFEEb139fdF\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpn_connection_stats_api.get_vpn_connection_stats(extId=ext_id, _startTime=start_time,\ \ _endTime=end_time, _samplingInterval=sampling_interval, _statType=stat_type,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnectionstats\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionStatsServiceApiInstance\ \ *api.VpnConnectionStatsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionStatsServiceApiInstance = api.NewVpnConnectionStatsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"46C21BAf-fA0b-EDDE-c8EF-b3f085508Dab\"\ \n // Datetime needs to be in RFC3339 format\n startTime_ := time.Now()\n\ \ // Datetime needs to be in RFC3339 format\n endTime_ := time.Now()\n\ \ \n samplingInterval_ := 1\n \n statType_ := SOME_RAW_DATA\n\ \ \n page_ := 0\n \n limit_ := 50\n\n\n request := vpnconnectionstats.GetVpnConnectionStatsRequest{\ \ ExtId: &extId, StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_:\ \ &samplingInterval_, StatType_: &statType_, Page_: &page_, Limit_: &limit_,\ \ Select_: nil }\n response, error := VpnConnectionStatsServiceApiInstance.GetVpnConnectionStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VpnConnectionStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/stats/vpn-connections/fb4cFe9a-07dd-a9Fa-BedA-eaf9db031a61?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/stats/vpn-connections/DaFFBd60-edF2-EbBd-Cb3D-efD9BBC3Ee4F?$startTime=2021-01-01T00:00:00-08:00&$limit=50&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$page=0&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionStatsApi vpnConnectionStatsApi = new VpnConnectionStatsApi(client);\n\ \n String extId = \"Bbb0c8ad-A6cB-D2Ca-E1aA-AFa1f08e56cf\";\n \ \ String startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime\ \ = \"2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n \ \ Object statType = SOME_RAW_DATA;\n int page = 0;\n int limit\ \ = 50;\n String select = \"string_sample_data\";\n\n // Create\ \ request object with parameters\n var request = new GetVpnConnectionStatsRequest\ \ {\n ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType,\n Page = page,\n \ \ Limit = limit,\n Select = select\n };\n try\ \ {\n GetVpnConnectionStatsApiResponse getVpnConnectionStatsApiResponse\ \ = vpnConnectionStatsApi.GetVpnConnectionStats(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/vpn-connections: get: tags: - VpnConnections summary: List the VPN connections description: List the VPN connections. operationId: listVpnConnections parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: dynamicRoutePriority example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$filter=dynamicRoutePriority\ \ eq 123" - name: localGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$filter=localGatewayReference\ \ eq 'ac7e516d-68a2-4907-a386-04b38e01be05'" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$filter=name\ \ eq 'vpn-connection-1'" - name: remoteGatewayReference example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$filter=remoteGatewayReference\ \ eq '91569fa5-2873-43b3-ba6e-ae384556ae8d'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: dynamicRoutePriority example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$orderby=dynamicRoutePriority" - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections?$orderby=name" responses: "200": description: List of all VPN connections content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpn-connections Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpn-connections Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpn-connections Get operation x-permissions: operationName: View Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.ListVpnConnectionsRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListVpnConnectionsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVpnConnectionsApiResponse\ \ listVpnConnectionsApiResponse = vpnConnectionsApi.listVpnConnections(ListVpnConnectionsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .build());\n\n System.out.println(listVpnConnectionsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VpnConnectionsApi } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; vpnConnectionsApi.listVpnConnections(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpn_connections_api.list_vpn_connections(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := vpnconnections.ListVpnConnectionsRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil }\n response,\ \ error := VpnConnectionsServiceApiInstance.ListVpnConnections(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.VpnConnection)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpn-connections?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpn-connections?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListVpnConnectionsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby\n };\n try {\n\ \ ListVpnConnectionsApiResponse listVpnConnectionsApiResponse\ \ = vpnConnectionsApi.ListVpnConnections(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - VpnConnections summary: Create a VPN connection description: Create VPN connection. operationId: createVpnConnection parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: e5553d75-e6cb-4fa5-bd5a-53cf06ca9130 requestBody: description: Create VPN connection request body content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' required: true responses: "202": description: Create VPN connection response headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Create Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.networking.java.client.ApiClient; import com.nutanix.networking.java.client.api.VpnConnectionsApi; import com.nutanix.dp1.networking.networking.v4.request.VpnConnections.CreateVpnConnectionRequest; import com.nutanix.dp1.networking.networking.v4.config.IpsecConfig; import com.nutanix.dp1.networking.networking.v4.config.GatewayRole; import com.nutanix.dp1.networking.networking.v4.config.VpnConnection; import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient); VpnConnection vpnConnection = new VpnConnection(); // VpnConnection object initializations here... vpnConnection.setIpsecConfig(new IpsecConfig()); // required field vpnConnection.setLocalGatewayReference("ddaea7Da-7DCB-EF8f-FC84-fEeDCB6839C7"); // required field vpnConnection.setLocalGatewayRole(GatewayRole.UNKNOWN); // required field vpnConnection.setName("vpn-connection-1"); // required field vpnConnection.setRemoteGatewayReference("8A743B2b-fBd4-Bb6b-eEDe-13fD1f29DdAc"); // required field try { // Pass in parameters using the request builder object associated with the operation. ConfigTaskReferenceApiResponse configTaskReferenceApiResponse = vpnConnectionsApi.createVpnConnection(CreateVpnConnectionRequest.builder() .build(), vpnConnection); System.out.println(configTaskReferenceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, VpnConnectionsApi, IpsecConfig, GatewayRole, VpnConnection } from "@nutanix-api/networking-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance); function sample() { let vpnConnection = new VpnConnection(); // VpnConnection object initializations here... vpnConnection.setIpsecConfig(new IpsecConfig()); // required field vpnConnection.setLocalGatewayReference("340ac87B-d764-3Bac-d3Cd-788F931BFFD2"); // required field vpnConnection.setLocalGatewayRole(GatewayRole.UNKNOWN); // required field vpnConnection.setName("vpn-connection-1"); // required field vpnConnection.setRemoteGatewayReference("D5af75F6-Cc9a-AeEf-cB15-fF2cd7Dd47E9"); // required field vpnConnection = JSON.stringify(vpnConnection); vpnConnectionsApi.createVpnConnection(vpnConnection).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_networking_py_client if __name__ == "__main__": # Configure the client config = ntnx_networking_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_networking_py_client.ApiClient(configuration=config) vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client) vpnConnection = ntnx_networking_py_client.VpnConnection() # VpnConnection object initializations here... vpnConnection.ipsec_config = ntnx_networking_py_client.IpsecConfig() # required field vpnConnection.local_gateway_reference = "2BEfdda7-5F1c-0afb-70CF-EfCaF7Ebfacb" # required field vpnConnection.local_gateway_role = ntnx_networking_py_client.GatewayRole._UNKNOWN # required field vpnConnection.name = "vpn-connection-1" # required field vpnConnection.remote_gateway_reference = "DBE90fa4-E1C3-e779-CEdD-bFE8Ec1bFCb5" # required field try: api_response = vpn_connections_api.create_vpn_connection(body=vpnConnection) print(api_response) except ntnx_networking_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections" import1 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient VpnConnectionsServiceApiInstance *api.VpnConnectionsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance) ctx := context.Background() vpnConnection := import1.NewVpnConnection() // VpnConnection object initializations here... request := vpnconnections.CreateVpnConnectionRequest{ Body: vpnConnection } response, error := VpnConnectionsServiceApiInstance.CreateVpnConnection(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/networking/v4.3/config/vpn-connections" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpn-connection-1","description":"Exampleconnectiondescription","localGatewayReference":"string","remoteGatewayReference":"string","ipsecConfig":{"preSharedKey":"string","localVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"remoteVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"localAuthenticationId":"string","remoteAuthenticationId":"string","ikeLifetimeSecs":30,"ipsecLifetimeSecs":30,"ikeEncryptionAlgorithm":"$UNKNOWN","ikeAuthenticationAlgorithm":"$UNKNOWN","ipsecEncryptionAlgorithm":"$UNKNOWN","ipsecAuthenticationAlgorithm":"$UNKNOWN","$objectType":"networking.v4.config.IpsecConfig"},"dpdConfig":{"operation":"$UNKNOWN","intervalSecs":15,"timeoutSecs":60,"$objectType":"networking.v4.config.DpdConfig"},"qosConfig":{"ingressLimitMbps":64,"egressLimitMbps":12,"$objectType":"networking.v4.config.QosConfig"},"localGatewayRole":"$UNKNOWN","advertisedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"learnedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"ipsecTunnelStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"ebgpStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.VpnConnection"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpn-connection-1","description":"Exampleconnectiondescription","localGatewayReference":"string","remoteGatewayReference":"string","ipsecConfig":{"preSharedKey":"string","localVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"remoteVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"localAuthenticationId":"string","remoteAuthenticationId":"string","ikeLifetimeSecs":30,"ipsecLifetimeSecs":30,"ikeEncryptionAlgorithm":"$UNKNOWN","ikeAuthenticationAlgorithm":"$UNKNOWN","ipsecEncryptionAlgorithm":"$UNKNOWN","ipsecAuthenticationAlgorithm":"$UNKNOWN","$objectType":"networking.v4.config.IpsecConfig"},"dpdConfig":{"operation":"$UNKNOWN","intervalSecs":15,"timeoutSecs":60,"$objectType":"networking.v4.config.DpdConfig"},"qosConfig":{"ingressLimitMbps":64,"egressLimitMbps":12,"$objectType":"networking.v4.config.QosConfig"},"localGatewayRole":"$UNKNOWN","advertisedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"learnedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"ipsecTunnelStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"ebgpStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.VpnConnection"} \ - "https://host:port/api/networking/v4.3/config/vpn-connections" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n VpnConnection vpnConnection = new VpnConnection();\n\n // VpnConnection\ \ object initializations here...\n vpnConnection.IpsecConfig = new\ \ IpsecConfig(); // required field\n vpnConnection.LocalGatewayReference\ \ = \"deA8dEbd-fFb3-BaCC-6cd9-2CeaAF4dC3Ca\"; // required field\n \ \ vpnConnection.LocalGatewayRole = GatewayRole.UNKNOWN; // required field\n\ \ vpnConnection.Name = \"vpn-connection-1\"; // required field\n \ \ vpnConnection.RemoteGatewayReference = \"EafEdDb9-fBb3-87eB-A23e-7BE093ABBA5a\"\ ; // required field\n\n\n // Create request object with parameters\n\ \ var request = new CreateVpnConnectionRequest {\n Body\ \ = vpnConnection\n };\n try {\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = vpnConnectionsApi.CreateVpnConnection(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/vpn-connections/{extId}: get: tags: - VpnConnections summary: Get VPN connection description: Get VPN connection for a specified ExtId. operationId: getVpnConnectionById parameters: - name: extId in: path description: VPN connection UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1bc1c265-8baa-44a0-9e51-c890b1469314 responses: "200": description: VPN connection content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Get operation" x-permissions: operationName: View Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Prism Admin - name: Prism Viewer - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.GetVpnConnectionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.GetVpnConnectionApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n \n String extId = \"CFA1eB1E-Feca-eFFB-B0C9-aECEe6A248f6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVpnConnectionApiResponse\ \ getVpnConnectionApiResponse = vpnConnectionsApi.getVpnConnectionById(GetVpnConnectionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getVpnConnectionApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"Eae282a9-7cDE-b5Ac-Fe9b-87bEa8A8fCBb\"\ ;\n\n\n\n\n\n vpnConnectionsApi.getVpnConnectionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ \n ext_id = \"91cEabbC-4e38-bac4-ed9a-EAf4D1bcE92c\"\n\n\n try:\n\ \ api_response = vpn_connections_api.get_vpn_connection_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"5DdBAf4c-BC6A-Ec24-5DFc-62CC2E6a280b\"\ \n\n\n request := vpnconnections.GetVpnConnectionByIdRequest{ ExtId:\ \ &extId }\n response, error := VpnConnectionsServiceApiInstance.GetVpnConnectionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VpnConnection)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpn-connections/a07dEE89-7A8e-9CA8-17c0-2d1BFaEaE4Fd" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpn-connections/5edAcab0-CEE5-a593-2e6E-910FDD44AC1C" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n String extId = \"Dd3CC7c4-8ecD-01Bd-E1CF-Ca68D2adfA5f\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetVpnConnectionByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetVpnConnectionApiResponse getVpnConnectionApiResponse\ \ = vpnConnectionsApi.GetVpnConnectionById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - VpnConnections summary: Update VPN connection description: Update VPN connection. operationId: updateVpnConnectionById parameters: - name: extId in: path description: VPN connection UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 3ef5e596-cd7a-4676-8913-034931043e70 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 86f50d82-c2ab-4ba5-92c3-cfbe8b3b72e4 requestBody: description: Update VPN connection request body content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' required: true responses: "202": description: Update VPN connection response headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Update Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.UpdateVpnConnectionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.request.VpnConnections.GetVpnConnectionByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.networking.networking.v4.config.IpsecConfig;\n\ import com.nutanix.dp1.networking.networking.v4.config.GatewayRole;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.VpnConnection;\nimport\ \ com.nutanix.dp1.networking.networking.v4.config.GetVpnConnectionApiResponse;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n VpnConnection vpnConnection = new VpnConnection();\n\n \ \ // VpnConnection object initializations here...\n vpnConnection.setIpsecConfig(new\ \ IpsecConfig()); // required field\n vpnConnection.setLocalGatewayReference(\"\ fdefCc3D-Dcdd-9C2d-b38B-d7AAa0aba95d\"); // required field\n vpnConnection.setLocalGatewayRole(GatewayRole.UNKNOWN);\ \ // required field\n vpnConnection.setName(\"vpn-connection-1\"\ ); // required field\n vpnConnection.setRemoteGatewayReference(\"\ ABbE9Bec-d3Bc-e9Db-AaD1-1d0e40F5DAB3\"); // required field\n \n\ \ String extId = \"caAcFaf6-c4cF-0Fa5-dC7f-a7dEB059A1F6\";\n\n \ \ // perform GET call\n GetVpnConnectionApiResponse getResponse\ \ = null;\n try {\n getResponse = vpnConnectionsApi.getVpnConnectionById(GetVpnConnectionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = vpnConnectionsApi.updateVpnConnectionById(UpdateVpnConnectionByIdRequest.builder()\n\ \ .extId(extId)\n .build(), vpnConnection,\ \ opts);\n\n System.out.println(configTaskReferenceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionsApi, IpsecConfig, GatewayRole,\ \ VpnConnection, GetVpnConnectionApiResponse } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let vpnConnection = new VpnConnection();\n\n // VpnConnection\ \ object initializations here...\n vpnConnection.setIpsecConfig(new IpsecConfig());\ \ // required field\n vpnConnection.setLocalGatewayReference(\"D2e5DAF2-dc4A-caCA-ECaC-6dFCcEd0CeBE\"\ ); // required field\n vpnConnection.setLocalGatewayRole(GatewayRole.UNKNOWN);\ \ // required field\n vpnConnection.setName(\"vpn-connection-1\"); \ \ // required field\n vpnConnection.setRemoteGatewayReference(\"6c4ebE9A-bbfe-0a54-0FfF-b7d3D0BeC2fa\"\ ); // required field\n vpnConnection = JSON.stringify(vpnConnection);\n\ \n \n let extId = \"BF8A8FBD-BEB0-Cba5-eB2d-e0dFf5Ea8Fbd\";\n\n\n\ \ // Perform Get call\n vpnConnectionsApi.getVpnConnectionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n vpnConnectionsApi.updateVpnConnectionById(extId,\ \ vpnConnection, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ vpnConnection = ntnx_networking_py_client.VpnConnection()\n\n #\ \ VpnConnection object initializations here...\n vpnConnection.ipsec_config\ \ = ntnx_networking_py_client.IpsecConfig() # required field\n vpnConnection.local_gateway_reference\ \ = \"64bbcCb2-E5e7-FBdF-410A-Ad3E3c2Cce0B\" # required field\n vpnConnection.local_gateway_role\ \ = ntnx_networking_py_client.GatewayRole._UNKNOWN # required field\n \ \ vpnConnection.name = \"vpn-connection-1\" # required field\n vpnConnection.remote_gateway_reference\ \ = \"69bcEda7-EdDc-18BD-42Ea-CBcFB7bb3C5b\" # required field\n \n \ \ ext_id = \"a721B9cD-417a-AFaC-F2ed-8a37aBb6ADE4\"\n\n try:\n \ \ api_response = vpn_connections_api.get_vpn_connection_by_id(extId=ext_id)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_networking_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = vpn_connections_api.update_vpn_connection_by_id(extId=ext_id,\ \ body=vpnConnection, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_networking_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vpnConnection := import1.NewVpnConnection()\n\ \n // VpnConnection object initializations here...\n\n \n extId\ \ := \"2cAcDc3B-EC1d-c51B-dEFb-BcBC79eBcb5A\"\n\n getRequest := vpnconnections.GetVpnConnectionByIdRequest{\ \ extId: &extId }\n getResponse, err := VpnConnectionsServiceApiInstance.GetVpnConnectionById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := vpnconnections.UpdateVpnConnectionByIdRequest{ ExtId: &extId,\ \ Body: vpnConnection }\n response, error := VpnConnectionsServiceApiInstance.UpdateVpnConnectionById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/networking/v4.3/config/vpn-connections/06d4Eeec-9c1d-e2be-DAbd-f8AB840DfbE1" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpn-connection-1","description":"Exampleconnectiondescription","localGatewayReference":"string","remoteGatewayReference":"string","ipsecConfig":{"preSharedKey":"string","localVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"remoteVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"localAuthenticationId":"string","remoteAuthenticationId":"string","ikeLifetimeSecs":30,"ipsecLifetimeSecs":30,"ikeEncryptionAlgorithm":"$UNKNOWN","ikeAuthenticationAlgorithm":"$UNKNOWN","ipsecEncryptionAlgorithm":"$UNKNOWN","ipsecAuthenticationAlgorithm":"$UNKNOWN","$objectType":"networking.v4.config.IpsecConfig"},"dpdConfig":{"operation":"$UNKNOWN","intervalSecs":15,"timeoutSecs":60,"$objectType":"networking.v4.config.DpdConfig"},"qosConfig":{"ingressLimitMbps":64,"egressLimitMbps":12,"$objectType":"networking.v4.config.QosConfig"},"localGatewayRole":"$UNKNOWN","advertisedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"learnedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"ipsecTunnelStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"ebgpStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.VpnConnection"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"metadata":{"ownerReferenceId":"string","ownerUserName":"string","projectReferenceId":"string","projectName":"string","categoryIds":["string"],"$objectType":"common.v1.config.Metadata"},"name":"vpn-connection-1","description":"Exampleconnectiondescription","localGatewayReference":"string","remoteGatewayReference":"string","ipsecConfig":{"preSharedKey":"string","localVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"remoteVtiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"localAuthenticationId":"string","remoteAuthenticationId":"string","ikeLifetimeSecs":30,"ipsecLifetimeSecs":30,"ikeEncryptionAlgorithm":"$UNKNOWN","ikeAuthenticationAlgorithm":"$UNKNOWN","ipsecEncryptionAlgorithm":"$UNKNOWN","ipsecAuthenticationAlgorithm":"$UNKNOWN","$objectType":"networking.v4.config.IpsecConfig"},"dpdConfig":{"operation":"$UNKNOWN","intervalSecs":15,"timeoutSecs":60,"$objectType":"networking.v4.config.DpdConfig"},"qosConfig":{"ingressLimitMbps":64,"egressLimitMbps":12,"$objectType":"networking.v4.config.QosConfig"},"localGatewayRole":"$UNKNOWN","advertisedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"learnedPrefixes":[{"ipv4":{"ip":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"prefixLength":24,"$objectType":"networking.v4.config.IPv4Subnet"},"ipv6":{"ip":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"prefixLength":64,"$objectType":"networking.v4.config.IPv6Subnet"},"$objectType":"networking.v4.config.IPSubnet"}],"ipsecTunnelStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"ebgpStatus":{"message":"Entityishealthy","state":"$UNKNOWN","$objectType":"networking.v4.config.Status"},"$objectType":"networking.v4.config.VpnConnection"} \ - "https://host:port/api/networking/v4.3/config/vpn-connections/aeDD3d6A-9CFe-b3Be-704d-0FFCCbD45DcD" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n VpnConnection vpnConnection = new VpnConnection();\n\n // VpnConnection\ \ object initializations here...\n vpnConnection.IpsecConfig = new\ \ IpsecConfig(); // required field\n vpnConnection.LocalGatewayReference\ \ = \"bba8FFCf-6Aae-6fde-562A-EAd5Cd83eceD\"; // required field\n \ \ vpnConnection.LocalGatewayRole = GatewayRole.UNKNOWN; // required field\n\ \ vpnConnection.Name = \"vpn-connection-1\"; // required field\n \ \ vpnConnection.RemoteGatewayReference = \"bAF80A5b-dCCE-8d0C-EdEb-DEEBe2AbF239\"\ ; // required field\n\n String extId = \"08dC3D6d-1eC4-65Cf-cBEe-AD23Ca695DCC\"\ ;\n\n // perform GET call\n var getRequest = new GetVpnConnectionByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetVpnConnectionApiResponse\ \ getResponse = vpnConnectionsApi.GetVpnConnectionById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateVpnConnectionByIdRequest {\n ExtId = extId,\n\ \ Body = vpnConnection,\n \n \n \ \ };\n try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpnConnectionsApi.UpdateVpnConnectionById(request, opts);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - VpnConnections summary: Delete VPN connection description: Delete VPN connection request body operationId: deleteVpnConnectionById parameters: - name: extId in: path description: VPN connection UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9d2f1dec-18e9-46bc-91d4-71a0dab75981 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: b30266ac-b20c-423b-9860-c58f53ff38c8 responses: "202": description: Delete VPN connection response headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" x-permissions: operationName: Delete Vpn Connection deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.DeleteVpnConnectionByIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.TaskReferenceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n \n String extId = \"bFb9eFfD-FaBd-bEED-a7bC-E5b6Cebe73a5\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ConfigTaskReferenceApiResponse\ \ configTaskReferenceApiResponse = vpnConnectionsApi.deleteVpnConnectionById(DeleteVpnConnectionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(configTaskReferenceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"0cd1CEBD-5406-ebe7-aaec-FBD7a6bdaBaD\"\ ;\n\n\n\n\n\n vpnConnectionsApi.deleteVpnConnectionById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ \n ext_id = \"aeA1bCC3-a2D6-Fb77-efac-1FCAFDde8E9c\"\n\n\n try:\n\ \ api_response = vpn_connections_api.delete_vpn_connection_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"3C3cfdCa-49D4-dA36-Bb2E-abeAbAfF9A1b\"\ \n\n\n request := vpnconnections.DeleteVpnConnectionByIdRequest{ ExtId:\ \ &extId }\n response, error := VpnConnectionsServiceApiInstance.DeleteVpnConnectionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/networking/v4.3/config/vpn-connections/62A2BD7e-Df54-D02E-AaCD-4ABbF78b4983" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpn-connections/4Db27bEE-bfc2-d54D-dcAd-F75fBd4c3a4e" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n String extId = \"4b8A6Bcc-99DB-Dc35-4E9C-bCCfCedEAb1e\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteVpnConnectionByIdRequest {\n ExtId = extId\n };\n\ \ try {\n ConfigTaskReferenceApiResponse configTaskReferenceApiResponse\ \ = vpnConnectionsApi.DeleteVpnConnectionById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs: get: tags: - VpnConnections summary: List of third-party VPN appliances for which configurations are available to download. description: List third-party VPN appliances for which configurations are available to download. operationId: listVpnAppliancesByVpnConnectionId parameters: - name: vpnConnectionExtId in: path description: VPN connection UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f66e20f-67f4-473f-96bb-c4fcfd487f16 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs?$filter=name\ \ eq 'VyOS'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: name example: "https://{host}:{port}/api/networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs?$orderby=name" responses: "200": description: List of third-party VPN appliances for which configurations are available to download. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpnAppliance' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs\ \ Get operation" x-permissions: operationName: Download Vpn Connection Config deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.ListVpnAppliancesByVpnConnectionIdRequest;\n\ import com.nutanix.dp1.networking.networking.v4.config.ListVpnVendorConfigsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n \n String vpnConnectionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVpnVendorConfigsApiResponse\ \ listVpnVendorConfigsApiResponse = vpnConnectionsApi.listVpnAppliancesByVpnConnectionId(ListVpnAppliancesByVpnConnectionIdRequest.builder()\n\ \ .vpnConnectionExtId(vpnConnectionExtId)\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .build());\n\n \ \ System.out.println(listVpnVendorConfigsApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let vpnConnectionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n vpnConnectionsApi.listVpnAppliancesByVpnConnectionId(vpnConnectionExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ \n vpn_connection_ext_id = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vpn_connections_api.list_vpn_appliances_by_vpn_connection_id(vpnConnectionExtId=vpn_connection_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n vpnConnectionExtId := \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := vpnconnections.ListVpnAppliancesByVpnConnectionIdRequest{\ \ VpnConnectionExtId: &vpnConnectionExtId, Page_: &page_, Limit_: &limit_,\ \ Filter_: nil, Orderby_: nil }\n response, error := VpnConnectionsServiceApiInstance.ListVpnAppliancesByVpnConnectionId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VpnAppliance)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpn-connections/7f66e20f-67f4-473f-96bb-c4fcfd487f16/vpn-vendor-configs?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpn-connections/7f66e20f-67f4-473f-96bb-c4fcfd487f16/vpn-vendor-configs?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ using Nutanix.NetworkingSDK.Model.Networking.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n String vpnConnectionExtId = \"7f66e20f-67f4-473f-96bb-c4fcfd487f16\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListVpnAppliancesByVpnConnectionIdRequest {\n VpnConnectionExtId\ \ = vpnConnectionExtId,\n Page = page,\n Limit = limit,\n\ \ Filter = filter,\n Orderby = orderby\n };\n\ \ try {\n ListVpnVendorConfigsApiResponse listVpnVendorConfigsApiResponse\ \ = vpnConnectionsApi.ListVpnAppliancesByVpnConnectionId(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs/{extId}: get: tags: - VpnConnections summary: Get third-party VPN appliance configuration. description: Get third-party VPN appliance configuration. operationId: getVpnApplianceForVpnConnectionById parameters: - name: vpnConnectionExtId in: path description: VPN connection UUID. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f5500dfc-2e97-4859-a4f1-0218e7d8b47a - name: extId in: path description: Third-party VPN appliance UUID required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6309c19c-8429-4125-95a1-f89ce39dde8d responses: "200": description: VPN appliance configuration. content: text/plain: schema: type: string example: | # VyOS 1.1.8, Thu Jul 8 23:28:22 2021 # This configuration consists of IPSec VPN and BGP configuration which needs # to be configured on your VPN Gateway. # This config dump assumes "eth0" to be IPSec interface # ----------------Values used in configuration--------------- # peer_gateway_public_address = 10.19.212.161 # local_gateway_public_address = 10.19.212.162 # peer_gw_vti_ip = 100.64.0.1 # local_vti_ip = 100.64.0.2 # vti_net_mask = 30 # ike_encryption_algorithm = aes256 # ike_auth_algorithm = sha256 # ike_dhgroup = 14 # ike_lifetime = 86400 # esp_encryption_algorithm = aes256 # esp_auth_algorithm = sha256 # esp_dhgroup = 19 # esp_lifetime = 43200 # pre_shared_key = tom-password # local_asn = 59995 # peer_gw_asn = 45554 # ---------------------------------------------------------- # ---------------------------------------------------------- # 1: Virtual Tunnel Interface(VTI) Configuration # ---------------------------------------------------------- # # A virtual tunnel interface is configured to be the logical interface associated # with the tunnel. All traffic routed to the tunnel interface will be # encrypted and transmitted to the PEER VPN GW. Similarly, traffic from the PEER VPN GW # will be logically received on this interface. # conf set interfaces vti vti0 address 100.64.0.2/30 set interfaces vti vti0 mtu 1356 # Following commands will set mss value for tunnel to 1316 set policy route MSS-CLAMP rule 10 protocol 'tcp' set policy route MSS-CLAMP rule 10 set tcp-mss 1316 set policy route MSS-CLAMP rule 10 tcp flags 'SYN' set interfaces ethernet eth0 policy route 'MSS-CLAMP' # ---------------------------------------------------------- # 2: IPSec Internet Key Exchange (IKE) Configuration # ---------------------------------------------------------- # # A policy is established for the supported ISAKMP encryption, # authentication, Diffie-Hellman, lifetime, and key parameters. # Please note, these sample configurations are for proposal [aes256,sha256,14] # # You will need to modify these sample configuration files to take advantage # of one of the PEER VPN GW ike proposal [{'encryption_algorithm': 'aes256', 'pfs_group': 14, 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes256', 'pfs_group': 19, 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes256', 'pfs_group': 20, 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes128', 'pfs_group': 14, 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes128', 'pfs_group': 19, 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes128', 'pfs_group': 20, 'auth_algorithm': 'sha256'}] set vpn ipsec ike-group 10-19-212-161 key-exchange ikev2 set vpn ipsec ike-group 10-19-212-161 lifetime 86400 set vpn ipsec ike-group 10-19-212-161 proposal 1 dh-group 14 set vpn ipsec ike-group 10-19-212-161 proposal 1 encryption aes256 set vpn ipsec ike-group 10-19-212-161 proposal 1 hash sha256 set vpn ipsec ike-group 10-19-212-161 dead-peer-detection action restart set vpn ipsec ike-group 10-19-212-161 dead-peer-detection interval 30 set vpn ipsec ike-group 10-19-212-161 dead-peer-detection timeout 120 # ---------------------------------------------------------- # 3: IPSec ESP Configuration # ---------------------------------------------------------- # # The IPSec transform set defines the encryption, authentication, and IPSec mode parameters. # Please note, these sample configurations are for proposal [aes256,sha256] # # You will need to modify these sample configuration files to take advantage # of one of the PEER VPN GW esp proposal [{'encryption_algorithm': 'aes256', 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes256', 'auth_algorithm': 'sha1'}, {'encryption_algorithm': 'aes256', 'auth_algorithm': 'md5'}, {'encryption_algorithm': 'aes128', 'auth_algorithm': 'sha256'}, {'encryption_algorithm': 'aes128', 'auth_algorithm': 'sha1'}, {'encryption_algorithm': 'aes128', 'auth_algorithm': 'md5'}] # set vpn ipsec esp-group 10-19-212-161 lifetime 43200 set vpn ipsec esp-group 10-19-212-161 proposal 1 encryption aes256 set vpn ipsec esp-group 10-19-212-161 proposal 1 hash sha256 set vpn ipsec esp-group 10-19-212-161 pfs dh-group19 # ---------------------------------------------------------- # 4: IPSec PEER Configuration # ---------------------------------------------------------- # Replace eth0 with your IPSec interface set vpn ipsec ipsec-interfaces interface eth0 set vpn ipsec auto-update 60 set vpn ipsec nat-traversal enable # Fill 'local-address' value with IPSec interface eth0 IP set vpn ipsec site-to-site peer 10.19.212.161 local-address set vpn ipsec site-to-site peer 10.19.212.161 authentication id 100.64.0.2 set vpn ipsec site-to-site peer 10.19.212.161 authentication mode pre-shared-secret set vpn ipsec site-to-site peer 10.19.212.161 authentication pre-shared-secret tom-password set vpn ipsec site-to-site peer 10.19.212.161 authentication remote-id 100.64.0.1 set vpn ipsec site-to-site peer 10.19.212.161 connection-type initiate set vpn ipsec site-to-site peer 10.19.212.161 default-esp-group 10-19-212-161 set vpn ipsec site-to-site peer 10.19.212.161 ike-group 10-19-212-161 set vpn ipsec site-to-site peer 10.19.212.161 vti bind vti0 set vpn ipsec site-to-site peer 10.19.212.161 vti esp-group 10-19-212-161 commit # ---------------------------------------------------------- # 5: Border Gateway Protocol (BGP) Configuration # ---------------------------------------------------------- # # BGP is used within the tunnel to exchange prefixes(routes) between the # PEER VPN GW and your VPN Gateway. # # The local BGP Autonomous System Number (ASN) (59995) is configured # as part of your VPN Gateway. # Fill 'router-id' value with ipsec interface eth0 ip address set protocols bgp 59995 parameters router-id set protocols bgp 59995 neighbor 100.64.0.1 remote-as 45554 set protocols bgp 59995 neighbor 100.64.0.1 ebgp-multihop '30' set protocols bgp 59995 neighbor 100.64.0.1 password tom-password set protocols bgp 59995 neighbor 100.64.0.1 'nexthop-self' set protocols bgp 59995 redistribute static set protocols bgp 59995 redistribute ospf commit save exit "4XX": description: Client error response content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' "5XX": description: Server error response content: application/json: schema: $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' x-permissions: operationName: Download Vpn Connection Config deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Account Owner - name: Administrator - name: Prism Admin - name: Network Infra Admin - name: VPC Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.networking.java.client.ApiClient;\n\ import com.nutanix.networking.java.client.api.VpnConnectionsApi;\nimport\ \ com.nutanix.dp1.networking.networking.v4.request.VpnConnections.GetVpnApplianceForVpnConnectionByIdRequest;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(apiClient);\n\ \n \n String vpnConnectionExtId = \"Fdeca1fc-a3Ed-E2Bd-3Df7-9ffEDda460ba\"\ ;\n \n String extId = \"eacEBd8F-ACEb-237a-F383-23CAeeddfb5d\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n byte[] byte[]\ \ = vpnConnectionsApi.getVpnApplianceForVpnConnectionById(GetVpnApplianceForVpnConnectionByIdRequest.builder()\n\ \ .vpnConnectionExtId(vpnConnectionExtId)\n \ \ .extId(extId)\n .build());\n\n System.out.println(byte[].toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VpnConnectionsApi } from \"@nutanix-api/networking-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let vpnConnectionsApi = new VpnConnectionsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let vpnConnectionExtId = \"1CbB1c4a-06df-c2ad-a46D-dDAE8BAaeac7\"\ ;\n \n let extId = \"eBfc65Ff-fbee-ace8-e7A0-f28C60dEeA2d\";\n\n\n\ \n\n\n vpnConnectionsApi.getVpnApplianceForVpnConnectionById(vpnConnectionExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_networking_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_networking_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_networking_py_client.ApiClient(configuration=config)\n\ \ vpn_connections_api = ntnx_networking_py_client.VpnConnectionsApi(api_client=client)\n\ \ \n vpn_connection_ext_id = \"A2F9bFBD-afbb-8B32-90aD-e71BFdbEc61D\"\ \n \n ext_id = \"EDB9aDe1-eEEE-dfF1-f6F7-41bADaffFF9f\"\n\n\n try:\n\ \ api_response = vpn_connections_api.get_vpn_appliance_for_vpn_connection_by_id(vpnConnectionExtId=vpn_connection_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_networking_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/networking-go-client/v4/models/networking/v4/request/vpnconnections\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VpnConnectionsServiceApiInstance\ \ *api.VpnConnectionsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VpnConnectionsServiceApiInstance = api.NewVpnConnectionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n vpnConnectionExtId := \"befF5FAb-68aC-F2ba-6eAA-85C3DfAFEbcb\"\ \n \n extId := \"1DDdac66-Aa8b-53e9-4CF4-c9De875d8dba\"\n\n\n request\ \ := vpnconnections.GetVpnApplianceForVpnConnectionByIdRequest{ VpnConnectionExtId:\ \ &vpnConnectionExtId, ExtId: &extId }\n response, error := VpnConnectionsServiceApiInstance.GetVpnApplianceForVpnConnectionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import.)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/networking/v4.3/config/vpn-connections/7cbeb0BC-c9fE-CBee-A6ff-BBFCBdadB3Fd/vpn-vendor-configs/D30EDBae-d2fE-F717-eFDd-7B3fCedcBfeD" \ --header 'Accept: text/plain' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: text/plain' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/networking/v4.3/config/vpn-connections/babC9BAb-D06a-2bcd-BDc4-ca356ba7ca14/vpn-vendor-configs/E6E0a79c-3c49-dE7e-EEE1-bfCEACADEEe4" - lang: Csharp source: "\n\nusing Nutanix.NetworkingSDK.Client;\nusing Nutanix.NetworkingSDK.Api;\n\ \nnamespace CsharpSdkSample\n{\n class Program\n {\n static void Main(string[]\ \ args) {\n // Configure the client\n Configuration _config =\ \ new Configuration\n {\n // UserName to connect to the cluster\n\ \ Username = \"username\",\n // Password(SecureString) to\ \ connect to the cluster \n Password = Configuration.CreateSecurePassword(\"\ password\"),\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ Host = \"localhost\",\n // Port used for the connection. \n\ \ Port = 9440,\n // Backoff period in seconds (exponential\ \ backoff: 2, 4, 8... seconds)\n BackOffPeriod = 2,\n // Max\ \ retry attempts while reconnecting on a loss of connection\n MaxRetryAttempts\ \ = 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n\ \ VpnConnectionsApi vpnConnectionsApi = new VpnConnectionsApi(client);\n\ \n String vpnConnectionExtId = \"DaAab266-8Fb8-Ea0E-b0db-9C7daF5Fc6FA\"\ ;\n String extId = \"5AeA86E2-B6C7-BfDF-Ecea-CBC48fcDCc7D\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetVpnApplianceForVpnConnectionByIdRequest {\n VpnConnectionExtId\ \ = vpnConnectionExtId,\n ExtId = extId\n };\n \ \ try {\n byte[] byte[] = vpnConnectionsApi.GetVpnApplianceForVpnConnectionById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" components: schemas: networking.v4.3.config.Anc: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Atlas Networking Controller (ANC) object. type: object properties: configVersion: type: integer description: Configuration version for the current ANC. It is the logical timestamp for the current V4 release and will be updated by the actual configuration version in future releases. format: int64 example: 39 isAtlasNetworkingEnabled: type: boolean description: True if atlas networking is enabled and false otherwise. example: false ancUrl: pattern: "^((http[s]?|nfs):\\/)?\\/?([^:\\/\\s]*)((\\/\\w+)*(:[0-9]+)*?\\\ /)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$" type: string description: URL of Atlas Network Controller (ANC). example: string ovnRemoteAddress: type: string description: OVN remote address of the Atlas Network Controller (ANC). example: ssl:anc-ovn-external.default.msp.pc-fdjb.nutanix.com:6652 ancDomainNameServerList: maxItems: 10 minItems: 0 type: array description: Resolve name server for the ANC services. readOnly: true items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' excludedClusters: maxItems: 200 minItems: 0 type: array description: UUIDs of the clusters excluded from advanced networking. readOnly: true items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: ef3b9094-f44f-421a-aa87-59d55f670b47 additionalProperties: false description: Schema for ANC. networking.v4.3.config.NetworkingBaseModel: description: Networking common base object allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.config.Metadata' additionalProperties: false networking.v4.3.config.FlowGateway: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Atlas Flow Gateway. required: - azureExternalSubnetBindingList - chassisUuid type: object properties: chassisUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Chassis UUID of the Atlas Flow Gateway. example: e2e2cdac-5370-44d5-a042-9ff5f7729e6a azureExternalSubnetBindingList: maxItems: 1 minItems: 1 type: array description: List of bindings of the Atlas Flow Gateway external subnet with the Azure external subnet. items: $ref: '#/components/schemas/networking.v4.3.config.AzureExternalSubnetBinding' gatewayStatus: $ref: '#/components/schemas/networking.v4.3.config.FlowGatewayStatus' ovnControllerVersion: pattern: ^(\d+\.)?(\d+\.)?(\d+)$ type: string description: Version of the OVN controller readOnly: true example: string additionalProperties: false description: Schema for Flow Gateway. networking.v4.3.config.TaskReferenceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Put operation" networking.v4.3.config.AzureExternalSubnetBinding: required: - azureExternalNetworkPrefix - routerPortMac type: object properties: routerPortMac: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: MAC address of the router port of Atlas Flow Gateway. example: b8:60:04:73:61:1a azureExternalNetworkPrefix: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' peerToPeerNetworkPrefix: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' eniPrimaryIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' eniId: type: string description: External network interface Id. example: ENI ID for FGW eth0 interface resourceGroupId: type: string description: Resource group Id. example: Resource Group ID for Azure VNET additionalProperties: false description: Binding of Atlas Flow Gateway external subnet with Azure external subnet. networking.v4.3.config.FlowGatewayStatus: type: object properties: detail: type: string description: Status detail of the Atlas Flow Gateway. example: string state: $ref: '#/components/schemas/networking.v4.3.config.FlowGatewayState' additionalProperties: false description: Status of the Atlas Flow Gateway. networking.v4.3.config.IPSubnet: type: object properties: ipv4: $ref: '#/components/schemas/networking.v4.3.config.IPv4Subnet' ipv6: $ref: '#/components/schemas/networking.v4.3.config.IPv6Subnet' additionalProperties: false description: IP subnet. networking.v4.3.config.IPv4Subnet: required: - ip - prefixLength type: object properties: ip: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' prefixLength: maximum: 32 minimum: 0 type: integer description: Prefix length of the IPv4 subnet. format: int32 example: 24 additionalProperties: false description: IPv4 subnet. networking.v4.3.config.IPv6Subnet: required: - ip - prefixLength type: object properties: ip: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' prefixLength: maximum: 128 minimum: 0 type: integer description: Prefix length of the IPv6 subnet. format: int32 example: 64 additionalProperties: false description: IPv6 subnet. networking.v4.3.config.FlowGatewayState: type: string description: State of the Atlas Flow Gateway. enum: - HEALTHY - DOWN - PROVISIONING - MAINTENANCE - $UNKNOWN - $REDACTED x-enumDescriptions: MAINTENANCE: Flow gateway in maintenance. DOWN: Flow gateway is down. HEALTHY: Flow gateway is healthy. PROVISIONING: Flow gateway is under provisioning. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.FlowGatewayKeepAliveRequestSpec: title: Request model for Flow Gateway Keepalive. required: - chassisUuid type: object properties: chassisUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Chassis UUID of the Atlas Flow Gateway. example: 7536207d-b3ab-4ca3-b47e-4d2aaf75cceb gatewayStatus: $ref: '#/components/schemas/networking.v4.3.config.FlowGatewayStatus' ovnControllerVersion: pattern: ^(\d+\.)?(\d+\.)?(\d+)$ type: string description: Version of the OVN controller example: 24.03.1 eniPrimaryIpList: maxItems: 1 minItems: 1 type: array description: List of external network interface's primary IP addresses corresponding to the external subnet bindings in the flow gateway. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Request model for Flow Gateway Keepalive. networking.v4.3.error.AppMessage: type: object properties: message: type: string description: The message string. example: string severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' code: type: string description: "The code associated with this message. This string is typically\ \ prefixed with the namespace to which the endpoint belongs. For example:\ \ VMM-40000" example: string locale: type: string description: Locale for this message. The default locale would be 'en-US'. default: en_US errorGroup: type: string description: The error group associated with this message of severity ERROR. example: string argumentsMap: type: object additionalProperties: type: string description: The map of argument name to value. additionalProperties: false description: Message with associated severity describing status of the current operation. x-platform-generated: true networking.v4.3.config.ListBgpSessionsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.BgpSession' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/bgp-sessions Get operation networking.v4.3.config.BgpSession: title: BGP session. description: BGP session. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - localGatewayReference - name - remoteGatewayReference type: object properties: name: maxLength: 128 type: string description: BGP session name. example: session-3 description: maxLength: 1000 type: string description: BGP session description. example: BGP session description localGatewayReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Local BGP gateway reference. example: 2e300195-ea08-4d83-a094-7d88e4816439 remoteGatewayReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Remote BGP gateway reference. example: 3374324f-a05e-42e8-ac29-298997fd07c3 localGatewayInterfaceIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' dynamicRoutePriority: maximum: 1000 minimum: 300 type: integer description: Priority assigned to routes received over this BGP session. format: int16 example: 450 password: type: string description: BGP password format: password writeOnly: true example: '**************' status: $ref: '#/components/schemas/networking.v4.3.config.Status' localGateway: $ref: '#/components/schemas/networking.v4.3.config.Gateway' remoteGateway: $ref: '#/components/schemas/networking.v4.3.config.Gateway' shouldAdvertiseAllExternallyRoutablePrefixes: type: boolean description: Advertise all VPC externally-routable prefixes. example: false externallyRoutablePrefixesToAdvertise: maxItems: 100 minItems: 0 type: array description: VPC externally-routable prefixes to advertise. items: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' prependedAutonomousSystemPath: maxItems: 10 minItems: 0 type: array description: List of ASNs to prepend to the AS_path attribute of BGP updates for this session. items: maximum: 4294967294 minimum: 1 type: integer format: int64 example: 45035 advertisedRoutesCommunities: maxItems: 20 minItems: 0 type: array description: BGP community tags for advertised routes. items: $ref: '#/components/schemas/networking.v4.3.config.BgpCommunity' additionalProperties: false networking.v4.3.config.Status: type: object properties: message: type: string description: Detailed message of component status. example: Entity is healthy state: $ref: '#/components/schemas/networking.v4.3.config.State' additionalProperties: false description: Up/Down status of component and message. networking.v4.3.config.Gateway: title: Network gateway. required: - name description: Network gateway. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Name of the gateway. example: gateway-a description: maxLength: 1000 type: string description: Description of the gateway. example: Network gateway description vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC example: 674e0afd-c4ed-4986-9ec6-b245f8de32e2 cloudNetworkReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Cloud network on which network gateway is deployed. example: 1b3c7d97-7e27-4d11-9f2a-7071f3650776 installedSoftwareVersion: type: string description: Software version installed on the gateway appliance. readOnly: true example: string supportedSoftwareVersion: type: string description: Supported gateway appliance version. readOnly: true example: string vmReference: type: string description: | Reference to a dedicated VM on which a local gateway is deployed. readOnly: true example: string deployment: $ref: '#/components/schemas/networking.v4.3.config.GatewayDeployment' gatewayDeviceVendor: type: string description: Third-party gateway vendor. example: Arista services: required: - $objectType properties: $objectType: type: string example: networking.v4.config.LocalNetworkServices description: Local or remote gateway service type. oneOf: - $ref: '#/components/schemas/networking.v4.3.config.LocalNetworkServices' - $ref: '#/components/schemas/networking.v4.3.config.RemoteNetworkServices' highAvailabilityGroup: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityGroup' isActive: type: boolean description: Indicates whether the gateway can be used to service a subnet extension's datapath. readOnly: true example: false status: $ref: '#/components/schemas/networking.v4.3.config.Status' vpc: $ref: '#/components/schemas/networking.v4.3.config.Vpc' vm: $ref: '#/components/schemas/networking.v4.3.config.Vm' additionalProperties: false networking.v4.3.config.BgpCommunity: title: BGP community. required: - autonomousSystemNumber - communityValue type: object properties: autonomousSystemNumber: maximum: 65535 minimum: 1 type: integer description: Autonomous System Number that originated the community. format: uint16 example: 45035 communityValue: maximum: 65535 minimum: 1 type: integer description: Unique number assigned by the autonomous system. format: uint16 example: 45035 additionalProperties: false description: BGP community. networking.v4.3.config.State: type: string description: Up/Down status of component. enum: - UP - DOWN - RECOVERY_STARTED - RECOVERY_IN_PROGRESS - RECOVERY_COMPLETED - $UNKNOWN - $REDACTED x-enumDescriptions: RECOVERY_IN_PROGRESS: Component recovery is currently in progress. DOWN: Component is not functional and down. RECOVERY_STARTED: Component recovery has started. RECOVERY_COMPLETED: Component recovery is completed. UP: Component is up and running. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.GatewayDeployment: title: Network gateway deployment configuration. type: object properties: clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | Cluster reference required to identify which on-prem cluster to deploy the gateway VM on. example: a39bdab1-98db-4268-b35f-24c5bf732191 managementInterface: $ref: '#/components/schemas/networking.v4.3.config.GatewayManagementInterface' interfaces: maxItems: 4 minItems: 0 type: array description: List of network interfaces for this gateway. items: $ref: '#/components/schemas/networking.v4.3.config.GatewayInterface' vcenterDatastoreName: maxLength: 128 type: string description: | vCenter datastore to which the gateway disks and images will be uploaded during deployment. example: myDatastore shouldSynchronizeSystemNtpServers: type: boolean description: | Boolean flag indicating which NTP servers are configured on the gateway. When True, the gateway will use the same NTP servers configured on the PC. When False, the gateway will use the list of NTP servers specified by ntpServers. default: false ntpServers: maxItems: 10 minItems: 0 type: array description: | List of NTP servers configured on the gateway. When shouldSynchronizeSystemNtpServers is True this key may be omitted. Any valid list value given for this key will be ignored. When shouldSynchronizeSystemNtpServers is False this field may be provided. If an empty list value is given, or if this key is omitted, the following NTP servers will be used by default: time.google.com 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org When an NTP server is provided as an IP address, the prefixLength property of each IP address will always have a value of 32. items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' shouldSynchronizeSystemDnsServers: type: boolean description: | Boolean flag indicating which DNS servers are configured on the gateway. When True, the gateway will use the same DNS servers configured on the PC. When False, the gateway will use the list of DNS servers specified by dnsServers. default: false dnsServers: maxItems: 10 minItems: 0 type: array description: | List of DNS servers configured on the gateway. When shouldSynchronizeSystemDnsServers is True this key may be omitted. Any valid list value given for this key will be ignored. When shouldSynchronizeSystemDnsServers is False this field may be provided. If an empty list value is given, or if this key is omitted, the following DNS servers will be used by default: 8.8.8.8 4.4.4.4 The prefixLength property of each IP address will always have a value of 32. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Network gateway deployment configuration. networking.v4.3.config.LocalNetworkServices: title: Local gateway services. type: object properties: serviceAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' serviceAddresses: maxItems: 4 minItems: 1 type: array description: List of floating IP addresses associated with this local gateway. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' localVpnService: $ref: '#/components/schemas/networking.v4.3.config.LocalVpnService' localVtepService: $ref: '#/components/schemas/networking.v4.3.config.LocalVtepService' localBgpService: $ref: '#/components/schemas/networking.v4.3.config.LocalBgpService' additionalProperties: false description: Services of this local gateway. networking.v4.3.config.RemoteNetworkServices: title: Remote gateway services. type: object properties: remoteVpnService: $ref: '#/components/schemas/networking.v4.3.config.RemoteVpnService' remoteVtepService: $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepService' remoteBgpService: $ref: '#/components/schemas/networking.v4.3.config.RemoteBgpService' additionalProperties: false description: Services of this remote gateway. networking.v4.3.config.HighAvailabilityGroup: type: object properties: isHaEnabled: type: boolean description: Indicates whether high availability is enabled. example: true algorithm: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityAlgorithm' peeredGateways: maxItems: 2 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.PeeredGateway' additionalProperties: false networking.v4.3.config.Vpc: title: Virtual Private Cloud (VPC) Object. required: - name description: Schema for Virtual Private Cloud (VPC). allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Name of the VPC. example: vpc-1 description: maxLength: 1000 type: string description: Description of the VPC. example: VPC description vpcType: $ref: '#/components/schemas/networking.v4.3.config.VpcType' commonDhcpOptions: $ref: '#/components/schemas/networking.v4.3.config.VpcDhcpOptions' snatIps: maxItems: 2 minItems: 0 type: array description: List of IP Addresses used for SNAT. readOnly: true items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' externalSubnets: maxItems: 4 minItems: 0 type: array description: List of external subnets that the VPC is attached to. items: $ref: '#/components/schemas/networking.v4.3.config.ExternalSubnet' externalRoutingDomainReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External routing domain associated with this route table example: 99715ff7-e2ad-4e9e-bf30-122fead43f35 externallyRoutablePrefixes: maxItems: 100 minItems: 0 type: array description: CIDR blocks from the VPC which can talk externally without performing NAT. This is applicable when connecting to external subnets which have disabled NAT. items: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' kubernetesClusters: maxItems: 1 minItems: 0 type: array description: List of Kubernetes clusters associated with the VPC. items: $ref: '#/components/schemas/networking.v4.3.config.KubernetesCluster' additionalProperties: false networking.v4.3.config.Vm: type: object properties: name: maxLength: 80 type: string description: Virtual Machine name example: user-vm-1 additionalProperties: false description: Virtual Machine properties networking.v4.3.config.GatewayManagementInterface: title: Network management interface of the gateway. type: object properties: subnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The on-prem vlan subnet to deploy the network gateway VM on. example: 9fb21e74-400c-49fc-a872-efcc66c00dc3 vlanId: maximum: 4095 minimum: 0 type: integer description: The on-prem VLAN to deploy the gateway on. format: int16 example: 10 address: $ref: '#/components/schemas/common.v1.0.config.IPAddress' defaultGateway: $ref: '#/components/schemas/common.v1.0.config.IPAddress' mtu: type: integer description: MTU of management interface. format: int16 readOnly: true example: 45 additionalProperties: false description: | Network interface used to deliver network services and for managing the gateway. If a VPC reference is supplied then the gateway will be deployed on a dedicated subnet within the VPC. If a VPC reference is not supplied, then this interface defines the subnet on which the gateway will be deployed, and the address it will be assigned. When a VPC reference is not present, either a subnet reference or a VLAN id must be supplied, along with the address and default gateway of the subnet. A VLAN network without IPAM may be used. networking.v4.3.config.GatewayInterface: title: Network interface of the gateway. type: object properties: subnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The VLAN subnet to deploy this network gateway VM on. example: 3d820c0c-1154-4fc4-9801-af4e07c9b498 ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' defaultGatewayAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: MAC address of this gateway interface. example: 9a:64:df:8d:df:d8 mtu: type: integer description: MTU of this gateway interface. format: int16 readOnly: true example: 75 additionalProperties: false description: | Network interface used to deliver network services. If the client supplies a VPC reference, but does not specify a VPC subnet, the gateway will be deployed on an auto-configured dedicated subnet within the VPC. If the client specifies a VPC subnet, the gateway will be deployed on that subnet. If the gateway is deployed on a VLAN subnet, with or without IPAM, then statically-allocated IP addresses on that subnet must be provided for each interface. networking.v4.3.config.LocalVpnService: title: VPN service. type: object properties: ebgpConfig: $ref: '#/components/schemas/networking.v4.3.config.BgpConfig' peerIgpConfig: $ref: '#/components/schemas/networking.v4.3.config.InternalRoutingConfig' additionalProperties: false description: VPN service hosted on this local gateway. networking.v4.3.config.LocalVtepService: title: VTEP service. required: - vxlanPort type: object properties: vxlanPort: maximum: 49151 minimum: 1 type: integer description: VXLAN port. format: int32 example: 4789 additionalProperties: false description: VTEP service hosted on this local gateway. networking.v4.3.config.LocalBgpService: title: BGP service. required: - asn type: object properties: vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | Reference to the VPC that this network gateway serves as its BGP speaker. Note that this BGP gateway will not service a regular VPC sitting behind a Transit VPC. example: d0b08f44-8146-4932-bd55-bbbfe88e2644 asn: maximum: 4294967294 minimum: 1 type: integer description: Autonomous system number. 0 and 4294967295 are reserved. format: int64 example: 45035 isBgpAddPathEnabled: type: boolean description: If the BGP additional paths capability is enabled on this local gateway. default: false additionalProperties: false description: BGP service hosted on this local gateway. networking.v4.3.config.BgpConfig: title: BGP configuration. type: object properties: asn: maximum: 4294967294 minimum: 1 type: integer description: Autonomous system number. 0 and 4294967295 are reserved. format: int64 example: 45035 password: type: string description: BPG password. writeOnly: true example: string shouldRedistributeRoutes: type: boolean description: | Redistribute routes over eBGP. Applicable only to network gateways deployed on VLAN subnets with eBGP over VPN. default: false additionalProperties: false description: BGP configuration. networking.v4.3.config.InternalRoutingConfig: type: object properties: ospfConfig: $ref: '#/components/schemas/networking.v4.3.config.OspfConfig' ibgpConfigList: maxItems: 32 minItems: 0 type: array description: iBGP configuration. items: $ref: '#/components/schemas/networking.v4.3.config.IbgpConfig' localPrefixList: maxItems: 250 minItems: 0 type: array description: List of local prefixes to be advertised over eBGP. items: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' additionalProperties: false description: | Describes the routing protocol configuration spec needed by this gateway to peer and learn routes from internal routers using either iBGP or OSPF. networking.v4.3.config.OspfConfig: type: object properties: areaId: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: OSPF area id of this gateway. example: 5.230.54.120 authenticationType: $ref: '#/components/schemas/networking.v4.3.config.AuthenticationType' password: type: string description: Password for authentication. format: password writeOnly: true example: '************' additionalProperties: false description: OSPF configuration for route peering with internal routers. networking.v4.3.config.IbgpConfig: title: Internal BGP configuration. description: Internal BGP configuration. allOf: - $ref: '#/components/schemas/networking.v4.3.config.BgpConfig' - type: object properties: peerIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false networking.v4.3.config.AuthenticationType: type: string description: Authentication type. enum: - PLAIN_TEXT - MD5 - $UNKNOWN - $REDACTED x-enumDescriptions: PLAIN_TEXT: Plain text authentication. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. MD5: MD5 authentication. networking.v4.3.config.RemoteVpnService: title: VPN service. type: object properties: serviceAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ebgpConfig: $ref: '#/components/schemas/networking.v4.3.config.BgpConfig' peerIgpConfig: $ref: '#/components/schemas/networking.v4.3.config.InternalRoutingConfig' shouldInstallXiRoute: type: boolean description: | Boolean flag indicating user opt-in for installing Xi LB route in on-prem Prism Central and Prism Element CVMs provided on-prem Prism Central, Prism Element and VPN VM are in the same subnet. default: false additionalProperties: false description: VPN service hosted on this remote gateway. networking.v4.3.config.RemoteVtepService: title: VTEP service. type: object properties: vxlanPort: maximum: 49151 minimum: 1 type: integer description: VXLAN port. format: int32 default: 4789 vteps: maxItems: 10 minItems: 0 type: array description: Remote VXLAN Tunnel Endpoints configuration. items: $ref: '#/components/schemas/networking.v4.3.config.Vtep' additionalProperties: false description: VTEP service hosted on this remote gateway. networking.v4.3.config.RemoteBgpService: title: BGP service. required: - address - asn type: object properties: address: $ref: '#/components/schemas/common.v1.0.config.IPAddress' asn: maximum: 4294967294 minimum: 1 type: integer description: Autonomous system number. 0 and 4294967295 are reserved. format: int64 example: 45035 additionalProperties: false description: BGP service hosted on this remote gateway. networking.v4.3.config.Vtep: title: VXLAN Tunnel Endpoint. type: object properties: address: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: VXLAN Tunnel Endpoint. networking.v4.3.config.HighAvailabilityAlgorithm: type: string description: High availability algorithm type used for the group. enum: - ACTIVE_BACKUP - $UNKNOWN - $REDACTED x-enumDescriptions: ACTIVE_BACKUP: Active-backup high availability algorithm where one gateway is active and others are in standby mode. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.PeeredGateway: type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External ID of the peered gateway. example: a19075de-4e58-4d43-8c60-4bf3b3805ff8 status: $ref: '#/components/schemas/networking.v4.3.config.Status' additionalProperties: false description: Information about a peered gateway in a high availability group. networking.v4.3.config.VpcType: type: string description: Type of VPC. enum: - REGULAR - TRANSIT - $UNKNOWN - $REDACTED x-enumDescriptions: REGULAR: VPC type regular. TRANSIT: VPC type transit. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.VpcDhcpOptions: type: object properties: domainNameServers: maxItems: 32 minItems: 0 type: array description: List of Domain Name Server addresses (option 6). items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: List of DHCP options to be configured. networking.v4.3.config.ExternalSubnet: required: - subnetReference type: object properties: subnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External subnet reference. example: 0aea62ef-e10a-4999-9ab7-d51cdf7f56d2 externalIps: maxItems: 4 minItems: 0 type: array description: "List of IP Addresses used for SNAT, if NAT is enabled on the\ \ external subnet. If NAT is not enabled, this specifies the IP address\ \ of the VPC port connected to the external gateway." items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' gatewayNodes: maxItems: 32 minItems: 3 type: array description: List of gateway nodes that can be used for external connectivity. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f9069519-5c50-4b4b-80dc-9e95fb00cc77 activeGatewayNodes: maxItems: 4 minItems: 0 type: array description: Currently active gateway nodes that are used for external connectivity. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.GatewayNodeReference' activeGatewayCount: maximum: 4 minimum: 1 type: integer description: Maximum number of active gateway nodes for the VPC external subnet association. format: int32 example: 4 additionalProperties: false description: "Information about the external subnet, SNAT IPs and the gateway\ \ nodes." networking.v4.3.config.KubernetesCluster: required: - extId type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: ExtID of the Kubernetes cluster. example: 20538be6-26d2-440e-aa46-c7b557bc701c gatewayNodesSelector: $ref: '#/components/schemas/networking.v4.3.config.GatewayNodesSelector' additionalProperties: false description: Kubernetes cluster associated with the VPC. networking.v4.3.config.GatewayNodeReference: type: object properties: nodeId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of gateway nodes example: 711c6064-a076-4b86-978c-a8b506bd57e8 nodeIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Reference of gateway nodes. networking.v4.3.config.GatewayNodesSelector: type: object properties: matchLabels: maxItems: 32 minItems: 0 type: array description: Labels used to select the gateway nodes candidates within the Kubernetes cluster. These labels are key-value pairs. items: $ref: '#/components/schemas/common.v1.0.config.KVStringPair' additionalProperties: false description: Selector used to identify gateway nodes candidates within the Kubernetes cluster. networking.v4.3.config.GetBgpSessionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.BgpSession oneOf: - $ref: '#/components/schemas/networking.v4.3.config.BgpSession' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{extId}\ \ Get operation" networking.v4.3.config.ListBgpRoutesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.BgpRoute' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes\ \ Get operation" networking.v4.3.config.BgpRoute: title: BGP route. description: Route advertised or received over a BGP session. allOf: - $ref: '#/components/schemas/networking.v4.3.config.BaseRoute' - required: - bgpRouteType - bgpSessionReference type: object properties: bgpSessionReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: BGP session over which the route is advertised or received. example: 87ad5d63-2dd6-492b-a11e-efcfb70dd0ec bgpRouteType: $ref: '#/components/schemas/networking.v4.3.config.BgpRouteType' bgpCommunities: maxItems: 20 minItems: 0 type: array description: BGP community tags. items: $ref: '#/components/schemas/networking.v4.3.config.BgpCommunity' additionalProperties: false networking.v4.3.config.BaseRoute: description: Base model of route. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Route name. example: route1 description: maxLength: 1000 type: string description: BGP session description. example: Route to peer destination: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' nexthop: $ref: '#/components/schemas/networking.v4.3.config.Nexthop' additionalProperties: false networking.v4.3.config.BgpRouteType: type: string description: Type of the BGP route. enum: - ADVERTISED - RECEIVED - RECEIVED_AND_IGNORED - $UNKNOWN - $REDACTED x-enumDescriptions: RECEIVED: BGP route is a received route. ADVERTISED: BGP route is an advertised route. RECEIVED_AND_IGNORED: BGP route is received but has not been programmed in the route table. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.Nexthop: required: - nexthopType type: object properties: nexthopType: $ref: '#/components/schemas/networking.v4.3.config.NexthopType' nexthopReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: "Reference to a link, such as a VPN connection or subnet." example: 61837fa5-e160-427f-9fe1-f1dec94a2bcd nexthopIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' nexthopName: maxLength: 128 type: string description: "Name of the nexthop, where nexthop is either an IP address,\ \ a VPN connection, or a subnet. \n" readOnly: true example: string additionalProperties: false description: Route nexthop. networking.v4.3.config.NexthopType: title: Next hop type. type: string description: Nexthop type. enum: - IP_ADDRESS - DIRECT_CONNECT_VIF - LOCAL_SUBNET - EXTERNAL_SUBNET - VPN_CONNECTION - $UNKNOWN - $REDACTED x-enumDescriptions: LOCAL_SUBNET: Next hop is an internal subnet. DIRECT_CONNECT_VIF: Next hop is a direct connect VIF. VPN_CONNECTION: Next hop is a VPN connection. IP_ADDRESS: Next hop is an IP address. EXTERNAL_SUBNET: Next hop is an external subnet. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.GetBgpRouteApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.BgpRoute oneOf: - $ref: '#/components/schemas/networking.v4.3.config.BgpRoute' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/bgp-sessions/{bgpSessionExtId}/bgp-routes/{extId}\ \ Get operation" networking.v4.3.config.ListClusterCapabilitiesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.ClusterCapability' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/capabilities Get operation networking.v4.3.config.ClusterCapability: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Cluster capabilities structure required: - capabilities - clusterId type: object properties: clusterId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Cluster UUID whose capabilities are retrieved. example: 5daf4647-161e-4961-a60f-234146423353 capabilities: maxItems: 10 minItems: 0 type: array description: | A dictionary with a key as a capability name and a value as a boolean, true if supported by the cluster, false if not. For example, dictionary will look like { "SUPPORTS_PC_SPAN": true, "SUPPORTS_VGPU_CONSOLE": true } readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.Capability' additionalProperties: false description: Describes cluster capabilities networking.v4.3.config.Capability: required: - capabilityName - isSupported type: object properties: capabilityName: maxLength: 128 type: string description: Name of the capability e.g. "SUPPORTS_PC_SPAN" example: SUPPORTS_SPAN_V2 isSupported: type: boolean description: "Boolean - true if the capability is supported, false otherwise" example: true additionalProperties: false description: Capability dictionary entry with capability name and boolean value indicating support networking.v4.3.config.ClusterFlowStatus: description: Get the Flow Networking usage of each registered Prism Element cluster. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: clusterStatusList: maxItems: 200 minItems: 0 type: array description: Flow Networking usage status for every cluster. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.ClusterStatus' additionalProperties: false networking.v4.3.config.ClusterStatus: required: - clusterReference - hasFlowStatus type: object properties: clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of respective cluster. example: 4935f46e-a88a-4d7d-a543-2f5e2db5e78c hasFlowStatus: type: boolean description: Indicates the flow status on the cluster. It is set to True if the cluster has at least one vNIC that is part of an Atlas subnet example: true additionalProperties: false description: Flow Networking usage status for a Prism Element cluster. networking.v4.3.config.ListFloatingIpsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/floating-ips Get operation networking.v4.3.config.FloatingIp: description: Configure a floating IP. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - name type: object properties: name: maxLength: 128 type: string description: Name of the floating IP. example: floating-ip-1 description: maxLength: 1000 type: string description: Description for the Floating IP. example: Floating IP for VM1 association: required: - $objectType properties: $objectType: type: string example: networking.v4.config.VmNicAssociation description: Association of the Floating IP with either NIC or Private IP oneOf: - $ref: '#/components/schemas/networking.v4.3.config.VmNicAssociation' - $ref: '#/components/schemas/networking.v4.3.config.PrivateIpAssociation' - $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSessionAssociation' floatingIp: $ref: '#/components/schemas/networking.v4.3.config.FloatingIPAddress' externalSubnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External subnet reference for the Floating IP to be allocated in on-prem only. example: 182a00ec-6894-4571-9ca0-ee1be77432f3 externalSubnet: $ref: '#/components/schemas/networking.v4.3.config.Subnet' privateIp: type: string description: Private IP value in string readOnly: true example: string floatingIpValue: type: string description: Floating IP value in string readOnly: true example: string associationStatus: $ref: '#/components/schemas/networking.v4.3.config.AssociationStatus' vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC reference UUID example: 47f3bf2b-22bd-4777-bab7-2fe8aaedf07b vmNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VM NIC reference. example: 51adbf8b-a653-424f-a750-7547f6c411c8 loadBalancerSessionReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Load Balancer Session reference UUID. example: 526e8538-f550-41b4-b31d-f6992da784a1 vpc: $ref: '#/components/schemas/networking.v4.3.config.Vpc' vmNic: $ref: '#/components/schemas/networking.v4.3.config.VmNic' additionalProperties: false networking.v4.3.config.VmNicAssociation: required: - vmNicReference type: object properties: vmNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VM NIC reference. example: de3f88f3-ab08-44bf-be4d-a109cc3c2f50 vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC reference to which the VM NIC subnet belongs. readOnly: true example: 3139f5a1-b217-4219-b69a-326f3f9cc741 privateIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: VM NIC and VPC to which the VM NIC subnet belongs. networking.v4.3.config.PrivateIpAssociation: required: - privateIp - vpcReference type: object properties: privateIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC in which the private IP exists. example: 7713f914-c053-419d-a2c6-a0ead844909c additionalProperties: false description: Private IP and VPC to which the floating IP is associated. networking.v4.3.config.LoadBalancerSessionAssociation: required: - loadBalancerSessionReference type: object properties: loadBalancerSessionReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Load Balancer Session reference UUID. example: edf39700-6bfe-4b1d-b53c-9da7c29a390d vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC reference to which the VM NIC subnet belongs. readOnly: true example: 2068a7f1-0299-4460-a34c-137e9e0855cd privateIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Load Balancer Session to which the floating IP is associated. networking.v4.3.config.FloatingIPAddress: type: object properties: ipv4: $ref: '#/components/schemas/networking.v4.3.config.FloatingIPv4Address' ipv6: $ref: '#/components/schemas/networking.v4.3.config.FloatingIPv6Address' additionalProperties: false description: Floating IP address. networking.v4.3.config.Subnet: title: Subnet object. required: - name - subnetType description: API schema for subnet. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Name of the subnet. example: subnet-1 description: maxLength: 1000 type: string description: Description of the subnet. example: Internal subnet subnetType: $ref: '#/components/schemas/networking.v4.3.config.SubnetType' networkId: maximum: 16777215 minimum: 0 type: integer description: "For VLAN subnet, this field represents VLAN Id, valid range\ \ is from 0 to 4095; For overlay subnet, this field represents 24-bit\ \ VNI, this field is read-only." format: int32 example: 36 dhcpOptions: $ref: '#/components/schemas/networking.v4.3.config.DhcpOptions' ipConfig: maxItems: 1 minItems: 0 type: array description: IP configuration for the subnet. items: $ref: '#/components/schemas/networking.v4.3.config.IPConfig' clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the cluster this subnet belongs to. example: 4899c6a1-19d5-43ab-9289-9e30e4ace068 clusterReferenceList: maxItems: 16 minItems: 0 type: array description: List of UUIDs of the cluster this subnet belongs to. readOnly: true items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 60b4e03a-a15a-4375-834d-d04ad89053bc clusterNameList: maxItems: 16 minItems: 0 type: array description: List of cluster names this subnet belongs to. readOnly: true items: maxLength: 128 type: string example: string virtualSwitchReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the virtual switch this subnet belongs to (type VLAN only). example: 210ec6ee-b615-447c-b856-173c7be92336 vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of Virtual Private Cloud this subnet belongs to (type Overlay only). example: 7cbb9bf4-a6eb-4ae5-bf9e-56177b9e7180 isNatEnabled: type: boolean description: Indicates whether NAT must be enabled for VPCs attached to the subnet. This is supported only for external subnets. NAT is enabled by default on external subnets. example: false isExternal: type: boolean description: Indicates whether the subnet is used for external connectivity. example: false reservedIpAddresses: maxItems: 255 minItems: 0 type: array description: List of IPs that are excluded while allocating IP addresses to VM ports. readOnly: true items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' dynamicIpAddresses: maxItems: 255 minItems: 0 type: array description: "List of IPs, which are a subset from the reserved IP address\ \ list, that must be advertised to the SDN gateway." readOnly: true items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' networkFunctionChainReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the Network function chain entity that this subnet belongs to (type VLAN only). example: 460b811b-e3ae-4675-905c-d438052b78bb bridgeName: maxLength: 128 type: string description: Name of the bridge on the host for the subnet. example: br0 isAdvancedNetworking: type: boolean description: Indicates whether the subnet is used for advanced networking. example: true clusterName: maxLength: 128 type: string description: Cluster Name example: cluster1 hypervisorType: type: string description: Hypervisor Type example: acropolis virtualSwitch: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' vpc: $ref: '#/components/schemas/networking.v4.3.config.Vpc' layer2StretchReference: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' ipPrefix: type: string description: IP Prefix in CIDR format. example: 255.255.255.0 ipUsage: $ref: '#/components/schemas/networking.v4.3.config.IPUsage' migrationState: $ref: '#/components/schemas/networking.v4.3.config.MigrationState' externalDhcpServers: maxItems: 1 minItems: 0 type: array description: List of External DHCP servers used by this subnet. items: $ref: '#/components/schemas/networking.v4.3.config.ExternalDhcpServer' additionalProperties: false networking.v4.3.config.AssociationStatus: type: string description: Association status of floating IP. enum: - NOT_ASSOCIATED - ASSOCIATED_TO_PRIVATE_IP - ASSOCIATED_TO_VNIC - ASSOCIATED_TO_LOAD_BALANCER_SESSION - $UNKNOWN - $REDACTED x-enumDescriptions: ASSOCIATED_TO_PRIVATE_IP: Associated to a Private IP. NOT_ASSOCIATED: Not associated. ASSOCIATED_TO_LOAD_BALANCER_SESSION: Associated to a Load balancer session. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. ASSOCIATED_TO_VNIC: Associated to a VM NIC. networking.v4.3.config.VmNic: type: object properties: privateIp: type: string description: Private IP value in string readOnly: true example: string additionalProperties: false description: Virtal NIC for projections. networking.v4.3.config.FloatingIPv4Address: type: object properties: value: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: Prefix of the network to which this host IPv4 address belongs. example: 200.88.216.126 prefixLength: maximum: 32 minimum: 0 type: integer description: Prefix length of the network to which this host IPv4 address belongs. format: int32 default: 32 additionalProperties: false description: IPv4 address. networking.v4.3.config.FloatingIPv6Address: type: object properties: value: pattern: "^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\ .){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\ .){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$" type: string description: Prefix of the network to which this host IPv6 address belongs. example: 0ba4:eaeb:6ec9:eaaf:1620:733c:7320:0f0c prefixLength: maximum: 128 minimum: 0 type: integer description: Prefix length of the network to which this host IPv6 address belongs. format: int32 default: 128 additionalProperties: false description: IPv6 address. networking.v4.3.config.SubnetType: type: string description: Type of subnet. enum: - OVERLAY - VLAN - $UNKNOWN - $REDACTED x-enumDescriptions: VLAN: VLAN subnet. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. OVERLAY: Overlay subnet of a VPC. networking.v4.3.config.DhcpOptions: type: object properties: domainNameServers: maxItems: 32 minItems: 0 type: array description: List of Domain Name Server addresses (option 6). items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' domainName: maxLength: 255 pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: The DNS domain name of the client (option 15). example: string searchDomains: maxItems: 32 minItems: 0 type: array description: The DNS domain search list (option 119). items: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string example: string tftpServerName: maxLength: 255 type: string description: TFTP server name (option 66). example: abc.example.com bootFileName: maxLength: 1000 type: string description: Boot file name (option 67). example: boot.cfg ntpServers: maxItems: 32 minItems: 0 type: array description: List of NTP server addresses (option 42). items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: List of DHCP options to be configured. networking.v4.3.config.IPConfig: type: object properties: ipv4: $ref: '#/components/schemas/networking.v4.3.config.IPv4Config' ipv6: $ref: '#/components/schemas/networking.v4.3.config.IPv6Config' additionalProperties: false description: IP configuration. networking.v4.3.config.VirtualSwitch: title: Virtual Switch configuration description: Schema to configure a virtual switch allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - bondMode - clusters - name type: object properties: name: maxLength: 128 type: string description: User-visible Virtual Switch name example: vs0 description: maxLength: 1000 type: string description: Input body to configure a Virtual Switch example: Default virtual switch isDefault: type: boolean description: Indicates whether it is a default Virtual Switch which cannot be deleted default: false isQuickMode: type: boolean description: "When true, the node is not put in maintenance mode during\ \ the Virtual Switch update operation. This may briefly interrupt cluster\ \ workloads." writeOnly: true default: false hasDeploymentError: type: boolean description: "When true, virtual switch configuration is not deployed\ \ on every node." readOnly: true example: true mtu: type: integer description: MTU format: int64 default: 1500 bondMode: $ref: '#/components/schemas/networking.v4.3.config.BondModeType' clusters: maxItems: 16 minItems: 1 type: array description: Cluster configuration list items: $ref: '#/components/schemas/networking.v4.3.config.Cluster' igmpSpec: $ref: '#/components/schemas/networking.v4.3.config.IgmpSpec' ownerType: $ref: '#/components/schemas/networking.v4.3.config.OwnerType' hasUpdateInProgress: type: boolean description: Indicates whether the virtual switch's update is being processed readOnly: true example: false hasDeleteInProgress: type: boolean description: Indicates whether the virtual switch's delete is being processed readOnly: true example: false additionalProperties: false networking.v4.3.config.Layer2Stretch: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Layer2 stretch. required: - name type: object properties: name: maxLength: 128 type: string description: Layer2 stretch configuration name. example: subnet-extension-4 description: maxLength: 1000 type: string description: Layer2 stretch configuration details between subnets on two sites. example: Subnet extension description localSiteParams: $ref: '#/components/schemas/networking.v4.3.config.SiteParams' remoteSiteParams: $ref: '#/components/schemas/networking.v4.3.config.SiteParams' connectionType: $ref: '#/components/schemas/networking.v4.3.config.StretchConnectionType' stretchStatus: $ref: '#/components/schemas/networking.v4.3.config.StretchStatus' remoteStretchStatus: maxItems: 10 minItems: 0 type: array readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepStretchStatus' mtu: maximum: 8950 minimum: 500 type: integer description: The MTU size setting for the VXLAN session. example: 1500 vni: maximum: 16777215 minimum: 1 type: integer description: The VXLAN network identifier used to uniquely identify the VXLAN tunnel. example: 111 highAvailabilityStatus: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityStatus' additionalProperties: false description: Configuration to extend a Layer 2 network between two sites. networking.v4.3.config.IPUsage: type: object properties: numMacs: minimum: 0 type: integer description: Number of MAC addresses. format: int64 example: 43 numFreeIPs: minimum: 0 type: integer description: Number of free IPs. format: int64 example: 33 numAssignedIPs: minimum: 0 type: integer description: Number of assigned IPs. format: int64 example: 47 ipPoolUsages: maxItems: 255 minItems: 0 type: array readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.IPPoolUsage' additionalProperties: false description: IP usage statistics.This field is only returned in subnet GET response. networking.v4.3.config.MigrationState: type: string description: Migration state of the subnet. This field is read-only. enum: - IN_PROGRESS - FAILED - COMPLETED - $UNKNOWN - $REDACTED x-enumDescriptions: IN_PROGRESS: Subnet migration is in progress. COMPLETED: Subnet migration successfully completed. FAILED: Subnet migration failed. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.ExternalDhcpServer: type: object properties: externalDhcpServerIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' externalDhcpServerPort: maximum: 65535 minimum: 0 type: integer description: External DHCP server Port used by this subnet. format: uint16 example: 20 additionalProperties: false description: External DHCP server used by this subnet. networking.v4.3.config.IPv4Config: required: - ipSubnet type: object properties: ipSubnet: $ref: '#/components/schemas/networking.v4.3.config.IPv4Subnet' defaultGatewayIp: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' dhcpServerAddress: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' poolList: maxItems: 255 minItems: 0 type: array description: Pool of IP addresses from where IPs are allocated. items: $ref: '#/components/schemas/networking.v4.3.config.IPv4Pool' additionalProperties: false description: IP V4 configuration. networking.v4.3.config.IPv6Config: required: - ipSubnet type: object properties: ipSubnet: $ref: '#/components/schemas/networking.v4.3.config.IPv6Subnet' defaultGatewayIp: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' dhcpServerAddress: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' poolList: maxItems: 255 minItems: 0 type: array description: Pool of IP addresses from where IPs are allocated. items: $ref: '#/components/schemas/networking.v4.3.config.IPv6Pool' additionalProperties: false description: IP V6 configuration. networking.v4.3.config.IPv4Pool: required: - endIp - startIp type: object properties: startIp: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' endIp: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' additionalProperties: false description: Start/end IP address range. networking.v4.3.config.IPv6Pool: required: - endIp - startIp type: object properties: startIp: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' endIp: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' additionalProperties: false description: Start/end IP address range. networking.v4.3.config.BondModeType: title: Bond mode - NIC teaming policy type: string description: The types of bond modes enum: - ACTIVE_BACKUP - BALANCE_SLB - BALANCE_TCP - NONE - $UNKNOWN - $REDACTED x-enumDescriptions: BALANCE_TCP: Bond mode is balance-tcp. BALANCE_SLB: Bond mode is balance-slb. ACTIVE_BACKUP: Bond mode is active-backup. NONE: Uplink bond is not formed. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.Cluster: title: Cluster configuration required: - extId - hosts type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference ExtId for the cluster. This is a required parameter on Prism Element ; and is optional on Prism Central example: b10db4e2-6689-4261-a593-2a2177341071 hosts: maxItems: 64 minItems: 1 type: array description: Host configuration array items: $ref: '#/components/schemas/networking.v4.3.config.Host' gatewayIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' vlanIdentifier: maximum: 4095 minimum: 0 type: integer description: VLAN Identifier for this virtual switch cluster; set to 0 to remove VLAN tagging. format: int16 example: 1 additionalProperties: false description: Input body to configure cluster networking.v4.3.config.IgmpSpec: title: IGMP Snooping Configuration type: object properties: isSnoopingEnabled: type: boolean description: Enable IGMP snooping on this Virtual Switch default: false querierSpec: $ref: '#/components/schemas/networking.v4.3.config.QuerierSpec' snoopingTimeout: type: integer description: IGMP Snooping timeout value in seconds format: int64 default: 300 additionalProperties: false description: Schema to configure IGMP Snooping on Virtual Switch networking.v4.3.config.OwnerType: title: Owner Type type: string description: Owner of DVS enum: - PE - PC - $UNKNOWN - $REDACTED x-enumDescriptions: PC: DVS owner type PC PE: DVS owner type PE $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.Host: title: Host configuration required: - extId type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference to the host example: 1a3b6969-93a4-4662-9e76-91bf665fe422 internalBridgeName: maxLength: 128 type: string description: Internal bridge name as br0 readOnly: true example: br0 hostNics: maxItems: 32 minItems: 0 type: array description: Host NIC array items: type: string example: eth0 ipAddress: $ref: '#/components/schemas/networking.v4.3.config.IPv4Subnet' routeTable: type: integer description: Internal route table number for the routing rules associated with the IP address on this host format: int32 readOnly: true example: 32 activeUplink: type: string description: Host active uplink interface example: eth0 additionalProperties: false description: Input body to configure hosts networking.v4.3.config.QuerierSpec: title: Querier Spec Configuration for IGMP type: object properties: isQuerierEnabled: type: boolean description: Enable IGMP querier on this Virtual Switch default: false vlanIdList: maxItems: 32 minItems: 0 type: array description: VLAN Id list on which IGMP queries must be sent items: maximum: 4095 minimum: 0 type: integer format: int32 example: 1 additionalProperties: false description: Schema to configure Querier for Virtual Switch networking.v4.3.config.SiteParams: type: object properties: pcClusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Prism Central cluster reference. example: 39e87309-4b7d-4225-a167-22702d00c280 stretchSubnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Subnet reference. example: 9aeefc8d-6f29-42b0-a96f-d0e3923fbba6 connectionReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The VPN connection or network gateway with VTEP service used for this Layer2 stretch. example: 606e63c5-d65d-493d-9f29-115abeee070b stretchInterfaceIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' vpnInterfaceIPAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' defaultGatewayIPAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' highAvailabilityGroup: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityGroup' additionalProperties: false description: Site-specific stretch configuration parameters. networking.v4.3.config.StretchConnectionType: type: string description: Type of the connection used for stretching the subnet. The default is VPN. enum: - VPN - VXLAN - $UNKNOWN - $REDACTED x-enumDescriptions: VXLAN: VXLAN connection is used for stretching the subnet. VPN: VPN connection is used for stretching the subnet. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.StretchStatus: title: Layer2 stretch status. type: object properties: detail: type: string description: Detailed text describing the runtime status of this stretch configuration. example: VxLAN tunnel is down tunnelState: $ref: '#/components/schemas/networking.v4.3.config.State' interfaceState: $ref: '#/components/schemas/networking.v4.3.config.State' roundTripTimeMillis: type: number description: "The round-trip time, in milliseconds, between subnets in this\ \ stretch configuration." format: float example: 123.45 additionalProperties: false description: Current status of the Layer2 extension among subnets. networking.v4.3.config.RemoteVtepStretchStatus: title: Status of VTEPs. type: object properties: address: $ref: '#/components/schemas/common.v1.0.config.IPAddress' status: $ref: '#/components/schemas/networking.v4.3.config.StretchStatus' highAvailabilityStatus: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityStatus' additionalProperties: false description: Status of each VTEP. Applicable only when connectionType is VXLAN. networking.v4.3.config.HighAvailabilityStatus: type: object properties: state: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityState' errorDetails: type: string description: Detailed text describing the most recent configuration failure. example: string additionalProperties: false description: Status of the connection being serviced by the high-availability group networking.v4.3.config.HighAvailabilityState: type: string description: State of the connection being serviced by the high-availability group. enum: - NORMAL - FAILOVER_IN_PROGRESS - FAILOVER_FAILED - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. FAILOVER_IN_PROGRESS: Layer2 Stretch connection is undergoing a failover to restore the datapath. NORMAL: Layer2 Stretch connection is in a normal state. FAILOVER_FAILED: Layer2 Stretch connection was unable to restore the datapath after attempting a failover. $REDACTED: | Redacted value. networking.v4.3.config.IPPoolUsage: type: object properties: numFreeIPs: minimum: 0 type: integer description: Number of free IPs. format: int64 example: 26 numTotalIPs: minimum: 0 type: integer description: Total number of IPs in this pool. format: int64 example: 82 range: $ref: '#/components/schemas/networking.v4.3.config.IPv4Pool' additionalProperties: false description: IP pool Usage. networking.v4.3.config.GetFloatingIpApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.FloatingIp oneOf: - $ref: '#/components/schemas/networking.v4.3.config.FloatingIp' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/floating-ips/{extId}\ \ Get operation" networking.v4.3.config.ListIPFIXExportersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters Get operation networking.v4.3.config.IPFIXExporter: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: IPFIX Exporter object. required: - collectorIp - collectorPort - exportScopes - name - protocol type: object properties: name: maxLength: 128 type: string description: Name of the IPFIX Exporter. example: LB-stats-exporter collectorIp: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: The IP address of the IPFIX collector. example: 113.16.83.49 protocol: $ref: '#/components/schemas/networking.v4.3.config.ExporterProtocol' collectorPort: type: integer description: The port number of the IPFIX collector. format: int64 example: 19 exportRateLimitPerNodeBps: type: integer description: The maximum export rate in bits per second(bps) at which the exporter should try to export data. format: int64 example: 99 exportScopes: maxItems: 64 minItems: 1 type: array description: List of IPFIX exporter scopes. items: $ref: '#/components/schemas/networking.v4.3.config.ExportScope' description: type: string description: IPFIX exporter description. example: IPFIX exporter description additionalProperties: false description: API Schema for IPFIX Exporter. networking.v4.3.config.ExporterProtocol: title: IPFIX Exporter Protocol. type: string description: IPFIX exporter protocol:the permissible values are TCP or UDP. enum: - TCP - UDP - TLS_TCP - $UNKNOWN - $REDACTED x-enumDescriptions: TCP: Transmission Control Protocol UDP: User Datagram Protocol TLS_TCP: TLS over TCP is used to export IPFIX messages. Only supported for internal collectors. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.ExportScope: title: IPFIX Exporter Scope. type: object properties: uuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the PE or PC cluster. example: f43bca72-a05d-4e4b-887f-8de61bb1de16 scopeType: $ref: '#/components/schemas/networking.v4.3.config.ScopeType' ipFamily: $ref: '#/components/schemas/networking.v4.3.config.IpFamily' additionalProperties: false description: Contains the UUID and scope type information for a particular export scope. networking.v4.3.config.ScopeType: title: DoctRef(ScopeTypeTitle) type: string description: Scope type:the permissible values are PC or PE. enum: - PC - PE - $UNKNOWN - $REDACTED x-enumDescriptions: PC: UUID of ExportScope refers to a Prism Central. PE: UUID of ExportScope refers to a Prism Element. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.IpFamily: title: IPFIX Exporter IP Family. type: string description: "IPFIX exporter IP family:the permissible values are V4, V6 and\ \ BOTH." enum: - V4 - V6 - BOTH - $UNKNOWN - $REDACTED x-enumDescriptions: V6: Supports only IPv6 family. $UNKNOWN: | Unknown value. V4: Supports only IPv4 family. BOTH: Supports both IPv4 and IPv6 families. $REDACTED: | Redacted value. networking.v4.3.config.GetIPFIXExporterApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.IPFIXExporter oneOf: - $ref: '#/components/schemas/networking.v4.3.config.IPFIXExporter' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/ipfix-exporters/{extId}\ \ Get operation" networking.v4.3.config.ListLayer2StretchesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/layer2-stretches Get operation networking.v4.3.config.GetLayer2StretchApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.Layer2Stretch oneOf: - $ref: '#/components/schemas/networking.v4.3.config.Layer2Stretch' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{extId}\ \ Get operation" networking.v4.3.config.ListLearnedMacAddressesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.LearnedMacAddress' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses\ \ Get operation" networking.v4.3.config.LearnedMacAddress: title: Layer2 Stretch MAC address. description: Layer2 Stretch MAC address properties. allOf: - $ref: '#/components/schemas/networking.v4.3.config.MacAddress' - type: object properties: remoteGatewayReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: A reference to the associated remote VTEP Gateway. example: c682f494-f6e7-44c7-a50f-5aebc483b33a vtepIPAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false networking.v4.3.config.MacAddress: title: MAC address. description: MAC address. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: value: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Hexadecimal representation of this MAC address. example: d5:55:8f:50:29:73 macType: $ref: '#/components/schemas/networking.v4.3.config.MacType' additionalProperties: false networking.v4.3.config.MacType: type: string description: MAC address type. enum: - LEARNED - AUTO_ASSIGNED - USER_ASSIGNED - $UNKNOWN - $REDACTED x-enumDescriptions: LEARNED: "MAC address learned through a Layer2Stretch (i.e. ARP broadcasts,\ \ manual configuration)." USER_ASSIGNED: MAC address that the user assigned. AUTO_ASSIGNED: MAC address that the system automatically assigned. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.GetLearnedMacAddressApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.LearnedMacAddress oneOf: - $ref: '#/components/schemas/networking.v4.3.config.LearnedMacAddress' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/layer2-stretches/{layer2StretchExtId}/learned-mac-addresses/{extId}\ \ Get operation" networking.v4.3.config.ListLoadBalancerSessionsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions Get operation networking.v4.3.config.LoadBalancerSession: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: load balancer session object. required: - description - healthCheckConfig - listener - name - targetsConfig - vpcReference type: object properties: name: maxLength: 128 type: string description: Name of the load balancer session. example: tcp-load-balancer-session description: maxLength: 1000 type: string description: Description of the load balancer session. example: TCP Load Balancer Session type: $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSessionType' vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the Virtual Private Cloud this load balancer session belongs to. example: 0c81204f-0228-4074-9a33-87b9f344ec65 listener: $ref: '#/components/schemas/networking.v4.3.config.Listener' algorithm: $ref: '#/components/schemas/networking.v4.3.config.Algorithm' targetsConfig: $ref: '#/components/schemas/networking.v4.3.config.Target' healthCheckConfig: $ref: '#/components/schemas/networking.v4.3.config.HealthCheck' additionalProperties: false description: API schema for load balancer session. networking.v4.3.config.LoadBalancerSessionType: type: string description: Type of load balancer session enum: - NETWORK_LOAD_BALANCER - $UNKNOWN - $REDACTED x-enumDescriptions: NETWORK_LOAD_BALANCER: Network (layer-4) load balancer session. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.Listener: required: - portRanges - protocol - virtualIP type: object properties: virtualIP: $ref: '#/components/schemas/networking.v4.3.config.VirtualIP' protocol: $ref: '#/components/schemas/networking.v4.3.config.Protocol' portRanges: maxItems: 10 minItems: 0 type: array description: Doc(LoadBalancerSessionPortRange) items: $ref: '#/components/schemas/networking.v4.3.config.PortRange' additionalProperties: false description: Listener configuration for the load balancer session. networking.v4.3.config.Algorithm: type: string description: Load balancing algorithm configured for the session. enum: - FIVE_TUPLE_HASH - $UNKNOWN - $REDACTED x-enumDescriptions: FIVE_TUPLE_HASH: | Five Tuple hash algorithm for load balancing. Hash is calculated based on source IP address, destination IP address, source TCP/UDP port, destination TCP/UDP port and protocol fields of the packet. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.Target: type: object properties: nicTargets: maxItems: 32 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.NicTarget' categoryTargets: maxItems: 32 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.CategoryTarget' additionalProperties: false description: Target configuration for the load balancer session. networking.v4.3.config.HealthCheck: type: object properties: intervalSecs: maximum: 65535 minimum: 1 type: integer description: "The interval, in seconds, between health checks." format: uint16 default: 5 timeoutSecs: maximum: 65535 minimum: 1 type: integer description: "The time, in seconds, after which a health check times out." format: uint16 default: 2 successThreshold: maximum: 64 minimum: 1 type: integer description: The number of successful checks after which the target is considered healthy. format: uint16 default: 3 failureThreshold: maximum: 64 minimum: 1 type: integer description: The number of failure checks after which the target is considered unhealthy. format: uint16 default: 3 additionalProperties: false description: Health check configuration for the load balancer session. networking.v4.3.config.VirtualIP: required: - assignmentType - subnetReference type: object properties: subnetReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the subnet from which virtual IP address is allocated. example: 3d9aba4d-c862-44ee-81ee-5d5db950d257 assignmentType: $ref: '#/components/schemas/networking.v4.3.config.AssignmentType' ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Virtual IP configuration for the load balancer session listener. networking.v4.3.config.Protocol: type: string description: L3/L4 protocol. enum: - TCP - UDP - $UNKNOWN - $REDACTED x-enumDescriptions: TCP: Transmission Control Protocol UDP: User Datagram Protocol $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.PortRange: required: - endPort - startPort type: object properties: startPort: maximum: 65535 minimum: 0 type: integer description: Start port of TCP/UDP port range. format: uint16 example: 80 endPort: maximum: 65535 minimum: 0 type: integer description: End port of TCP/UDP port range. format: uint16 example: 443 additionalProperties: false description: Range of TCP/UDP ports. networking.v4.3.config.AssignmentType: type: string description: Assignment method for load balancer Virtual IP. enum: - DYNAMIC - STATIC - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. STATIC: Virtual IP is statically assigned by the user. $REDACTED: | Redacted value. DYNAMIC: Virtual IP is dynamically assigned by the system. networking.v4.3.config.NicTarget: type: object properties: virtualNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the virtual NIC of the load balancer session target. example: ab548f13-a1d3-47e2-8345-859c7c91dee8 port: maximum: 65535 minimum: 1 type: integer description: port value of the load balancer session target. format: uint16 example: 31 vmReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the VM of the load balancer session target. readOnly: true example: e034d13c-bfec-4311-b49b-66aa1fe17174 health: $ref: '#/components/schemas/networking.v4.3.config.TargetHealth' additionalProperties: false description: Targets that are associated with the load balancer using virtual NIC. networking.v4.3.config.CategoryTarget: required: - matchAll - port type: object properties: matchAll: maxItems: 1 minItems: 1 type: array items: $ref: '#/components/schemas/networking.v4.3.config.CategoryVnicSelector' port: maximum: 65535 minimum: 1 type: integer description: port value of the load balancer session target. format: uint16 example: 73 nics: maxItems: 32 minItems: 0 type: array description: | Details of the load balancer target's virtual NIC(s), including their Ext ID, port and health status, which are configured as load balancer targets derived through configured category targets. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.NicTarget' additionalProperties: false description: | Targets that are defined by categories for the load balancer, which are eventually resolved to virtual NIC(s). networking.v4.3.config.TargetHealth: type: string description: Health status of the load balancer session target. enum: - HEALTHY - UNHEALTHY - $UNKNOWN - $REDACTED x-enumDescriptions: HEALTHY: Load balancer target is healthy. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. UNHEALTHY: Load balancer target is unhealthy. networking.v4.3.config.CategoryVnicSelector: type: object properties: scope: $ref: '#/components/schemas/networking.v4.3.config.CategoryScope' extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External ID of the category. example: a577debc-9b0d-44e0-a07d-61784d3089a9 additionalProperties: false description: | Specifies a category and its scope used to select virtual NIC(s) for the load balancer session. networking.v4.3.config.CategoryScope: type: string description: | The scope of the category. The scope of the category will be used to filter out the type of entities that will be derived from the category to determine the final load balancer virutal NIC targets. enum: - VM - $UNKNOWN - $REDACTED x-enumDescriptions: VM: | All VM(s) associated with the load balancer session's category are used to determine the load balancer session's targets $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.GetLoadBalancerSessionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.LoadBalancerSession oneOf: - $ref: '#/components/schemas/networking.v4.3.config.LoadBalancerSession' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/load-balancer-sessions/{extId}\ \ Get operation" networking.v4.3.config.NetworkCloudConfig: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Network cloud configuration. type: object properties: azureConfig: $ref: '#/components/schemas/networking.v4.3.config.AzureConfig' awsConfig: $ref: '#/components/schemas/networking.v4.3.config.AwsConfig' gcpConfig: $ref: '#/components/schemas/networking.v4.3.config.GcpConfig' additionalProperties: false description: Network Cloud configuration. networking.v4.3.config.AzureConfig: required: - externalSubnetConfigList type: object properties: externalSubnetConfigList: maxItems: 1 minItems: 1 type: array description: The external subnet configuration list for the Azure cloud. items: $ref: '#/components/schemas/networking.v4.3.config.AzureExternalSubnetConfig' externalRoutingDomainUuidList: maxItems: 1 minItems: 1 type: array description: External routing domain UUID list. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: bb082b13-30f3-456b-ad33-81d96eb5a4fa bgpInfo: $ref: '#/components/schemas/networking.v4.3.config.BgpInfo' isScaleOut: type: boolean description: True if flow gateway scale out is supported. default: false authorizationData: $ref: '#/components/schemas/networking.v4.3.config.AuthorizationData' additionalProperties: false description: Azure configuration. networking.v4.3.config.AwsConfig: required: - externalSubnetConfigList type: object properties: externalSubnetConfigList: maxItems: 1 minItems: 1 type: array description: The AWS external subnet configuration list. items: $ref: '#/components/schemas/networking.v4.3.config.AwsExternalSubnetConfig' additionalProperties: false description: AWS configuration. networking.v4.3.config.GcpConfig: required: - externalSubnetConfigList type: object properties: externalSubnetConfigList: maxItems: 2 minItems: 1 type: array description: The GCP external subnet configuration list. items: $ref: '#/components/schemas/networking.v4.3.config.GcpExternalSubnetConfig' additionalProperties: false description: GCP configuration networking.v4.3.config.AzureExternalSubnetConfig: required: - ipConfig type: object properties: ipConfig: $ref: '#/components/schemas/networking.v4.3.config.IPConfig' gatewayMacAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Gateway MAC address of the external subnet. example: f2:8c:d9:41:7e:de publicIpMappingList: maxItems: 250 minItems: 0 type: array description: List of mappings of private IP (SNAT or floating IP) to public IP. items: $ref: '#/components/schemas/networking.v4.3.config.PublicIpMapping' additionalProperties: false description: The external subnet configuration for the Azure cloud. networking.v4.3.config.BgpInfo: required: - localBgpGatewayList - remoteBgpGatewayList type: object properties: localBgpGatewayList: maxItems: 2 minItems: 2 type: array items: $ref: '#/components/schemas/networking.v4.3.config.LocalBgpGateway' remoteBgpGatewayList: maxItems: 2 minItems: 2 type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteBgpGateway' additionalProperties: false description: BGP info needed for flow gateway scale out model. networking.v4.3.config.AuthorizationData: required: - subscriptionId - token type: object properties: clientId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Client Id. example: bd2aa9a5-93df-4261-9814-41556eee295e tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Tenant Id. example: 08c417ef-2fcd-4ba4-9185-5f08837d5cc1 token: type: string description: Authorization token. example: string expiryTimeSeconds: type: integer description: Expiry time of the authorization token. format: int64 example: 69 subscriptionId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Subscription ID. example: de04618b-f9bc-48d2-aa7d-c04d83d65086 additionalProperties: false description: Authorization data. networking.v4.3.config.PublicIpMapping: required: - privateIp - publicIp type: object properties: privateIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' publicIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false networking.v4.3.config.LocalBgpGateway: required: - asn - vnicIpPrefixLength - vnicList type: object properties: asn: type: integer description: ASN number of the BGP gateway. example: 10 vnicList: maxItems: 4 minItems: 4 type: array items: $ref: '#/components/schemas/networking.v4.3.config.GatewayNic' vnicIpPrefixLength: type: integer description: Prefix length of the VNIC IP addresses of the local BGP gateways. example: 31 additionalProperties: false description: Local BGP gateway info needed for flow gateway scale out model. networking.v4.3.config.RemoteBgpGateway: required: - asn - ipAddress type: object properties: asn: type: integer description: ASN number of the BGP gateway. example: 81 ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Remote BGP gateway info needed for flow gateway scale out model. networking.v4.3.config.GatewayNic: required: - index - ipAddress - macAddress type: object properties: index: type: integer description: Index of the NIC. example: 89 ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: MAC address of the NIC. example: b8:20:ed:5e:8c:2c additionalProperties: false description: Information of the VNICs attached to the local BGP gateways. networking.v4.3.config.AwsExternalSubnetConfig: required: - awsSubnetConfig type: object properties: awsSubnetConfig: $ref: '#/components/schemas/networking.v4.3.config.AwsSubnetConfig' clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Cluster example: e678cabb-630f-40e3-8920-4240d07d5daa additionalProperties: false description: The AWS external subnet configuration. networking.v4.3.config.AwsSubnetConfig: required: - availabilityZone - cidr - gatewayIpAddress - securityGroupReferenceList - subnetReference - vpcReference type: object properties: cidr: type: string description: Subnet CIDR. example: 10.0.0.0/16 gatewayIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' subnetReference: type: string description: AWS subnet Id. example: subnet-0f9f9b6b securityGroupReferenceList: maxItems: 16 minItems: 1 type: array description: The security group ID list. items: type: string example: sg-0f9f9b6b vpcReference: type: string description: VPC example: vpc-0f9f9b6b availabilityZone: maxLength: 64 minLength: 1 type: string description: The cloud subnet availability zone. example: us-west-2a additionalProperties: false description: The AWS subnet configuration. networking.v4.3.config.GcpExternalSubnetConfig: required: - gcpSubnetConfig type: object properties: gcpSubnetConfig: $ref: '#/components/schemas/networking.v4.3.config.GcpSubnetConfig' clusters: maxItems: 2 minItems: 1 type: array description: UUIDs of the Nutanix clusters where the subnet is configured. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f04b1b87-e315-439e-9d26-c9d92b3c0165 additionalProperties: false description: The GCP external subnet configuration. networking.v4.3.config.GcpSubnetConfig: required: - cidr - isNatEnabled type: object properties: cidr: type: string description: Subnet CIDR. example: 10.0.0.0/16 isNatEnabled: type: boolean description: True if NAT is enabled for the external subnet. default: true additionalProperties: false description: The GCP subnet configuration. networking.v4.3.config.ListNetworkControllersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 1 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.NetworkController' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/controllers Get operation networking.v4.3.config.NetworkController: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Network controller type: object properties: controllerStatus: $ref: '#/components/schemas/networking.v4.3.config.ControllerStatus' controllerVersion: type: string description: Network controller software version. readOnly: true example: 5.0.0 minimumAHVVersion: type: string description: Minimum AHV version that this network controller supports. readOnly: true example: "10.0" minimumNOSVersion: type: string description: Minimum NOS version that this network controller supports. readOnly: true example: "7.0" cloudSubstrate: $ref: '#/components/schemas/networking.v4.3.config.CloudSubstrate' defaultVlanStack: $ref: '#/components/schemas/networking.v4.3.config.DefaultVlanStack' vpcGlobalConfig: $ref: '#/components/schemas/networking.v4.3.config.VpcGlobalConfig' additionalProperties: false description: Network controller that provides advanced networking capabilities. networking.v4.3.config.ControllerStatus: title: Network controller status type: string description: Current status of the network controller. enum: - UP - DEGRADED - DOWN - $UNKNOWN - $REDACTED x-enumDescriptions: DOWN: Network controller is down. DEGRADED: Network controller is unhealthy and operating in degraded state. UP: Network controller healthy and status is up. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.CloudSubstrate: title: Network controller cloud substrate type: string description: "Cloud substrate of the network controller, for e.g. Azure." enum: - AZURE - AWS - GCP - $UNKNOWN - $REDACTED x-enumDescriptions: AZURE: Network controller substrate is Azure. GCP: Network controller substrate is GCP. $UNKNOWN: | Unknown value. AWS: Network controller substrate is AWS. $REDACTED: | Redacted value. networking.v4.3.config.DefaultVlanStack: title: Default VLAN Stack type: string description: Default VLAN stack(Legacy or Advanced) to instatiate VLAN-backed subnets on if advanced networking is enabled enum: - ADVANCED - LEGACY - $UNKNOWN - $REDACTED x-enumDescriptions: LEGACY: Legacy networking stack. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. ADVANCED: Advanced networking stack. networking.v4.3.config.VpcGlobalConfig: title: Global configuration for all VPCs. type: object properties: isOverlappingErpsEnabled: type: boolean description: Option to enable or disable overlapping ERPs (External Routable Prefixes) across VPCs. default: false additionalProperties: false description: Global settings for all VPCs within the network controller. networking.v4.3.config.GetNetworkControllerApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.NetworkController oneOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkController' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/controllers/{extId}\ \ Get operation" networking.v4.3.config.ListNetworkFunctionsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/network-functions Get operation networking.v4.3.config.NetworkFunction: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: Network Function object. required: - highAvailabilityMode - name - nicPairs type: object properties: name: maxLength: 128 type: string description: Name of the network function. example: samplenf description: maxLength: 1000 type: string description: Description of the network function. example: Sample network function nicPairs: maxItems: 2 minItems: 1 type: array description: List of all NIC pairs part of this network function. items: $ref: '#/components/schemas/networking.v4.3.config.NicPair' highAvailabilityMode: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityMode' failureHandling: $ref: '#/components/schemas/networking.v4.3.config.FailureHandling' trafficForwardingMode: $ref: '#/components/schemas/networking.v4.3.config.TrafficForwardingMode' dataPlaneHealthCheckConfig: $ref: '#/components/schemas/networking.v4.3.config.DataPlaneHealthCheckConfig' additionalProperties: false description: API schema for network function. networking.v4.3.config.NicPair: required: - ingressNicReference - isEnabled type: object properties: ingressNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of NIC which will be used as ingress NIC. example: 1dfcfe13-c469-412a-b5df-e0de81c9a05e egressNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of NIC which will be used as egress NIC. example: 992ee508-aaa6-4369-9a83-d3638ca12d8e vmReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VM UUID which both ingress/egress NICs are part of. example: 66f58949-ab01-4bdd-9923-6b2b3a15b927 isEnabled: type: boolean description: | Administrative state of the NIC pair. If it's set to False, the NIC pair will not be selected as ACTIVE network function. default: true highAvailabilityState: $ref: '#/components/schemas/networking.v4.3.config.NicHighAvailabilityState' dataPlaneHealthStatus: $ref: '#/components/schemas/networking.v4.3.config.HealthStatus' additionalProperties: false description: List of all NIC pairs part of this network function. networking.v4.3.config.HighAvailabilityMode: type: string description: | High availability configuration used between virtual NIC pairs. Traffic is only redirected to the ACTIVE NIC pair enum: - ACTIVE_PASSIVE - $UNKNOWN - $REDACTED x-enumDescriptions: ACTIVE_PASSIVE: | NIC pair is in ACTIVE_PASSIVE mode. In ACTIVE_PASSIVE mode, one of the NIC pairs will be selected as the ACTIVE network function and all other NIC pairs will be on STANDBY $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.FailureHandling: type: string description: Failure handling behavior when network function is unhealthy. enum: - NO_ACTION - FAIL_CLOSE - FAIL_OPEN - $UNKNOWN - $REDACTED x-enumDescriptions: FAIL_OPEN: "When all the network function VM(s) are down, traffic from sources\ \ can be forwarded directly to the destinations, effectively bypassing the\ \ network function VM." FAIL_CLOSE: "When all the network function VM(s) are down, all traffic from\ \ sources is blocked to prevent it from bypassing the security." $UNKNOWN: | Unknown value. NO_ACTION: "When network function is unhealthy, no action is taken and traffic\ \ is black-holed. This value is deprecated. If it continues to be used,\ \ it will automatically be converted to FAIL_CLOSE." $REDACTED: | Redacted value. networking.v4.3.config.TrafficForwardingMode: type: string description: "Specifies how traffic is sent to the network function VM for processing,\ \ depending on the chosen insertion method." enum: - INLINE - VTAP - $UNKNOWN - $REDACTED x-enumDescriptions: VTAP: "Traffic is passively mirrored to the network function VM for out-of-band\ \ monitoring, without affecting the original traffic flow. The failureHandling\ \ or dataPlaneHealthCheckConfig or egressNicReference inside any of NicPair\ \ is not supported along with this mode. API will fail as part of validation\ \ if passed with VTAP trafficForwardingMode." INLINE: Inline traffic redirection is applied through the network function VM to enable comprehensive inspection and policy enforcement. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.DataPlaneHealthCheckConfig: type: object properties: intervalSecs: maximum: 65535 minimum: 1 type: integer description: "The interval, in seconds, between health checks." format: uint16 default: 5 timeoutSecs: maximum: 65535 minimum: 1 type: integer description: "The time, in seconds, after which a health check times out." format: uint16 default: 1 successThreshold: maximum: 64 minimum: 1 type: integer description: The number of successful checks after which the target is considered healthy. format: uint8 default: 3 failureThreshold: maximum: 64 minimum: 1 type: integer description: The number of failure checks after which the target is considered unhealthy. format: uint8 default: 3 additionalProperties: false description: Data Plane Health check configuration applied for the network function. networking.v4.3.config.NicHighAvailabilityState: type: string description: High Availability status of NIC pair. enum: - ACTIVE - PASSIVE - $UNKNOWN - $REDACTED x-enumDescriptions: PASSIVE: NIC Pair is in standby mode. ACTIVE: NIC Pair is active mode. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.HealthStatus: type: string description: Health status of entity enum: - HEALTHY - UNHEALTHY - $UNKNOWN - $REDACTED x-enumDescriptions: HEALTHY: Entity is healthy $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. UNHEALTHY: Entity is unhealthy networking.v4.3.config.GetNetworkFunctionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.NetworkFunction oneOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkFunction' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/network-functions/{extId}\ \ Get operation" networking.v4.3.config.ListGatewaysApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Gateway' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/gateways Get operation networking.v4.3.config.GetGatewayApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.Gateway oneOf: - $ref: '#/components/schemas/networking.v4.3.config.Gateway' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/gateways/{extId}\ \ Get operation" networking.v4.3.config.ListNicProfilesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.NicProfile' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/nic-profiles Get operation networking.v4.3.config.NicProfile: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: NIC Profile object. required: - capabilityConfig - name - nicFamily type: object properties: name: maxLength: 128 type: string description: Name of the NIC Profile. example: NICProfile1 description: maxLength: 1000 type: string description: Description of the NIC Profile. example: NIC Profile for SRIOV capabilityConfig: $ref: '#/components/schemas/networking.v4.3.config.CapabilityConfig' hostNicReferences: maxItems: 64 minItems: 0 type: array description: List of host NICs references associated with the NIC Profile. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.HostNicReference' nicFamily: maxLength: 256 type: string description: Specification for a specific device family of Host NIC. The given string must be in the format vendor_id:device_id. example: 15b3:a2d6 additionalProperties: false description: API schema for NIC Profile. Which will be used to enable/disable capabilities on the host NICs. networking.v4.3.config.CapabilityConfig: required: - capabilityType type: object properties: capabilityType: $ref: '#/components/schemas/networking.v4.3.config.CapabilityType' additionalProperties: false description: Capability specification of the NIC Profile. Capability will be enabled on the host NICs when associated with the NIC Profile. networking.v4.3.config.HostNicReference: type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the Host Nic. example: 68ced9c3-e6eb-4364-8eff-1b13012ac0e7 numVFs: maximum: 128 minimum: 0 type: integer description: Number of VFs associated with the Host Nic. format: int16 example: 8 associatedVmNicReferences: maxItems: 64 minItems: 0 type: array description: List of VM NICs references associated with the Host Nic. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: dd88f48a-8d1e-4dec-a275-c82498efcdc0 complianceStatus: $ref: '#/components/schemas/networking.v4.3.config.HostNicComplianceStatus' additionalProperties: false description: Host NIC reference associated with the NIC Profile. networking.v4.3.config.CapabilityType: type: string description: Capability type of the NIC Profile. enum: - SRIOV - DP_OFFLOAD - $UNKNOWN - $REDACTED x-enumDescriptions: DP_OFFLOAD: DP-OFFLOAD capability type. SRIOV: SRIOV capability type. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.HostNicComplianceStatus: type: string description: "Provides compliance status for a given Host NIC. A Host NIC is\ \ said to be non-compliant when status field is returned with status other\ \ than success. Virtual Machine's cannot be associated with the Host Nic's\ \ VFs of Nic Profile, which have non-compliant status." enum: - SUCCESS - NIC_NOT_FOUND_ERROR - NIC_PROFILE_NOT_FOUND_ERROR - NIC_PROFILE_MISMATCH_ERROR - INTERNAL_ERROR - $UNKNOWN - $REDACTED x-enumDescriptions: SUCCESS: "Provides compliance status for a given Host NIC. A Host NIC is said\ \ to be non-compliant when status field is returned with status other than\ \ success. Virtual Machine's cannot be associated with the Host Nic's VFs\ \ of Nic Profile, which have non-compliant status." NIC_PROFILE_NOT_FOUND_ERROR: Indicates that the NIC profile reference within the Host NIC reference scope is not found. NIC_PROFILE_MISMATCH_ERROR: Indicates that the Host NIC is already associated with a different NIC profile. NIC_NOT_FOUND_ERROR: "Indicates that the NIC profile is associated with Host\ \ NIC, however the Host NIC is not found." INTERNAL_ERROR: Indicates that an internal issue prevents the given Host NIC from being properly associated with the NIC profile. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.GetNicProfileApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.NicProfile oneOf: - $ref: '#/components/schemas/networking.v4.3.config.NicProfile' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/nic-profiles/{extId}\ \ Get operation" networking.v4.3.config.HostNic: type: object properties: hostNicExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the Host Nic. example: 742210e4-a5fb-45f9-b645-be6be41da27f additionalProperties: false description: Host NIC to associate/disassociate with the NIC Profile. networking.v4.3.config.ListRemoteSubnetsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteSubnet' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets\ \ Get operation" networking.v4.3.config.RemoteSubnet: title: Remote subnet details. description: Information about a subnet from the specified Prism Central cluster. allOf: - $ref: '#/components/schemas/networking.v4.3.config.Subnet' - type: object properties: vpcName: maxLength: 128 type: string description: Name of the VPC associated with the subnet. example: vpc-a additionalProperties: false networking.v4.3.config.GetRemoteSubnetApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.RemoteSubnet oneOf: - $ref: '#/components/schemas/networking.v4.3.config.RemoteSubnet' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-subnets/{extId}\ \ Get operation" networking.v4.3.config.RemoteVpnConnectionListApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteVpnConnection' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections\ \ Get operation" networking.v4.3.config.RemoteVpnConnection: title: Remote VPN connection details. description: Information about a VPN connection from the specified Prism Central cluster. allOf: - $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' - type: object properties: clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference to the remote Prism Element cluster where the remote gateway of the VPN connection is located. example: 70f38c68-51c1-4ed2-b93d-9cc05d04905c clusterName: maxLength: 128 type: string description: Name of the remote Prism Element cluster where the remote gateway of the VPN connection is located. example: vargas vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference to the VPC associated with the VPN connection. example: ca80650b-da16-4446-b1a1-65bf83456ff8 vpcName: maxLength: 128 type: string description: Name of the VPC associated with the VPN connection. example: vpc-a additionalProperties: false networking.v4.3.config.VpnConnection: title: VPN connection description: VPN connection allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - ipsecConfig - localGatewayReference - localGatewayRole - name - remoteGatewayReference type: object properties: name: maxLength: 128 type: string description: VPN connection name example: vpn-connection-1 description: maxLength: 1000 type: string description: VPN connection description example: Example connection description localGatewayReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The local VPN gateway reference example: ac7e516d-68a2-4907-a386-04b38e01be05 remoteGatewayReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The remote VPN gateway reference example: 91569fa5-2873-43b3-ba6e-ae384556ae8d ipsecConfig: $ref: '#/components/schemas/networking.v4.3.config.IpsecConfig' dpdConfig: $ref: '#/components/schemas/networking.v4.3.config.DpdConfig' qosConfig: $ref: '#/components/schemas/networking.v4.3.config.QosConfig' localGatewayRole: $ref: '#/components/schemas/networking.v4.3.config.GatewayRole' dynamicRoutePriority: maximum: 1000 minimum: 10 type: integer description: | Priority assigned to routes received on this connection over eBGP. A higher priority value indicates that the routes are more preferred format: int16 example: 123 advertisedPrefixes: maxItems: 250 minItems: 0 type: array description: IP prefixes advertised to the remote gateway over BGP. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' learnedPrefixes: maxItems: 250 minItems: 0 type: array description: IP prefixes learned from the remote gateway over BGP. readOnly: true items: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' ipsecTunnelStatus: $ref: '#/components/schemas/networking.v4.3.config.Status' ebgpStatus: $ref: '#/components/schemas/networking.v4.3.config.Status' additionalProperties: false networking.v4.3.config.IpsecConfig: title: IPSec Configuration required: - preSharedKey type: object properties: preSharedKey: type: string description: Shared secret for authentication between gateway peers example: string localVtiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' remoteVtiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' localAuthenticationId: type: string description: Local IKE authentication Id used for this connection example: string remoteAuthenticationId: type: string description: IKE authentication Id of the remote peer example: string ikeLifetimeSecs: type: integer description: IKE lifetime (seconds) format: int64 example: 30 ipsecLifetimeSecs: type: integer description: IPSec lifetime (seconds) format: int64 example: 30 espPfsDhGroupNumber: type: integer description: | Diffie-Hellman group value of 14, 19 or 20 to be used for Perfect Forward Secrecy (PFS) format: int16 example: 7 ikeEncryptionAlgorithm: $ref: '#/components/schemas/networking.v4.3.config.EncryptionAlgorithm' ikeAuthenticationAlgorithm: $ref: '#/components/schemas/networking.v4.3.config.AuthenticationAlgorithm' ipsecEncryptionAlgorithm: $ref: '#/components/schemas/networking.v4.3.config.EncryptionAlgorithm' ipsecAuthenticationAlgorithm: $ref: '#/components/schemas/networking.v4.3.config.AuthenticationAlgorithm' additionalProperties: false description: IPSec configuration networking.v4.3.config.DpdConfig: title: DPD configuration type: object properties: operation: $ref: '#/components/schemas/networking.v4.3.config.DpdOperation' intervalSecs: type: integer description: | The amount of time the peer waits for traffic before sending a DPD request format: int64 example: 15 timeoutSecs: type: integer description: | The maximum amount of time to wait for a DPD response before marking the peer as dead format: int64 example: 60 additionalProperties: false description: Dead peer detection configuration for the VPN connection networking.v4.3.config.QosConfig: title: Quality of Service configuration for the site-to-site VPN tunnel type: object properties: ingressLimitMbps: type: integer description: Ingress traffic limit (Mbps) format: int64 example: 64 egressLimitMbps: type: integer description: Egress traffic limit (Mbps) format: int64 example: 12 additionalProperties: false description: Quality of Service configuration for the VPN IPSec tunnel networking.v4.3.config.GatewayRole: title: Local gateway role type: string description: Local gateway role (acceptor or initiator) in the connection enum: - INITIATOR - ACCEPTOR - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. INITIATOR: Gateway role to initiate connection. ACCEPTOR: Gateway role to accept connection. networking.v4.3.config.EncryptionAlgorithm: type: string description: Encryption algorithm. enum: - AES128 - AES256 - TRIPLE_DES - AES256GCM128 - $UNKNOWN - $REDACTED x-enumDescriptions: TRIPLE_DES: Encryption algorithm is triple-des. AES128: Encryption algorithm is aes-128. AES256: Encryption algorithm is aes-256. $UNKNOWN: | Unknown value. AES256GCM128: Encryption algorithm is 256 bit AES-GCM with 128 bit ICV. $REDACTED: | Redacted value. networking.v4.3.config.AuthenticationAlgorithm: type: string description: Authentication algorithm. enum: - MD5 - SHA1 - SHA256 - SHA384 - SHA512 - $UNKNOWN - $REDACTED x-enumDescriptions: SHA256: Authentication algorithm is sha256. SHA1: Authentication algorithm is sha1. SHA384: Authentication algorithm is sha384. $UNKNOWN: | Unknown value. SHA512: Authentication algorithm is sha512. $REDACTED: | Redacted value. MD5: Authentication algorithm is md5. networking.v4.3.config.DpdOperation: type: string description: Operation to be performed on detecting a dead peer. The default is HOLD. enum: - RESTART - CLEAR - HOLD - $UNKNOWN - $REDACTED x-enumDescriptions: RESTART: Attempt to re-negotiate the connection. $UNKNOWN: | Unknown value. CLEAR: Close the connection. HOLD: Queue traffic while waiting for the connection to be re-established. $REDACTED: | Redacted value. networking.v4.3.config.RemoteVpnConnectionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.RemoteVpnConnection oneOf: - $ref: '#/components/schemas/networking.v4.3.config.RemoteVpnConnection' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vpn-connections/{extId}\ \ Get operation" networking.v4.3.config.RemoteVtepGatewayListApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepGateway' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways\ \ Get operation" networking.v4.3.config.RemoteVtepGateway: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: ' VTEP gateway information.' type: object properties: name: maxLength: 128 type: string description: ' VTEP gateway name.' example: vtep-gw isLocal: type: boolean description: "If set to true, the VTEP gateway is local. When set to false,\ \ the VTEP gateway is remote." example: true vxlanPort: maximum: 65535 minimum: 0 type: integer description: VXLAN port. format: int16 example: 4789 clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference to the remote Prism Element cluster that owns the VTEP gateway. example: c65ae2df-fd3d-466c-9fe4-ba8b17756526 clusterName: maxLength: 128 type: string description: Name of the remote Prism Element cluster that owns the VTEP gateway. example: vargas vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference to the VPC associated with the VTEP gateway. example: ba7a7840-b1d7-4e40-999e-ed3513a3a4cb vpcName: maxLength: 128 type: string description: Name of the VPC associated with the VTEP gateway. example: vpc-a isActive: type: boolean description: Indicates whether the gateway can be used to service a subnet extension's datapath. readOnly: true example: true highAvailabilityGroup: $ref: '#/components/schemas/networking.v4.3.config.HighAvailabilityGroup' additionalProperties: false description: Information about a VTEP gateway from the specified Prism Central cluster. networking.v4.3.config.RemoteVtepGatewayApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.RemoteVtepGateway oneOf: - $ref: '#/components/schemas/networking.v4.3.config.RemoteVtepGateway' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/clusters/{clusterExtId}/remote-vtep-gateways/{extId}\ \ Get operation" networking.v4.3.config.ListRouteTablesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.RouteTable' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/route-tables Get operation networking.v4.3.config.RouteTable: title: Route table required: - name description: Route table allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC example: fee6b15e-c4ca-40c1-b5c9-a84c1e750820 externalRoutingDomainReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External routing domain associated with this route table example: 66b7646f-cdd2-48fc-ac90-a58c2337835a additionalProperties: false networking.v4.3.config.GetRouteTableApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.RouteTable oneOf: - $ref: '#/components/schemas/networking.v4.3.config.RouteTable' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{extId}\ \ Get operation" networking.v4.3.config.ListRoutesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Route' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes\ \ Get operation" networking.v4.3.config.Route: title: VPC route. description: Route of the VPC route table. allOf: - $ref: '#/components/schemas/networking.v4.3.config.BaseRoute' - required: - routeType type: object properties: routeTableReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Route table to which this route belongs. example: e20db6e5-3066-4cbf-b1ed-cc99104895c7 vpcReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: VPC to which this route belongs. example: c1640b17-5ff1-4a47-a71b-c1ff075accbd externalRoutingDomainReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External routing domain to which this route belongs. example: 3967f5eb-577f-4c3f-8bb1-046af83109b1 routeType: $ref: '#/components/schemas/networking.v4.3.config.RouteType' isActive: type: boolean description: Indicates whether the route is active in the forwarding plane. readOnly: true example: true priority: type: integer description: Route priority. A higher value implies greater preference is assigned to the route. format: uint16 readOnly: true example: 50 additionalProperties: false networking.v4.3.config.RouteType: type: string description: Type of the VPC route. enum: - DYNAMIC - LOCAL - STATIC - $UNKNOWN - $REDACTED x-enumDescriptions: LOCAL: Local route. $UNKNOWN: | Unknown value. STATIC: Static route. $REDACTED: | Redacted value. DYNAMIC: Dynamic route. networking.v4.3.config.GetRouteApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.Route oneOf: - $ref: '#/components/schemas/networking.v4.3.config.Route' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/route-tables/{routeTableExtId}/routes/{extId}\ \ Get operation" networking.v4.3.config.ListRoutingPoliciesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/routing-policies Get operation networking.v4.3.config.RoutingPolicy: description: Schema to configure a routing policy. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - name - policies - priority - vpcExtId type: object properties: name: maxLength: 128 type: string description: Name of the routing policy. example: RoutingPolicy1 description: maxLength: 1000 type: string description: A description of the routing policy. example: Routing Policy Description priority: maximum: 1000 minimum: 1 type: integer description: Priority of the routing policy. format: int16 example: 70 policies: maxItems: 1 minItems: 1 type: array items: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicyRule' vpcExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: ExtId of the VPC extId to which the routing policy belongs. example: aacf4a91-8d42-484a-811e-b21c9ea110ce vpc: $ref: '#/components/schemas/networking.v4.3.config.VpcName' additionalProperties: false networking.v4.3.config.RoutingPolicyRule: required: - policyAction - policyMatch type: object properties: policyMatch: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicyMatchCondition' policyAction: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicyAction' isBidirectional: type: boolean description: "If True, policies in the reverse direction will be installed\ \ with the same action but source and destination will be swapped." default: false additionalProperties: false description: Policy indicating the match rule and the action. networking.v4.3.config.VpcName: type: object properties: name: maxLength: 128 type: string description: VPC name. example: VPC1 additionalProperties: false description: VPC name for projections. networking.v4.3.config.RoutingPolicyMatchCondition: required: - destination - protocolType - source type: object properties: source: $ref: '#/components/schemas/networking.v4.3.config.AddressTypeObject' destination: $ref: '#/components/schemas/networking.v4.3.config.AddressTypeObject' protocolType: $ref: '#/components/schemas/networking.v4.3.config.ProtocolType' protocolParameters: required: - $objectType properties: $objectType: type: string example: networking.v4.config.LayerFourProtocolObject description: Protocol parameters of the traffic that is exiting/leaving the VPC. oneOf: - $ref: '#/components/schemas/networking.v4.3.config.LayerFourProtocolObject' - $ref: '#/components/schemas/networking.v4.3.config.ICMPObject' - $ref: '#/components/schemas/networking.v4.3.config.ProtocolNumberObject' additionalProperties: false description: Match condition for the traffic that is entering the VPC. networking.v4.3.config.RoutingPolicyAction: required: - actionType type: object properties: actionType: $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicyActionType' rerouteParams: maxItems: 1 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.RerouteParam' nexthopIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: The action to be taken on the traffic matching the routing policy. networking.v4.3.config.AddressTypeObject: required: - addressType type: object properties: addressType: $ref: '#/components/schemas/networking.v4.3.config.AddressType' subnetPrefix: $ref: '#/components/schemas/networking.v4.3.config.IPSubnet' additionalProperties: false description: Address Type like "EXTERNAL" or "ANY". networking.v4.3.config.ProtocolType: type: string description: Routing Policy IP protocol type. enum: - ANY - ICMP - TCP - UDP - PROTOCOL_NUMBER - $UNKNOWN - $REDACTED x-enumDescriptions: TCP: Routing policy protocol type is TCP. UDP: Routing policy protocol type is UDP. PROTOCOL_NUMBER: Specify routing policy L4 protocol number. ANY: Routing policy protocol type is Any. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. ICMP: Routing policy protocol type is ICMP. networking.v4.3.config.LayerFourProtocolObject: type: object properties: sourcePortRanges: maxItems: 20 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.PortRange' destinationPortRanges: maxItems: 20 minItems: 0 type: array items: $ref: '#/components/schemas/networking.v4.3.config.PortRange' additionalProperties: false description: L4 TCP/UDP protocol parameters to be matched in routing policy. networking.v4.3.config.ICMPObject: type: object properties: icmpType: maximum: 255 minimum: 0 type: integer description: ICMP type for the ICMP param to be matched in routing policy. format: uint8 example: 39 icmpCode: maximum: 255 minimum: 0 type: integer description: ICMP code for the ICMP param to be matched in routing policy. format: uint8 example: 73 additionalProperties: false description: ICMP parameters to be matched in routing policy. networking.v4.3.config.ProtocolNumberObject: required: - protocolNumber type: object properties: protocolNumber: maximum: 255 minimum: 0 type: integer description: Routing Policy IP protocol parameter number. format: uint8 example: 86 additionalProperties: false networking.v4.3.config.AddressType: type: string description: Address Type like "EXTERNAL" or "ANY". enum: - ANY - EXTERNAL - SUBNET - $UNKNOWN - $REDACTED x-enumDescriptions: SUBNET: Subnet prefix. EXTERNAL: External address. ANY: Any kind of address. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.RoutingPolicyActionType: type: string description: Routing policy action type. enum: - PERMIT - DENY - REROUTE - FORWARD - $UNKNOWN - $REDACTED x-enumDescriptions: REROUTE: Routing policy action type is reroute and need to specify service IP to which traffic is rerouted. DENY: Routing policy action type is deny/drop. FORWARD: Routing policy action type is forward. $UNKNOWN: | Unknown value. PERMIT: Routing policy action type is permit/allow. $REDACTED: | Redacted value. networking.v4.3.config.RerouteParam: type: object properties: serviceIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' rerouteFallbackAction: $ref: '#/components/schemas/networking.v4.3.config.RerouteFallbackAction' ingressServiceIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' egressServiceIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Parameters for the reroute action which includes the reroute service IP and the fallback action when the service IP is down. networking.v4.3.config.RerouteFallbackAction: type: string description: Type of fallback action in reroute case when service VM is down. default: PASSTHROUGH enum: - $UNKNOWN - $REDACTED - ALLOW - DROP - PASSTHROUGH - NO_ACTION x-enumDescriptions: PASSTHROUGH: "When service vm is down, reroute fallback action is \"passthrough\"\ . Next higher priority matching rule is applied." $UNKNOWN: | Unknown value. NO_ACTION: When service vm is down and reroute fallback action is "NO_ACTION". No action is taken and traffic is black-holed. ALLOW: "When service vm is down, reroute fallback action is \"allowed\"." $REDACTED: | Redacted value. DROP: "When service vm is down, reroute fallback action is \"drop\"." networking.v4.3.config.GetRoutingPolicyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.RoutingPolicy oneOf: - $ref: '#/components/schemas/networking.v4.3.config.RoutingPolicy' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/routing-policies/{extId}\ \ Get operation" networking.v4.3.config.ListSubnetsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Subnet' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/subnets Get operation networking.v4.3.config.GetSubnetApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.Subnet oneOf: - $ref: '#/components/schemas/networking.v4.3.config.Subnet' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{extId}\ \ Get operation" networking.v4.3.config.ListSubnetVnicsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Vnic' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/vnics\ \ Get operation" networking.v4.3.config.Vnic: description: Virtual NIC object. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: learnedIpv4Addresses: maxItems: 16 minItems: 0 type: array description: The learned IPv4 addresses on the virtual NIC. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' assignedIpv4Addresses: maxItems: 16 minItems: 0 type: array description: The assigned IPv4 addresses on the virtual NIC. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' assignedSecondaryIpv4Addresses: maxItems: 16 minItems: 0 type: array description: The assigned secondary IPv4 addresses on the virtual NIC. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: The MAC address assigned to the virtual NIC. example: 7f:7d:a3:77:0b:82 vmReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The VM UUID of the virtual NIC. example: 089fc9b2-e51f-4f6b-a4bc-60c9f2e3f1fb additionalProperties: false networking.v4.3.config.VnicMigrationItemSpec: required: - networkUuid allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: networkUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: NIC network UUID for the destination subnet. example: de640114-6441-4b88-952d-570e69dff4c0 requestedIpAddresses: maxItems: 1 minItems: 0 type: array items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false networking.v4.3.config.VlanSubnetMigrationSpec: required: - subnets type: object properties: subnets: maxItems: 255 minItems: 1 type: array description: VLAN subnet details that need to be migrated. items: $ref: '#/components/schemas/networking.v4.3.config.SubnetInfo' additionalProperties: false description: Schema for VLAN subnet migration. networking.v4.3.config.SubnetInfo: required: - subnetUuid type: object properties: subnetUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the subnet to be migrated. example: a0d9b375-3f79-4e97-8d0f-ef9b779cca47 additionalProperties: false networking.v4.3.config.IpReserveSpec: required: - reserveType type: object properties: count: type: integer description: Number of IP addresses reserved. format: int64 example: 93 startIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipAddresses: maxItems: 255 minItems: 0 type: array description: List of IP addresses to reserve. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' reserveType: $ref: '#/components/schemas/networking.v4.3.config.ReserveType' clientContext: maxLength: 64 minLength: 1 type: string description: Optional context to associate with a reserved IP address. example: reserved_ip_context additionalProperties: false description: Input required to reserve IP addresses on a subnet. networking.v4.3.config.ReserveType: type: string description: Type of IP Address reservation. enum: - IP_ADDRESS_COUNT - IP_ADDRESS_RANGE - IP_ADDRESS_LIST - $UNKNOWN - $REDACTED x-enumDescriptions: IP_ADDRESS_RANGE: Reserve IP address based on the given IP range. IP_ADDRESS_COUNT: Reserve IP address based on the number of IPs specified. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. IP_ADDRESS_LIST: Reserve IP address based on the given IP address list. networking.v4.3.config.IpUnreserveSpec: required: - unreserveType type: object properties: count: type: integer description: Number of IP addresses unreserved. format: int64 example: 68 startIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipAddresses: maxItems: 255 minItems: 0 type: array description: List of IP addresses to unreserve. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' clientContext: maxLength: 64 minLength: 1 type: string description: Optional context to associate with a reserved IP address. example: reserved_ip_context unreserveType: $ref: '#/components/schemas/networking.v4.3.config.UnreserveType' additionalProperties: false description: Input required to unreserve IP addresses on a subnet. networking.v4.3.config.UnreserveType: type: string description: Type of IP Address unreservation. enum: - IP_ADDRESS_LIST - IP_ADDRESS_RANGE - CONTEXT - $UNKNOWN - $REDACTED x-enumDescriptions: IP_ADDRESS_RANGE: Unreserve IP address based on the given IP range. $UNKNOWN: | Unknown value. CONTEXT: Unreserve IP address based on the given context. $REDACTED: | Redacted value. IP_ADDRESS_LIST: Unreserve IP address based on the given IP address list. networking.v4.3.config.ListSubnetReservedIpsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.ReservedIp' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/subnets/{subnetExtId}/reserved-ips\ \ Get operation" networking.v4.3.config.ReservedIp: description: Information pertaining to a reserved IP address on a subnet. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: ipv4Address: type: string description: Reserved IPv4 address. example: 10.0.0.1 clientContext: maxLength: 64 minLength: 1 type: string description: Optional context to associate with a reserved IP address. example: reserved_ip_context additionalProperties: false networking.v4.3.config.ListTrafficMirrorsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors Get operation networking.v4.3.config.TrafficMirror: title: Port mirroring session. required: - clusterReferenceList - destinationList - name - sourceList description: | Mirror network traffic from a set of source ports, to a set of destination ports. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Name of the session. example: TM1 description: maxLength: 1000 type: string description: Description of the session. example: TM1 description sourceList: maxItems: 50 minItems: 1 type: array description: List of source ports of the session. Maximum of 4 source ports are allowed per session. Each session should have at least 1 source port. items: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorSourcePort' destinationList: maxItems: 50 minItems: 1 type: array description: List of destination ports of the session. Maximum of 2 destination ports are allowed per session. Each session should have at least 1 destination port. items: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorPort' isEnabled: type: boolean description: Indicates whether the port mirroring session is enabled or not. default: true clusterReferenceList: maxItems: 1 minItems: 1 type: array description: "List of cluster UUIDs that are configured for this session.\ \ Currently, only 1 cluster is allowed to participate in a session." items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 124d40b6-232e-4e35-8525-f5620b4dfc5a hostReferenceList: maxItems: 64 minItems: 1 type: array description: "List of host UUIDs that are configured for this session.\ \ Currently, only 1 host is allowed to participate in a session." items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b833f049-fa94-4cf0-b7e3-cc0267bc8cfc virtualSwitchReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Traffic mirror virtual switch reference to use for Remote SPAN. example: eb12fd6a-795c-4ccf-a2ac-e522ff2dd167 state: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorState' stateMessage: type: string description: Traffic mirror state message. readOnly: true example: string additionalProperties: false networking.v4.3.config.TrafficMirrorSourcePort: title: Traffic mirror session source port configuration. description: Traffic mirror session source port to mirror traffic from. allOf: - $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorPort' - required: - direction type: object properties: direction: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorSourcePortDirection' additionalProperties: false networking.v4.3.config.TrafficMirrorPort: title: Traffic mirror session port configuration. required: - nicType - nicUuid type: object properties: nicType: $ref: '#/components/schemas/networking.v4.3.config.TrafficMirrorPortNicType' nicUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the NIC that this port belongs to. example: bd501781-79bf-42c0-8157-f3312b577579 isUp: type: boolean description: Indicates whether the port is up. readOnly: true example: true additionalProperties: false description: Traffic mirror session port description. networking.v4.3.config.TrafficMirrorState: title: Traffic mirror state title. type: string description: Traffic mirror state value. enum: - ACTIVE - ERROR - DISABLED - $UNKNOWN - $REDACTED x-enumDescriptions: DISABLED: Traffic mirror session is disabled. ACTIVE: Traffic mirror session is active. ERROR: Traffic mirror session is in error status. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.TrafficMirrorSourcePortDirection: title: Traffic mirror session source port direction. type: string description: "Indicates the direction of traffic that the session will mirror.\ \ Allowed values are INGRESS, EGRESS and BIDIRECTIONAL." enum: - INGRESS - EGRESS - BIDIRECTIONAL - $UNKNOWN - $REDACTED x-enumDescriptions: EGRESS: Indicates the outgoing direction of traffic that the session will mirror. INGRESS: Indicates the incoming direction of traffic that the session will mirror. BIDIRECTIONAL: Indicates the bidirectional traffic that the session will mirror. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.TrafficMirrorPortNicType: title: Traffic mirror session port NIC type. type: string description: Port NIC type for the Traffic mirror session. Allowed values are HOST_NIC and VIRTUAL_NIC. enum: - HOST_NIC - VIRTUAL_NIC - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. HOST_NIC: Traffic mirror port is a host NIC. $REDACTED: | Redacted value. VIRTUAL_NIC: Traffic mirror port is a virtual NIC. networking.v4.3.config.GetTrafficMirrorApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.TrafficMirror oneOf: - $ref: '#/components/schemas/networking.v4.3.config.TrafficMirror' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/traffic-mirrors/{extId}\ \ Get operation" networking.v4.3.config.ListUplinkBondsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.UplinkBond' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/uplink-bonds Get operation networking.v4.3.config.UplinkBond: title: Group of host-NICs description: Group host-NICs to function as a singular entity allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: Name of the bond readOnly: true example: string hostNicReferences: maxItems: 10 minItems: 2 type: array description: List of host-NIC UUIDs in this bond readOnly: true items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1c584eb3-b9d6-4c48-b70c-08ff89af93cf type: $ref: '#/components/schemas/networking.v4.3.config.UplinkBondType' lacpStatus: $ref: '#/components/schemas/networking.v4.3.config.UplinkBondLacpStatus' clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of Prism Element cluster that the host belongs to readOnly: true example: d47e0457-59b8-4f7b-a2db-b90964fd2a1e hostReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Host UUID for the bond readOnly: true example: 37240ef4-a610-4c98-87de-9e61a1607868 virtualSwitchInfo: $ref: '#/components/schemas/networking.v4.3.config.UplinkBondVirtualSwitchInfo' additionalProperties: false networking.v4.3.config.UplinkBondType: title: Uplink bond type type: string description: "Type of the bond (active-backup, balance-slb, or balance-tcp)" enum: - ACTIVE_BACKUP - BALANCE_SLB - BALANCE_TCP - $UNKNOWN - $REDACTED x-enumDescriptions: BALANCE_TCP: Uplink bond is configured as balance-tcp mode. BALANCE_SLB: Uplink bond is configured as balance-slb mode. ACTIVE_BACKUP: Uplink bond is configured as active-backup mode. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.UplinkBondLacpStatus: title: Bond LACP status type: string description: "LACP status of the bond (configured, negotiated, or off)" enum: - CONFIGURED - NEGOTIATED - NIL - $UNKNOWN - $REDACTED x-enumDescriptions: NIL: LACP is not configured ("off") for uplink bond. CONFIGURED: Uplink bond LACP is configured. NEGOTIATED: Uplink bond LACP is under negotiation. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.UplinkBondVirtualSwitchInfo: title: Bond virtual Switch info type: object properties: reference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the Virtual Switch this bond is a part of example: 4ac273bb-749e-4f07-aacb-33db2e3a6b7d name: maxLength: 128 type: string description: Name of the Virtual Switch that this bond is a part of example: vs0 additionalProperties: false description: Virtual Switch info associated with bond (if any) networking.v4.3.config.GetUplinkBondApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.UplinkBond oneOf: - $ref: '#/components/schemas/networking.v4.3.config.UplinkBond' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/uplink-bonds/{extId}\ \ Get operation" networking.v4.3.config.ListVirtualSwitchesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 10 type: array items: $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/virtual-switches Get operation networking.v4.3.config.Bridge: title: Configuration of bridge to migrate to a Virtual Switch description: Schema of bridge to migrate to a Virtual Switch allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - required: - existingBridgeName - name type: object properties: name: maxLength: 128 type: string description: Virtual Switch name to migrate to example: vs1 description: maxLength: 1000 type: string description: Input body to migrate to a Virtual Switch example: Internal bridge existingBridgeName: maxLength: 128 type: string description: Name of bridge to convert from example: br1 clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | Prism Element cluster reference. This header can be optionally supplied for Virtual Switch list requests, but is deprecated for all other Virtual Switch fetch/create/update/delete requests. example: 3de02634-2e5a-4f0a-b02e-0170ed2dd134 additionalProperties: false networking.v4.3.config.GetVirtualSwitchApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.VirtualSwitch oneOf: - $ref: '#/components/schemas/networking.v4.3.config.VirtualSwitch' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/virtual-switches/{extId}\ \ Get operation" networking.v4.3.config.ListNodeSchedulableStatusesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.NodeSchedulableStatus' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/node-schedulable-statuses Get operation networking.v4.3.config.NodeSchedulableStatus: title: Check to see whether a node in a cluster is a storage-only node or not required: - isNeverSchedulable description: "Array of node UUIDs and boolean pairs, indicating whether the\ \ nodes are storage-only." allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: isNeverSchedulable: type: boolean description: The boolean value to indicate whether or not node is a storage only node example: true additionalProperties: false networking.v4.3.config.ListVpcsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.Vpc' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpcs Get operation networking.v4.3.config.GetVpcApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.Vpc oneOf: - $ref: '#/components/schemas/networking.v4.3.config.Vpc' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpcs/{extId}\ \ Get operation" networking.v4.3.config.ListVpcVirtualSwitchMappingsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpcVirtualSwitchMapping' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpc-virtual-switch-mappings Get operation networking.v4.3.config.VpcVirtualSwitchMapping: allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - title: VPC virtual switch mappings config. required: - virtualSwitchUuid type: object properties: clusterUuids: maxItems: 16 minItems: 1 type: array description: UUID of the cluster. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 90931c1f-b61a-4c1c-8cff-689e7a8a5c03 virtualSwitchUuid: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the virtual switch. example: 19f16073-0933-46b6-8597-71ef7a13249c isAllTrafficPermitted: type: boolean description: Whether to permit all traffic through virtual switch or only the ICMP and statistics collection requests. example: false additionalProperties: false description: Schema for VPC virtual switch mappings traffic config. networking.v4.3.config.ListVpnConnectionsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/config/vpn-connections Get operation networking.v4.3.config.GetVpnConnectionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.config.VpnConnection oneOf: - $ref: '#/components/schemas/networking.v4.3.config.VpnConnection' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{extId}\ \ Get operation" networking.v4.3.config.ListVpnVendorConfigsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.config.VpnAppliance' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/config/vpn-connections/{vpnConnectionExtId}/vpn-vendor-configs\ \ Get operation" networking.v4.3.config.VpnAppliance: title: VPN appliance. description: Third-party VPN appliance. allOf: - $ref: '#/components/schemas/networking.v4.3.config.NetworkingBaseModel' - type: object properties: name: maxLength: 128 type: string description: VPN appliance name. example: VyOS version: type: string description: VPN appliance version. readOnly: true example: 1.1.8+ additionalProperties: false networking.v4.3.stats.GetLayer2StretchStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.stats.Layer2StretchStats oneOf: - $ref: '#/components/schemas/networking.v4.3.stats.Layer2StretchStats' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/layer2-stretches/{extId}\ \ Get operation" networking.v4.3.stats.Layer2StretchStats: title: Layer2 stretch statistics model description: Layer2 stretch statistics description allOf: - $ref: '#/components/schemas/networking.v4.3.stats.StatsQueryResponseBase' - type: object properties: throughputRxKbps: maxItems: 8500 minItems: 0 type: array description: VPN connection string array of ingress kilobits per second values items: type: string example: string throughputTxKbps: maxItems: 8500 minItems: 0 type: array description: VPN connection string array of egress kilobits per second values items: type: string example: string rtt: maxItems: 8500 minItems: 0 type: array description: Layer2Stretch string array of round-trip-time. items: type: string example: string additionalProperties: false networking.v4.3.stats.StatsQueryResponseBase: title: Stats query response. description: Response of statistics query. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: statType: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' additionalProperties: false common.v1.0.stats.DownSamplingOperator: type: string description: | The operator to use while performing down-sampling on stats data. Allowed values are SUM, MIN, MAX, AVG, COUNT and LAST. enum: - SUM - MIN - MAX - AVG - COUNT - LAST - $UNKNOWN - $REDACTED x-enumDescriptions: AVG: | Aggregation indicating mean or average of all values. MIN: | Aggregation containing lowest of all values. MAX: | Aggregation containing highest of all values. LAST: | Aggregation containing only the last recorded value. SUM: | Aggregation with sum of all values. COUNT: | Aggregation containing total count of values. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. common.v1.0.response.ApiResponseMetadata: type: object properties: flags: maxItems: 20 minItems: 0 type: array description: | An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. items: $ref: '#/components/schemas/common.v1.0.config.Flag' links: maxItems: 20 minItems: 0 type: array description: | An array of HATEOAS style links for the response that may also include pagination links for list operations. items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' totalAvailableResults: type: integer description: | The total number of entities that are available on the server for this type. format: int32 example: 47 messages: maxItems: 20 minItems: 0 type: array description: | Information, Warning or Error messages that might provide additional contextual information related to the operation. items: $ref: '#/components/schemas/common.v1.0.config.Message' extraInfo: maxItems: 20 minItems: 0 type: array description: | An array of entity-specific metadata items: $ref: '#/components/schemas/common.v1.0.config.KVPair' additionalProperties: false description: | The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests. common.v1.0.response.ExternalizableAbstractModel: description: | A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel allOf: - $ref: '#/components/schemas/common.v1.0.config.TenantAwareModel' - type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier of an instance that is suitable for external consumption. nullable: true readOnly: true example: 0079ebc4-467c-48cf-91cb-7e2f2a7b2363 links: maxItems: 20 minItems: 0 type: array description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. readOnly: true items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' additionalProperties: false common.v1.0.config.Flag: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | Name of the flag. example: string value: type: boolean description: | Value of the flag. default: false additionalProperties: false description: | Many entities in the Nutanix APIs carry flags. This object captures all the flags associated with that entity through this object. The field that hosts this type of object must have an attribute called x-bounded-map-keys that tells which flags are actually present for that entity. common.v1.0.response.ApiLink: type: object properties: href: type: string description: | The URL at which the entity described by the link can be accessed. example: string rel: type: string description: | A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of "self" identifies the URL for the object. example: string additionalProperties: false description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. common.v1.0.config.Message: type: object properties: code: type: string description: | A code that uniquely identifies a message. example: string message: type: string description: | The description of the message. example: string locale: type: string description: | The locale for the message description. default: en_US severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' additionalProperties: false common.v1.0.config.KVPair: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | The key of the key-value pair. example: string value: description: The value associated with the key for this key-value pair oneOf: - type: string description: | A string value in a key-value pair. example: string - type: integer description: | An integer value in a key-value pair. example: 19 - type: boolean description: | An boolean value in a key-value pair. example: true - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of strings. items: type: string example: string - type: object additionalProperties: type: string description: | A value in a key-value pair that represents a map of string keys and values. - maxItems: 20 minItems: 0 type: array description: | A value in a key-value pair that represents an array of maps of string keys and values. items: $ref: '#/components/schemas/common.v1.0.config.MapOfStringWrapper' - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of integers. items: type: integer example: 9 additionalProperties: false description: | A map describing a set of keys and their corresponding values. common.v1.0.config.MessageSeverity: type: string description: | The message severity. enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-enumDescriptions: ERROR: | Error indicating failed completion. INFO: | Information about successful completion. $UNKNOWN: | Unknown value. WARNING: | Warning indicating future error. $REDACTED: | Redacted value. common.v1.0.config.MapOfStringWrapper: type: object properties: map: type: object additionalProperties: type: string description: | A map with string keys and values. additionalProperties: false description: | A wrapper schema containing a map with string keys and values. common.v1.0.config.TenantAwareModel: type: object properties: tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server). readOnly: true example: e33d31ca-f8b6-48cc-ac98-015e3fea8e57 additionalProperties: false description: | A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server. networking.v4.3.stats.LoadBalancerSessionStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.stats.LoadBalancerSessionStats oneOf: - $ref: '#/components/schemas/networking.v4.3.stats.LoadBalancerSessionStats' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/load-balancer-sessions/{extId}\ \ Get operation" networking.v4.3.stats.LoadBalancerSessionStats: title: Load balancer session statistics model description: Load balancer session statistics description allOf: - $ref: '#/components/schemas/networking.v4.3.stats.StatsQueryResponseBase' - type: object properties: listenerStats: maxItems: 2 minItems: 0 type: array description: List of listener stats associated with the load balancer session. items: $ref: '#/components/schemas/networking.v4.3.stats.ListenerStats' targetStats: maxItems: 32 minItems: 0 type: array description: List of target stats associated with the load balancer session. items: $ref: '#/components/schemas/networking.v4.3.stats.TargetStats' additionalProperties: false networking.v4.3.stats.ListenerStats: type: object properties: virtualIpAddress: type: string description: Load balancer session listener virtual IP address example: string numBytes: maxItems: 200 minItems: 0 type: array description: String array of number of bytes received. items: type: string example: string numRequests: maxItems: 200 minItems: 0 type: array description: String array of number of packets received. items: type: string example: string numPackets: maxItems: 200 minItems: 0 type: array description: String array of number of requests received. items: type: string example: string additionalProperties: false networking.v4.3.stats.TargetStats: type: object properties: virtualNicReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Load balancer session Target vNIC UUID example: 794cc60a-6d2c-4e77-bc22-92bfefa77081 numBytes: maxItems: 200 minItems: 0 type: array description: String array of number of bytes received. items: type: string example: string numRequests: maxItems: 200 minItems: 0 type: array description: String array of number of packets received. items: type: string example: string numPackets: maxItems: 200 minItems: 0 type: array description: String array of number of requests received. items: type: string example: string additionalProperties: false networking.v4.3.stats.RoutingPolicyClearCountersSpec: required: - vpcExtId type: object properties: vpcExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: ExtId of the VPC extId to which the routing policy belongs. example: e5c531fc-5aac-4ede-be9e-612d0cb4031c routingPolicyExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the policy for which the counters need to be cleared. example: efd1e7a8-36a3-40ea-bd30-9833e008bd40 additionalProperties: false description: VPC UUID to reset all routing policy counters to zero. networking.v4.3.stats.TaskReferenceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/stats/routing-policies/$actions/clear Post operation networking.v4.3.stats.GetTrafficMirrorStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.stats.TrafficMirrorStats oneOf: - $ref: '#/components/schemas/networking.v4.3.stats.TrafficMirrorStats' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/traffic-mirrors/{extId}\ \ Get operation" networking.v4.3.stats.TrafficMirrorStats: title: Traffic mirror stats title. description: Traffic mirror stats description. allOf: - $ref: '#/components/schemas/networking.v4.3.stats.StatsQueryResponseBase' - type: object properties: transmitPacketCount: maxItems: 7000 minItems: 0 type: array description: Traffic mirror number of packets transmitted. items: type: integer format: int64 example: 93 transmitByteCount: maxItems: 7000 minItems: 0 type: array description: Traffic mirror bytes transmitted. items: type: integer format: int64 example: 99 additionalProperties: false networking.v4.3.stats.GetVpcNsStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.stats.VpcNsStats oneOf: - $ref: '#/components/schemas/networking.v4.3.stats.VpcNsStats' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpc/{vpcExtId}/external-subnets/{extId}\ \ Get operation" networking.v4.3.stats.VpcNsStats: title: VPC North-South statistics model description: VPC North-South statistics description allOf: - $ref: '#/components/schemas/networking.v4.3.stats.StatsQueryResponseBase' - type: object properties: northSouthIngressBytesPerSec: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of ingress BPS values items: type: string example: string northSouthEgressBytesPerSec: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of egress BPS values items: type: string example: string northSouthIngressPacketsPerSec: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of ingress PPS values items: type: string example: string northSouthEgressPacketsPerSec: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of egress PPS values items: type: string example: string northSouthIngressBytesAbs: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of ingress absolute bytes values items: type: string example: string northSouthEgressBytesAbs: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of egress absolute bytes values items: type: string example: string northSouthIngressPacketsAbs: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of ingress absolute packets values items: type: string example: string northSouthEgressPacketsAbs: maxItems: 2250 minItems: 0 type: array description: VPC North-South string array of egress absolute packets values items: type: string example: string additionalProperties: false networking.v4.3.stats.GetVpnConnectionStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: networking.v4.stats.VpnConnectionStats oneOf: - $ref: '#/components/schemas/networking.v4.3.stats.VpnConnectionStats' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /networking/v4.3/stats/vpn-connections/{extId}\ \ Get operation" networking.v4.3.stats.VpnConnectionStats: title: VPN connection statistics model description: VPN connection statistics description allOf: - $ref: '#/components/schemas/networking.v4.3.stats.StatsQueryResponseBase' - type: object properties: throughputRxKbps: maxItems: 8500 minItems: 0 type: array description: VPN connection string array of ingress kilobits per second values items: type: string example: string throughputTxKbps: maxItems: 8500 minItems: 0 type: array description: VPN connection string array of egress kilobits per second values items: type: string example: string additionalProperties: false common.v1.0.config.IPAddress: type: object properties: ipv4: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' ipv6: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4 or IPv6 format. common.v1.0.config.Metadata: type: object properties: ownerReferenceId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the owner of this resource. example: dcbec497-6b25-43eb-9e89-02b5fc728a9f ownerUserName: maxLength: 128 type: string description: | The userName of the owner of this resource. example: string projectReferenceId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the project this resource belongs to. example: 2723843a-f694-45cc-b424-b735f8b6d955 projectName: maxLength: 128 type: string description: | The name of the project this resource belongs to. example: string categoryIds: maxItems: 256 minItems: 1 type: array description: | A list of globally unique identifiers that represent all the categories the resource is associated with. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f5ff4d64-b985-498b-9276-040f53ff5df9 additionalProperties: false description: | Metadata associated with this resource. common.v1.0.config.IPv4Address: required: - value type: object properties: value: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: | The IPv4 address of the host. example: 40.204.87.101 prefixLength: maximum: 32 minimum: 0 type: integer description: | The prefix length of the network to which this host IPv4 address belongs. format: int32 default: 32 additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4 format. common.v1.0.config.IPv6Address: required: - value type: object properties: value: pattern: "^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\ .){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\ .){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$" type: string description: | The IPv6 address of the host. example: 7f8b:7a40:8c4e:ea2c:d804:15e9:1d2c:b338 prefixLength: maximum: 128 minimum: 0 type: integer description: | The prefix length of the network to which this host IPv6 address belongs. format: int32 default: 128 additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv6 format. common.v1.0.config.IPAddressOrFQDN: type: object properties: ipv4: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' ipv6: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' fqdn: $ref: '#/components/schemas/common.v1.0.config.FQDN' additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4/IPv6 format or a Fully Qualified Domain Name. common.v1.0.config.KVStringPair: type: object properties: name: maxLength: 128 minLength: 3 type: string description: The key of this key-value string pair example: string value: type: string description: The value associated with the key for this key-value string pair default: "" additionalProperties: false common.v1.0.config.FQDN: type: object properties: value: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: | The fully qualified domain name of the host. example: string additionalProperties: false description: | A fully qualified domain name that specifies its exact location in the tree hierarchy of the Domain Name System. networking.v4.3.config.SharedServiceHealth: title: Health of the shared services. type: object properties: service: $ref: '#/components/schemas/networking.v4.3.config.SharedServiceName' state: $ref: '#/components/schemas/networking.v4.3.config.ControllerStatus' additionalProperties: false description: "Health of the shared services like OVN, Hermes, Mysql and Policydb." networking.v4.3.config.ClusterHealth: title: Health status of PE clusters. type: object properties: clusterName: maxLength: 128 type: string description: Name of PE cluster. example: SampleCluster1 clusterExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of PE cluster. example: 3257996f-c362-49f2-bd4e-d7098b6e99ec connectionStatus: $ref: '#/components/schemas/networking.v4.3.config.ControllerStatus' nodes: maxItems: 32 minItems: 0 type: array description: List of AHV nodes. items: $ref: '#/components/schemas/networking.v4.3.config.NodeHealth' additionalProperties: false description: List of PE clusters. networking.v4.3.config.SharedServiceName: title: Shared Service Name. type: string description: Name of the shared service. enum: - CORE_SERVICE - CONFIGURATION_DATABASE - $UNKNOWN - $REDACTED x-enumDescriptions: CONFIGURATION_DATABASE: Network controller configuration database service. $UNKNOWN: | Unknown value. CORE_SERVICE: Network controller core service(s). $REDACTED: | Redacted value. networking.v4.3.config.NodeHealth: title: AHV node health status. type: object properties: nodeExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Reference of external ID of node. example: d69c314b-cee9-4898-a260-e9f9f55e3882 nodeIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' nodeServices: maxItems: 1 minItems: 0 type: array description: List of networking services running on AHV node. items: $ref: '#/components/schemas/networking.v4.3.config.NodeServiceHealth' additionalProperties: false description: Health status of AHV node. networking.v4.3.config.NodeServiceHealth: title: Networking seivices status on AHV nodes. type: object properties: service: $ref: '#/components/schemas/networking.v4.3.config.NodeServiceName' state: $ref: '#/components/schemas/networking.v4.3.config.ControllerStatus' additionalProperties: false description: Health of networking services running on AHV nodes. networking.v4.3.config.NodeServiceName: title: Node Service Name. type: string description: Name of the service running on AHV node. enum: - CONTROL_PLANE_AGENT - $UNKNOWN - $REDACTED x-enumDescriptions: CONTROL_PLANE_AGENT: Networking control plane agent running on AHV nodes. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. networking.v4.3.config.ProjectReference: required: - projectExtId type: object properties: projectExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of the project that an entity is shared or unshared with. example: 516fb792-4428-4618-9a00-72a094802915 additionalProperties: false description: Reference to project an entity is shared or unshared with. networking.v4.3.error.ErrorResponse: type: object properties: error: oneOf: - type: array items: $ref: '#/components/schemas/networking.v4.3.error.AppMessage' - $ref: '#/components/schemas/networking.v4.3.error.SchemaValidationError' additionalProperties: false description: An error response indicates that the operation has failed either due to a client error(4XX) or server error(5XX). Please look at the HTTP status code and namespace specific error code and error message for further details. x-platform-generated: true networking.v4.3.error.MessageSeverity: type: string description: Enum schema MessageSeverity enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-platform-generated: true x-codegen-hint: $any: - type: entity-identifier properties: identifiers: - value: $UNKNOWN index: 201 - value: $REDACTED index: 202 - value: INFO index: 203 - value: WARNING index: 204 - value: ERROR index: 205 networking.v4.3.error.SchemaValidationError: type: object properties: timestamp: type: string description: Timestamp of the response. format: date-time example: 2009-09-23T14:30:00-07:00 statusCode: type: integer description: The HTTP status code of the response. example: 84 error: type: string description: The generic error message for the response. example: string path: type: string description: API path on which the request was made. example: string validationErrorMessages: type: array description: List of validation error messages items: $ref: '#/components/schemas/networking.v4.3.error.SchemaValidationErrorMessage' additionalProperties: false description: This schema is generated from SchemaValidationError.java x-platform-generated: true networking.v4.3.error.SchemaValidationErrorMessage: type: object properties: location: type: string description: "The part of the request that failed validation. Validation\ \ can fail for path, query parameters, and request body." example: string message: type: string description: The detailed message for the validation error. example: string attributePath: type: string description: The path of the attribute that failed validation in the schema. example: string additionalProperties: false description: This schema is generated from SchemaValidationErrorMessage.java x-platform-generated: true prism.v4.3.config.TaskReference: type: object properties: extId: pattern: "^[a-zA-Z0-9/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" type: string description: A globally unique identifier for a task. example: QmFzZTY0RW5jb2RlZA==:178fc01b-7a6f-4ab4-ac2b-086b05e0db10 additionalProperties: false description: A reference to a task tracking an asynchronous operation. The status of the task can be queried by making a GET request to the task URI provided in the metadata section of the API response. networking.v4.3.aws.config.Capabilities: title: Cloud capabilities object. description: Cloud capabilities schema. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - subnet type: object properties: subnet: $ref: '#/components/schemas/networking.v4.3.aws.config.SubnetCapabilities' additionalProperties: false networking.v4.3.aws.config.SubnetCapabilities: title: AwsSubnet capabilities object. description: AwsSubnet capabilities schema. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: crud: maximum: 24 minimum: 0 type: integer description: "This value defines the create, read, update and delete capabilities\ \ for the resource. It will be a 4-bit integer with the most significant\ \ bit defining delete capability, followed by update and create capability\ \ and finally least significant defining the read capability." format: int32 example: 16 additionalProperties: false networking.v4.3.aws.config.ListAwsSubnetsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 50 type: array items: $ref: '#/components/schemas/networking.v4.3.aws.config.AwsSubnet' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/subnets Get operation networking.v4.3.aws.config.AwsSubnet: title: NC2A subnet model. description: NC2A Subnet in the given VPC. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - availabilityZone - cidr - cloudType - gatewayIp - subnetId - vpcId type: object properties: vpcId: type: string description: ' AWS VPC ID where cluster is deployed.' example: vpc-123abc678 annotation: type: string description: Annotation string for cloud resources. example: string subnetId: type: string description: Cloud subnet Id. example: subnet-123abc678 cidr: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\\ /[0-2]?[0-9]|3[0-2])$" type: string description: Cloud subnet mask. example: 10.192.0.0/24 gatewayIp: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: Cloud subnet gateway IP. example: 10.192.0.1 cloudType: $ref: '#/components/schemas/networking.v4.3.aws.config.CloudType' availabilityZone: type: string description: Availability Zone in which resource is situated. example: us-west-2a additionalProperties: false networking.v4.3.aws.config.CloudType: type: string description: Enum defining different cloud platforms. enum: - AWS - AZURE - $UNKNOWN - $REDACTED x-enumDescriptions: AZURE: Enum for cloud platform Azure $UNKNOWN: | Unknown value. AWS: Enum for cloud platform AWS $REDACTED: | Redacted value. networking.v4.3.aws.config.ListAwsVpcsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 1 minItems: 1 type: array items: $ref: '#/components/schemas/networking.v4.3.aws.config.AwsVpc' - $ref: '#/components/schemas/networking.v4.3.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /networking/v4.3/aws/config/vpcs Get operation networking.v4.3.aws.config.AwsVpc: title: NC2A VPC model. description: NC2 AWS VPC object. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - cidrs - cloudType - vpcId type: object properties: vpcId: type: string description: ' AWS VPC ID where cluster is deployed.' example: vpc-123abc678 annotation: type: string description: Annotation string for cloud resources. example: string cidrs: maxItems: 20 minItems: 1 type: array description: List of subnet cidrs associated with the AWS VPC. items: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\\\ /[0-2]?[0-9]|3[0-2])$" type: string example: 10.0.0.0/16 cloudType: $ref: '#/components/schemas/networking.v4.3.aws.config.CloudType' additionalProperties: false securitySchemes: basicAuthScheme: type: http scheme: basic apiKeyAuthScheme: type: apiKey name: X-ntnx-api-key in: header