NATGatewaysApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method | HTTP request | Description |
---|---|---|
Delete /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways | |
Get /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways | |
Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs | |
Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs | |
Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs | |
Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs | |
Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log | |
Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs | |
Get /datacenters/{datacenterId}/natgateways | List NAT Gateways | |
Patch /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways | |
Post /datacenters/{datacenterId}/natgateways | Create a NAT Gateway | |
Put /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways | |
Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules | |
Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules | |
Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules | |
Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID | |
Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule | |
Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID |
var result = DatacentersNatgatewaysDelete(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Delete NAT Gateways
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysDelete(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysDeleteRequest 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] |
xContractNumber | int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
var result NatGateway = DatacentersNatgatewaysFindByNatGatewayId(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Retrieve NAT Gateways
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFindByNatGatewayId`: NatGateway
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId`: %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. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFindByNatGatewayIdRequest 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] |
xContractNumber | int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | |
- Content-Type: Not defined
- Accept: application/json
var result = DatacentersNatgatewaysFlowlogsDelete(ctx, datacenterId, natGatewayId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.Execute()
Delete NAT Gateway Flow Logs
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
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 := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
datacenterId | string | The unique ID of the data center. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
flowLogId | string | The unique ID of the Flow Log. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsDeleteRequest 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 = DatacentersNatgatewaysFlowlogsFindByFlowLogId(ctx, datacenterId, natGatewayId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.Execute()
Retrieve NAT Gateway Flow Logs
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
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 := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsFindByFlowLogId`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId`: %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. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
flowLogId | string | The unique ID of the Flow Log. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest 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 = DatacentersNatgatewaysFlowlogsGet(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()
List NAT Gateway Flow Logs
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
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 := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet`: %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. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsGetRequest 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 = DatacentersNatgatewaysFlowlogsPatch(ctx, datacenterId, natGatewayId, flowLogId)
.NatGatewayFlowLogProperties(natGatewayFlowLogProperties)
.Pretty(pretty)
.Depth(depth)
.Execute()
Partially modify NAT Gateway Flow Logs
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
natGatewayFlowLogProperties := *openapiclient.NewFlowLogProperties("ACCEPTED", "bucketName/key", "INGRESS", "My resource") // FlowLogProperties | The properties of the Flow Log 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 := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch(context.Background(), datacenterId, natGatewayId, flowLogId).NatGatewayFlowLogProperties(natGatewayFlowLogProperties).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch`: %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. | |
natGatewayId | string | The unique ID of the NAT Gateway. | |
flowLogId | string | The unique ID of the Flow Log. | |
Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsPatchRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
natGatewayFlowLogProperties | The properties of the Flow Log 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: Not defined
- Accept: application/json
var result FlowLog = DatacentersNatgatewaysFlowlogsPost(ctx, datacenterId, natGatewayId)
.NatGatewayFlowLog(natGatewayFlowLog)
.Pretty(pretty)
.Depth(depth)
.Execute()
Create a NAT Gateway Flow Log
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("ACCEPTED", "bucketName/key", "INGRESS", "My resource")) // 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 := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, r, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost(context.Background(), datacenterId, natGatewayId).NatGatewayFlowLog(natGatewayFlowLog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context |