All URIs are relative to https://api.ionos.com/cloudapi/v6
Method | HTTP request | Description |
---|---|---|
DatacentersServersNicsFlowlogsDelete | Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs |
DatacentersServersNicsFlowlogsFindById | Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs |
DatacentersServersNicsFlowlogsGet | Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs |
DatacentersServersNicsFlowlogsPatch | Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs |
DatacentersServersNicsFlowlogsPost | Post /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log |
DatacentersServersNicsFlowlogsPut | Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs |
var result = DatacentersServersNicsFlowlogsDelete(ctx, datacenterId, serverId, nicId, flowlogId)
.Pretty(pretty)
.Depth(depth)
.Execute()
Delete Flow Logs
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsDelete(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. | |
flowlogId | string | The unique ID of the Flow Log. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
var result FlowLog = DatacentersServersNicsFlowlogsFindById(ctx, datacenterId, serverId, nicId, flowlogId)
.Pretty(pretty)
.Depth(depth)
.Execute()
Retrieve Flow Logs
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsFindById(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `DatacentersServersNicsFlowlogsFindById`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsFindById`: %v\n", resource)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. | |
flowlogId | string | The unique ID of the Flow Log. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsFindByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
- Content-Type: Not defined
- Accept: application/json
var result FlowLogs = DatacentersServersNicsFlowlogsGet(ctx, datacenterId, serverId, nicId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()
List Flow Logs
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsGet(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `DatacentersServersNicsFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsGet`: %v\n", resource)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
offset | int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0] |
limit | int32 | The maximum number of elements to return (use together with offset for pagination). | [default to 1000] |
- Content-Type: Not defined
- Accept: application/json
var result FlowLog = DatacentersServersNicsFlowlogsPatch(ctx, datacenterId, serverId, nicId, flowlogId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()
Partially modify Flow Logs
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
flowlog := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The Flow Log record to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPatch(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `DatacentersServersNicsFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPatch`: %v\n", resource)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. | |
flowlogId | string | The unique ID of the Flow Log. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsPatchRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
flowlog | FlowLogProperties | The Flow Log record to be updated. | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
- Content-Type: application/json
- Accept: application/json
var result FlowLog = DatacentersServersNicsFlowlogsPost(ctx, datacenterId, serverId, nicId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()
Create a Flow Log
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPost(context.Background(), datacenterId, serverId, nicId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `DatacentersServersNicsFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPost`: %v\n", resource)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
flowlog | FlowLog | The Flow Log to create. | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
- Content-Type: application/json
- Accept: application/json
var result FlowLog = DatacentersServersNicsFlowlogsPut(ctx, datacenterId, serverId, nicId, flowlogId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()
Modify Flow Logs
package main
import (
"context"
"fmt"
"os"
compute "github.com/ionos-cloud/sdk-go-bundle/products/compute"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
flowlog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := compute.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPut(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `DatacentersServersNicsFlowlogsPut`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPut`: %v\n", resource)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
serverId | string | The unique ID of the server. | |
nicId | string | The unique ID of the NIC. | |
flowlogId | string | The unique ID of the Flow Log. |
Other parameters are passed through a pointer to an apiDatacentersServersNicsFlowlogsPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
flowlog | FlowLogPut | The modified Flow Log. | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true] |
depth | int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0] |
- Content-Type: application/json
- Accept: application/json