arrow-left

All pages
1 of 1

Loading...

IPBlocksApi

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

Method
HTTP request
Description

Delete /ipblocks/{ipblockId}

Delete IP blocks

Get /ipblocks/{ipblockId}

Retrieve IP blocks

hashtag
IpblocksDelete

Delete IP blocks

hashtag
Example

hashtag
Path Parameters

Name
Type
Description
Notes

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

(empty response body)

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
IpblocksFindById

Retrieve IP blocks

hashtag
Example

hashtag
Path Parameters

Name
Type
Description
Notes

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
IpblocksGet

List IP blocks

hashtag
Example

hashtag
Path Parameters

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

hashtag
HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

hashtag
IpblocksPatch

Partially modify IP blocks

hashtag
Example

hashtag
Path Parameters

Name
Type
Description
Notes

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

hashtag
HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

hashtag
IpblocksPost

Reserve a IP Block

hashtag
Example

hashtag
Path Parameters

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

hashtag
HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

hashtag
IpblocksPut

Modify a IP Block by ID

hashtag
Example

hashtag
Path Parameters

Name
Type
Description
Notes

hashtag
Other Parameters

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

Name
Type
Description
Notes

hashtag
Return type

hashtag
HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

offset

int32

The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).

[default to 0]

limit

int32

The maximum number of elements to return (use together with offset for pagination).

[default to 100]

xContractNumber

int32

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

xContractNumber

int32

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

xContractNumber

int32

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Get /ipblocks

List IP blocks

IpblocksPatch

Patch /ipblocks/{ipblockId}

Partially modify IP blocks

IpblocksPost

Post /ipblocks

Reserve a IP Block

IpblocksPut

Put /ipblocks/{ipblockId}

Modify a IP Block by ID

ctx

context.Context

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

ipblockId

string

The unique ID of the IP block.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.

ctx

context.Context

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

ipblockId

string

The unique ID of the IP block.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.

ctx

context.Context

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

ipblockId

string

The unique ID of the IP block.

ipblock

IpBlockProperties

The properties of the IP block to be updated.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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

ipblock

IpBlock

The IP block to be reserved.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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

ctx

context.Context

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

ipblockId

string

The unique ID of the IP block.

ipblock

IpBlock

The modified IP block.

pretty

bool

Controls whether the response is pretty-printed (with indentations and new lines).

[default to true]

depth

int32

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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

IpBlock
IpBlocks
IpBlock
IpBlock
IpBlock
IpblocksDelete
IpblocksFindById
IpblocksGet

[default to 0]

[default to 0]

[default to 0]

var result  = IpblocksDelete(ctx, ipblockId)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resp, err := apiClient.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)
    }
}
var result IpBlock = IpblocksFindById(ctx, ipblockId)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.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)
}
var result IpBlocks = IpblocksGet(ctx)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Offset(offset)
                      .Limit(limit)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
    offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
    limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 100)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.IPBlocksApi.IpblocksGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).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)
}
var result IpBlock = IpblocksPatch(ctx, ipblockId)
                      .Ipblock(ipblock)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
    ipblock := *openapiclient.NewIpBlockProperties("us/las", int32(5)) // IpBlockProperties | The properties of the IP block to be updated.
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.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)
}
var result IpBlock = IpblocksPost(ctx)
                      .Ipblock(ipblock)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The IP block to be reserved.
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.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)
}
var result IpBlock = IpblocksPut(ctx, ipblockId)
                      .Ipblock(ipblock)
                      .Pretty(pretty)
                      .Depth(depth)
                      .XContractNumber(xContractNumber)
                      .Execute()
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)

func main() {
    ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
    ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The modified IP block.
    pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
    depth := int32(56) // int32 | Controls the detail depth of the response objects.  GET /datacenters/[ID]  - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)

    configuration := ionoscloud.NewConfiguration()
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.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)
}