> 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/target-groups/partially-modify-a-target-group-by-id.md).

# Partially Modify a Target Group by ID

Updates the properties of the target group specified by its ID.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Target groups"}],"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":{"TargetGroupProperties":{"required":["algorithm","name","protocol"],"type":"object","properties":{"name":{"type":"string","description":"The target group name."},"algorithm":{"type":"string","description":"The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers.\n\n- **Round Robin**: Targets are served alternately according to their weighting.\n\n- **Least Connection**: The target with the least active connection is served.\n\n- **Random**: The targets are served based on a consistent pseudorandom algorithm.\n\n- **Source IP**: It is ensured that the same client IP address reaches the same target.","enum":["ROUND_ROBIN","LEAST_CONNECTION","RANDOM","SOURCE_IP"]},"protocol":{"type":"string","description":"The forwarding protocol. Only the value 'HTTP' is allowed.","enum":["HTTP"]},"protocolVersion":{"type":"string","description":"The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.","enum":["HTTP1","HTTP2"]},"targets":{"type":"array","description":"Array of items in the collection.","items":{"$ref":"#/components/schemas/TargetGroupTarget"}},"healthCheck":{"$ref":"#/components/schemas/TargetGroupHealthCheck"},"httpHealthCheck":{"$ref":"#/components/schemas/TargetGroupHttpHealthCheck"}}},"TargetGroupTarget":{"required":["ip","port","weight"],"type":"object","properties":{"ip":{"type":"string","description":"The IP address of the balanced target."},"port":{"type":"integer","description":"The port of the balanced target service; the valid range is 1 to 65535.","format":"int32"},"weight":{"type":"integer","description":"The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments.","format":"int32"},"proxyProtocol":{"type":"string","description":"Proxy protocol version.","default":"none","enum":["none","v1","v2","v2ssl"]},"healthCheckEnabled":{"type":"boolean","description":"When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'."},"maintenanceEnabled":{"type":"boolean","description":"When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'."}}},"TargetGroupHealthCheck":{"type":"object","properties":{"checkTimeout":{"type":"integer","description":"The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established.","format":"int32"},"checkInterval":{"type":"integer","description":"The interval in milliseconds between consecutive health checks; the default value is '2000'.","format":"int32"},"retries":{"type":"integer","description":"The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'.","format":"int32"}}},"TargetGroupHttpHealthCheck":{"required":["matchType","response"],"type":"object","properties":{"path":{"type":"string","description":"The destination URL for HTTP the health check; the default is '/'."},"method":{"type":"string","description":"The method used for the health check request.","enum":["HEAD","PUT","POST","GET","TRACE","PATCH"]},"matchType":{"type":"string","description":"Specify the target's response type to match ALB's request.","enum":["STATUS_CODE","RESPONSE_BODY"]},"response":{"type":"string","description":"The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'."},"regex":{"type":"boolean","description":"Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'.\n\nBy using regular expressions, you can flexibly customize the expected response from a healthy server."},"negate":{"type":"boolean","description":"Specifies whether to negate an individual entry; the default value is 'FALSE'."}}},"TargetGroup":{"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/TargetGroupProperties"}}},"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"]}}},"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":{"/targetgroups/{targetGroupId}":{"patch":{"tags":["Target groups"],"summary":"Partially Modify a Target Group by ID","description":"Updates the properties of the target group specified by its ID.","operationId":"targetgroupsPatch","parameters":[{"name":"targetGroupId","in":"path","description":"The unique ID of the target group.","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 target group properties to be updated.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TargetGroupProperties"}}},"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/TargetGroup"}}}},"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/target-groups/partially-modify-a-target-group-by-id.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.
