Models

LabelApi

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

Method

HTTP request

Description

DatacentersLabelsDelete

Delete /datacenters/{datacenterId}/labels/{key}

Delete a Label from Data Center

DatacentersLabelsFindByKey

Get /datacenters/{datacenterId}/labels/{key}

Retrieve a Label of Data Center

DatacentersLabelsGet

Get /datacenters/{datacenterId}/labels

List all Data Center Labels

DatacentersLabelsPost

Post /datacenters/{datacenterId}/labels

Add a Label to Data Center

DatacentersLabelsPut

Put /datacenters/{datacenterId}/labels/{key}

Modify a Label of Data Center

DatacentersServersLabelsDelete

Delete /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Delete a Label from Server

DatacentersServersLabelsFindByKey

Get /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Retrieve a Label of Server

DatacentersServersLabelsGet

Get /datacenters/{datacenterId}/servers/{serverId}/labels

List all Server Labels

DatacentersServersLabelsPost

Post /datacenters/{datacenterId}/servers/{serverId}/labels

Add a Label to Server

DatacentersServersLabelsPut

Put /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Modify a Label of Server

DatacentersVolumesLabelsDelete

Delete /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Delete a Label from Volume

DatacentersVolumesLabelsFindByKey

Get /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Retrieve a Label of Volume

DatacentersVolumesLabelsGet

Get /datacenters/{datacenterId}/volumes/{volumeId}/labels

List all Volume Labels

DatacentersVolumesLabelsPost

Post /datacenters/{datacenterId}/volumes/{volumeId}/labels

Add a Label to Volume

DatacentersVolumesLabelsPut

Put /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Modify a Label of Volume

IpblocksLabelsDelete

Delete /ipblocks/{ipblockId}/labels/{key}

Delete a Label from IP Block

IpblocksLabelsFindByKey

Get /ipblocks/{ipblockId}/labels/{key}

Retrieve a Label of IP Block

IpblocksLabelsGet

Get /ipblocks/{ipblockId}/labels

List all Ip Block Labels

IpblocksLabelsPost

Post /ipblocks/{ipblockId}/labels

Add a Label to IP Block

IpblocksLabelsPut

Put /ipblocks/{ipblockId}/labels/{key}

Modify a Label of IP Block

LabelsFindByUrn

Get /labels/{labelurn}

Returns the label by its URN.

LabelsGet

Get /labels

List Labels

SnapshotsLabelsDelete

Delete /snapshots/{snapshotId}/labels/{key}

Delete a Label from Snapshot

SnapshotsLabelsFindByKey

Get /snapshots/{snapshotId}/labels/{key}

Retrieve a Label of Snapshot

SnapshotsLabelsGet

Get /snapshots/{snapshotId}/labels

List all Snapshot Labels

SnapshotsLabelsPost

Post /snapshots/{snapshotId}/labels

Add a Label to Snapshot

SnapshotsLabelsPut

Put /snapshots/{snapshotId}/labels/{key}

Modify a Label of Snapshot

DatacentersLabelsDelete

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

Delete a Label from Data Center

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Data Center
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersLabelsDelete(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersLabelsDelete`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Data Center

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersLabelsDeleteRequest 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

DatacentersLabelsFindByKey

var result LabelResource = DatacentersLabelsFindByKey(ctx, datacenterId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Retrieve a Label of Data Center

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Data Center
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersLabelsFindByKey(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersLabelsFindByKey`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Data Center

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersLabelsFindByKeyRequest 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

LabelResource

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersLabelsGet

var result LabelResources = DatacentersLabelsGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()

List all Data Center Labels

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Data Center
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)
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)
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.LabelApi.DatacentersLabelsGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersLabelsGet`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Data Center

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersLabelsGetRequest 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 <code>offset</code> for pagination)

[default to 1000]

Return type

LabelResources

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersLabelsPost

var result LabelResource = DatacentersLabelsPost(ctx, datacenterId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Add a Label to Data Center

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Data Center
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | Label to be added
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.LabelApi.DatacentersLabelsPost(context.Background(), datacenterId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersLabelsPost`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Data Center

Other Parameters

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

Name

Type

Description

Notes

label

LabelResource

Label to be added

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

LabelResource

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

DatacentersLabelsPut

