NAT Gateways

List NAT Gateways

get

List all NAT Gateways within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "natgateway",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My NAT Gateway",
        "publicIps": [
          "81.173.1.2",
          "82.231.2.5",
          "92.221.2.4"
        ],
        "lans": [
          {
            "id": 3,
            "gatewayIps": [
              "10.12.1.2/24",
              "10.11.2.5/24",
              "10.11.2.4"
            ]
          }
        ]
      },
      "entities": {
        "rules": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "natgateway-rule",
              "href": "<RESOURCE-URI>",
              "metadata": {
                "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                "createdDate": "2015-12-04T14:34:09.809Z",
                "createdBy": "[email protected]",
                "createdByUserId": "[email protected]",
                "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                "lastModifiedBy": "[email protected]",
                "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                "state": "AVAILABLE"
              },
              "properties": {
                "name": "My NAT Gateway rule",
                "type": "SNAT",
                "protocol": "TCP",
                "sourceSubnet": "10.0.1.0/24",
                "publicIp": "192.18.7.17",
                "targetSubnet": "10.0.1.0/24",
                "targetPortRange": {
                  "start": 10000,
                  "end": 20000
                }
              }
            }
          ]
        },
        "flowlogs": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "flow-log",
              "href": "<RESOURCE-URI>",
              "metadata": {
                "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                "createdDate": "2015-12-04T14:34:09.809Z",
                "createdBy": "[email protected]",
                "createdByUserId": "[email protected]",
                "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                "lastModifiedBy": "[email protected]",
                "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                "state": "AVAILABLE"
              },
              "properties": {
                "name": "My resource",
                "action": "ACCEPTED",
                "direction": "INGRESS",
                "bucket": "bucketName/key"
              }
            }
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        }
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a NAT Gateway

post

Creates a NAT Gateway within the data center.

This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: natgateway
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/natgateways HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 314

{
  "type": "natgateway",
  "metadata": {},
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  },
  "entities": {
    "rules": {
      "type": "collection"
    },
    "flowlogs": {
      "type": "collection",
      "offset": 0,
      "limit": 1000,
      "_links": {}
    }
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "natgateway-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My NAT Gateway rule",
            "type": "SNAT",
            "protocol": "TCP",
            "sourceSubnet": "10.0.1.0/24",
            "publicIp": "192.18.7.17",
            "targetSubnet": "10.0.1.0/24",
            "targetPortRange": {
              "start": 10000,
              "end": 20000
            }
          }
        }
      ]
    },
    "flowlogs": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "flow-log",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "action": "ACCEPTED",
            "direction": "INGRESS",
            "bucket": "bucketName/key"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Retrieve NAT Gateways

get

Retrieve the properties of the specified NAT Gateway within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "natgateway-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My NAT Gateway rule",
            "type": "SNAT",
            "protocol": "TCP",
            "sourceSubnet": "10.0.1.0/24",
            "publicIp": "192.18.7.17",
            "targetSubnet": "10.0.1.0/24",
            "targetPortRange": {
              "start": 10000,
              "end": 20000
            }
          }
        }
      ]
    },
    "flowlogs": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "flow-log",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "action": "ACCEPTED",
            "direction": "INGRESS",
            "bucket": "bucketName/key"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Modify NAT Gateways

put

Modify the properties of the specified NAT Gateway within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: natgateway
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 188

{
  "type": "natgateway",
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "natgateway-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My NAT Gateway rule",
            "type": "SNAT",
            "protocol": "TCP",
            "sourceSubnet": "10.0.1.0/24",
            "publicIp": "192.18.7.17",
            "targetSubnet": "10.0.1.0/24",
            "targetPortRange": {
              "start": 10000,
              "end": 20000
            }
          }
        }
      ]
    },
    "flowlogs": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "flow-log",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "action": "ACCEPTED",
            "direction": "INGRESS",
            "bucket": "bucketName/key"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Delete NAT Gateways

delete

Remove the specified NAT Gateway from the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
202
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Partially modify NAT Gateways

patch

Update the properties of the specified NAT Gateway within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
namestringRequired

Name of the NAT Gateway.

Example: My NAT Gateway
publicIpsstring[]Required

Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location.

Example: ["81.173.1.2","82.231.2.5","92.221.2.4"]
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: */*
Accept: */*
Content-Length: 153

{
  "name": "My NAT Gateway",
  "publicIps": [
    "81.173.1.2",
    "82.231.2.5",
    "92.221.2.4"
  ],
  "lans": [
    {
      "id": 3,
      "gatewayIps": [
        "10.12.1.2/24",
        "10.11.2.5/24",
        "10.11.2.4"
      ]
    }
  ]
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway",
    "publicIps": [
      "81.173.1.2",
      "82.231.2.5",
      "92.221.2.4"
    ],
    "lans": [
      {
        "id": 3,
        "gatewayIps": [
          "10.12.1.2/24",
          "10.11.2.5/24",
          "10.11.2.4"
        ]
      }
    ]
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "natgateway-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My NAT Gateway rule",
            "type": "SNAT",
            "protocol": "TCP",
            "sourceSubnet": "10.0.1.0/24",
            "publicIp": "192.18.7.17",
            "targetSubnet": "10.0.1.0/24",
            "targetPortRange": {
              "start": 10000,
              "end": 20000
            }
          }
        }
      ]
    },
    "flowlogs": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "flow-log",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "action": "ACCEPTED",
            "direction": "INGRESS",
            "bucket": "bucketName/key"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

