You can configure BloxOne Threat Defense Cloud to redirect traffic to the Infoblox server that displays the default or customized redirect page. You can redirect traffic to a custom destination using custom redirects.
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
Install the package using go get
:
go get github.com/infobloxopen/bloxone-go-client/redirect
Import the package into your code:
import "github.com/infobloxopen/bloxone-go-client/redirect"
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 := redirect.NewAPIClient()
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"
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 := redirect.NewAPIClient(option.WithClientName("my-client"))
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 := redirect.NewAPIClient(option.WithCSPUrl("https://csp.eu.infoblox.com"))
You can also set the URL using the environment variable BLOXONE_CSP_URL
An API key is required to access BloxOne Redirect 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 BloxOne Redirect API, you can use the option.WithAPIKey
option. For example:
client := redirect.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.
You can set default tags for all API requests using the option.WithDefaultTags
option. For example:
client := redirect.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.
All URIs are relative to https://csp.infoblox.com/api/atcfw/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CertificateAPI | GetProxyCertificates | Get /cert_download_urls | Get Proxy Certificates |
CustomRedirectsAPI | CreateCustomRedirect | Post /custom_redirects | Create Custom Redirect. |
CustomRedirectsAPI | DeleteCustomRedirect | Delete /custom_redirects | Delete Custom Redirect. |
CustomRedirectsAPI | DeleteSingleCustomRedirect | Delete /custom_redirects/{id} | Delete Custom Redirect By Id. |
CustomRedirectsAPI | ListCustomRedirect | Get /custom_redirects | List Custom Redirects. |
CustomRedirectsAPI | ReadCustomRedirect | Get /custom_redirects/{id} | Read Custom Redirect. |
CustomRedirectsAPI | UpdateCustomRedirect | Put /custom_redirects/{id} | Update Custom Redirect. |
RedirectPageAPI | ReadRedirectPage | Get /redirect_page | Read Redirect Page. |
RedirectPageAPI | UpdateRedirectPage | Put /redirect_page | Update Redirect Page. |
- CertificateGetProxyCertificates500Response
- CertificateGetProxyCertificates500ResponseError
- CustomRedirect
- CustomRedirectCreateResponse
- CustomRedirectDeleteRequest
- CustomRedirectMultiResponse
- CustomRedirectReadResponse
- CustomRedirectUpdateResponse
- CustomRedirectsCreateCustomRedirect400Response
- CustomRedirectsCreateCustomRedirect400ResponseError
- CustomRedirectsCreateCustomRedirect409Response
- CustomRedirectsCreateCustomRedirect409ResponseError
- CustomRedirectsDeleteCustomRedirect400Response
- CustomRedirectsDeleteCustomRedirect400ResponseError
- CustomRedirectsDeleteSingleCustomRedirect400Response
- CustomRedirectsDeleteSingleCustomRedirect400ResponseError
- CustomRedirectsReadCustomRedirect404Response
- CustomRedirectsReadCustomRedirect404ResponseError
- CustomRedirectsUpdateCustomRedirect409Response
- CustomRedirectsUpdateCustomRedirect409ResponseError
- ProxyCertResponse
- RedirectPage
- RedirectPageReadResponse
- RedirectPageUpdateRedirectPage400Response
- RedirectPageUpdateRedirectPage400ResponseError
- RedirectPageUpdateResponse
- UpdateRedirectPagePayload
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