Skip to content

Latest commit

 

History

History
370 lines (335 loc) · 24.5 KB

README.md

File metadata and controls

370 lines (335 loc) · 24.5 KB

Go API client for IP Address Management API

The IPAM/DHCP Application is a BloxOne DDI service providing IP address management and DHCP protocol features. The IPAM component provides visibility into and provisioning tools to manage networking spaces, monitoring and reporting of entire IP address infrastructures, and integration with DNS and DHCP protocols. The DHCP component provides DHCP protocol configuration service with on-prem host serving DHCP protocol. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v1
  • Generator version: 7.5.0
  • Build package: com.infoblox.codegen.BloxoneGoClientCodegen

Installation

Install the package using go get:

go get github.com/infobloxopen/bloxone-go-client/ipam

Import the package into your code:

import "github.com/infobloxopen/bloxone-go-client/ipam"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

To create a new API client, you can use the NewAPIClient function as shown below

client := ipam.NewAPIClient()

Configuration

The NewAPIClient function accepts a variadic list of option.ClientOption functions that can be used to configure the client. It requires the option package to be imported. You can import the package using:

import "github.com/infobloxopen/bloxone-go-client/option"

Client Name

The client name is used to identify the client in the logs. By default, the client name is set to bloxone-go-client. You can change this using the option.WithClientName option. For example:

client := ipam.NewAPIClient(option.WithClientName("my-client"))

Server URL

The default URL for the Cloud Services Portal is https://csp.infoblox.com. If you need to change this, you can use option.WithCSPUrl to set the URL. For example:

client := ipam.NewAPIClient(option.WithCSPUrl("https://csp.eu.infoblox.com"))

You can also set the URL using the environment variable BLOXONE_CSP_URL

Authorization

An API key is required to access IP Address Management API. You can obtain an API key by following the instructions in the guide for Configuring User API Keys.

To use an API key with IP Address Management API, you can use the option.WithAPIKey option. For example:

client := ipam.NewAPIClient(option.WithAPIKey("YOUR_API_KEY"))

You can also set the API key using the environment variable BLOXONE_API_KEY

Note: The API key is a secret and should be handled securely. Hardcoding the API key in your code is not recommended.

Default Tags

You can set default tags for all API requests using the option.WithDefaultTags option. For example:

client := ipam.NewAPIClient(option.WithDefaultTags(map[string]string{"tag1": "value1", "tag2": "value2"}))

This will add the tags tag1=value1 and tag2=value2 to all API requests that support tags in the request body.

Documentation for API Endpoints

All URIs are relative to http://csp.infoblox.com/api/ddi/v1