List NAT Gateway rules

get

List all rules for the specified NAT Gateway.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "natgateway-rule",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My NAT Gateway rule",
        "type": "SNAT",
        "protocol": "TCP",
        "sourceSubnet": "10.0.1.0/24",
        "publicIp": "192.18.7.17",
        "targetSubnet": "10.0.1.0/24",
        "targetPortRange": {
          "start": 10000,
          "end": 20000
        }
      }
    }
  ]
}

Create a NAT Gateway Rule

post

Creates a rule for the specified NAT Gateway.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: natgateway-rule
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 244

{
  "type": "natgateway-rule",
  "metadata": {},
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}

Retrieve NAT Gateway rules

get

Retrieve the properties of the specified NAT Gateway rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

natGatewayRuleIdstringRequired

The unique ID of the NAT Gateway rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}

Modify a NAT Gateway Rule by ID

put

Modify the specified NAT Gateway rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

natGatewayRuleIdstringRequired

The unique ID of the NAT Gateway rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: natgateway-rule
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 230

{
  "type": "natgateway-rule",
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}

Delete NAT Gateway rules

delete

Delete the specified NAT Gateway rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

natGatewayRuleIdstringRequired

The unique ID of the NAT Gateway rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
202
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Partially Modify a NAT Gateway Rule by ID

patch

Updates the properties of the specified NAT Gateway rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

natGatewayRuleIdstringRequired

The unique ID of the NAT Gateway rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Body
namestringRequired

The name of the NAT Gateway rule.

Example: My NAT Gateway rule
typeall ofOptional

Type of the NAT Gateway rule.

Example: SNAT
string · enumOptionalPossible values:
protocolall ofOptional

Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set.

Example: TCP
string · enumOptionalPossible values:
sourceSubnetstringRequired

Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address.

Example: 10.0.1.0/24
publicIpstringRequired

Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource

Example: 192.18.7.17
targetSubnetstringOptional

Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address.

Example: 10.0.1.0/24
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: */*
Accept: */*
Content-Length: 190

{
  "name": "My NAT Gateway rule",
  "type": "SNAT",
  "protocol": "TCP",
  "sourceSubnet": "10.0.1.0/24",
  "publicIp": "192.18.7.17",
  "targetSubnet": "10.0.1.0/24",
  "targetPortRange": {
    "start": 10000,
    "end": 20000
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "natgateway-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My NAT Gateway rule",
    "type": "SNAT",
    "protocol": "TCP",
    "sourceSubnet": "10.0.1.0/24",
    "publicIp": "192.18.7.17",
    "targetSubnet": "10.0.1.0/24",
    "targetPortRange": {
      "start": 10000,
      "end": 20000
    }
  }
}

List NAT Gateway Flow Logs

get

List all the Flow Logs for the specified NAT Gateway.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
offsetinteger · int32Optional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination).

Default: 0
limitinteger · int32 · min: 1 · max: 10000Optional

The maximum number of elements to return (use together with offset for pagination).

Default: 1000
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "flow-log",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My resource",
        "action": "ACCEPTED",
        "direction": "INGRESS",
        "bucket": "bucketName/key"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a NAT Gateway Flow Log

post

Adds a new Flow Log to the specified NAT Gateway.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: flow-log
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

The URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 137

{
  "type": "flow-log",
  "metadata": {},
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "flow-log",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}

Retrieve NAT Gateway Flow Logs

get

Retrieve the specified NAT Gateway Flow Log.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

flowLogIdstringRequired

The unique ID of the Flow Log.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "flow-log",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}

Modify NAT Gateway Flow Logs

put

Modify the specified NAT Gateway Flow Log.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

flowLogIdstringRequired

The unique ID of the Flow Log.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: flow-log
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "type": "flow-log",
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "flow-log",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}

Delete NAT Gateway Flow Logs

delete

Delete the specified NAT Gateway Flow Log.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

flowLogIdstringRequired

The unique ID of the Flow Log.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Responses
202
Successful operation
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Partially modify NAT Gateway Flow Logs

patch

Update the properties of the specified NAT Gateway Flow Log.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

natGatewayIdstringRequired

The unique ID of the NAT Gateway.

flowLogIdstringRequired

The unique ID of the Flow Log.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

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: 0
Body
namestringRequired

The resource name.

Example: My resource
actionstring · enumRequired

Specifies the traffic action pattern.

Example: ACCEPTEDPossible values:
directionstring · enumRequired

Specifies the traffic direction pattern.

Example: INGRESSPossible values:
bucketstringRequired

The bucket name of an existing IONOS Cloud Object storage bucket.

Example: bucketName/key
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: */*
Accept: */*
Content-Length: 90

{
  "name": "My resource",
  "action": "ACCEPTED",
  "direction": "INGRESS",
  "bucket": "bucketName/key"
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "flow-log",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "action": "ACCEPTED",
    "direction": "INGRESS",
    "bucket": "bucketName/key"
  }
}

Was this helpful?