> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/infra-controller/llms.txt.
> For full documentation content, see https://docs.nvidia.com/infra-controller/llms-full.txt.

# Update InfiniBand Partition

PATCH https://carbide-rest-api.carbide.svc.cluster.local/v2/org/{org}/carbide/infiniband-partition/{infiniBandPartitionId}
Content-Type: application/json

Update an existing InfiniBand Partition

Org must have a Tenant entity. User must have `FORGE_TENANT_ADMIN` authorization role.

Tenant must own the Partition.

Reference: https://docs.nvidia.com/infra-controller/infra-controller/rest-api-reference/api-reference/infini-band-partition/update-infiniband-partition

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NCX Infra Controller REST API
  version: 1.0.0
paths:
  /v2/org/{org}/carbide/infiniband-partition/{infiniBandPartitionId}:
    patch:
      operationId: update-infiniband-partition
      summary: Update InfiniBand Partition
      description: >-
        Update an existing InfiniBand Partition


        Org must have a Tenant entity. User must have `FORGE_TENANT_ADMIN`
        authorization role.


        Tenant must own the Partition.
      tags:
        - subpackage_infiniBandPartition
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
        - name: infiniBandPartitionId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            ```

            export JWT_BEARER_TOKEN="<jwt-bearer-token>"


            # Example org name: "acme-inc

            export ORG_NAME=<org-name>


            # Use the JWT bearer token in your API request auth header:

            curl -v -X GET -H "Content-Type: application/json" -H
            "Authorization: Bearer $JWT_BEARER_TOKEN"
            https://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current

            ```
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfiniBandPartition'
        '400':
          description: Error response when request data cannot be validated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbideAPIError'
        '403':
          description: >-
            Error response when user is not authorized to call an endpoint or
            retrieve/modify objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarbideAPIError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InfiniBandPartitionUpdateRequest'
servers:
  - url: https://carbide-rest-api.carbide.svc.cluster.local
components:
  schemas:
    Labels:
      type: object
      additionalProperties:
        type: string
      title: Labels
    InfiniBandPartitionUpdateRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        labels:
          $ref: '#/components/schemas/Labels'
          description: >-
            String key value pairs describing Partition labels. Up to 10 key
            value pairs can be specified
      required:
        - name
      description: Request data to update an InfiniBand Partition
      title: InfiniBandPartitionUpdateRequest
    InfiniBandPartitionRateLimit:
      type: string
      enum:
        - '2'
        - '5'
        - '10'
        - '14'
        - '20'
        - '25'
        - '30'
        - '40'
        - '56'
        - '60'
        - '80'
        - '100'
        - '112'
        - '120'
        - '168'
        - '200'
        - '300'
      title: InfiniBandPartitionRateLimit
    InfiniBandPartitionMtu:
      type: string
      enum:
        - '4000'
        - '8000'
      title: InfiniBandPartitionMtu
    InfiniBandPartitionStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Ready
        - Configuring
        - Deleting
        - Error
      description: Status values for InfiniBand Partition objects
      title: InfiniBandPartitionStatus
    StatusDetail:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Describes the details of a status transition for a resource
      title: StatusDetail
    InfiniBandPartition:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        siteId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        controllerIBPartitionId:
          type:
            - string
            - 'null'
          format: uuid
        partitionKey:
          type:
            - string
            - 'null'
        partitionName:
          type:
            - string
            - 'null'
        serviceLevel:
          type:
            - integer
            - 'null'
        rateLimit:
          $ref: '#/components/schemas/InfiniBandPartitionRateLimit'
        mtu:
          $ref: '#/components/schemas/InfiniBandPartitionMtu'
        enableSharp:
          type: boolean
        labels:
          $ref: '#/components/schemas/Labels'
          description: >-
            String key value pairs describing InfiniBand Partition labels. Up to
            10 key value pairs can be specified
        status:
          $ref: '#/components/schemas/InfiniBandPartitionStatus'
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusDetail'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: InfiniBand Partitions are network segments utilizing InfiniBand topology
      title: InfiniBandPartition
    CarbideApiErrorSource:
      type: string
      enum:
        - carbide
      description: Source of the error. Only 'carbide' is supported
      title: CarbideApiErrorSource
    CarbideApiErrorData:
      type: object
      properties: {}
      description: Additional data about the error
      title: CarbideApiErrorData
    CarbideAPIError:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/CarbideApiErrorSource'
          description: Source of the error. Only 'carbide' is supported
        message:
          type: string
          description: Message describing the error
        data:
          oneOf:
            - $ref: '#/components/schemas/CarbideApiErrorData'
            - type: 'null'
          description: Additional data about the error
      description: Describes the error response from NCX Infra Controller REST API
      title: CarbideAPIError
  securitySchemes:
    JWTBearerToken:
      type: http
      scheme: bearer
      description: >-
        ```

        export JWT_BEARER_TOKEN="<jwt-bearer-token>"


        # Example org name: "acme-inc

        export ORG_NAME=<org-name>


        # Use the JWT bearer token in your API request auth header:

        curl -v -X GET -H "Content-Type: application/json" -H "Authorization:
        Bearer $JWT_BEARER_TOKEN"
        https://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current

        ```

```

## SDK Code Examples

```python Example 1
import requests

url = "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId"

payload = {
    "name": "turbo-net-v2",
    "description": "Second version of the model training network",
    "labels": {
        "environment": "production",
        "team": "devops"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example 1
const url = 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"turbo-net-v2","description":"Second version of the model training network","labels":{"environment":"production","team":"devops"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example 1
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId"

	payload := strings.NewReader("{\n  \"name\": \"turbo-net-v2\",\n  \"description\": \"Second version of the model training network\",\n  \"labels\": {\n    \"environment\": \"production\",\n    \"team\": \"devops\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example 1
require 'uri'
require 'net/http'

url = URI("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"turbo-net-v2\",\n  \"description\": \"Second version of the model training network\",\n  \"labels\": {\n    \"environment\": \"production\",\n    \"team\": \"devops\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"turbo-net-v2\",\n  \"description\": \"Second version of the model training network\",\n  \"labels\": {\n    \"environment\": \"production\",\n    \"team\": \"devops\"\n  }\n}")
  .asString();
```

```php Example 1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId', [
  'body' => '{
  "name": "turbo-net-v2",
  "description": "Second version of the model training network",
  "labels": {
    "environment": "production",
    "team": "devops"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Example 1
using RestSharp;

var client = new RestClient("https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"turbo-net-v2\",\n  \"description\": \"Second version of the model training network\",\n  \"labels\": {\n    \"environment\": \"production\",\n    \"team\": \"devops\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "turbo-net-v2",
  "description": "Second version of the model training network",
  "labels": [
    "environment": "production",
    "team": "devops"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://carbide-rest-api.carbide.svc.cluster.local/v2/org/org/carbide/infiniband-partition/infiniBandPartitionId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```