latest
Models
Powered By GitBook
IPBlocksApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
Method
HTTP request
Description
Delete /ipblocks/{ipblockId}
Delete IP Block
Get /ipblocks/{ipblockId}
Retrieve an IP Block
Get /ipblocks
List IP Blocks
Patch /ipblocks/{ipblockId}
Partially modify IP Block
Post /ipblocks
Reserve IP Block
Put /ipblocks/{ipblockId}
Modify IP Block

IpblocksDelete

1
var result map[string]interface{} = IpblocksDelete(ctx, ipblockId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Delete IP Block

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
ipblockId := "ipblockId_example" // string |
12
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
api_client := openapiclient.NewAPIClient(configuration)
18
resp, r, err := api_client.IPBlocksApi.IpblocksDelete(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksDelete``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `IpblocksDelete`: map[string]interface{}
24
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksDelete`: %v\n", resp)
25
}
Copied!

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

1
var result IpBlock = IpblocksFindById(ctx, ipblockId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve an IP Block

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
ipblockId := "ipblockId_example" // string |
12
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
api_client := openapiclient.NewAPIClient(configuration)
18
resp, r, err := api_client.IPBlocksApi.IpblocksFindById(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksFindById``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `IpblocksFindById`: IpBlock
24
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksFindById`: %v\n", resp)
25
}
Copied!

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

1
var result IpBlocks = IpblocksGet(ctx)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Offset(offset)
6
.Limit(limit)
7
.Execute()
Copied!
List IP Blocks

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
12
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)
13
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
14
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
15
limit := int32(56) // int32 | the maximum number of elements to return (use together with offset for pagination) (optional) (default to 100)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.IPBlocksApi.IpblocksGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksGet``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `IpblocksGet`: IpBlocks
25
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksGet`: %v\n", resp)
26
}
Copied!

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
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with offset for pagination)
[default to 100]

Return type

IpBlocks

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

IpblocksPatch

1
var result IpBlock = IpblocksPatch(ctx, ipblockId)
2
.Ipblock(ipblock)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Partially modify IP Block

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
ipblockId := "ipblockId_example" // string |
12
ipblock := *openapiclient.NewIpBlockProperties("us/las", int32(5)) // IpBlockProperties | IP Block to be modified
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.IPBlocksApi.IpblocksPatch(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPatch``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `IpblocksPatch`: IpBlock
25
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPatch`: %v\n", resp)
26
}
Copied!

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
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

1
var result IpBlock = IpblocksPost(ctx)
2
.Ipblock(ipblock)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Reserve IP Block

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | IP Block to be reserved
12
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
api_client := openapiclient.NewAPIClient(configuration)
18
resp, r, err := api_client.IPBlocksApi.IpblocksPost(context.Background()).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPost``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `IpblocksPost`: IpBlock
24
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPost`: %v\n", resp)
25
}
Copied!

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

1
var result IpBlock = IpblocksPut(ctx, ipblockId)
2
.Ipblock(ipblock)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Modify IP Block

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
ipblockId := "ipblockId_example" // string |
12
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | IP Block to be modified
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.IPBlocksApi.IpblocksPut(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPut``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `IpblocksPut`: IpBlock
25
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPut`: %v\n", resp)
26
}
Copied!

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
Last modified 14d ago