var result LabelResource = DatacentersLabelsPut(ctx, datacenterId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Modify a Label of Data Center

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Data Center
key := "key_example" // string | The key of the Label
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | Modified Label
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.LabelApi.DatacentersLabelsPut(context.Background(), datacenterId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersLabelsPut`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Data Center

key

string

The key of the Label

Other Parameters

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

Name

Type

Description

Notes

label

LabelResource

Modified Label

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

LabelResource

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

DatacentersServersLabelsDelete

var result map[string]interface{} = DatacentersServersLabelsDelete(ctx, datacenterId, serverId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Delete a Label from Server

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
serverId := "serverId_example" // string | The unique ID of the Server
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersServersLabelsDelete(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersServersLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersServersLabelsDelete`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

serverId

string

The unique ID of the Server

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersLabelsDeleteRequest 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

DatacentersServersLabelsFindByKey

var result LabelResource = DatacentersServersLabelsFindByKey(ctx, datacenterId, serverId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Retrieve a Label of Server

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
serverId := "serverId_example" // string | The unique ID of the Server
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersServersLabelsFindByKey(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersServersLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersServersLabelsFindByKey`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

serverId

string

The unique ID of the Server

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersLabelsFindByKeyRequest 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

LabelResource

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersServersLabelsGet

var result LabelResources = DatacentersServersLabelsGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()

List all Server Labels

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
serverId := "serverId_example" // string | The unique ID of the Server
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)
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)
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.LabelApi.DatacentersServersLabelsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersServersLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersServersLabelsGet`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

serverId

string

The unique ID of the Server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersLabelsGetRequest 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 <code>offset</code> for pagination)

[default to 1000]

Return type

LabelResources

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersServersLabelsPost

var result LabelResource = DatacentersServersLabelsPost(ctx, datacenterId, serverId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Add a Label to Server

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
serverId := "serverId_example" // string | The unique ID of the Server
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | Label to be added
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.LabelApi.DatacentersServersLabelsPost(context.Background(), datacenterId, serverId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersServersLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersServersLabelsPost`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

serverId

string

The unique ID of the Server

Other Parameters

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

Name

Type

Description

Notes

label

LabelResource

Label to be added

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

LabelResource

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

DatacentersServersLabelsPut

var result LabelResource = DatacentersServersLabelsPut(ctx, datacenterId, serverId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Modify a Label of Server

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
serverId := "serverId_example" // string | The unique ID of the Server
key := "key_example" // string | The key of the Label
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | Modified Label
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.LabelApi.DatacentersServersLabelsPut(context.Background(), datacenterId, serverId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersServersLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersServersLabelsPut`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

serverId

string

The unique ID of the Server

key

string

The key of the Label

Other Parameters

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

Name

Type

Description

Notes

label

LabelResource

Modified Label

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

LabelResource

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

DatacentersVolumesLabelsDelete

var result map[string]interface{} = DatacentersVolumesLabelsDelete(ctx, datacenterId, volumeId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Delete a Label from Volume

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
volumeId := "volumeId_example" // string | The unique ID of the Volume
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersVolumesLabelsDelete(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersVolumesLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersVolumesLabelsDelete`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

volumeId

string

The unique ID of the Volume

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsDeleteRequest 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

DatacentersVolumesLabelsFindByKey

var result LabelResource = DatacentersVolumesLabelsFindByKey(ctx, datacenterId, volumeId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Retrieve a Label of Volume

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
volumeId := "volumeId_example" // string | The unique ID of the Volume
key := "key_example" // string | The key of the Label
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.LabelApi.DatacentersVolumesLabelsFindByKey(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersVolumesLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersVolumesLabelsFindByKey`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

volumeId

string

The unique ID of the Volume

key

string

The key of the Label

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsFindByKeyRequest 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

LabelResource

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersVolumesLabelsGet

var result LabelResources = DatacentersVolumesLabelsGet(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()

List all Volume Labels

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
volumeId := "volumeId_example" // string | The unique ID of the Volume
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)
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)
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.LabelApi.DatacentersVolumesLabelsGet(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersVolumesLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersVolumesLabelsGet`: %v\n", resp)
}

Path Parameters

Name

Type

Description

Notes

ctx

context.Context

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

datacenterId

string

The unique ID of the Datacenter

volumeId

string

The unique ID of the Volume

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsGetRequest 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 <code>offset</code> for pagination)

[default to 1000]

Return type

LabelResources

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

DatacentersVolumesLabelsPost

var result LabelResource = DatacentersVolumesLabelsPost(ctx, datacenterId, volumeId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()

Add a Label to Volume

Example

package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
volumeId := "volumeId_example" // string | The unique ID of the Volume
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | Label to be added
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.LabelApi.DatacentersVolumesLabelsPost(context.Background(), datacenterId, volumeId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersVolumesLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersVolumesLabelsPost`: %v\n", resp)
}

Path Parameters