> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/cloud-api-v6/nat-gateways/partially-modify-nat-gateways.md).

# Partially modify NAT Gateways

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

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"NAT Gateways"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"NatGatewayProperties":{"required":["name","publicIps"],"type":"object","properties":{"name":{"type":"string","description":"Name of the NAT Gateway."},"publicIps":{"type":"array","description":"Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location.","items":{"type":"string"}},"lans":{"type":"array","description":"Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.","items":{"$ref":"#/components/schemas/NatGatewayLanProperties"}},"tier":{"type":"string","description":"The service tier the NAT Gateway runs on. See `VnfServiceTier`.","allOf":[{"$ref":"#/components/schemas/VnfServiceTier"}]},"maintenanceWindow":{"nullable":true,"description":"The weekly slot in which IONOS may carry out disruptive work on this NAT Gateway. Sending `null` clears a configured window, after which the resource follows the assignment rule again. See `VnfMaintenanceWindow`.","allOf":[{"$ref":"#/components/schemas/VnfMaintenanceWindow"}]}}},"NatGatewayLanProperties":{"required":["id"],"type":"object","properties":{"id":{"type":"integer","description":"Id for the LAN connected to the NAT Gateway","format":"int32"},"gatewayIps":{"type":"array","description":"Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN","items":{"type":"string"}}}},"VnfServiceTier":{"type":"string","description":"The service tiers a VNF resource can run on. Each names a performance class and a redundancy; the `_HA` suffix marks the redundant form, and both dimensions are compared by the upgrade-only rule below. What a tier resolves to in cores, memory and machine type is defined per product and is the same in every location.\n\n**Which tiers are accepted.** A tier the product's catalogue holds no entry for is refused, since nothing then defines what it resolves to. `STANDARD_HA` is the exception and is accepted whether or not the catalogue holds an entry for it; where it holds none, the resource is sized by the platform's own configuration for that product rather than by a catalogue entry.\n\n**Upgrades only.** A change that lowers either the performance class or the redundancy of the tier the resource is running is rejected.\n\n**Selecting a tier.** Naming a tier that differs from the one the resource is running, or on creation naming one other than the tier it would receive anyway, is a selection. A selection requires service tiers to be enabled on both the contract and the cluster, and is refused if either is not. Naming the tier a resource is already running is not a selection and is always accepted, so a resource that has been read can be written back without the feature enabled. Creating a resource on the tier it would receive anyway is likewise not a selection, so a client may equally create one from a resource it has read.\n\n**When a selection takes effect.** At once. Nothing is queued and nothing waits for the resource's maintenance window, so a resource's `tier` reports the tier it is running and never one it is moving to.\n\n**Omitting the tier.** On creation a resource starts on the tier configured as the default for its product, where service tiers are enabled on both the contract and the cluster; otherwise, and where the catalogue marks no default, it starts on `STANDARD_HA`. On update the resource keeps the tier it is running — an omitted tier is never read as a request to return to the default.\n\n**An open set.** The set of tiers may grow, so a client generated against this spec must tolerate a tier it does not recognise rather than fail on it. A tier this API does not yet define is still refused on write: an open set describes what a client may one day be told, not what it may send."},"VnfMaintenanceWindow":{"required":["dayOfTheWeek","time"],"type":"object","description":"The weekly slot in which IONOS may carry out disruptive work on a VNF resource. Set the window that suits you: it is recorded so that IONOS operations know when they may intervene on the resource, and the platform itself never acts on the stored value — no change to the resource is held back waiting for the window to open, and none is applied because it opened. Changing the window does not itself reprovision the resource.\n\n**A window is a span, not an instant.** It opens at the stated time and stays open for a fixed length, configured by the platform and the same for every resource; work may begin at any point while it is open.\n\n**Every resource has one at all times.** When none is configured, the system assigns one derived from the resource's identifier, which spreads assigned windows across the week instead of gathering every resource into one slot.\n\n**Setting and clearing.** Omitting the window when updating an existing resource leaves the window it already has unchanged. Sending it as `null` clears it, after which the resource follows the assignment rule again. Clearing is the way back for a resource that carries a window nobody chose for it — a copied data centre gives each copy the window of the resource it was copied from, because the copy states the window it was shown. The schemas that carry this window serve requests and responses alike, so the contract admits `null` in both; what the platform returns is always a window, configured or assigned.","properties":{"dayOfTheWeek":{"type":"string","description":"The weekday for a maintenance window.","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]},"time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z|[+-](0[0-9]|1[0-4])[0-5][0-9])?$","description":"The time of day the maintenance window opens, as a UTC wall-clock time. Accepted formats are `HH:mm:ss`, `HH:mm:ssZ`, and `HH:mm:ss±hhmm` with the offset written without a colon — an offset in the `±hh:mm` form is rejected. An offset that is given is accepted but **not applied**: the time is taken as stated and evaluated in UTC, so `13:00:00+0200` opens the window at 13:00 UTC and not at 11:00 UTC. Send the value already converted to UTC. Responses always report the bare `HH:mm:ss` form."}}},"NatGateway":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/NatGatewayProperties"},"entities":{"$ref":"#/components/schemas/NatGatewayEntities"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"NatGatewayEntities":{"type":"object","properties":{"rules":{"$ref":"#/components/schemas/NatGatewayRules"},"flowlogs":{"$ref":"#/components/schemas/FlowLogs"}}},"NatGatewayRules":{"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"URL to the object representation (absolute path).","format":"uri","readOnly":true},"items":{"type":"array","description":"Array of items in the collection.","readOnly":true,"items":{"$ref":"#/components/schemas/NatGatewayRule"}}}},"NatGatewayRule":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/NatGatewayRuleProperties"}}},"NatGatewayRuleProperties":{"required":["name","publicIp","sourceSubnet"],"type":"object","properties":{"name":{"type":"string","description":"The name of the NAT Gateway rule."},"type":{"type":"string","description":"Type of the NAT Gateway rule.","allOf":[{"$ref":"#/components/schemas/NatGatewayRuleType"}]},"protocol":{"type":"string","description":"Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set.","allOf":[{"$ref":"#/components/schemas/NatGatewayRuleProtocol"}]},"sourceSubnet":{"type":"string","description":"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."},"publicIp":{"type":"string","description":"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"},"targetSubnet":{"type":"string","description":"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."},"targetPortRange":{"$ref":"#/components/schemas/TargetPortRange"}}},"NatGatewayRuleType":{"type":"string","enum":["SNAT"]},"NatGatewayRuleProtocol":{"type":"string","enum":["TCP","UDP","ICMP","ALL"]},"TargetPortRange":{"type":"object","properties":{"start":{"type":"integer","description":"Target port range start associated with the NAT Gateway rule.","format":"int32"},"end":{"type":"integer","description":"Target port range end associated with the NAT Gateway rule.","format":"int32"}}},"FlowLogs":{"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"items":{"type":"array","description":"Array of items in the collection.","readOnly":true,"items":{"$ref":"#/components/schemas/FlowLog"}},"offset":{"$ref":"#/components/schemas/PaginationOffsetOptional"},"limit":{"$ref":"#/components/schemas/PaginationLimitOptional"},"_links":{"$ref":"#/components/schemas/PaginationLinks"}}},"FlowLog":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/FlowLogProperties"}}},"FlowLogProperties":{"required":["action","bucket","direction","name"],"type":"object","properties":{"name":{"type":"string","description":"The resource name."},"action":{"type":"string","description":"Specifies the traffic action pattern.","enum":["ACCEPTED","REJECTED","ALL"]},"direction":{"type":"string","description":"Specifies the traffic direction pattern.","enum":["INGRESS","EGRESS","BIDIRECTIONAL"]},"bucket":{"type":"string","description":"The bucket name of an existing IONOS CLOUD Object storage bucket."}}},"PaginationOffsetOptional":{"type":"number","description":"The offset (if specified in the request)."},"PaginationLimitOptional":{"type":"number","description":"The limit (if specified in the request)."},"PaginationLinks":{"type":"object","properties":{"prev":{"type":"string","description":"URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0.","format":"uri","readOnly":true},"self":{"type":"string","description":"URL (with offset and limit parameters) of the current page.","format":"uri","readOnly":true},"next":{"type":"string","description":"URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements.","format":"uri","readOnly":true}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/natgateways/{natGatewayId}":{"patch":{"tags":["NAT Gateways"],"summary":"Partially modify NAT Gateways","description":"Update the properties of the specified NAT Gateway within the data center.","operationId":"datacentersNatgatewaysPatch","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"natGatewayId","in":"path","description":"The unique ID of the NAT Gateway.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The properties of the NAT Gateway to be updated.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NatGatewayProperties"}}},"required":true},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NatGateway"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/api-reference/cloud-api-v6/nat-gateways/partially-modify-nat-gateways.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
