var result map[string]interface{} = DatacentersLabelsDelete(ctx, datacenterId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Label from Data Center
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
var result LabelResources= DatacentersLabelsGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute()
List all Data Center Labels
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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)
var result LabelResource= DatacentersLabelsPost(ctx, datacenterId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Add a Label to Data Center
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
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
var result LabelResource= DatacentersLabelsPut(ctx, datacenterId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Modify a Label of Data Center
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
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
var result map[string]interface{} = DatacentersServersLabelsDelete(ctx, datacenterId, serverId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Label from Server
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
var result LabelResources= DatacentersServersLabelsGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute()
List all Server Labels
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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)
var result LabelResource= DatacentersServersLabelsPost(ctx, datacenterId, serverId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Add a Label to Server
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
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
var result LabelResource= DatacentersServersLabelsPut(ctx, datacenterId, serverId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Modify a Label of Server
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
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
var result map[string]interface{} = DatacentersVolumesLabelsDelete(ctx, datacenterId, volumeId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Label from Volume
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
var result LabelResources= DatacentersVolumesLabelsGet(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute()
List all Volume Labels
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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)
var result LabelResource= DatacentersVolumesLabelsPost(ctx, datacenterId, volumeId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Add a Label to Volume
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.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
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 apiDatacentersVolumesLabelsPostRequest struct via the builder pattern
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
var result LabelResource= DatacentersVolumesLabelsPut(ctx, datacenterId, volumeId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Modify a Label of Volume
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.DatacentersVolumesLabelsPut(context.Background(), datacenterId, volumeId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.DatacentersVolumesLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersVolumesLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelApi.DatacentersVolumesLabelsPut`: %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 apiDatacentersVolumesLabelsPutRequest struct via the builder pattern
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
var result map[string]interface{} = IpblocksLabelsDelete(ctx, ipblockId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Label from IP Block
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { ipblockId :="ipblockId_example"// string | The unique ID of the Ip Block 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.IpblocksLabelsDelete(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.IpblocksLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `IpblocksLabelsDelete`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `LabelApi.IpblocksLabelsDelete`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
ipblockId
string
The unique ID of the Ip Block
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiIpblocksLabelsDeleteRequest 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
IpblocksLabelsFindByKey
var result LabelResource= IpblocksLabelsFindByKey(ctx, ipblockId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Retrieve a Label of IP Block
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { ipblockId :="ipblockId_example"// string | The unique ID of the Ip Block 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.IpblocksLabelsFindByKey(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.IpblocksLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `IpblocksLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelApi.IpblocksLabelsFindByKey`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
ipblockId
string
The unique ID of the Ip Block
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiIpblocksLabelsFindByKeyRequest 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
var result LabelResources= IpblocksLabelsGet(ctx, ipblockId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
List all Ip Block Labels
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { ipblockId :="ipblockId_example"// string | The unique ID of the Ip Block 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.IpblocksLabelsGet(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.IpblocksLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `IpblocksLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelApi.IpblocksLabelsGet`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
ipblockId
string
The unique ID of the Ip Block
Other Parameters
Other parameters are passed through a pointer to a apiIpblocksLabelsGetRequest 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
var result LabelResource= IpblocksLabelsPost(ctx, ipblockId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Add a Label to IP Block
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { ipblockId :="ipblockId_example"// string | The unique ID of the Ip Block 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.IpblocksLabelsPost(context.Background(), ipblockId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.IpblocksLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `IpblocksLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelApi.IpblocksLabelsPost`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
ipblockId
string
The unique ID of the Ip Block
Other Parameters
Other parameters are passed through a pointer to a apiIpblocksLabelsPostRequest struct via the builder pattern
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
var result LabelResource= IpblocksLabelsPut(ctx, ipblockId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Modify a Label of IP Block
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { ipblockId :="ipblockId_example"// string | The unique ID of the Ip Block 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.IpblocksLabelsPut(context.Background(), ipblockId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.IpblocksLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `IpblocksLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelApi.IpblocksLabelsPut`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
ipblockId
string
The unique ID of the Ip Block
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiIpblocksLabelsPutRequest struct via the builder pattern
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
var result Label= LabelsFindByUrn(ctx, labelurn) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Returns the label by its URN.
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { labelurn := "labelurn_example" // string | The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>
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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.LabelsFindByUrn(context.Background(), labelurn).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.LabelsFindByUrn``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `LabelsFindByUrn`: Label fmt.Fprintf(os.Stdout, "Response from `LabelApi.LabelsFindByUrn`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
labelurn
string
The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn🏷️<resource_type>:<resource_uuid>:<key>
Other Parameters
Other parameters are passed through a pointer to a apiLabelsFindByUrnRequest 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
var result Labels= LabelsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
List Labels
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.LabelsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.LabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `LabelsGet`: Labels fmt.Fprintf(os.Stdout, "Response from `LabelApi.LabelsGet`: %v\n", resp)}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiLabelsGetRequest 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
var result map[string]interface{} = SnapshotsLabelsDelete(ctx, snapshotId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Label from Snapshot
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { snapshotId :="snapshotId_example"// string | The unique ID of the Snapshot 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.SnapshotsLabelsDelete(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.SnapshotsLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `SnapshotsLabelsDelete`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `LabelApi.SnapshotsLabelsDelete`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
snapshotId
string
The unique ID of the Snapshot
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiSnapshotsLabelsDeleteRequest 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
SnapshotsLabelsFindByKey
var result LabelResource= SnapshotsLabelsFindByKey(ctx, snapshotId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Retrieve a Label of Snapshot
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { snapshotId :="snapshotId_example"// string | The unique ID of the Snapshot 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() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LabelApi.SnapshotsLabelsFindByKey(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.SnapshotsLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `SnapshotsLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelApi.SnapshotsLabelsFindByKey`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
snapshotId
string
The unique ID of the Snapshot
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiSnapshotsLabelsFindByKeyRequest 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
var result LabelResources= SnapshotsLabelsGet(ctx, snapshotId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
List all Snapshot Labels
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the Snapshot
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()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LabelApi.SnapshotsLabelsGet(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.SnapshotsLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelApi.SnapshotsLabelsGet`: %v\n", resp)
}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
snapshotId
string
The unique ID of the Snapshot
Other Parameters
Other parameters are passed through a pointer to a apiSnapshotsLabelsGetRequest 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
var result LabelResource = SnapshotsLabelsPost(ctx, snapshotId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Add a Label to Snapshot
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the Snapshot
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()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LabelApi.SnapshotsLabelsPost(context.Background(), snapshotId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.SnapshotsLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.SnapshotsLabelsPost`: %v\n", resp)
}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
snapshotId
string
The unique ID of the Snapshot
Other Parameters
Other parameters are passed through a pointer to a apiSnapshotsLabelsPostRequest struct via the builder pattern
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
var result LabelResource = SnapshotsLabelsPut(ctx, snapshotId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Modify a Label of Snapshot
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the Snapshot
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()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LabelApi.SnapshotsLabelsPut(context.Background(), snapshotId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelApi.SnapshotsLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelApi.SnapshotsLabelsPut`: %v\n", resp)
}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
snapshotId
string
The unique ID of the Snapshot
key
string
The key of the Label
Other Parameters
Other parameters are passed through a pointer to a apiSnapshotsLabelsPutRequest struct via the builder pattern
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