Models

IPBlocksApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

Method

HTTP request

Description

IpblocksDelete

Delete /ipblocks/{ipblockId}

Delete IP Block

IpblocksFindById

Get /ipblocks/{ipblockId}

Retrieve an IP Block

IpblocksGet

Get /ipblocks

List IP Blocks

IpblocksPatch

Patch /ipblocks/{ipblockId}

Partially modify IP Block

IpblocksPost

Post /ipblocks

Reserve IP Block

IpblocksPut

Put /ipblocks/{ipblockId}

Modify IP Block

IpblocksDelete

var result map[string]interface{} = IpblocksDelete(ctx, ipblockId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Delete IP Block

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ipblockId := "ipblockId_example" // string |
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksDelete(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksDelete`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

ipblockId

string

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksDeleteRequest struct via the builder pattern

Name

Type

Description

Notes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

map[string]interface{}

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

IpblocksFindById

var result IpBlock = IpblocksFindById(ctx, ipblockId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Retrieve an IP Block

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ipblockId := "ipblockId_example" // string |
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksFindById(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksFindById`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksFindById`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

ipblockId

string

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksFindByIdRequest struct via the builder pattern

Name

Type

Description

Notes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

IpBlock

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

IpblocksGet

var result IpBlocks = IpblocksGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

List IP Blocks

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksGet`: IpBlocks
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksGetRequest struct via the builder pattern

Name

Type

Description

Notes

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

IpBlocks

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

IpblocksPatch

var result IpBlock = IpblocksPatch(ctx, ipblockId)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Partially modify IP Block

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ipblockId := "ipblockId_example" // string |
ipblock := *openapiclient.NewIpBlockProperties("us/las", int32(5)) // IpBlockProperties | IP Block to be modified
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksPatch(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPatch`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPatch`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

ipblockId

string

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksPatchRequest struct via the builder pattern

Name

Type

Description

Notes

ipblock

IpBlockProperties

IP Block to be modified

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

IpBlock

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

IpblocksPost

var result IpBlock = IpblocksPost(ctx)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Reserve IP Block

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | IP Block to be reserved
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksPost(context.Background()).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPost`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksPostRequest struct via the builder pattern

Name

Type

Description

Notes

ipblock

IpBlock

IP Block to be reserved

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

IpBlock

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

IpblocksPut

var result IpBlock = IpblocksPut(ctx, ipblockId)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Modify IP Block

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ipblockId := "ipblockId_example" // string |
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | IP Block to be modified
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.IPBlocksApi.IpblocksPut(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPut`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPut`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

ipblockId

string

Other Parameters

Other parameters are passed through a pointer to a apiIpblocksPutRequest struct via the builder pattern

Name

Type

Description

Notes

ipblock

IpBlock

IP Block to be modified

pretty

bool

Controls whether response is pretty-printed (with indentation and new lines)

[default to true]

depth

int32

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[default to 0]

xContractNumber

int32

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

IpBlock

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json