Class Method HTTP request Description
AddressAPI Create Post /ipam/address Create the IP address.
AddressAPI Delete Delete /ipam/address/{id} Move the IP address to the recycle bin.
AddressAPI List Get /ipam/address Retrieve IP addresses.
AddressAPI Read Get /ipam/address/{id} Retrieve the IP address.
AddressAPI Update Patch /ipam/address/{id} Update the IP address.
AddressBlockAPI Copy Post /ipam/address_block/{id}/copy Copy the address block.
AddressBlockAPI Create Post /ipam/address_block Create the address block.
AddressBlockAPI CreateNextAvailableAB Post /ipam/address_block/{id}/nextavailableaddressblock Create the Next Available Address Block object.
AddressBlockAPI CreateNextAvailableIP Post /ipam/address_block/{id}/nextavailableip Allocate the next available IP address.
AddressBlockAPI CreateNextAvailableSubnet Post /ipam/address_block/{id}/nextavailablesubnet Create the Next Available Subnet object.
AddressBlockAPI Delete Delete /ipam/address_block/{id} Move the address block to the recycle bin.
AddressBlockAPI List Get /ipam/address_block Retrieve the address blocks.
AddressBlockAPI ListNextAvailableAB Get /ipam/address_block/{id}/nextavailableaddressblock List Next Available Address Block objects.
AddressBlockAPI ListNextAvailableIP Get /ipam/address_block/{id}/nextavailableip Retrieve the next available IP address.
AddressBlockAPI ListNextAvailableSubnet Get /ipam/address_block/{id}/nextavailablesubnet List Next Available Subnet objects.
AddressBlockAPI Read Get /ipam/address_block/{id} Retrieve the address block.
AddressBlockAPI Update Patch /ipam/address_block/{id} Update the address block.
AsmAPI Create Post /ipam/asm Update subnet and ranges for Automated Scope Management.
AsmAPI List Get /ipam/asm Retrieve suggested updates for Automated Scope Management.
AsmAPI Read Get /ipam/asm/{id} Retrieve the suggested update for Automated Scope Management.
DhcpHostAPI List Get /dhcp/host Retrieve DHCP hosts.
DhcpHostAPI ListAssociations Get /dhcp/host/{id}/associations Retrieve DHCP host associations.
DhcpHostAPI Read Get /dhcp/host/{id} Retrieve the DHCP host.
DhcpHostAPI Update Patch /dhcp/host/{id} Update the DHCP hosts.
DnsUsageAPI List Get /ipam/dns_usage Retrieve DNS usage for multiple objects.
DnsUsageAPI Read Get /ipam/dns_usage/{id} Retrieve the DNS usage.
FilterAPI List Get /dhcp/filter Retrieve DHCP filters.
FixedAddressAPI Create Post /dhcp/fixed_address Create the fixed address.
FixedAddressAPI Delete Delete /dhcp/fixed_address/{id} Move the fixed address to the recycle bin.
FixedAddressAPI List Get /dhcp/fixed_address Retrieve fixed addresses.
FixedAddressAPI Read Get /dhcp/fixed_address/{id} Retrieve the fixed address.
FixedAddressAPI Update Patch /dhcp/fixed_address/{id} Update the fixed address.
GlobalAPI Read Get /dhcp/global Retrieve the global configuration.
GlobalAPI ReadById Get /dhcp/global/{id} Retrieve the global configuration.
GlobalAPI Update Patch /dhcp/global Update the global configuration.
GlobalAPI UpdateById Patch /dhcp/global/{id} Update the global configuration.
HaGroupAPI Create Post /dhcp/ha_group Create the HA group.
HaGroupAPI Delete Delete /dhcp/ha_group/{id} Delete the HA group.
HaGroupAPI List Get /dhcp/ha_group Retrieve HA groups.
HaGroupAPI Read Get /dhcp/ha_group/{id} Retrieve the HA group.
HaGroupAPI Update Patch /dhcp/ha_group/{id} Update the HA group.
HardwareFilterAPI Create Post /dhcp/hardware_filter Create the hardware filter.
HardwareFilterAPI Delete Delete /dhcp/hardware_filter/{id} Move the hardware filter to the recycle bin.
HardwareFilterAPI List Get /dhcp/hardware_filter Retrieve hardware filters.
HardwareFilterAPI Read Get /dhcp/hardware_filter/{id} Retrieve the hardware filter.
HardwareFilterAPI Update Patch /dhcp/hardware_filter/{id} Update the hardware filter.
IpSpaceAPI BulkCopy Post /ipam/ip_space/bulk_copy Copy the specified address block and subnets in the IP space.
IpSpaceAPI Copy Post /ipam/ip_space/{id}/copy Copy the IP space.
IpSpaceAPI Create Post /ipam/ip_space Create the IP space.
IpSpaceAPI Delete Delete /ipam/ip_space/{id} Move the IP space to the recycle bin.
IpSpaceAPI List Get /ipam/ip_space Retrieve IP spaces.
IpSpaceAPI Read Get /ipam/ip_space/{id} Retrieve the IP space.
IpSpaceAPI Update Patch /ipam/ip_space/{id} Update the IP space.
IpamHostAPI Create Post /ipam/host Create the IPAM host.
IpamHostAPI Delete Delete /ipam/host/{id} Move the IPAM host to the recycle bin.
IpamHostAPI List Get /ipam/host Retrieve the IPAM hosts.
IpamHostAPI Read Get /ipam/host/{id} Retrieve the IPAM host.
IpamHostAPI Update Patch /ipam/host/{id} Update the IPAM host.
LeasesCommandAPI Create Post /dhcp/leases_command Perform actions like clearing DHCP lease(s).
OptionCodeAPI Create Post /dhcp/option_code Create the DHCP option code.
OptionCodeAPI Delete Delete /dhcp/option_code/{id} Delete the DHCP option code.
OptionCodeAPI List Get /dhcp/option_code Retrieve DHCP option codes.
OptionCodeAPI Read Get /dhcp/option_code/{id} Retrieve the DHCP option code.
OptionCodeAPI Update Patch /dhcp/option_code/{id} Update the DHCP option code.
OptionFilterAPI Create Post /dhcp/option_filter Create the DHCP option filter.
OptionFilterAPI Delete Delete /dhcp/option_filter/{id} Move the DHCP option filter to the recycle bin.
OptionFilterAPI List Get /dhcp/option_filter Retrieve DHCP option filters.
OptionFilterAPI Read Get /dhcp/option_filter/{id} Retrieve the DHCP option filter.
OptionFilterAPI Update Patch /dhcp/option_filter/{id} Update the DHCP option filter.
OptionGroupAPI Create Post /dhcp/option_group Create the DHCP option group.
OptionGroupAPI Delete Delete /dhcp/option_group/{id} Move the DHCP option group to the recycle bin.
OptionGroupAPI List Get /dhcp/option_group Retrieve DHCP option groups.
OptionGroupAPI Read Get /dhcp/option_group/{id} Retrieve the DHCP option group.
OptionGroupAPI Update Patch /dhcp/option_group/{id} Update the DHCP option group.
OptionSpaceAPI Create Post /dhcp/option_space Create the DHCP option space.
OptionSpaceAPI Delete Delete /dhcp/option_space/{id} Move the DHCP option space to the recycle bin.
OptionSpaceAPI List Get /dhcp/option_space Retrieve DHCP option spaces.
OptionSpaceAPI Read Get /dhcp/option_space/{id} Retrieve the DHCP option space.
OptionSpaceAPI Update Patch /dhcp/option_space/{id} Update the DHCP option space.
RangeAPI Create Post /ipam/range Create the range.
RangeAPI CreateNextAvailableIP Post /ipam/range/{id}/nextavailableip Allocate the next available IP address.
RangeAPI Delete Delete /ipam/range/{id} Move the range to the recycle bin.
RangeAPI List Get /ipam/range Retrieve ranges.
RangeAPI ListNextAvailableIP Get /ipam/range/{id}/nextavailableip Retrieve the next available IP address.
RangeAPI Read Get /ipam/range/{id} Retrieve the range.
RangeAPI Update Patch /ipam/range/{id} Update the range.
ServerAPI Create Post /dhcp/server Create the DHCP configuration profile.
ServerAPI Delete Delete /dhcp/server/{id} Move the DHCP configuration profile to the recycle bin.
ServerAPI List Get /dhcp/server Retrieve DHCP configuration profiles.
ServerAPI Read Get /dhcp/server/{id} Retrieve the DHCP configuration profile.
ServerAPI Update Patch /dhcp/server/{id} Update the DHCP configuration profile.
SubnetAPI Copy Post /ipam/subnet/{id}/copy Copy the subnet.
SubnetAPI Create Post /ipam/subnet Create the subnet.
SubnetAPI CreateNextAvailableIP Post /ipam/subnet/{id}/nextavailableip Allocate the next available IP address.
SubnetAPI Delete Delete /ipam/subnet/{id} Move the subnet to the recycle bin.
SubnetAPI List Get /ipam/subnet Retrieve subnets.
SubnetAPI ListNextAvailableIP Get /ipam/subnet/{id}/nextavailableip Retrieve the next available IP address.
SubnetAPI Read Get /ipam/subnet/{id} Retrieve the subnet.
SubnetAPI Update Patch /ipam/subnet/{id} Update the subnet.

Documentation For Models

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime