openapi: 3.0.1 info: title: Nutanix Volumes APIs description: Configure volumes. version: 1.0.0 x-logo: altText: Volumes Logo url: https://developers.nutanix.com/api/v1/namespaces/storage/images/storage-logo-img.svg x-namespace-backward-compatibility: - redirect: storage to: volumes x-repo-name: volumes x-minimum-negotiation-version: v4.2 servers: - url: "https://{host}:{port}/api" security: - basicAuthScheme: [] - apiKeyAuthScheme: [] tags: - name: IscsiClients description: | Represents the configuration of the external iSCSI client connecting to a Volume Group. You can fetch and list iSCSI clients using these APIs. x-displayName: Iscsi Clients - name: VolumeGroups description: | Represents an entity that exposes block storage devices. Once created a Volume Group may be either directly connected to a guest operating system or exposed to AHV hosts in a NCI cluster. Storage & DR policies can be applied on a Volume Group by associating categories. x-displayName: Volume Groups - name: NvmfClients description: | NVMe-TCP, also known as NVMf or NVMe-oF, is an I/O protocol. NVMe over fabrics, where the fabrics can be TCP/IP, RDMA or fibre channel. The endpoints under this section represents the configuration of the external NVMe-TCP client connecting to a Volume Group. You can fetch and list NVMe-TCP clients using these APIs. x-displayName: NVMe-TCP Clients paths: /volumes/v4.2/config/iscsi-clients/{extId}: get: tags: - IscsiClients summary: Fetch an iSCSI client details description: "Fetches the iSCSI client details identified by {extId}." operationId: getIscsiClientById parameters: - name: extId in: path description: The external identifier of an iSCSI client. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 2fdae52c-097b-4b07-a8ce-b49be1ea9a2d responses: "200": description: Details of the queried iSCSI client. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Get operation" x-permissions: operationName: View External ISCSI Client deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.IscsiClientsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.IscsiClients.GetIscsiClientByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetIscsiClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(apiClient);\n\ \n \n String extId = \"dB22BeDA-fFD8-9b29-eFfE-Bc68eEDE3DAa\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetIscsiClientApiResponse\ \ getIscsiClientApiResponse = iscsiClientsApi.getIscsiClientById(GetIscsiClientByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getIscsiClientApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, IscsiClientsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let iscsiClientsApi = new IscsiClientsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"fFaF3fDD-9aed-37D8-eBA6-f3beeFEDcFAb\"\ ;\n\n\n\n\n\n iscsiClientsApi.getIscsiClientById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ iscsi_clients_api = ntnx_volumes_py_client.IscsiClientsApi(api_client=client)\n\ \ \n ext_id = \"F09Edd15-09dF-F28D-cc6F-2D5afaFd45BA\"\n\n\n try:\n\ \ api_response = iscsi_clients_api.get_iscsi_client_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/iscsiclients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IscsiClientsServiceApiInstance\ \ *api.IscsiClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IscsiClientsServiceApiInstance = api.NewIscsiClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"3bcc4BBF-F2bA-cecc-CC6C-cBc5f7BaBAB8\"\ \n\n\n request := iscsiclients.GetIscsiClientByIdRequest{ ExtId: &extId\ \ }\n response, error := IscsiClientsServiceApiInstance.GetIscsiClientById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.IscsiClient)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/iscsi-clients/DF5BDdDC-0cf6-4b5e-031D-E8b5E0cc9b5a" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/iscsi-clients/bF352a1F-cBBd-0eCD-eb38-BbC8EA1afbcb" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(client);\n\n\ \ String extId = \"13ccDBdf-E2bE-944a-D66b-2badC6bDBEEF\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetIscsiClientByIdRequest {\n ExtId = extId\n };\n \ \ try {\n GetIscsiClientApiResponse getIscsiClientApiResponse\ \ = iscsiClientsApi.GetIscsiClientById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - IscsiClients summary: Update an iSCSI client description: "Modifies the details of an existing iSCSI client configuration\ \ identified by {extId}." operationId: updateIscsiClientById parameters: - name: extId in: path description: The external identifier of an iSCSI client. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 3e3850c4-acb9-4453-a025-b96a3aae0993 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: cea9145b-ca8d-4d9d-971a-3a02f0c51096 requestBody: description: A model that represents an iSCSI client that can be associated with a Volume Group as an external attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' required: true responses: "202": description: iSCSI client after the update operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Put operation" x-permissions: operationName: Update External ISCSI Client deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Super Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: small count: 15 timeUnit: seconds - type: large count: 15 timeUnit: seconds - type: xlarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.IscsiClientsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.IscsiClients.UpdateIscsiClientByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.request.IscsiClients.GetIscsiClientByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.vol.volumes.v4.config.IscsiClient;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetIscsiClientApiResponse;\n\ import com.nutanix.dp1.vol.volumes.v4.config.UpdateIscsiClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(apiClient);\n\ \n IscsiClient iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n \n String extId = \"C8cEd8CC-bD2b-BA0a-B8Af-Ab1bc0259ebD\"\ ;\n\n // perform GET call\n GetIscsiClientApiResponse getResponse\ \ = null;\n try {\n getResponse = iscsiClientsApi.getIscsiClientById(GetIscsiClientByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateIscsiClientApiResponse\ \ updateIscsiClientApiResponse = iscsiClientsApi.updateIscsiClientById(UpdateIscsiClientByIdRequest.builder()\n\ \ .extId(extId)\n .build(), iscsiClient, opts);\n\ \n System.out.println(updateIscsiClientApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, IscsiClientsApi, IscsiClient, GetIscsiClientApiResponse\ \ } from \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let iscsiClientsApi = new IscsiClientsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n iscsiClient = JSON.stringify(iscsiClient);\n\ \n \n let extId = \"AcfedfDe-cf0C-bdEf-2aDc-BbaeEfcBd73E\";\n\n\n\ \ // Perform Get call\n iscsiClientsApi.getIscsiClientById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n iscsiClientsApi.updateIscsiClientById(extId,\ \ iscsiClient, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ iscsi_clients_api = ntnx_volumes_py_client.IscsiClientsApi(api_client=client)\n\ \ iscsiClient = ntnx_volumes_py_client.IscsiClient()\n\n # IscsiClient\ \ object initializations here...\n \n ext_id = \"063D2CCB-A8cB-2E7E-daF7-A281bdBCC3fF\"\ \n\n try:\n api_response = iscsi_clients_api.get_iscsi_client_by_id(extId=ext_id)\n\ \ except ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_volumes_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = iscsi_clients_api.update_iscsi_client_by_id(extId=ext_id,\ \ body=iscsiClient, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/iscsiclients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IscsiClientsServiceApiInstance\ \ *api.IscsiClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IscsiClientsServiceApiInstance = api.NewIscsiClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n iscsiClient := import1.NewIscsiClient()\n\ \n // IscsiClient object initializations here...\n\n \n extId :=\ \ \"dD3D4ebE-1aDD-ae95-CCf5-279B1BAB7FEF\"\n\n getRequest := iscsiclients.GetIscsiClientByIdRequest{\ \ extId: &extId }\n getResponse, err := IscsiClientsServiceApiInstance.GetIscsiClientById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := iscsiclients.UpdateIscsiClientByIdRequest{ ExtId: &extId,\ \ Body: iscsiClient }\n response, error := IscsiClientsServiceApiInstance.UpdateIscsiClientById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/volumes/v4.2/config/iscsi-clients/2fCBcCff-ffBc-5Fef-e8cF-9ec845bCA5Cd" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"iscsiInitiatorName":"iqn.2024-01.com.example.iscsi:initiator","iscsiInitiatorNetworkId":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"},"clientSecret":"string","enabledAuthentications":"$UNKNOWN","attachedTargets":[{"numVirtualTargets":0,"iscsiTargetName":"target-e7195673-85d0-4456-b5ee-c1b89be13537","$objectType":"volumes.v4.config.TargetParam"}],"numVirtualTargets":0,"clusterReference":"string","attachmentSite":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiClient"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"iscsiInitiatorName":"iqn.2024-01.com.example.iscsi:initiator","iscsiInitiatorNetworkId":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"},"clientSecret":"string","enabledAuthentications":"$UNKNOWN","attachedTargets":[{"numVirtualTargets":0,"iscsiTargetName":"target-e7195673-85d0-4456-b5ee-c1b89be13537","$objectType":"volumes.v4.config.TargetParam"}],"numVirtualTargets":0,"clusterReference":"string","attachmentSite":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiClient"} \ - "https://host:port/api/volumes/v4.2/config/iscsi-clients/7a6DEC74-bc1F-FA2d-D2bE-fAbecbAB1b6c" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(client);\n\n\ \ IscsiClient iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n\n String extId = \"cA5B3a2a-0edb-2eAD-cdf2-ff5073E7eFf8\"\ ;\n\n // perform GET call\n var getRequest = new GetIscsiClientByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetIscsiClientApiResponse\ \ getResponse = iscsiClientsApi.GetIscsiClientById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateIscsiClientByIdRequest {\n ExtId = extId,\n\ \ Body = iscsiClient,\n \n \n };\n\ \ try {\n UpdateIscsiClientApiResponse updateIscsiClientApiResponse\ \ = iscsiClientsApi.UpdateIscsiClientById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /volumes/v4.2/config/iscsi-clients: get: tags: - IscsiClients summary: List all the iSCSI clients description: Fetches the list of iSCSI clients. operationId: listIscsiClients parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$filter=clusterReference\ \ eq '7bb85a06-f81d-41e8-a76f-aaeca5721d71'" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$filter=extId\ \ eq '431e86d6-495b-4f30-bfcf-fc0933dcb152'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$orderby=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$orderby=extId" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$expand=cluster" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$select=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/iscsi-clients?$select=extId" responses: "200": description: Paginated list of iSCSI clients. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients Get operation x-permissions: operationName: View External ISCSI Client deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.IscsiClientsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.IscsiClients.ListIscsiClientsRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListIscsiClientsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListIscsiClientsApiResponse\ \ listIscsiClientsApiResponse = iscsiClientsApi.listIscsiClients(ListIscsiClientsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .$select(null)\n .build());\n\ \n System.out.println(listIscsiClientsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, IscsiClientsApi } from "@nutanix-api/volumes-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let iscsiClientsApi = new IscsiClientsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; iscsiClientsApi.listIscsiClients(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ iscsi_clients_api = ntnx_volumes_py_client.IscsiClientsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = iscsi_clients_api.list_iscsi_clients(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/iscsiclients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n IscsiClientsServiceApiInstance\ \ *api.IscsiClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ IscsiClientsServiceApiInstance = api.NewIscsiClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := iscsiclients.ListIscsiClientsRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil, Select_:\ \ nil }\n response, error := IscsiClientsServiceApiInstance.ListIscsiClients(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.IscsiClient)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/iscsi-clients?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/iscsi-clients?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ IscsiClientsApi iscsiClientsApi = new IscsiClientsApi(client);\n\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListIscsiClientsRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListIscsiClientsApiResponse listIscsiClientsApiResponse\ \ = iscsiClientsApi.ListIscsiClients(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /volumes/v4.2/config/nvmf-clients/{extId}: get: tags: - NvmfClients summary: Get a NVMe-TCP client details description: Fetches NVMe-TCP client details identified by its external identifier. operationId: getNvmfClientById parameters: - name: extId in: path description: The external identifier of the NVMe-TCP client. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: fa8e3509-c536-4548-899d-2dd24a65aef6 responses: "200": description: Returns details of the queried NVMe-TCP client. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients/{extId}\ \ Get operation" x-permissions: operationName: View External NVMF Clients deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" - product: PE version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.NvmfClientsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.NvmfClients.GetNvmfClientByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetNvmfClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NvmfClientsApi nvmfClientsApi = new NvmfClientsApi(apiClient);\n\n\ \ \n String extId = \"9EfC39Fc-6bA3-b3D7-dEDB-EFAa432f1de1\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetNvmfClientApiResponse\ \ getNvmfClientApiResponse = nvmfClientsApi.getNvmfClientById(GetNvmfClientByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getNvmfClientApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, NvmfClientsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let nvmfClientsApi = new NvmfClientsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"04fB9dDd-F6DF-cAEC-CB51-7bbFabadFDfF\"\ ;\n\n\n\n\n\n nvmfClientsApi.getNvmfClientById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ nvmf_clients_api = ntnx_volumes_py_client.NvmfClientsApi(api_client=client)\n\ \ \n ext_id = \"faFad4aA-95cD-9D5B-AbDa-AFdefD25F7FD\"\n\n\n try:\n\ \ api_response = nvmf_clients_api.get_nvmf_client_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/nvmfclients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NvmfClientsServiceApiInstance\ \ *api.NvmfClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NvmfClientsServiceApiInstance = api.NewNvmfClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"8DbaBF9F-BCc1-CBbF-C43F-a0BcBaC1EcAC\"\ \n\n\n request := nvmfclients.GetNvmfClientByIdRequest{ ExtId: &extId\ \ }\n response, error := NvmfClientsServiceApiInstance.GetNvmfClientById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.NvmfClient)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/nvmf-clients/9b80eCcc-Ee44-AbbB-ea3A-D99A3843c4Bc" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/nvmf-clients/f49AB9DA-4cAa-c3fb-d4dD-decf3e3Ec07a" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NvmfClientsApi nvmfClientsApi = new NvmfClientsApi(client);\n\n \ \ String extId = \"dBbdf4FC-Bb39-FDaA-c07E-bBCBc9fBFB28\";\n\n \ \ // Create request object with parameters\n var request = new GetNvmfClientByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetNvmfClientApiResponse\ \ getNvmfClientApiResponse = nvmfClientsApi.GetNvmfClientById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/nvmf-clients: get: tags: - NvmfClients summary: List all NVMe-TCP clients description: Fetches a list of all the NVMe-TCP clients. operationId: listNvmfClients parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$filter=clusterReference\ \ eq '193ffc6a-6541-4666-bfe0-7ef7fb07565b'" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$filter=extId\ \ eq '431e86d6-495b-4f30-bfcf-fc0933dcb152'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$orderby=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$orderby=extId" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$expand=cluster" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$select=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/nvmf-clients?$select=extId" responses: "200": description: Returns a paginated list of NVMe-TCP clients. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients Get operation x-permissions: operationName: View External NVMF Clients deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" - product: PE version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.NvmfClientsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.NvmfClients.ListNvmfClientsRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListNvmfClientsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ NvmfClientsApi nvmfClientsApi = new NvmfClientsApi(apiClient);\n\n\ \ \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListNvmfClientsApiResponse\ \ listNvmfClientsApiResponse = nvmfClientsApi.listNvmfClients(ListNvmfClientsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .$select(null)\n .build());\n\ \n System.out.println(listNvmfClientsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, NvmfClientsApi } from "@nutanix-api/volumes-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let nvmfClientsApi = new NvmfClientsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; nvmfClientsApi.listNvmfClients(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ nvmf_clients_api = ntnx_volumes_py_client.NvmfClientsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = nvmf_clients_api.list_nvmf_clients(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/nvmfclients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n NvmfClientsServiceApiInstance\ \ *api.NvmfClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ NvmfClientsServiceApiInstance = api.NewNvmfClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := nvmfclients.ListNvmfClientsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil, Select_: nil\ \ }\n response, error := NvmfClientsServiceApiInstance.ListNvmfClients(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.NvmfClient)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/nvmf-clients?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/nvmf-clients?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ NvmfClientsApi nvmfClientsApi = new NvmfClientsApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListNvmfClientsRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListNvmfClientsApiResponse listNvmfClientsApiResponse\ \ = nvmfClientsApi.ListNvmfClients(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /volumes/v4.2/config/volume-groups/{extId}: get: tags: - VolumeGroups summary: Get a Volume Group description: "Query the Volume Group identified by {extId}." operationId: getVolumeGroupById parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: c63f4ed7-e53d-45f2-8396-5aadf5b263f7 - name: $expand in: query description: | A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby.- cluster - metadata required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster - name: metadata responses: "200": description: Details of the queried Volume Group. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Get operation" x-permissions: operationName: View Volume Group Details deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeGroupByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetVolumeGroupApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String extId = \"60a8BdE3-fAdD-DCC2-8Cec-9AEAf77befF0\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVolumeGroupApiResponse\ \ getVolumeGroupApiResponse = volumeGroupsApi.getVolumeGroupById(GetVolumeGroupByIdRequest.builder()\n\ \ .extId(extId)\n .$expand(null)\n \ \ .build());\n\n System.out.println(getVolumeGroupApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"0ceDa59F-0D83-62b0-af6D-4ACEaB35db1c\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $expand\"] = \"string_sample_data\";\n\n\n\n\n volumeGroupsApi.getVolumeGroupById(extId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n ext_id = \"BB3bA0FF-EfCD-4e56-E7cE-18D6eaBCCb8F\"\n\n\n try:\n\ \ api_response = volume_groups_api.get_volume_group_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"eAfEE0Be-defC-1Fa8-9e9C-8Ba727AfBcEa\"\ \n\n\n request := volumegroups.GetVolumeGroupByIdRequest{ ExtId: &extId,\ \ Expand_: nil }\n response, error := VolumeGroupsServiceApiInstance.GetVolumeGroupById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VolumeGroup)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/CC3Cf8AA-e873-cEF4-e583-0C2DaDADa295?$expand=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/eECf2bd9-73ec-eF2e-cb1D-6aE25bb2EFAd?$expand=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String extId = \"ecDcA3CF-aB2E-FCA9-5cC9-cA28Ec3bABB3\";\n String\ \ expand = \"string_sample_data\";\n\n // Create request object with\ \ parameters\n var request = new GetVolumeGroupByIdRequest {\n \ \ ExtId = extId,\n Expand = expand\n };\n \ \ try {\n GetVolumeGroupApiResponse getVolumeGroupApiResponse\ \ = volumeGroupsApi.GetVolumeGroupById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - VolumeGroups summary: Update details of a specified Volume Group description: "Updates details of a specific Volume Group identified by {extId}." operationId: updateVolumeGroupById parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a41ed6c6-e673-4899-8774-1f27f2bd51af - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 450d470e-ad67-4281-9a83-61aca1c7dbff requestBody: description: A model that represents a Volume Group resource. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' required: true responses: "202": description: Returns the task ID corresponding to the Volume Group update operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Put operation" x-permissions: operationName: Update Volume Group Details deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: small count: 15 timeUnit: seconds - type: large count: 15 timeUnit: seconds - type: xlarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.UpdateVolumeGroupByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeGroupByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.vol.volumes.v4.config.VolumeGroup;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetVolumeGroupApiResponse;\n\ import com.nutanix.dp1.vol.volumes.v4.config.UpdateVolumeGroupApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n VolumeGroup volumeGroup = new VolumeGroup();\n\n // VolumeGroup\ \ object initializations here...\n \n String extId = \"0E5DefFb-7989-Cbaf-F713-Cf41BCdbcCa1\"\ ;\n\n // perform GET call\n GetVolumeGroupApiResponse getResponse\ \ = null;\n try {\n getResponse = volumeGroupsApi.getVolumeGroupById(GetVolumeGroupByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateVolumeGroupApiResponse\ \ updateVolumeGroupApiResponse = volumeGroupsApi.updateVolumeGroupById(UpdateVolumeGroupByIdRequest.builder()\n\ \ .extId(extId)\n .build(), volumeGroup, opts);\n\ \n System.out.println(updateVolumeGroupApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, VolumeGroup, GetVolumeGroupApiResponse\ \ } from \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let volumeGroup = new VolumeGroup();\n\n // VolumeGroup\ \ object initializations here...\n volumeGroup = JSON.stringify(volumeGroup);\n\ \n \n let extId = \"EE69e6Ad-6Cb8-A7c2-3AB7-A981FA2c96dd\";\n\n\n\ \ // Perform Get call\n volumeGroupsApi.getVolumeGroupById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n volumeGroupsApi.updateVolumeGroupById(extId,\ \ volumeGroup, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ volumeGroup = ntnx_volumes_py_client.VolumeGroup()\n\n # VolumeGroup\ \ object initializations here...\n \n ext_id = \"acE458bE-dcd2-E5f9-aeC9-8ebfcaEcE14C\"\ \n\n try:\n api_response = volume_groups_api.get_volume_group_by_id(extId=ext_id)\n\ \ except ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_volumes_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = volume_groups_api.update_volume_group_by_id(extId=ext_id,\ \ body=volumeGroup, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n volumeGroup := import1.NewVolumeGroup()\n\ \n // VolumeGroup object initializations here...\n\n \n extId :=\ \ \"e5d9Aff3-CAbF-71e9-55b7-2f2ac9DBfeE4\"\n\n getRequest := volumegroups.GetVolumeGroupByIdRequest{\ \ extId: &extId }\n getResponse, err := VolumeGroupsServiceApiInstance.GetVolumeGroupById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := volumegroups.UpdateVolumeGroupByIdRequest{ ExtId: &extId,\ \ Body: volumeGroup }\n response, error := VolumeGroupsServiceApiInstance.UpdateVolumeGroupById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/56EAbe0E-4fBd-c0bB-bDe7-3d35Ab49C7aB" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"volumeGroup1","description":"ThisVolumeGroupisusedforstoringdatafiles","shouldLoadBalanceVmAttachments":false,"sharingStatus":"$UNKNOWN","targetPrefix":"targetPrefix1","targetName":"target1","enabledAuthentications":"$UNKNOWN","iscsiFeatures":{"targetSecret":"string","enabledAuthentications":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiFeatures"},"createdBy":"application1","clusterReference":"string","storageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.StorageFeatures"},"usageType":"$UNKNOWN","attachmentType":"$UNKNOWN","protocol":"$UNKNOWN","isHidden":false,"disks":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"}],"attachments":[{"attachment":{"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"},"$objectType":"volumes.v4.config.VGAttachment"}],"hydrationStatus":"$UNKNOWN","$objectType":"volumes.v4.config.VolumeGroup"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"volumeGroup1","description":"ThisVolumeGroupisusedforstoringdatafiles","shouldLoadBalanceVmAttachments":false,"sharingStatus":"$UNKNOWN","targetPrefix":"targetPrefix1","targetName":"target1","enabledAuthentications":"$UNKNOWN","iscsiFeatures":{"targetSecret":"string","enabledAuthentications":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiFeatures"},"createdBy":"application1","clusterReference":"string","storageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.StorageFeatures"},"usageType":"$UNKNOWN","attachmentType":"$UNKNOWN","protocol":"$UNKNOWN","isHidden":false,"disks":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"}],"attachments":[{"attachment":{"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"},"$objectType":"volumes.v4.config.VGAttachment"}],"hydrationStatus":"$UNKNOWN","$objectType":"volumes.v4.config.VolumeGroup"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/7fc67AcA-c45F-C968-3a5e-D0634656Ab38" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VolumeGroup volumeGroup = new VolumeGroup();\n\n // VolumeGroup\ \ object initializations here...\n\n String extId = \"Db1c25c7-ADeA-de16-efc7-2fbDAfaF8EBa\"\ ;\n\n // perform GET call\n var getRequest = new GetVolumeGroupByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetVolumeGroupApiResponse\ \ getResponse = volumeGroupsApi.GetVolumeGroupById(getRequest);\n \ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateVolumeGroupByIdRequest {\n ExtId = extId,\n\ \ Body = volumeGroup,\n \n \n };\n\ \ try {\n UpdateVolumeGroupApiResponse updateVolumeGroupApiResponse\ \ = volumeGroupsApi.UpdateVolumeGroupById(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - VolumeGroups summary: Delete the Volume Group description: "Delete the Volume Group identified by {extId}." operationId: deleteVolumeGroupById parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 2fae8697-7b09-4a1f-ba03-033751189548 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: b8d50a23-e918-4e8c-bc36-e924344c4a6e responses: "202": description: Task Id corresponding to the Volume Group delete operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Delete operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Delete operation" x-permissions: operationName: Delete Volume Group deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DeleteVolumeGroupByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.DeleteVolumeGroupApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String extId = \"E430cda1-D07a-DfDa-eAB9-c3aC0dAAC26b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteVolumeGroupApiResponse\ \ deleteVolumeGroupApiResponse = volumeGroupsApi.deleteVolumeGroupById(DeleteVolumeGroupByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(deleteVolumeGroupApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"fD10DCbD-a5B8-475A-0ad6-dDb633dFbEbE\"\ ;\n\n\n\n\n\n volumeGroupsApi.deleteVolumeGroupById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n ext_id = \"A36CDDA4-abCB-823B-eFf9-aDFCF6bDae8B\"\n\n\n try:\n\ \ api_response = volume_groups_api.delete_volume_group_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"3A30D85D-dCEC-0f1d-bcEF-fA9bdD8Cc1ea\"\ \n\n\n request := volumegroups.DeleteVolumeGroupByIdRequest{ ExtId: &extId\ \ }\n response, error := VolumeGroupsServiceApiInstance.DeleteVolumeGroupById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/fDFFC2DF-6D0A-3f1f-1Ac1-bdEa0faE2FAD" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/DAbC41AB-Da9f-F8d1-3948-BCAfC1C27EAd" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String extId = \"Bc92129e-BAbC-Da45-e0e1-dB1DffAcbdcf\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteVolumeGroupByIdRequest {\n ExtId = extId\n };\n\ \ try {\n DeleteVolumeGroupApiResponse deleteVolumeGroupApiResponse\ \ = volumeGroupsApi.DeleteVolumeGroupById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /volumes/v4.2/config/volume-groups: get: tags: - VolumeGroups summary: List all the Volume Groups description: Query the list of Volume Groups. operationId: listVolumeGroups parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$filter=clusterReference\ \ eq '3eabe3fc-4db8-4b80-9161-1c6d3e2b7bf5'" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$filter=extId\ \ eq '431e86d6-495b-4f30-bfcf-fc0933dcb152'" - name: name example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$filter=name\ \ eq 'volumeGroup1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$orderby=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$orderby=extId" - name: name example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$orderby=name" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$expand=cluster" - name: metadata example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$expand=metadata" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$select=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$select=extId" - name: name example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups?$select=name" responses: "200": description: Paginated list of Volume Groups. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Get operation x-permissions: operationName: View Volume Group Details deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.ListVolumeGroupsRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListVolumeGroupsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVolumeGroupsApiResponse\ \ listVolumeGroupsApiResponse = volumeGroupsApi.listVolumeGroups(ListVolumeGroupsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .$select(null)\n .build());\n\ \n System.out.println(listVolumeGroupsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VolumeGroupsApi } from "@nutanix-api/volumes-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; volumeGroupsApi.listVolumeGroups(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = volume_groups_api.list_volume_groups(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := volumegroups.ListVolumeGroupsRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_: nil, Select_:\ \ nil }\n response, error := VolumeGroupsServiceApiInstance.ListVolumeGroups(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VolumeGroup)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListVolumeGroupsRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListVolumeGroupsApiResponse listVolumeGroupsApiResponse\ \ = volumeGroupsApi.ListVolumeGroups(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - VolumeGroups summary: Creates a new Volume Group description: Creates a new Volume Group. operationId: createVolumeGroup parameters: - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 01203c02-9ee5-43dd-9f67-88d8d4375b6c requestBody: description: A model that represents a Volume Group resource. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' required: true responses: "202": description: Task Id corresponding to the Volume Group create operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Post operation x-permissions: operationName: Create Volume Group deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.vol.java.client.ApiClient; import com.nutanix.vol.java.client.api.VolumeGroupsApi; import com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.CreateVolumeGroupRequest; import com.nutanix.dp1.vol.volumes.v4.config.VolumeGroup; import com.nutanix.dp1.vol.volumes.v4.config.CreateVolumeGroupApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient); VolumeGroup volumeGroup = new VolumeGroup(); // VolumeGroup object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateVolumeGroupApiResponse createVolumeGroupApiResponse = volumeGroupsApi.createVolumeGroup(CreateVolumeGroupRequest.builder() .build(), volumeGroup); System.out.println(createVolumeGroupApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, VolumeGroupsApi, VolumeGroup } from "@nutanix-api/volumes-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance); function sample() { let volumeGroup = new VolumeGroup(); // VolumeGroup object initializations here... volumeGroup = JSON.stringify(volumeGroup); volumeGroupsApi.createVolumeGroup(volumeGroup).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_volumes_py_client if __name__ == "__main__": # Configure the client config = ntnx_volumes_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_volumes_py_client.ApiClient(configuration=config) volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client) volumeGroup = ntnx_volumes_py_client.VolumeGroup() # VolumeGroup object initializations here... try: api_response = volume_groups_api.create_volume_group(body=volumeGroup) print(api_response) except ntnx_volumes_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups" import1 "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient VolumeGroupsServiceApiInstance *api.VolumeGroupsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance) ctx := context.Background() volumeGroup := import1.NewVolumeGroup() // VolumeGroup object initializations here... request := volumegroups.CreateVolumeGroupRequest{ Body: volumeGroup } response, error := VolumeGroupsServiceApiInstance.CreateVolumeGroup(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import2.TaskReference) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"volumeGroup1","description":"ThisVolumeGroupisusedforstoringdatafiles","shouldLoadBalanceVmAttachments":false,"sharingStatus":"$UNKNOWN","targetPrefix":"targetPrefix1","targetName":"target1","enabledAuthentications":"$UNKNOWN","iscsiFeatures":{"targetSecret":"string","enabledAuthentications":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiFeatures"},"createdBy":"application1","clusterReference":"string","storageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.StorageFeatures"},"usageType":"$UNKNOWN","attachmentType":"$UNKNOWN","protocol":"$UNKNOWN","isHidden":false,"disks":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"}],"attachments":[{"attachment":{"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"},"$objectType":"volumes.v4.config.VGAttachment"}],"hydrationStatus":"$UNKNOWN","$objectType":"volumes.v4.config.VolumeGroup"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"volumeGroup1","description":"ThisVolumeGroupisusedforstoringdatafiles","shouldLoadBalanceVmAttachments":false,"sharingStatus":"$UNKNOWN","targetPrefix":"targetPrefix1","targetName":"target1","enabledAuthentications":"$UNKNOWN","iscsiFeatures":{"targetSecret":"string","enabledAuthentications":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiFeatures"},"createdBy":"application1","clusterReference":"string","storageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.StorageFeatures"},"usageType":"$UNKNOWN","attachmentType":"$UNKNOWN","protocol":"$UNKNOWN","isHidden":false,"disks":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"}],"attachments":[{"attachment":{"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"},"$objectType":"volumes.v4.config.VGAttachment"}],"hydrationStatus":"$UNKNOWN","$objectType":"volumes.v4.config.VolumeGroup"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VolumeGroup volumeGroup = new VolumeGroup();\n\n // VolumeGroup\ \ object initializations here...\n\n\n // Create request object with\ \ parameters\n var request = new CreateVolumeGroupRequest {\n \ \ Body = volumeGroup\n };\n try {\n CreateVolumeGroupApiResponse\ \ createVolumeGroupApiResponse = volumeGroupsApi.CreateVolumeGroup(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks: get: tags: - VolumeGroups summary: List all the Volume Disks attached to the Volume Group description: "Query the list of disks corresponding to a Volume Group identified\ \ by {volumeGroupExtId}." operationId: listVolumeDisksByVolumeGroupId parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e362bb1d-5289-4cac-9d19-7011e8dbbca2 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: storageContainerId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks?$filter=storageContainerId\ \ eq '4f6cf677-f501-4d64-bc52-4451ede4a53f'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: diskSizeBytes example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks?$orderby=diskSizeBytes" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks?$select=extId" - name: storageContainerId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks?$select=storageContainerId" responses: "200": description: "Paginated list of disks corresponding to a Volume Group identified\ \ by {volumeGroupExtId}." content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Get operation" x-permissions: operationName: View Volume Group Disks deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.ListVolumeDisksByVolumeGroupIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListVolumeDisksApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"cA5CFc53-Ecfb-Da0B-EFC4-fCFFDd5BbdFf\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVolumeDisksApiResponse\ \ listVolumeDisksApiResponse = volumeGroupsApi.listVolumeDisksByVolumeGroupId(ListVolumeDisksByVolumeGroupIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listVolumeDisksApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"F0bCbCEd-A57E-B141-F1Ec-4F82DEf5AD74\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n opts[\"$select\"\ ] = \"string_sample_data\";\n\n\n\n\n volumeGroupsApi.listVolumeDisksByVolumeGroupId(volumeGroupExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"Ce35F9bc-C6Fd-dcEF-F4bc-eC1fE53fFc87\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = volume_groups_api.list_volume_disks_by_volume_group_id(volumeGroupExtId=volume_group_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"eF6E6a6e-6eff-1F4f-F402-73A507Ac0eaC\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := volumegroups.ListVolumeDisksByVolumeGroupIdRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil, Select_: nil }\n response, error := VolumeGroupsServiceApiInstance.ListVolumeDisksByVolumeGroupId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VolumeDisk)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/5a7CDC04-B84b-3043-2fEf-cba42dbAb5Bd/disks?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/be7f7Dae-9bae-bB8D-BA0b-D83bE7eFdbCe/disks?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"Dbdac4CF-1FF9-2d4D-1d9e-CbC2AE3dd6e0\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\ \ String select = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListVolumeDisksByVolumeGroupIdRequest\ \ {\n VolumeGroupExtId = volumeGroupExtId,\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListVolumeDisksApiResponse listVolumeDisksApiResponse\ \ = volumeGroupsApi.ListVolumeDisksByVolumeGroupId(request);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - VolumeGroups summary: Creates a new Volume Disk description: Creates a new Volume Disk. operationId: createVolumeDisk parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 630dee95-b63b-4b0b-9b9a-2e4683dc02f5 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 01443826-87c1-4efe-821e-8a5cd47eddd1 requestBody: description: "A model that represents a Volume Disk associated with a Volume\ \ Group, supported by a backing file on DSF." content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' required: true responses: "202": description: Task Id corresponding to the Volume Disk create operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Post operation" x-permissions: operationName: Create Volume Group Disk deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.CreateVolumeDiskRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.VolumeDisk;\nimport com.nutanix.dp1.vol.volumes.v4.config.CreateVolumeDiskApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n VolumeDisk volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n \n String volumeGroupExtId\ \ = \"Fe1B223d-12bA-Abbf-3e0e-9FA3AefC458F\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n CreateVolumeDiskApiResponse createVolumeDiskApiResponse\ \ = volumeGroupsApi.createVolumeDisk(CreateVolumeDiskRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .build(),\ \ volumeDisk);\n\n System.out.println(createVolumeDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, VolumeDisk } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n volumeDisk = JSON.stringify(volumeDisk);\n\ \n \n let volumeGroupExtId = \"2A8AbfA3-EcfC-a90f-c2C2-E48F7C71fBAa\"\ ;\n\n\n\n\n\n volumeGroupsApi.createVolumeDisk(volumeGroupExtId, volumeDisk).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ volumeDisk = ntnx_volumes_py_client.VolumeDisk()\n\n # VolumeDisk\ \ object initializations here...\n \n volume_group_ext_id = \"88AD0b92-befc-2DbE-52Fe-77DE4DaEcCE2\"\ \n\n\n try:\n api_response = volume_groups_api.create_volume_disk(volumeGroupExtId=volume_group_ext_id,\ \ body=volumeDisk)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n volumeDisk := import1.NewVolumeDisk()\n\ \n // VolumeDisk object initializations here...\n\n \n volumeGroupExtId\ \ := \"Eac4c9Ed-13Bc-9ccC-aE9d-f26df382D24a\"\n\n\n request := volumegroups.CreateVolumeDiskRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, Body: volumeDisk }\n response,\ \ error := VolumeGroupsServiceApiInstance.CreateVolumeDisk(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import2.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/D5Db3D2b-fBBF-Aa70-DbCc-47aA66ab5aBc/disks" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/E14Eac3C-dA6B-9e6D-1ae5-6A0CA2f41Ca2/disks" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VolumeDisk volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n\n String volumeGroupExtId = \"eD5A1feC-Efad-8Bd1-CBc3-a0Ef4D6a3F7e\"\ ;\n\n // Create request object with parameters\n var request\ \ = new CreateVolumeDiskRequest {\n VolumeGroupExtId = volumeGroupExtId,\n\ \ Body = volumeDisk\n };\n try {\n CreateVolumeDiskApiResponse\ \ createVolumeDiskApiResponse = volumeGroupsApi.CreateVolumeDisk(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}: get: tags: - VolumeGroups summary: Get the details of a Volume Disk description: "Query the Volume Disk identified by {extId} in the Volume Group\ \ identified by {volumeGroupExtId}." operationId: getVolumeDiskById parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e8a32b51-57b4-4dca-941a-2ffc17e1cdb7 - name: extId in: path description: The external identifier of a Volume Disk. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 152a0f52-092a-4c22-901c-305eb3dd08ac responses: "200": description: Details of the queried Volume Disk. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" x-permissions: operationName: View Volume Group Disks deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeDiskByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetVolumeDiskApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"54FEfCeb-BDe8-Fa6b-c94c-831DFf2FcEc8\"\ ;\n \n String extId = \"12AFdBd3-dDcF-FcBd-df0e-c1D4ccC0f1e6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVolumeDiskApiResponse\ \ getVolumeDiskApiResponse = volumeGroupsApi.getVolumeDiskById(GetVolumeDiskByIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getVolumeDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"AF106eEe-7E0C-6ADa-C800-1F38daFB5e09\"\ ;\n \n let extId = \"EFaDDCEB-D181-dCBa-6ccC-8FDc5BCDdceB\";\n\n\n\ \n\n\n volumeGroupsApi.getVolumeDiskById(volumeGroupExtId, extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"eFa7Bb3C-2dBd-FEda-D93F-Cdcaa6Dcccd3\"\ \n \n ext_id = \"EEbEcfFD-2Ab5-5dd4-4D0d-A6176A1Feba2\"\n\n\n try:\n\ \ api_response = volume_groups_api.get_volume_disk_by_id(volumeGroupExtId=volume_group_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"bCdaBc86-56A0-3E1C-DcfC-AE37fE05F508\"\ \n \n extId := \"4349fD32-4DbB-60Cb-EFea-Ad97a07b3f8e\"\n\n\n request\ \ := volumegroups.GetVolumeDiskByIdRequest{ VolumeGroupExtId: &volumeGroupExtId,\ \ ExtId: &extId }\n response, error := VolumeGroupsServiceApiInstance.GetVolumeDiskById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VolumeDisk)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/1fCdeecA-e0e1-54FE-8a6F-C179AbBDAe8a/disks/B7CFa0F4-F2ED-6835-EBbf-D5f1cD02CbAc" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/aCdA63ea-AdaC-C1ef-9e0a-289c3f0AaFB8/disks/3baccCbF-eDEd-e6dE-E95E-00fAa84f5BBa" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"ec52da9e-fcB6-D388-5Cb7-BeE5bd8CB9D3\"\ ;\n String extId = \"eeb9DAD0-C37f-aBDd-eE6E-6E0cedEb8CB6\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetVolumeDiskByIdRequest {\n VolumeGroupExtId = volumeGroupExtId,\n\ \ ExtId = extId\n };\n try {\n GetVolumeDiskApiResponse\ \ getVolumeDiskApiResponse = volumeGroupsApi.GetVolumeDiskById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - VolumeGroups summary: Update a specified Volume Disk description: "Updates a specific Volume Disk identified by {extId}." operationId: updateVolumeDiskById parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b2eca79b-889a-4217-a390-0efa83ac0c34 - name: extId in: path description: The external identifier of a Volume Disk. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 43bcd8d2-ff37-4bd7-be08-8a8fd505e306 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: e07cb5f6-c56d-4f23-8aaa-c90a2eb86eee requestBody: description: "A model that represents a Volume Disk associated with a Volume\ \ Group, supported by a backing file on DSF." content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' required: true responses: "202": description: Returns the task ID corresponding to the Volume Disk update operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Put operation" x-permissions: operationName: Update Volume Group Disk deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: small count: 15 timeUnit: seconds - type: large count: 15 timeUnit: seconds - type: xlarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.UpdateVolumeDiskByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeDiskByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.vol.volumes.v4.config.VolumeDisk;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetVolumeDiskApiResponse;\n\ import com.nutanix.dp1.vol.volumes.v4.config.UpdateVolumeDiskApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n VolumeDisk volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n \n String volumeGroupExtId\ \ = \"63A8cCF3-EABc-EABB-dAb2-E7Cd622DceFA\";\n \n String\ \ extId = \"ecE3DEAb-a9AD-BeeC-da1E-3fdFDFcAf9ac\";\n\n // perform\ \ GET call\n GetVolumeDiskApiResponse getResponse = null;\n \ \ try {\n getResponse = volumeGroupsApi.getVolumeDiskById(GetVolumeDiskByIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .extId(extId)\n\ \ .build());\n } catch(RestClientException ex) {\n\ \ System.out.println(ex.getMessage());\n }\n //\ \ Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateVolumeDiskApiResponse\ \ updateVolumeDiskApiResponse = volumeGroupsApi.updateVolumeDiskById(UpdateVolumeDiskByIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .extId(extId)\n\ \ .build(), volumeDisk, opts);\n\n System.out.println(updateVolumeDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, VolumeDisk, GetVolumeDiskApiResponse\ \ } from \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n volumeDisk = JSON.stringify(volumeDisk);\n\ \n \n let volumeGroupExtId = \"bb7c0c0e-ea4c-a38d-0b48-BC5A2AB99D6F\"\ ;\n \n let extId = \"Fa555CEf-4FF0-fDf9-Ddf8-441FabA7eBBb\";\n\n\n\ \ // Perform Get call\n volumeGroupsApi.getVolumeDiskById(volumeGroupExtId,\ \ extId).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n // Extract E-Tag\ \ Header\n let etagValue = ApiClient.getEtag(data);\n let\ \ args = {\"If-Match\" : etagValue};\n\n volumeGroupsApi.updateVolumeDiskById(volumeGroupExtId,\ \ extId, volumeDisk, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ volumeDisk = ntnx_volumes_py_client.VolumeDisk()\n\n # VolumeDisk\ \ object initializations here...\n \n volume_group_ext_id = \"9d1Bc9d8-bad2-BdCC-248b-84FEAe6e3fac\"\ \n \n ext_id = \"fdee584b-3dbf-AaED-EBba-afadB0abeD3F\"\n\n try:\n\ \ api_response = volume_groups_api.get_volume_disk_by_id(volumeGroupExtId=volume_group_ext_id,\ \ extId=ext_id)\n except ntnx_volumes_py_client.rest.ApiException as\ \ e:\n print(e)\n # Extract E-Tag Header\n etag_value = ntnx_volumes_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = volume_groups_api.update_volume_disk_by_id(volumeGroupExtId=volume_group_ext_id,\ \ extId=ext_id, body=volumeDisk, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n volumeDisk := import1.NewVolumeDisk()\n\ \n // VolumeDisk object initializations here...\n\n \n volumeGroupExtId\ \ := \"5aBf8e1E-a6b7-3Efb-2444-fe4beFaCAF3C\"\n \n extId := \"B3c3dF6C-AB62-d0Fc-E3fa-dBbefa6ee05B\"\ \n\n getRequest := volumegroups.GetVolumeDiskByIdRequest{ volumeGroupExtId:\ \ &volumeGroupExtId, extId: &extId }\n getResponse, err := VolumeGroupsServiceApiInstance.GetVolumeDiskById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := volumegroups.UpdateVolumeDiskByIdRequest{ VolumeGroupExtId:\ \ &volumeGroupExtId, ExtId: &extId, Body: volumeDisk }\n response, error\ \ := VolumeGroupsServiceApiInstance.UpdateVolumeDiskById(ctx, &request,\ \ args)\n if error != nil {\n fmt.Println(error)\n return\n\ \ }\n data, _ := response.GetData().(import2.TaskReference)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/94ef6CC0-A85d-eCEE-752f-4C6C5dABaBcb/disks/A3f47DdC-5b0B-b7Ff-1daE-edEBAd72937C" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"index":0,"diskSizeBytes":0,"storageContainerId":"string","description":"string","diskDataSourceReference":{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"},"diskStorageFeatures":{"flashMode":{"isEnabled":false,"$objectType":"volumes.v4.config.FlashMode"},"$objectType":"volumes.v4.config.DiskStorageFeatures"},"$objectType":"volumes.v4.config.VolumeDisk"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/EB6EC7af-5FDC-E8c2-4bB7-fCfDFfa2fB2B/disks/31B3a4EE-fFf4-3B71-Ef46-8EDf5Af4D10c" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VolumeDisk volumeDisk = new VolumeDisk();\n\n // VolumeDisk\ \ object initializations here...\n\n String volumeGroupExtId = \"73eC84bb-cc9d-AcDE-BCcb-F1FD7c25b0D1\"\ ;\n String extId = \"CecDA1Cb-D7C8-cDdd-CBAF-fbaDF4Dc9E7D\";\n\n \ \ // perform GET call\n var getRequest = new GetVolumeDiskByIdRequest\ \ {\n VolumeGroupExtId = volumeGroupExtId,\n ExtId\ \ = extId,\n };\n var getRequest = new GetVolumeDiskByIdRequest\ \ {\n VolumeGroupExtId = volumeGroupExtId,\n ExtId\ \ = extId\n };\n try {\n GetVolumeDiskApiResponse\ \ getResponse = volumeGroupsApi.GetVolumeDiskById(getRequestgetRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateVolumeDiskByIdRequest {\n VolumeGroupExtId\ \ = volumeGroupExtId,\n ExtId = extId,\n Body = volumeDisk,\n\ \ \n \n };\n try {\n UpdateVolumeDiskApiResponse\ \ updateVolumeDiskApiResponse = volumeGroupsApi.UpdateVolumeDiskById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - VolumeGroups summary: Delete a Volume Disk description: "Deletes a Volume Disk identified by {extId} in the Volume Group\ \ identified by {volumeGroupExtId}." operationId: deleteVolumeDiskById parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: cd72baf4-90f2-4f5a-9816-a9f59da55229 - name: extId in: path description: The external identifier of a Volume Disk. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7f6e265a-27ca-4195-9f7d-7249747067e1 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 8e5e119c-c21e-488b-8afd-b8a6a617e919 responses: "202": description: Task Id corresponding to the Volume Disk delete operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Delete operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Delete operation" x-permissions: operationName: Delete Volume Group Disk deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DeleteVolumeDiskByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.DeleteVolumeDiskApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"Ceb58dDa-4d1d-BcfD-BaBa-Da5c3AbB1edE\"\ ;\n \n String extId = \"EcA2aBca-3eA5-E410-fA5F-bECB7Aecd2ff\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteVolumeDiskApiResponse\ \ deleteVolumeDiskApiResponse = volumeGroupsApi.deleteVolumeDiskById(DeleteVolumeDiskByIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(deleteVolumeDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"eFFA74be-f0bc-D6E6-DaA0-a5EbF7EEDFB1\"\ ;\n \n let extId = \"BCaeb57f-25BA-7BE5-b3A1-4F4cdDc5DECF\";\n\n\n\ \n\n\n volumeGroupsApi.deleteVolumeDiskById(volumeGroupExtId, extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"a88AA0F0-b4B8-2293-cD3F-D7a7b3a3c2ce\"\ \n \n ext_id = \"56d5caEB-8Eb0-Bb4b-cf0F-7F95cBB5fDb5\"\n\n\n try:\n\ \ api_response = volume_groups_api.delete_volume_disk_by_id(volumeGroupExtId=volume_group_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"1ceacDaE-D0eD-EAC9-F9E1-E57ea7EFA6CF\"\ \n \n extId := \"fBDFfAEa-EEbe-A2bD-d192-AF8AC6c4C111\"\n\n\n request\ \ := volumegroups.DeleteVolumeDiskByIdRequest{ VolumeGroupExtId: &volumeGroupExtId,\ \ ExtId: &extId }\n response, error := VolumeGroupsServiceApiInstance.DeleteVolumeDiskById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request DELETE \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/1cE8aFCA-EDE2-4eb1-3a68-b6eCBADcE6d1/disks/F46faaaf-A0c1-1a4C-C76e-AfEe801b1F10" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/6CcCbf00-9bb8-dFEb-ef7e-CbE0Cd0c5B50/disks/b2ad43fD-38D6-fdB5-a49b-f7A5b6Bc3FBc" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"9f1A7C08-4a6c-3B8C-95FE-DCdb6ABdE6D5\"\ ;\n String extId = \"afEFAe6e-9DAC-6ff5-baEc-cEB0b73832e5\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteVolumeDiskByIdRequest {\n VolumeGroupExtId = volumeGroupExtId,\n\ \ ExtId = extId\n };\n try {\n DeleteVolumeDiskApiResponse\ \ deleteVolumeDiskApiResponse = volumeGroupsApi.DeleteVolumeDiskById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments: get: tags: - VolumeGroups summary: List all the iSCSI attachments associated with the given Volume Group description: "Query the list of external iSCSI attachments for a Volume Group\ \ identified by {extId}." operationId: listExternalIscsiAttachmentsByVolumeGroupId parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: be0c7206-7ed4-4916-968b-fb68eacbe7c5 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$filter=clusterReference\ \ eq '9a9ad650-f14c-40b1-ad15-6bac2fb4c21b'" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$filter=extId\ \ eq '9d23bbf5-0bec-409c-ad6f-71d25f177b3e'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$orderby=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$orderby=extId" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: iscsiClient example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$expand=iscsiClient" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterReference example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$select=clusterReference" - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments?$select=extId" responses: "200": description: Paginated list of external iSCSI attachments. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClientAttachment' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments\ \ Get operation" deprecated: true x-permissions: operationName: View Volume Group ISCSI Attachments deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.ListExternalIscsiAttachmentsByVolumeGroupIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListExternalIscsiAttachmentsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"84faaf2C-F56E-B4D6-9a3A-cb96B3cc3AF3\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListExternalIscsiAttachmentsApiResponse\ \ listExternalIscsiAttachmentsApiResponse = volumeGroupsApi.listExternalIscsiAttachmentsByVolumeGroupId(ListExternalIscsiAttachmentsByVolumeGroupIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$expand(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listExternalIscsiAttachmentsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"c9FB51dC-eB8F-45AD-DECb-A5ae4d9EddC7\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n opts[\"$expand\"\ ] = \"string_sample_data\";\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n volumeGroupsApi.listExternalIscsiAttachmentsByVolumeGroupId(volumeGroupExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"dE302ddd-De2E-8Dfa-DabD-cdF7aDcFa021\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = volume_groups_api.list_external_iscsi_attachments_by_volume_group_id(volumeGroupExtId=volume_group_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"beE051eD-94D0-cb2e-2cAE-DDEfc7757bb2\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := volumegroups.ListExternalIscsiAttachmentsByVolumeGroupIdRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil, Expand_: nil, Select_: nil }\n response, error\ \ := VolumeGroupsServiceApiInstance.ListExternalIscsiAttachmentsByVolumeGroupId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.IscsiClientAttachment)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/7CAFD4Ee-44d2-9EcC-587d-6a65cBDEeEf0/external-iscsi-attachments?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/b8D04CEE-57f4-cfFA-Ddaa-14caFaE9caF0/external-iscsi-attachments?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"bd47FEBb-4dC9-1d8c-c92b-b09eBbEcCA28\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\ \ String expand = \"string_sample_data\";\n String select = \"\ string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListExternalIscsiAttachmentsByVolumeGroupIdRequest\ \ {\n VolumeGroupExtId = volumeGroupExtId,\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Expand = expand,\n \ \ Select = select\n };\n try {\n ListExternalIscsiAttachmentsApiResponse\ \ listExternalIscsiAttachmentsApiResponse = volumeGroupsApi.ListExternalIscsiAttachmentsByVolumeGroupId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-iscsi-client: post: tags: - VolumeGroups summary: Attach an iSCSI client to the given Volume Group description: "Attaches iSCSI initiator to a Volume Group identified by {extId}." operationId: attachIscsiClient parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b4374a52-f829-44c4-873e-f41897c1c97b - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: cf8ceaa3-7e21-41a8-934d-2211a9ba6544 requestBody: description: A model that represents an iSCSI client that can be associated with a Volume Group as an external attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' required: true responses: "202": description: Status of the iSCSI client attachment operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-iscsi-client\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-iscsi-client\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-iscsi-client\ \ Post operation" x-permissions: operationName: Attach Volume Group To External ISCSI Client deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.AttachIscsiClientRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.IscsiClient;\nimport com.nutanix.dp1.vol.volumes.v4.config.AttachIscsiClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n IscsiClient iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n \n String extId = \"a636CAbe-Ab82-0e22-ecac-1a86BFCaD3B7\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n AttachIscsiClientApiResponse\ \ attachIscsiClientApiResponse = volumeGroupsApi.attachIscsiClient(AttachIscsiClientRequest.builder()\n\ \ .extId(extId)\n .build(), iscsiClient);\n\ \n System.out.println(attachIscsiClientApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, IscsiClient } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n iscsiClient = JSON.stringify(iscsiClient);\n\ \n \n let extId = \"D38Edc1b-6cDa-e5BE-10E9-B0d9979DcEb5\";\n\n\n\n\ \n\n volumeGroupsApi.attachIscsiClient(extId, iscsiClient).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ iscsiClient = ntnx_volumes_py_client.IscsiClient()\n\n # IscsiClient\ \ object initializations here...\n \n ext_id = \"d38a857b-cd71-71ad-8C3b-7EfDF4ccF4Ce\"\ \n\n\n try:\n api_response = volume_groups_api.attach_iscsi_client(extId=ext_id,\ \ body=iscsiClient)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n iscsiClient := import1.NewIscsiClient()\n\ \n // IscsiClient object initializations here...\n\n \n extId :=\ \ \"ca0BdBeC-bEbd-DbDc-CF30-d8aCCCB9dB06\"\n\n\n request := volumegroups.AttachIscsiClientRequest{\ \ ExtId: &extId, Body: iscsiClient }\n response, error := VolumeGroupsServiceApiInstance.AttachIscsiClient(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/eFdBcf2b-EC13-AB19-B521-fF16c6DcbBCE/$actions/attach-iscsi-client" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"iscsiInitiatorName":"iqn.2024-01.com.example.iscsi:initiator","iscsiInitiatorNetworkId":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"},"clientSecret":"string","enabledAuthentications":"$UNKNOWN","attachedTargets":[{"numVirtualTargets":0,"iscsiTargetName":"target-e7195673-85d0-4456-b5ee-c1b89be13537","$objectType":"volumes.v4.config.TargetParam"}],"numVirtualTargets":0,"clusterReference":"string","attachmentSite":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiClient"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"iscsiInitiatorName":"iqn.2024-01.com.example.iscsi:initiator","iscsiInitiatorNetworkId":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"fqdn":{"value":"string","$objectType":"common.v1.config.FQDN"},"$objectType":"common.v1.config.IPAddressOrFQDN"},"clientSecret":"string","enabledAuthentications":"$UNKNOWN","attachedTargets":[{"numVirtualTargets":0,"iscsiTargetName":"target-e7195673-85d0-4456-b5ee-c1b89be13537","$objectType":"volumes.v4.config.TargetParam"}],"numVirtualTargets":0,"clusterReference":"string","attachmentSite":"$UNKNOWN","$objectType":"volumes.v4.config.IscsiClient"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/ceF2C4Ff-8BdB-990d-41ED-55Cbe5c1953b/$actions/attach-iscsi-client" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ IscsiClient iscsiClient = new IscsiClient();\n\n // IscsiClient\ \ object initializations here...\n\n String extId = \"edCc7aDb-E5bE-bfAD-EeDe-baFEBAbc3ce1\"\ ;\n\n // Create request object with parameters\n var request\ \ = new AttachIscsiClientRequest {\n ExtId = extId,\n \ \ Body = iscsiClient\n };\n try {\n AttachIscsiClientApiResponse\ \ attachIscsiClientApiResponse = volumeGroupsApi.AttachIscsiClient(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-iscsi-client: post: tags: - VolumeGroups summary: Detach an iSCSi client from the given Volume Group description: "Detaches iSCSI initiator identified by {extId} from a Volume Group\ \ identified by {volumeGroupExtId}." operationId: detachIscsiClient parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 693b5f16-8e6b-474b-a05a-cb9a0f9e4b1e - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 26c56474-885b-4c0b-877b-477f13d87d7c requestBody: description: A model that represents an iSCSI client that can be associated with a Volume Group as an external attachment. It contains the minimal properties required for the attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClientAttachment' required: true responses: "202": description: Status of the iSCSI client detachment operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-iscsi-client\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-iscsi-client\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-iscsi-client\ \ Post operation" x-permissions: operationName: Detach Volume Group From External ISCSI Client deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DetachIscsiClientRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.IscsiClientAttachment;\nimport\ \ com.nutanix.dp1.vol.volumes.v4.config.DetachIscsiClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n IscsiClientAttachment iscsiClientAttachment = new IscsiClientAttachment();\n\ \n // IscsiClientAttachment object initializations here...\n \ \ \n String extId = \"4bad4BFe-fdba-1c4a-FdBF-Fca1dBc51acb\";\n\ \n try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n DetachIscsiClientApiResponse\ \ detachIscsiClientApiResponse = volumeGroupsApi.detachIscsiClient(DetachIscsiClientRequest.builder()\n\ \ .extId(extId)\n .build(), iscsiClientAttachment);\n\ \n System.out.println(detachIscsiClientApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, IscsiClientAttachment } from\ \ \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\nlet apiClientInstance\ \ = new ApiClient();\n// IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host\ \ = 'localhost';\n// Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\napiClientInstance.port = '9440';\n\ // Max retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let iscsiClientAttachment = new IscsiClientAttachment();\n\ \n // IscsiClientAttachment object initializations here...\n iscsiClientAttachment\ \ = JSON.stringify(iscsiClientAttachment);\n\n \n let extId = \"Db9687bF-fEA3-fB2F-97c9-E21bAC616b60\"\ ;\n\n\n\n\n\n volumeGroupsApi.detachIscsiClient(extId, iscsiClientAttachment).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ iscsiClientAttachment = ntnx_volumes_py_client.IscsiClientAttachment()\n\ \n # IscsiClientAttachment object initializations here...\n \n \ \ ext_id = \"39d06Fd8-eEAd-cDA8-d5b7-CbbfCF89d2Bd\"\n\n\n try:\n \ \ api_response = volume_groups_api.detach_iscsi_client(extId=ext_id,\ \ body=iscsiClientAttachment)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n iscsiClientAttachment := import1.NewIscsiClientAttachment()\n\ \n // IscsiClientAttachment object initializations here...\n\n \n\ \ extId := \"6Dcfde4F-beEE-ceA0-8A12-EEFEdC47E4f7\"\n\n\n request\ \ := volumegroups.DetachIscsiClientRequest{ ExtId: &extId, Body: iscsiClientAttachment\ \ }\n response, error := VolumeGroupsServiceApiInstance.DetachIscsiClient(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/E9c7BCaC-FcDf-dEFF-5FAD-A00A51d8Eff1/$actions/detach-iscsi-client" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"extId":"string","clusterReference":"string","$objectType":"volumes.v4.config.IscsiClientAttachment"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"extId":"string","clusterReference":"string","$objectType":"volumes.v4.config.IscsiClientAttachment"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/1415b8AB-DB9a-B84E-E3cF-bebe0DbCdbDd/$actions/detach-iscsi-client" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ IscsiClientAttachment iscsiClientAttachment = new IscsiClientAttachment();\n\ \n // IscsiClientAttachment object initializations here...\n\n \ \ String extId = \"dd7FaC6E-Fb1B-7DAD-aD8A-E1ab08bcacBF\";\n\n //\ \ Create request object with parameters\n var request = new DetachIscsiClientRequest\ \ {\n ExtId = extId,\n Body = iscsiClientAttachment\n\ \ };\n try {\n DetachIscsiClientApiResponse detachIscsiClientApiResponse\ \ = volumeGroupsApi.DetachIscsiClient(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments: get: tags: - VolumeGroups summary: List all the VM attachments for a Volume Group description: "Query the list of VM attachments for a Volume Group identified\ \ by {extId}." operationId: listVmAttachmentsByVolumeGroupId parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: edbaaeba-be8f-4a93-a5ea-05074955b638 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments?$filter=extId\ \ eq '8ac92845-5ff3-4eeb-9bc2-4ce8c2a9f993'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments?$orderby=extId" responses: "200": description: Paginated list of VM attachments. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VmAttachment' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments\ \ Get operation" deprecated: true x-permissions: operationName: View Volume Group VM Attachments deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.ListVmAttachmentsByVolumeGroupIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListVmAttachmentsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"d1Af5D6e-Aa9F-4ACA-8cFF-ce23bEfE8fbA\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListVmAttachmentsApiResponse\ \ listVmAttachmentsApiResponse = volumeGroupsApi.listVmAttachmentsByVolumeGroupId(ListVmAttachmentsByVolumeGroupIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listVmAttachmentsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"bEA8EC8a-E7De-fFeA-Bd8c-f5Ef4eeEcAfC\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n\n\n\n\n volumeGroupsApi.listVmAttachmentsByVolumeGroupId(volumeGroupExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"e64dEFfE-eeed-8Efd-bC51-ebD15EC1edad\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = volume_groups_api.list_vm_attachments_by_volume_group_id(volumeGroupExtId=volume_group_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"fcDbfCeA-fdb9-fae3-cDD7-0F9eFAC8BBE5\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := volumegroups.ListVmAttachmentsByVolumeGroupIdRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := VolumeGroupsServiceApiInstance.ListVmAttachmentsByVolumeGroupId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VmAttachment)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/9BDC8eDC-D21c-74BC-ECEc-b9Bf6301bbf9/vm-attachments?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/4C9eDe6a-daec-aDdB-7EAa-dCeB3dDB4F5E/vm-attachments?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"B33c7Ccd-b9A7-Bccd-B2Ce-cCC59c5dA456\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListVmAttachmentsByVolumeGroupIdRequest {\n VolumeGroupExtId\ \ = volumeGroupExtId,\n Page = page,\n Limit = limit,\n\ \ Filter = filter,\n Orderby = orderby\n };\n\ \ try {\n ListVmAttachmentsApiResponse listVmAttachmentsApiResponse\ \ = volumeGroupsApi.ListVmAttachmentsByVolumeGroupId(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-vm: post: tags: - VolumeGroups summary: Attach an AHV VM to the given Volume Group description: "Attaches VM to a Volume Group identified by {extId}." operationId: attachVm parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1a119e96-e3e1-403c-9384-6425070a03eb - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 16fb44c5-d715-4d84-976b-fee18dc3c548 requestBody: description: A model that represents a VM reference that can be associated with a Volume Group as an AHV hypervisor attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VmAttachment' required: true responses: "202": description: "Status of the VM attach operation, on the Volume Group." headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-vm\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-vm\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-vm\ \ Post operation" x-permissions: operationName: Attach Volume Group To AHV VM deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Virtual Machine Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.AttachVmRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.VmAttachment;\nimport com.nutanix.dp1.vol.volumes.v4.config.AttachVmApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n VmAttachment vmAttachment = new VmAttachment();\n\n //\ \ VmAttachment object initializations here...\n vmAttachment.setExtId(\"\ 67dFeCeD-dBed-8F31-Dde4-b7EdCa6faCE4\"); // required field\n \n\ \ String extId = \"CC47e8AF-E2dE-8a4F-a3E9-a36BAFfe93Ed\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n AttachVmApiResponse\ \ attachVmApiResponse = volumeGroupsApi.attachVm(AttachVmRequest.builder()\n\ \ .extId(extId)\n .build(), vmAttachment);\n\ \n System.out.println(attachVmApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, VmAttachment } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let vmAttachment = new VmAttachment();\n\n // VmAttachment\ \ object initializations here...\n vmAttachment.setExtId(\"88aAc3DE-D24E-1f51-6Feb-e1dfbA69Cebc\"\ ); // required field\n vmAttachment = JSON.stringify(vmAttachment);\n\ \n \n let extId = \"FeAD8DD1-238C-2e01-DcFA-CbFBabbAFD5f\";\n\n\n\n\ \n\n volumeGroupsApi.attachVm(extId, vmAttachment).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ vmAttachment = ntnx_volumes_py_client.VmAttachment()\n\n # VmAttachment\ \ object initializations here...\n vmAttachment.ext_id = \"3F6ffb8B-e6dB-DdeA-FAcD-9d9d9EBBfE65\"\ \ # required field\n \n ext_id = \"3611AadA-bf7A-cC87-dCff-aA1c99c9fEe8\"\ \n\n\n try:\n api_response = volume_groups_api.attach_vm(extId=ext_id,\ \ body=vmAttachment)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vmAttachment := import1.NewVmAttachment()\n\ \n // VmAttachment object initializations here...\n\n \n extId\ \ := \"adC9aDd9-F9AE-8Abd-F497-eD2ED4D9FBdE\"\n\n\n request := volumegroups.AttachVmRequest{\ \ ExtId: &extId, Body: vmAttachment }\n response, error := VolumeGroupsServiceApiInstance.AttachVm(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/ef18Cac6-bbcd-7ccf-e5cA-c4cde66eCfEa/$actions/attach-vm" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/Bdbce6c0-3BCC-A19F-AbEb-9cDEfe9eccfC/$actions/attach-vm" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VmAttachment vmAttachment = new VmAttachment();\n\n // VmAttachment\ \ object initializations here...\n vmAttachment.ExtId = \"8aC32B0D-aeCc-7b71-C7ca-d7B8Adc08e18\"\ ; // required field\n\n String extId = \"B36A91eB-17Ec-8B2e-33cc-BCFbE1fcdBAf\"\ ;\n\n // Create request object with parameters\n var request\ \ = new AttachVmRequest {\n ExtId = extId,\n Body\ \ = vmAttachment\n };\n try {\n AttachVmApiResponse\ \ attachVmApiResponse = volumeGroupsApi.AttachVm(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-vm: post: tags: - VolumeGroups summary: Detach an AHV VM from the given Volume Group description: "Detaches VM identified by {extId} from a Volume Group identified\ \ by {volumeGroupExtId}." operationId: detachVm parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: bac6394f-6702-4ce1-8a9e-476c8c8e4330 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 648c5a23-3b32-4170-b1b5-850c04318fa0 requestBody: description: A model that represents a VM reference that can be associated with a Volume Group as an AHV hypervisor attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.VmAttachment' required: true responses: "202": description: Status of the VM detach operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-vm\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-vm\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-vm\ \ Post operation" x-permissions: operationName: Detach Volume Group From AHV VM deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Virtual Machine Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DetachVmRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.VmAttachment;\nimport com.nutanix.dp1.vol.volumes.v4.config.DetachVmApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n VmAttachment vmAttachment = new VmAttachment();\n\n //\ \ VmAttachment object initializations here...\n vmAttachment.setExtId(\"\ 8Fe54fCD-FcFC-9aBd-dd8e-22CEfA7FaEd4\"); // required field\n \n\ \ String extId = \"6edc2dDA-1AF4-dDb1-adbB-F8dbb1eaa0b7\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n DetachVmApiResponse\ \ detachVmApiResponse = volumeGroupsApi.detachVm(DetachVmRequest.builder()\n\ \ .extId(extId)\n .build(), vmAttachment);\n\ \n System.out.println(detachVmApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, VmAttachment } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let vmAttachment = new VmAttachment();\n\n // VmAttachment\ \ object initializations here...\n vmAttachment.setExtId(\"AcCebAdf-c58B-0D8A-44CB-Ad4BbDC3dFe6\"\ ); // required field\n vmAttachment = JSON.stringify(vmAttachment);\n\ \n \n let extId = \"80fEeC34-EFbd-0fBE-34CF-C8EaE47BD3fd\";\n\n\n\n\ \n\n volumeGroupsApi.detachVm(extId, vmAttachment).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ vmAttachment = ntnx_volumes_py_client.VmAttachment()\n\n # VmAttachment\ \ object initializations here...\n vmAttachment.ext_id = \"5F1B8626-B30d-BE0C-d281-CEdEfFFcbD54\"\ \ # required field\n \n ext_id = \"CBF3AeD3-c0Ec-9aDd-EAf2-d4E447b0ceFa\"\ \n\n\n try:\n api_response = volume_groups_api.detach_vm(extId=ext_id,\ \ body=vmAttachment)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vmAttachment := import1.NewVmAttachment()\n\ \n // VmAttachment object initializations here...\n\n \n extId\ \ := \"b0aEDCEa-b8fF-cf9E-Eadf-cCCc9d6BCCBD\"\n\n\n request := volumegroups.DetachVmRequest{\ \ ExtId: &extId, Body: vmAttachment }\n response, error := VolumeGroupsServiceApiInstance.DetachVm(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/aA61BDbb-B5ED-ACab-EaA1-BefED0BAb65D/$actions/detach-vm" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"extId":"string","index":0,"$objectType":"volumes.v4.config.VmAttachment"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/7Ab181cb-2fbA-0B6d-DFE6-d376BDFe34FA/$actions/detach-vm" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ VmAttachment vmAttachment = new VmAttachment();\n\n // VmAttachment\ \ object initializations here...\n vmAttachment.ExtId = \"9dcfDFFf-FfFE-3dFE-AcbE-DcAabdE6A7Db\"\ ; // required field\n\n String extId = \"1be8E2a5-23cF-AE7A-d7C0-Db9bdfBDC93c\"\ ;\n\n // Create request object with parameters\n var request\ \ = new DetachVmRequest {\n ExtId = extId,\n Body\ \ = vmAttachment\n };\n try {\n DetachVmApiResponse\ \ detachVmApiResponse = volumeGroupsApi.DetachVm(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/category-associations: get: tags: - VolumeGroups summary: List all the category details that are associated with the Volume Group description: "Query the category details that are associated with the Volume\ \ Group identified by {volumeGroupExtId}." operationId: listCategoryAssociationsByVolumeGroupId parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: fd6419c4-605d-4676-b151-8db55d54be23 - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 responses: "200": description: Paginated list of category details associated with the Volume Group. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/volumes.v4.2.config.CategoryDetails' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/category-associations\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/category-associations\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/category-associations\ \ Get operation" deprecated: true x-permissions: operationName: View Volume Group Category Associations deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.ListCategoryAssociationsByVolumeGroupIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.ListCategoryAssociationsApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"742FeFAe-DD6C-ba59-CFCF-80adceefDfD0\"\ ;\n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListCategoryAssociationsApiResponse\ \ listCategoryAssociationsApiResponse = volumeGroupsApi.listCategoryAssociationsByVolumeGroupId(ListCategoryAssociationsByVolumeGroupIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .$page(page)\n\ \ .$limit(limit)\n .build());\n\n \ \ System.out.println(listCategoryAssociationsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"FF8ABaA6-5dE0-FFcb-2a3b-bD202aFb5A52\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n\n\n\n\n volumeGroupsApi.listCategoryAssociationsByVolumeGroupId(volumeGroupExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"cb29cDaE-a0ee-B084-EcC0-F79e4f3ACFde\"\ \n \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = volume_groups_api.list_category_associations_by_volume_group_id(volumeGroupExtId=volume_group_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"6Fa54BCc-aAec-EEDb-e218-a9FC44ca2E5E\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := volumegroups.ListCategoryAssociationsByVolumeGroupIdRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, Page_: &page_, Limit_: &limit_ }\n\ \ response, error := VolumeGroupsServiceApiInstance.ListCategoryAssociationsByVolumeGroupId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.CategoryDetails)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/Ca01cbdF-7D1E-687A-fe37-Cb8bB28Fcfdf/category-associations?$limit=50&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/D59B2c9D-d62A-31CB-7F8A-aDdEEfFEda4f/category-associations?$limit=50&$page=0" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"3E9ae8f4-eE2f-AeDE-9F1a-1dBfBd581C6b\"\ ;\n int page = 0;\n int limit = 50;\n\n // Create request\ \ object with parameters\n var request = new ListCategoryAssociationsByVolumeGroupIdRequest\ \ {\n VolumeGroupExtId = volumeGroupExtId,\n Page\ \ = page,\n Limit = limit\n };\n try {\n \ \ ListCategoryAssociationsApiResponse listCategoryAssociationsApiResponse\ \ = volumeGroupsApi.ListCategoryAssociationsByVolumeGroupId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/associate-category: post: tags: - VolumeGroups summary: Associate category to a Volume Group description: "Associates a category to a Volume Group identified by {extId}." operationId: associateCategory parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9b53a6f2-5361-4d84-a42b-d389305356ba requestBody: description: The list of categories to be associated/disassociated with the Volume Group. This is a mandatory field. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.CategoryEntityReferences' required: true responses: "202": description: Returns the status of the associate category operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/associate-category\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/associate-category\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/associate-category\ \ Post operation" x-permissions: operationName: Associate Volume Group Categories deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: small count: 10 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.AssociateCategoryRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.CategoryEntityReferences;\n\ import com.nutanix.dp1.vol.volumes.v4.config.AssociateCategoryApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n CategoryEntityReferences categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n \ \ \n String extId = \"AdF6FeBB-F7Ce-BeaA-024d-eaFECeAcACAC\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n AssociateCategoryApiResponse\ \ associateCategoryApiResponse = volumeGroupsApi.associateCategory(AssociateCategoryRequest.builder()\n\ \ .extId(extId)\n .build(), categoryEntityReferences);\n\ \n System.out.println(associateCategoryApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, CategoryEntityReferences }\ \ from \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n categoryEntityReferences\ \ = JSON.stringify(categoryEntityReferences);\n\n \n let extId = \"\ B9F0EceA-AdaC-Bab8-EAd8-AF8e9C81FFCD\";\n\n\n\n\n\n volumeGroupsApi.associateCategory(extId,\ \ categoryEntityReferences).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ categoryEntityReferences = ntnx_volumes_py_client.CategoryEntityReferences()\n\ \n # CategoryEntityReferences object initializations here...\n \n\ \ ext_id = \"Eaf53EEE-bAF7-Ca27-d66b-c8b59afeb8bB\"\n\n\n try:\n \ \ api_response = volume_groups_api.associate_category(extId=ext_id,\ \ body=categoryEntityReferences)\n print(api_response)\n except\ \ ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n categoryEntityReferences := import1.NewCategoryEntityReferences()\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ \n extId := \"Acb9cFBB-AbbF-bcaE-E6Ac-baa63793AcCc\"\n\n\n request\ \ := volumegroups.AssociateCategoryRequest{ ExtId: &extId, Body: categoryEntityReferences\ \ }\n response, error := VolumeGroupsServiceApiInstance.AssociateCategory(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/625cC6DF-d7C5-DAe7-51a7-826D914bE1bA/$actions/associate-category" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"categories":[{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"}],"$objectType":"volumes.v4.config.CategoryEntityReferences"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"categories":[{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"}],"$objectType":"volumes.v4.config.CategoryEntityReferences"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/e94dEbf3-2E5b-0b9D-baFC-4B5faB173cb6/$actions/associate-category" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ CategoryEntityReferences categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ String extId = \"afc7b0fb-EfFf-FCa0-Be3d-ca5d4fACb56E\";\n\n \ \ // Create request object with parameters\n var request = new\ \ AssociateCategoryRequest {\n ExtId = extId,\n Body\ \ = categoryEntityReferences\n };\n try {\n AssociateCategoryApiResponse\ \ associateCategoryApiResponse = volumeGroupsApi.AssociateCategory(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/disassociate-category: post: tags: - VolumeGroups summary: Disassociate category from a Volume Group description: "Disassociates a category from a Volume Group identified by {extId}." operationId: disassociateCategory parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 4b531776-e3ca-42a2-bb68-05d9eeeab0f0 requestBody: description: The list of categories to be associated/disassociated with the Volume Group. This is a mandatory field. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.CategoryEntityReferences' required: true responses: "202": description: Return the status of the disassociate category operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/disassociate-category\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/disassociate-category\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/disassociate-category\ \ Post operation" x-permissions: operationName: Disassociate Volume Group Categories deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DisassociateCategoryRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.CategoryEntityReferences;\n\ import com.nutanix.dp1.vol.volumes.v4.config.DisassociateCategoryApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n CategoryEntityReferences categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n \ \ \n String extId = \"bb3cA5bd-c7Ae-EdD0-faf0-0Cbc7EF6EC93\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DisassociateCategoryApiResponse\ \ disassociateCategoryApiResponse = volumeGroupsApi.disassociateCategory(DisassociateCategoryRequest.builder()\n\ \ .extId(extId)\n .build(), categoryEntityReferences);\n\ \n System.out.println(disassociateCategoryApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, CategoryEntityReferences }\ \ from \"@nutanix-api/volumes-js-client\";\n\n// Configure the client\n\ let apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n categoryEntityReferences\ \ = JSON.stringify(categoryEntityReferences);\n\n \n let extId = \"\ cBcEd1D2-dDe5-Cd8E-8820-Df8CcAeAeddD\";\n\n\n\n\n\n volumeGroupsApi.disassociateCategory(extId,\ \ categoryEntityReferences).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ categoryEntityReferences = ntnx_volumes_py_client.CategoryEntityReferences()\n\ \n # CategoryEntityReferences object initializations here...\n \n\ \ ext_id = \"5c4Ae8Eb-EDdE-fd0B-aDae-A3f5EDaCE4ca\"\n\n\n try:\n \ \ api_response = volume_groups_api.disassociate_category(extId=ext_id,\ \ body=categoryEntityReferences)\n print(api_response)\n except\ \ ntnx_volumes_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n categoryEntityReferences := import1.NewCategoryEntityReferences()\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ \n extId := \"98cd4Afc-AFbF-Ec9d-9bfE-afe3160B9EfE\"\n\n\n request\ \ := volumegroups.DisassociateCategoryRequest{ ExtId: &extId, Body: categoryEntityReferences\ \ }\n response, error := VolumeGroupsServiceApiInstance.DisassociateCategory(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/CEfECedd-fD86-279c-CCCf-9BAF1B3912Fe/$actions/disassociate-category" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"categories":[{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"}],"$objectType":"volumes.v4.config.CategoryEntityReferences"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"categories":[{"extId":"string","name":"string","uris":["string"],"entityType":"$UNKNOWN","$objectType":"common.v1.config.EntityReference"}],"$objectType":"volumes.v4.config.CategoryEntityReferences"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/Ab2A0F8A-dF3d-03CA-6CB2-C32CEfddEDe6/$actions/disassociate-category" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ CategoryEntityReferences categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ String extId = \"A6f82FF8-BAd5-38aE-dBDe-F3E68ba15c00\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DisassociateCategoryRequest {\n ExtId = extId,\n \ \ Body = categoryEntityReferences\n };\n try {\n \ \ DisassociateCategoryApiResponse disassociateCategoryApiResponse = volumeGroupsApi.DisassociateCategory(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/revert: post: tags: - VolumeGroups summary: Revert a Volume Group description: Reverts a Volume Group identified by Volume Group external identifier. This API performs an in-place restore from a specified Volume Group recovery point. operationId: revertVolumeGroup parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a17ae9e7-fcbb-49a1-a308-6762f3006832 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 33f329bf-b197-4a70-a879-422cfe7edfd3 requestBody: description: Specify the Volume Group recovery point ID to which the Volume Group would be reverted. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.RevertSpec' required: true responses: "202": description: Returns task ID to monitor the progress of Volume Group revert operation. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/revert\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/revert\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/revert\ \ Post operation" x-permissions: operationName: Revert Volume Group deploymentList: - ON_PREM roleList: - name: Super Admin - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Disaster Recovery Admin - name: Project Manager x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 1 timeUnit: seconds - type: large count: 1 timeUnit: seconds - type: xlarge count: 1 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.RevertVolumeGroupRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.RevertSpec;\nimport com.nutanix.dp1.vol.volumes.v4.config.RevertVolumeGroupApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n RevertSpec revertSpec = new RevertSpec();\n\n // RevertSpec\ \ object initializations here...\n revertSpec.setVolumeGroupRecoveryPointExtId(\"\ f0FeaCBB-AcCA-edcD-aa97-eABDb1d2ab9E\"); // required field\n \n\ \ String extId = \"65Dae48E-bFdC-AD2a-Fc6f-a921f4eDDeDf\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n RevertVolumeGroupApiResponse\ \ revertVolumeGroupApiResponse = volumeGroupsApi.revertVolumeGroup(RevertVolumeGroupRequest.builder()\n\ \ .extId(extId)\n .build(), revertSpec);\n\ \n System.out.println(revertVolumeGroupApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, RevertSpec } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let revertSpec = new RevertSpec();\n\n // RevertSpec\ \ object initializations here...\n revertSpec.setVolumeGroupRecoveryPointExtId(\"\ A3F9BbBe-2a62-ECCc-3eEc-BEcccdaFAFFF\"); // required field\n revertSpec\ \ = JSON.stringify(revertSpec);\n\n \n let extId = \"71C0C33D-4F4d-14eF-BcAB-E7fdcceeaEeC\"\ ;\n\n\n\n\n\n volumeGroupsApi.revertVolumeGroup(extId, revertSpec).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ revertSpec = ntnx_volumes_py_client.RevertSpec()\n\n # RevertSpec\ \ object initializations here...\n revertSpec.volume_group_recovery_point_ext_id\ \ = \"c2D94ccf-14dB-C35D-cEBB-aaCcEc0fbb75\" # required field\n \n \ \ ext_id = \"a10Bc2cE-8dFF-0ACb-1Ecc-dd8CDcd5f5AE\"\n\n\n try:\n \ \ api_response = volume_groups_api.revert_volume_group(extId=ext_id,\ \ body=revertSpec)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n revertSpec := import1.NewRevertSpec()\n\ \n // RevertSpec object initializations here...\n\n \n extId :=\ \ \"7Bddf1A1-DdBd-bcAF-fffc-daE7F5BfB7Fa\"\n\n\n request := volumegroups.RevertVolumeGroupRequest{\ \ ExtId: &extId, Body: revertSpec }\n response, error := VolumeGroupsServiceApiInstance.RevertVolumeGroup(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/6Aa4fDAa-bB6c-16ED-8af3-cDacAE9aA040/$actions/revert" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"volumeGroupRecoveryPointExtId":"string","$objectType":"volumes.v4.config.RevertSpec"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"volumeGroupRecoveryPointExtId":"string","$objectType":"volumes.v4.config.RevertSpec"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/CcbabCBE-e9Af-DB12-5Fc0-dBeBfAEf5BAA/$actions/revert" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ RevertSpec revertSpec = new RevertSpec();\n\n // RevertSpec\ \ object initializations here...\n revertSpec.VolumeGroupRecoveryPointExtId\ \ = \"4a131Fbf-5cdB-fCec-9384-cdD3f83B4BA8\"; // required field\n\n \ \ String extId = \"feba50dB-36CD-ABcd-bBBc-99a48a13CefB\";\n\n \ \ // Create request object with parameters\n var request = new RevertVolumeGroupRequest\ \ {\n ExtId = extId,\n Body = revertSpec\n \ \ };\n try {\n RevertVolumeGroupApiResponse revertVolumeGroupApiResponse\ \ = volumeGroupsApi.RevertVolumeGroup(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/metadata: get: tags: - VolumeGroups summary: Fetch metadata information associated with a Volume Group. description: "Query for metadata information which is associated with the Volume\ \ Group identified by {extId}." operationId: getVolumeGroupMetadataById parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8e784d10-21eb-46b4-8b4a-bddb964f87fc responses: "200": description: Metadata information associated with the Volume Group. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/common.v1.0.config.Metadata' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/metadata\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/metadata\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/metadata\ \ Get operation" deprecated: true x-permissions: operationName: View Volume Group Metadata deploymentList: - ON_PREM roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Disaster Recovery Admin - name: Disaster Recovery Viewer - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeGroupMetadataByIdRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.GetVolumeGroupMetadataApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"Cd09DFAC-dA61-B9ff-F284-748abafC04Ec\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVolumeGroupMetadataApiResponse\ \ getVolumeGroupMetadataApiResponse = volumeGroupsApi.getVolumeGroupMetadataById(GetVolumeGroupMetadataByIdRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .build());\n\ \n System.out.println(getVolumeGroupMetadataApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"cfA95DbB-Ad4f-2AdD-dfe9-A43B39B5Fda1\"\ ;\n\n\n\n\n\n volumeGroupsApi.getVolumeGroupMetadataById(volumeGroupExtId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"D9a95f32-6048-a7a7-Aa1B-75Adb048F2fc\"\ \n\n\n try:\n api_response = volume_groups_api.get_volume_group_metadata_by_id(volumeGroupExtId=volume_group_ext_id)\n\ \ print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/common/v1/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"CbE34BFe-e5ab-e4c4-caAd-d38ed8bC63D0\"\ \n\n\n request := volumegroups.GetVolumeGroupMetadataByIdRequest{ VolumeGroupExtId:\ \ &volumeGroupExtId }\n response, error := VolumeGroupsServiceApiInstance.GetVolumeGroupMetadataById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Metadata)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/da9Ccca2-bFAC-EfA7-BCDc-BADF7cF6fe2c/metadata" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/config/volume-groups/EAAcC88f-2aF6-dAA3-5b33-9BC3adBcc8fB/metadata" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"E61c6bC0-CdBa-F46D-Bade-bAe2BCaeaBFB\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetVolumeGroupMetadataByIdRequest {\n VolumeGroupExtId\ \ = volumeGroupExtId\n };\n try {\n GetVolumeGroupMetadataApiResponse\ \ getVolumeGroupMetadataApiResponse = volumeGroupsApi.GetVolumeGroupMetadataById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-nvmf-client: post: tags: - VolumeGroups summary: Attach an NVMe-TCP client to the given Volume Group description: Attaches a NVMe-TCP client/initiator to a Volume Group identified by its external identifier. operationId: attachNvmfClient parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a4ed096a-a98c-4a38-8f87-da87a2eca2c2 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 0a91907b-b658-45d9-86e5-23a29f0c230c requestBody: description: A model representing a NVMe-TCP client that can be associated with a Volume Group as an external attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' required: true responses: "202": description: Current status of the NVMe-TCP client attachment operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-nvmf-client\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-nvmf-client\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-nvmf-client\ \ Post operation" x-permissions: operationName: Attach Volume Group To External NVMF Client deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" - product: PE version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.AttachNvmfClientRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.NvmfClient;\nimport com.nutanix.dp1.vol.volumes.v4.config.AttachNvmfClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n NvmfClient nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n \n String extId = \"3dFA07cd-aca8-9B7c-f8Fc-fa8fa3F89a65\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n AttachNvmfClientApiResponse\ \ attachNvmfClientApiResponse = volumeGroupsApi.attachNvmfClient(AttachNvmfClientRequest.builder()\n\ \ .extId(extId)\n .build(), nvmfClient);\n\ \n System.out.println(attachNvmfClientApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, NvmfClient } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n nvmfClient = JSON.stringify(nvmfClient);\n\ \n \n let extId = \"134851AE-fF3b-cE55-6436-BfdF2Cd0caed\";\n\n\n\n\ \n\n volumeGroupsApi.attachNvmfClient(extId, nvmfClient).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ nvmfClient = ntnx_volumes_py_client.NvmfClient()\n\n # NvmfClient\ \ object initializations here...\n \n ext_id = \"f41c1aAa-cE4d-FDC7-Ef4F-d6F9dfAf6f35\"\ \n\n\n try:\n api_response = volume_groups_api.attach_nvmf_client(extId=ext_id,\ \ body=nvmfClient)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nvmfClient := import1.NewNvmfClient()\n\ \n // NvmfClient object initializations here...\n\n \n extId :=\ \ \"b895d23b-F297-CEEf-ADFc-4EAaB4DBDafF\"\n\n\n request := volumegroups.AttachNvmfClientRequest{\ \ ExtId: &extId, Body: nvmfClient }\n response, error := VolumeGroupsServiceApiInstance.AttachNvmfClient(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/ffaad3Cb-97df-cD84-ADb1-D5ccEEeDCB4a/$actions/attach-nvmf-client" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"nvmfInitiatorName":"nqn.2025-12.org.nvmexpress:uuid:59d5de78-a964-5746-8c6e-677c4c7a79df","attachedTargets":["string"],"clusterReference":"string","$objectType":"volumes.v4.config.NvmfClient"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"nvmfInitiatorName":"nqn.2025-12.org.nvmexpress:uuid:59d5de78-a964-5746-8c6e-677c4c7a79df","attachedTargets":["string"],"clusterReference":"string","$objectType":"volumes.v4.config.NvmfClient"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/Adce4D27-CFF1-7B8d-BEb7-cF2Bb5b4BbC9/$actions/attach-nvmf-client" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ NvmfClient nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n\n String extId = \"Fb1BD0Fe-cE06-8dd3-Ee5f-0ddEeBA9b8de\"\ ;\n\n // Create request object with parameters\n var request\ \ = new AttachNvmfClientRequest {\n ExtId = extId,\n \ \ Body = nvmfClient\n };\n try {\n AttachNvmfClientApiResponse\ \ attachNvmfClientApiResponse = volumeGroupsApi.AttachNvmfClient(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-nvmf-client: post: tags: - VolumeGroups summary: Detach a NVMe-TCP client from the given Volume Group description: Detaches a NVMe-TCP client/initiator from a Volume Group identified by its external identifier. operationId: detachNvmfClient parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: c453c8c0-4c70-47d1-b92a-a09b5be24f39 - name: NTNX-Request-Id in: header description: | A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request. required: true style: simple explode: false schema: type: string format: uuid example: 6f1987c6-9f0f-49ca-8732-c2928bb87765 requestBody: description: A model representing a NVMe-TCP client that can be associated with a Volume Group as an external attachment. content: application/json: schema: $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' required: true responses: "202": description: Current status of the NVMe-TCP client detachment operation on the Volume Group. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/prism.v4.3.config.TaskReference' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-nvmf-client\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-nvmf-client\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-nvmf-client\ \ Post operation" x-permissions: operationName: Detach Volume Group From External NVMF Client deploymentList: - ON_PREM roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Project Manager x-rate-limit: - type: xsmall count: 20 timeUnit: seconds - type: small count: 25 timeUnit: seconds - type: large count: 25 timeUnit: seconds - type: xlarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: "2025.2" - product: PE version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.DetachNvmfClientRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.config.NvmfClient;\nimport com.nutanix.dp1.vol.volumes.v4.config.DetachNvmfClientApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n NvmfClient nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n \n String extId = \"bbFCcb2A-06DD-2dAa-5AeB-eBAcd3dae4B2\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DetachNvmfClientApiResponse\ \ detachNvmfClientApiResponse = volumeGroupsApi.detachNvmfClient(DetachNvmfClientRequest.builder()\n\ \ .extId(extId)\n .build(), nvmfClient);\n\ \n System.out.println(detachNvmfClientApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi, NvmfClient } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n let nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n nvmfClient = JSON.stringify(nvmfClient);\n\ \n \n let extId = \"8cDce3A7-CdeF-eACB-5FCA-90CFfF7a20FC\";\n\n\n\n\ \n\n volumeGroupsApi.detachNvmfClient(extId, nvmfClient).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\n\nif __name__ == \"__main__\":\n\ \ # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ nvmfClient = ntnx_volumes_py_client.NvmfClient()\n\n # NvmfClient\ \ object initializations here...\n \n ext_id = \"5BbdF8dF-2B53-36eB-eDEE-cBAABe8F080d\"\ \n\n\n try:\n api_response = volume_groups_api.detach_nvmf_client(extId=ext_id,\ \ body=nvmfClient)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nvmfClient := import1.NewNvmfClient()\n\ \n // NvmfClient object initializations here...\n\n \n extId :=\ \ \"e8bEaAaa-D3eD-FC26-f71E-FE4c842CfFe4\"\n\n\n request := volumegroups.DetachNvmfClientRequest{\ \ ExtId: &extId, Body: nvmfClient }\n response, error := VolumeGroupsServiceApiInstance.DetachNvmfClient(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.TaskReference)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/volumes/v4.2/config/volume-groups/EDd3AfdC-fcae-bC9A-F5cD-Aa6A482ECF76/$actions/detach-nvmf-client" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"nvmfInitiatorName":"nqn.2025-12.org.nvmexpress:uuid:59d5de78-a964-5746-8c6e-677c4c7a79df","attachedTargets":["string"],"clusterReference":"string","$objectType":"volumes.v4.config.NvmfClient"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"nvmfInitiatorName":"nqn.2025-12.org.nvmexpress:uuid:59d5de78-a964-5746-8c6e-677c4c7a79df","attachedTargets":["string"],"clusterReference":"string","$objectType":"volumes.v4.config.NvmfClient"} \ - "https://host:port/api/volumes/v4.2/config/volume-groups/ebf7ccCC-5bbC-FAF8-f2eA-80e68BdF59db/$actions/detach-nvmf-client" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Config;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ NvmfClient nvmfClient = new NvmfClient();\n\n // NvmfClient\ \ object initializations here...\n\n String extId = \"DE0F7fa6-DFCB-fdc6-aC1E-8BcC53ABB13D\"\ ;\n\n // Create request object with parameters\n var request\ \ = new DetachNvmfClientRequest {\n ExtId = extId,\n \ \ Body = nvmfClient\n };\n try {\n DetachNvmfClientApiResponse\ \ detachNvmfClientApiResponse = volumeGroupsApi.DetachNvmfClient(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/stats/volume-groups/{extId}: get: tags: - VolumeGroups summary: Get statistics for a Volume Group description: "Query the Volume Group stats identified by {extId}." operationId: getVolumeGroupStats parameters: - name: extId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8840aafa-33c4-4d8f-b8a0-3e54db496b25 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 41 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: controllerAvgIOLatencyUsecs - name: controllerAvgReadIOLatencyUsecs - name: controllerAvgWriteIOLatencyUsecs - name: controllerIOBandwidthKBps - name: controllerNumIOPS - name: controllerNumReadIOPS - name: controllerNumWriteIOPS - name: controllerReadIOBandwidthKBps - name: controllerUserBytes - name: controllerWriteIOBandwidthKBps - name: hydrationRemainingBytes responses: "200": description: Details of the queried Volume Group stats. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.stats.VolumeGroupStats' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{extId}\ \ Get operation" x-permissions: operationName: View Volume Group Stats deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Backup Admin - name: Project Manager x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeGroupStatsRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.stats.GetVolumeGroupStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String extId = \"1b891a6d-afcD-Fe5b-eCD0-Be1C7bebBDD7\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetVolumeGroupStatsApiResponse getVolumeGroupStatsApiResponse = volumeGroupsApi.getVolumeGroupStats(GetVolumeGroupStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .$select(null)\n\ \ .build());\n\n System.out.println(getVolumeGroupStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let extId = \"73dBE88b-7fEa-eA8F-Ba13-B04853C7B6DF\"\ ;\n //Datetime needs to be in RFC3339 format\n let $startTime = \"\ 2021-01-01T00:00:00-08:00\";\n //Datetime needs to be in RFC3339 format\n\ \ let $endTime = \"2021-01-01T00:00:00-08:00\";\n\n // Construct Optional\ \ Parameters\n var opts = {};\n opts[\"$samplingInterval\"] = 1;\n\ \ opts[\"$statType\"] = SOME_RAW_DATA;\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n volumeGroupsApi.getVolumeGroupStats(extId, $startTime, $endTime,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\nimport datetime\n\nif __name__ ==\ \ \"__main__\":\n # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n ext_id = \"7F56BFf4-EAEB-c049-2AaD-D4c9aD1ED7b0\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\n\ \n try:\n api_response = volume_groups_api.get_volume_group_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"C7CdEA4c-3833-eBa6-54Ac-3Ddde264dB8b\"\ \n // Datetime needs to be in RFC3339 format\n startTime_ := time.Now()\n\ \ // Datetime needs to be in RFC3339 format\n endTime_ := time.Now()\n\ \ \n samplingInterval_ := 1\n \n statType_ := SOME_RAW_DATA\n\ \n\n request := volumegroups.GetVolumeGroupStatsRequest{ ExtId: &extId,\ \ StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_: &samplingInterval_,\ \ StatType_: &statType_, Select_: nil }\n response, error := VolumeGroupsServiceApiInstance.GetVolumeGroupStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VolumeGroupStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/stats/volume-groups/CcbDbad9-bdcE-3bb8-09A4-a0FBDaa2CbA4?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/stats/volume-groups/fBdd5fc7-aDD8-FCdb-AbdC-5eadFCD3ddba?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String extId = \"Fcd2EeBF-8964-F4B7-1e9D-9aCeE6FCF6E0\";\n String\ \ startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime = \"\ 2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n Object\ \ statType = SOME_RAW_DATA;\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetVolumeGroupStatsRequest {\n ExtId = extId,\n \ \ StartTime = startTime,\n EndTime = endTime,\n \ \ SamplingInterval = samplingInterval,\n StatType = statType,\n\ \ Select = select\n };\n try {\n GetVolumeGroupStatsApiResponse\ \ getVolumeGroupStatsApiResponse = volumeGroupsApi.GetVolumeGroupStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /volumes/v4.2/stats/volume-groups/{volumeGroupExtId}/disks/{extId}: get: tags: - VolumeGroups summary: Get statistics for a Volume Disk description: "Query the Volume Disk stats identified by {diskExtId}." operationId: getVolumeDiskStats parameters: - name: volumeGroupExtId in: path description: The external identifier of a Volume Group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 53fc0e28-916b-46cc-af8f-5e1903329000 - name: extId in: path description: The external identifier of a Volume Disk. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 696c8c26-1baf-485b-bd23-1f082e815492 - name: $startTime in: query description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $endTime in: query description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html required: true style: form explode: false schema: type: string description: | The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html format: date-time example: 2009-09-23T14:30:00-07:00 - name: $samplingInterval in: query description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. required: false style: form explode: false schema: minimum: 1 type: integer description: | The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30. example: 85 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: controllerAvgIOLatencyUsecs - name: controllerAvgReadIOLatencyUsecs - name: controllerAvgWriteIOLatencyUsecs - name: controllerIOBandwidthKBps - name: controllerNumIOPS - name: controllerNumReadIOPS - name: controllerNumWriteIOPS - name: controllerReadIOBandwidthKBps - name: controllerUserBytes - name: controllerWriteIOBandwidthKBps responses: "200": description: Details of the queried Volume Disk stats. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.stats.VolumeDiskStats' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" x-permissions: operationName: View Volume Group Disk Stats deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Storage Admin - name: Storage Viewer - name: Project Manager - name: Backup Admin x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vol.java.client.ApiClient;\n\ import com.nutanix.vol.java.client.api.VolumeGroupsApi;\nimport com.nutanix.dp1.vol.volumes.v4.request.VolumeGroups.GetVolumeDiskStatsRequest;\n\ import com.nutanix.dp1.vol.volumes.v4.stats.GetVolumeDiskStatsApiResponse;\n\ import java.time.OffsetDateTime;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(apiClient);\n\ \n \n String volumeGroupExtId = \"d37aC2CF-fdDA-E8aF-ba7A-2e074bcA7b69\"\ ;\n \n String extId = \"a31aDDAA-aFEf-AEBb-EA6B-94135a2fbfc1\"\ ;\n // Datetime needs to be in RFC3339 format\n OffsetDateTime\ \ startTime = OffsetDateTime.now();\n // Datetime needs to be in\ \ RFC3339 format\n OffsetDateTime endTime = OffsetDateTime.now();\n\ \ \n int samplingInterval = 1;\n \n Object statType\ \ = SOME_RAW_DATA;\n\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ GetVolumeDiskStatsApiResponse getVolumeDiskStatsApiResponse = volumeGroupsApi.getVolumeDiskStats(GetVolumeDiskStatsRequest.builder()\n\ \ .volumeGroupExtId(volumeGroupExtId)\n .extId(extId)\n\ \ .$startTime(startTime)\n .$endTime(endTime)\n\ \ .$samplingInterval(samplingInterval)\n .$statType(statType)\n\ \ .$select(null)\n .build());\n\n \ \ System.out.println(getVolumeDiskStatsApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VolumeGroupsApi } from \"@nutanix-api/volumes-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let volumeGroupsApi = new VolumeGroupsApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let volumeGroupExtId = \"EC9FE6DC-D6CE-c1cA-DE3C-bBB8bD0bd21A\"\ ;\n \n let extId = \"0B0EEBcf-f33d-BE3B-fEaF-fbBDC3cCACE0\";\n \ \ //Datetime needs to be in RFC3339 format\n let $startTime = \"2021-01-01T00:00:00-08:00\"\ ;\n //Datetime needs to be in RFC3339 format\n let $endTime = \"2021-01-01T00:00:00-08:00\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $samplingInterval\"] = 1;\n opts[\"$statType\"] = SOME_RAW_DATA;\n \ \ opts[\"$select\"] = \"string_sample_data\";\n\n\n\n\n volumeGroupsApi.getVolumeDiskStats(volumeGroupExtId,\ \ extId, $startTime, $endTime, opts).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_volumes_py_client\nimport datetime\n\nif __name__ ==\ \ \"__main__\":\n # Configure the client\n config = ntnx_volumes_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_volumes_py_client.ApiClient(configuration=config)\n \ \ volume_groups_api = ntnx_volumes_py_client.VolumeGroupsApi(api_client=client)\n\ \ \n volume_group_ext_id = \"aba6b0Ea-12FB-fAD3-3abF-bf9AAf5BB9bc\"\ \n \n ext_id = \"4B3dCFaC-299E-eCeF-eE6D-EA326CbA617F\"\n # Datetime\ \ needs to be in RFC3339 format\n start_time = datetime.datetime.Now()\n\ \ # Datetime needs to be in RFC3339 format\n end_time = datetime.datetime.Now()\n\ \ \n sampling_interval = 1\n \n stat_type = SOME_RAW_DATA\n\n\ \n try:\n api_response = volume_groups_api.get_volume_disk_stats(volumeGroupExtId=volume_group_ext_id,\ \ extId=ext_id, _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_volumes_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"time\"\n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/request/volumegroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VolumeGroupsServiceApiInstance\ \ *api.VolumeGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ VolumeGroupsServiceApiInstance = api.NewVolumeGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n volumeGroupExtId := \"AAb13d9f-F618-3F1f-cB0b-a53DB24c71Fd\"\ \n \n extId := \"D69babFF-6104-B19B-BBfc-202acBcD4C6b\"\n // Datetime\ \ needs to be in RFC3339 format\n startTime_ := time.Now()\n // Datetime\ \ needs to be in RFC3339 format\n endTime_ := time.Now()\n \n samplingInterval_\ \ := 1\n \n statType_ := SOME_RAW_DATA\n\n\n request := volumegroups.GetVolumeDiskStatsRequest{\ \ VolumeGroupExtId: &volumeGroupExtId, ExtId: &extId, StartTime_: &startTime_,\ \ EndTime_: &endTime_, SamplingInterval_: &samplingInterval_, StatType_:\ \ &statType_, Select_: nil }\n response, error := VolumeGroupsServiceApiInstance.GetVolumeDiskStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VolumeDiskStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/volumes/v4.2/stats/volume-groups/EAEcEdDf-3Dbe-e271-AEAd-1fEDbAe4EfFe/disks/BCFC36Cf-9a2A-9af8-ECb3-bb6D6E9dbfA2?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/volumes/v4.2/stats/volume-groups/2EaFbcfb-f0CE-b9bb-E5Cd-74AdA8Ccb39e/disks/3435AEDB-f52a-b1bb-e441-5EEA4fAEbBF1?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VolSDK.Client;\nusing Nutanix.VolSDK.Api;\nusing\ \ Nutanix.VolSDK.Model.Volumes.V4.Stats;\n\nnamespace CsharpSdkSample\n\ {\n class Program\n {\n static void Main(string[] args) {\n //\ \ Configure the client\n Configuration _config = new Configuration\n\ \ {\n // UserName to connect to the cluster\n Username\ \ = \"username\",\n // Password(SecureString) to connect to the cluster\ \ \n Password = Configuration.CreateSecurePassword(\"password\"),\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"\ localhost\",\n // Port used for the connection. \n Port =\ \ 9440,\n // Backoff period in seconds (exponential backoff: 2, 4,\ \ 8... seconds)\n BackOffPeriod = 2,\n // Max retry attempts\ \ while reconnecting on a loss of connection\n MaxRetryAttempts =\ \ 5\n };\n\n ApiClient client = new ApiClient(_config);\n\n \ \ VolumeGroupsApi volumeGroupsApi = new VolumeGroupsApi(client);\n\n\ \ String volumeGroupExtId = \"d6E9AceA-AeaF-4B3D-c56D-F2D0Bdbdf270\"\ ;\n String extId = \"EcdBe43e-fbeC-acdF-B2d6-Aa6e9Eb6C2Bd\";\n \ \ String startTime = \"2021-01-01T00:00:00-08:00\";\n String endTime\ \ = \"2021-01-01T00:00:00-08:00\";\n int samplingInterval = 1;\n \ \ Object statType = SOME_RAW_DATA;\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetVolumeDiskStatsRequest {\n VolumeGroupExtId = volumeGroupExtId,\n\ \ ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType,\n Select = select\n \ \ };\n try {\n GetVolumeDiskStatsApiResponse getVolumeDiskStatsApiResponse\ \ = volumeGroupsApi.GetVolumeDiskStats(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" components: schemas: volumes.v4.2.config.GetIscsiClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.config.IscsiClient oneOf: - $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Get operation" volumes.v4.2.config.IscsiClient: title: iSCSI client object description: A model that represents an iSCSI client that can be associated with a Volume Group as an external attachment. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: iscsiInitiatorName: maxLength: 64 type: string description: iSCSI initiator name. Exactly one of iscsiInitiatorName and iscsiInitiatorNetworkId must be specified during the attach operation. This field is immutable. example: iqn.2024-01.com.example.iscsi:initiator iscsiInitiatorNetworkId: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' clientSecret: maxLength: 16 minLength: 12 type: string description: iSCSI initiator client secret in case of CHAP authentication. This field should not be provided if the authentication type is not set to CHAP. format: password writeOnly: true example: '***************' enabledAuthentications: $ref: '#/components/schemas/volumes.v4.2.config.AuthenticationType' attachedTargets: maxItems: 128 minItems: 0 type: array readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.config.TargetParam' numVirtualTargets: type: integer description: Number of virtual targets generated for the iSCSI target. This field is immutable. format: int32 writeOnly: true example: 3 clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The UUID of the cluster that will host the iSCSI client. This field is read-only. readOnly: true example: 7bb85a06-f81d-41e8-a76f-aaeca5721d71 attachmentSite: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroupAttachmentSite' additionalProperties: false volumes.v4.2.config.UpdateIscsiClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients/{extId}\ \ Put operation" volumes.v4.2.config.AuthenticationType: title: Supported types of authentication type: string description: "The authentication type enabled for the Volume Group. This is\ \ an optional field. If omitted, the authentication is not configured for\ \ the Volume Group. If this is set to CHAP, the target/client secret must\ \ be provided." enum: - CHAP - NONE - $UNKNOWN - $REDACTED x-enumDescriptions: CHAP: Access to the Volume Group requires CHAP authentication. NONE: Access to the Volume Group doesn't require any authentication. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. volumes.v4.2.config.TargetParam: title: Parameters associated with each iSCSI target corresponding to the iSCSI client type: object properties: numVirtualTargets: maximum: 32 minimum: 1 type: integer description: Number of virtual targets generated for the iSCSI target. This field is immutable. format: int32 readOnly: true example: 32 iscsiTargetName: maxLength: 512 type: string description: Name of the iSCSI target that the iSCSI client is connected to. This is a read-only field. readOnly: true example: target-e7195673-85d0-4456-b5ee-c1b89be13537 additionalProperties: false description: List of iSCSI target parameters that will be visible and accessible to the iSCSI client. volumes.v4.2.config.VolumeGroupAttachmentSite: title: Supported Volume Group attachment sites type: string description: The site where the Volume Group attach operation should be processed. This is an optional field. This field may only be set if Metro DR has been configured for this Volume Group. enum: - PRIMARY - SECONDARY - $UNKNOWN - $REDACTED x-enumDescriptions: SECONDARY: Attach to the Volume Group on the stretch secondary site. PRIMARY: Attach to the Volume Group on the stretch primary site. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. volumes.v4.2.config.Cluster: title: Cluster model object type: object properties: clusterExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Cluster Uuid. readOnly: true example: 97a3e46a-a71e-4e0e-93ed-9d6796e16943 clusterName: maxLength: 75 type: string description: Name of the Cluster. readOnly: true example: string additionalProperties: false volumes.v4.2.config.ListIscsiClientsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClient' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/iscsi-clients Get operation volumes.v4.2.config.GetNvmfClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.config.NvmfClient oneOf: - $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients/{extId}\ \ Get operation" volumes.v4.2.config.NvmfClient: title: NVMe-TCP client object description: A model representing a NVMe-TCP client that can be associated with a Volume Group as an external attachment. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: nvmfInitiatorName: maxLength: 68 type: string description: NVMe-TCP client qualified name. example: nqn.2025-12.org.nvmexpress:uuid:59d5de78-a964-5746-8c6e-677c4c7a79df attachedTargets: maxItems: 20 minItems: 0 type: array description: List of all subsystems connected to a NVMe-TCP client. readOnly: true items: type: string example: string clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The UUID of the cluster that hosts the NVMe-TCP client. readOnly: true example: 193ffc6a-6541-4666-bfe0-7ef7fb07565b additionalProperties: false volumes.v4.2.config.ListNvmfClientsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.NvmfClient' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/nvmf-clients Get operation volumes.v4.2.config.GetVolumeGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.config.VolumeGroup oneOf: - $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Get operation" volumes.v4.2.config.VolumeGroup: title: Volume Group object description: A model that represents a Volume Group resource. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 256 type: string description: Volume Group name. example: volumeGroup1 description: maxLength: 1000 type: string description: Volume Group description. This is an optional field. example: This Volume Group is used for storing data files shouldLoadBalanceVmAttachments: type: boolean description: "Indicates whether to enable Volume Group load balancing\ \ for VM attachments. This cannot be enabled if there are iSCSI client\ \ attachments already associated with the Volume Group, and vice-versa.\ \ This is an optional field." default: false sharingStatus: $ref: '#/components/schemas/volumes.v4.2.config.SharingStatus' targetPrefix: maxLength: 512 pattern: "^[\\da-zA-Z:\\.\\-]+$" type: string description: The specifications contain the target prefix for external clients as the value. This is an optional field. writeOnly: true example: targetPrefix1 targetName: maxLength: 512 minLength: 12 type: string description: Name of the external client target that will be visible and accessible to the client. This is an optional field. example: target1 enabledAuthentications: $ref: '#/components/schemas/volumes.v4.2.config.AuthenticationType' iscsiFeatures: $ref: '#/components/schemas/volumes.v4.2.config.IscsiFeatures' createdBy: maxLength: 512 type: string description: Service/user who created this Volume Group. This is an optional field. example: application1 clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The UUID of the cluster that will host the Volume Group. This is a mandatory field for creating a Volume Group on Prism Central. example: 3eabe3fc-4db8-4b80-9161-1c6d3e2b7bf5 storageFeatures: $ref: '#/components/schemas/volumes.v4.2.config.StorageFeatures' usageType: $ref: '#/components/schemas/volumes.v4.2.config.UsageType' attachmentType: $ref: '#/components/schemas/volumes.v4.2.config.AttachmentType' protocol: $ref: '#/components/schemas/volumes.v4.2.config.Protocol' isHidden: type: boolean description: "Indicates whether the Volume Group is meant to be hidden\ \ or not. This is an optional field. If omitted, the VG will not be\ \ hidden." default: false disks: maxItems: 10 minItems: 1 type: array description: A list of Volume Disks to be attached to the Volume Group. writeOnly: true items: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' attachments: maxItems: 128 minItems: 0 type: array description: List of attachments for a Volume Group. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.config.VGAttachment' hydrationStatus: $ref: '#/components/schemas/volumes.v4.2.config.HydrationStatus' additionalProperties: false x-required-by-operation: create: - clusterReference - name volumes.v4.2.config.UpdateVolumeGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Put operation" volumes.v4.2.config.DeleteVolumeGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}\ \ Delete operation" volumes.v4.2.config.SharingStatus: title: The supported sharing status types type: string description: "Indicates whether the Volume Group can be shared across multiple\ \ iSCSI initiators. The mode cannot be changed from SHARED to NOT_SHARED on\ \ a Volume Group with multiple attachments. Similarly, a Volume Group cannot\ \ be associated with more than one attachment as long as it is in exclusive\ \ mode. This is an optional field." enum: - SHARED - NOT_SHARED - $UNKNOWN - $REDACTED x-enumDescriptions: SHARED: The Volume Group is shared between multiple iSCSI-clients or VMs. NOT_SHARED: The Volume Group is exclusively accessed by an iSCSI client or VM. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. volumes.v4.2.config.IscsiFeatures: title: Iscsi target features title type: object properties: targetSecret: maxLength: 16 minLength: 12 type: string description: Target secret in case of a CHAP authentication. This field must only be provided in case the authentication type is not set to CHAP. This is an optional field and it cannot be retrieved once configured. format: password writeOnly: true example: '*************' enabledAuthentications: $ref: '#/components/schemas/volumes.v4.2.config.AuthenticationType' additionalProperties: false description: iSCSI specific settings for the Volume Group. This is an optional field. volumes.v4.2.config.StorageFeatures: type: object properties: flashMode: $ref: '#/components/schemas/volumes.v4.2.config.FlashMode' additionalProperties: false description: Storage optimization features which must be enabled on the Volume Group. This is an optional field. volumes.v4.2.config.UsageType: title: Supported Volume Group Usage types type: string description: Expected usage type for the Volume Group. This is an indicative hint on how the caller will consume the Volume Group. This is an optional field. enum: - USER - INTERNAL - TEMPORARY - BACKUP_TARGET - $UNKNOWN - $REDACTED x-enumDescriptions: BACKUP_TARGET: The Volume Groups which store backup data. INTERNAL: "The Volume Groups, which are critical to AOS and its related applications\ \ must not be modified externally." TEMPORARY: The temporary Volume Groups which are created to access the data from the disks and may be deleted without any data loss. USER: "The Volume Groups created by the user, typically using the UI." $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. volumes.v4.2.config.AttachmentType: title: Supported Volume Group attachment types type: string description: The field indicates whether a VG has a VM or an external attachment associated with it. enum: - NONE - DIRECT - EXTERNAL - $UNKNOWN - $REDACTED x-enumDescriptions: EXTERNAL: Volume Group has an external iSCSI or NVMe-TCP attachment. NONE: Volume Group has no attachment. $UNKNOWN: | Unknown value. DIRECT: Volume Group has a VM attachment. $REDACTED: | Redacted value. volumes.v4.2.config.Protocol: title: Supported Volume group protocols type: string description: Type of protocol to be used for Volume Group. enum: - NOT_ASSIGNED - ISCSI - NVMF - $UNKNOWN - $REDACTED x-enumDescriptions: NOT_ASSIGNED: Volume Group does not use any protocol. ISCSI: Volume Group uses iSCSI protocol. NVMF: Volume Group uses NVMe-TCP protocol. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. volumes.v4.2.config.VolumeDisk: title: Volume Disk object description: "A model that represents a Volume Disk associated with a Volume\ \ Group, supported by a backing file on DSF." allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: index: maximum: 16383 minimum: 0 type: integer description: Index of the disk in a Volume Group. This field is optional and immutable. example: 74 diskSizeBytes: maximum: 219902325555200 minimum: 524288 type: integer description: Size of the disk in bytes. This field is mandatory during Volume Group creation if a new disk is created on the storage container. format: int64 example: 156650882979022 storageContainerId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Storage container on which the disk must be created. This is a read-only field. readOnly: true example: 4f6cf677-f501-4d64-bc52-4451ede4a53f description: maxLength: 1000 type: string description: Volume Disk description. This is an optional field. example: string diskDataSourceReference: $ref: '#/components/schemas/common.v1.0.config.EntityReference' diskStorageFeatures: $ref: '#/components/schemas/volumes.v4.2.config.DiskStorageFeatures' additionalProperties: false x-required-by-operation: create: - diskDataSourceReference volumes.v4.2.config.VGAttachment: title: Volume Group Attachment type: object properties: attachment: required: - $objectType properties: $objectType: type: string example: volumes.v4.config.VmAttachment oneOf: - $ref: '#/components/schemas/volumes.v4.2.config.VmAttachment' - $ref: '#/components/schemas/volumes.v4.2.config.IscsiClientAttachment' - $ref: '#/components/schemas/volumes.v4.2.config.NvmfClientAttachment' additionalProperties: false description: "Volume Group attachment. It contains iSCSI, NVMe-TCP or direct\ \ attachment of a Volume Group." volumes.v4.2.config.HydrationStatus: title: Volume Group hydration status. type: string description: Specifies the status of the data on the instantly restored Volume Groups. This field is not set for normal Volume Groups. enum: - IN_PROGRESS - COMPLETE - FAIL - $UNKNOWN - $REDACTED x-enumDescriptions: IN_PROGRESS: The Volume Group is being hydrated. COMPLETE: The volume group has been successfully hydrated. $UNKNOWN: | Unknown value. FAIL: Hydration process for the Volume Group has irrecoverably failed. $REDACTED: | Redacted value. volumes.v4.2.config.VolumeGroupMetadata: title: Volume Group metadata model object type: object properties: ownerReference: type: string description: Owner reference information of a Volume Group. This is read-only and is automatically populated using the authentication context provided during the VG creation. readOnly: true example: 59d5de78-a964-5746-8c6e-677c4c7a79df categoryIds: maxItems: 20 minItems: 0 type: array description: The list of categories attached to a Volume Group. This is read-only. Use the associate/disassociate-category APIs to update this list. readOnly: true items: type: string example: 59d5de78-a964-5746-8c6e-677c4c7a79df additionalProperties: false volumes.v4.2.config.FlashMode: type: object properties: isEnabled: type: boolean description: This field will indicate whether flash mode is enabled or not. default: false additionalProperties: false description: "Once configured, this field will avoid down migration of data\ \ from the hot tier unless the overrides field is specified for the virtual\ \ disks." volumes.v4.2.config.DiskStorageFeatures: type: object properties: flashMode: $ref: '#/components/schemas/volumes.v4.2.config.FlashMode' additionalProperties: false description: "Storage optimization features which must be enabled on the Volume\ \ Disks. This is an optional field. If omitted, the disks will honor the Volume\ \ Group specific storage features setting." volumes.v4.2.config.VmAttachment: required: - extId type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The external identifier of the VM. example: 8ac92845-5ff3-4eeb-9bc2-4ce8c2a9f993 index: type: integer description: The index on the SCSI bus to attach the VM to the Volume Group. This is an optional field. writeOnly: true example: 26 additionalProperties: false description: A model that represents a VM reference that can be associated with a Volume Group as an AHV hypervisor attachment. volumes.v4.2.config.IscsiClientAttachment: title: iSCSI client attachment object type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The external identifier of an iSCSI client. example: 9d23bbf5-0bec-409c-ad6f-71d25f177b3e clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The UUID of the cluster that will host the iSCSI client. This field is read-only. readOnly: true example: 9a9ad650-f14c-40b1-ad15-6bac2fb4c21b additionalProperties: false description: A model that represents an iSCSI client that can be associated with a Volume Group as an external attachment. It contains the minimal properties required for the attachment. volumes.v4.2.config.NvmfClientAttachment: title: NVMe-TCP client attachment object description: A model representing an NVMe-TCP client that can be associated with a Volume Group as an external attachment. It contains the minimal properties required for the attachment. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: clusterReference: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The UUID of the cluster that hosts the NVMe-TCP client. readOnly: true example: 7b5098fb-e5ef-428f-bde3-4a5e7cc5d408 additionalProperties: false volumes.v4.2.config.ListVolumeGroupsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VolumeGroup' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Get operation volumes.v4.2.config.CreateVolumeGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /volumes/v4.2/config/volume-groups Post operation volumes.v4.2.config.ListVolumeDisksApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Get operation" volumes.v4.2.config.CreateVolumeDiskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks\ \ Post operation" volumes.v4.2.config.GetVolumeDiskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.config.VolumeDisk oneOf: - $ref: '#/components/schemas/volumes.v4.2.config.VolumeDisk' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" volumes.v4.2.config.UpdateVolumeDiskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Put operation" volumes.v4.2.config.DeleteVolumeDiskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Delete operation" volumes.v4.2.config.ListExternalIscsiAttachmentsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.IscsiClientAttachment' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments\ \ Get operation" volumes.v4.2.config.AttachIscsiClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-iscsi-client\ \ Post operation" volumes.v4.2.config.DetachIscsiClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-iscsi-client\ \ Post operation" volumes.v4.2.config.ListVmAttachmentsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.VmAttachment' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/vm-attachments\ \ Get operation" volumes.v4.2.config.AttachVmApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-vm\ \ Post operation" volumes.v4.2.config.DetachVmApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-vm\ \ Post operation" volumes.v4.2.config.ListCategoryAssociationsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.config.CategoryDetails' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/category-associations\ \ Get operation" volumes.v4.2.config.CategoryDetails: description: An existing category detail associated with the Volume Group. allOf: - $ref: '#/components/schemas/common.v1.0.config.EntityReference' volumes.v4.2.config.CategoryEntityReferences: type: object properties: categories: maxItems: 20 minItems: 1 type: array description: The category to be associated/disassociated with the Volume Group. This is a mandatory field. items: $ref: '#/components/schemas/common.v1.0.config.EntityReference' additionalProperties: false description: The list of categories to be associated/disassociated with the Volume Group. This is a mandatory field. volumes.v4.2.config.AssociateCategoryApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/associate-category\ \ Post operation" volumes.v4.2.config.DisassociateCategoryApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/disassociate-category\ \ Post operation" volumes.v4.2.config.RevertSpec: title: Volume Group revert specification required: - volumeGroupRecoveryPointExtId type: object properties: volumeGroupRecoveryPointExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The external identifier of the Volume Group recovery point. This is a mandatory field. example: 76a48c6e-3c48-4619-8de6-39fbb32798cf additionalProperties: false description: Specify the Volume Group recovery point ID to which the Volume Group would be reverted. volumes.v4.2.config.RevertVolumeGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/revert\ \ Post operation" volumes.v4.2.config.GetVolumeGroupMetadataApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: common.v1.config.Metadata oneOf: - $ref: '#/components/schemas/common.v1.0.config.Metadata' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{volumeGroupExtId}/metadata\ \ Get operation" common.v1.0.config.Metadata: type: object properties: ownerReferenceId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the owner of this resource. example: 808d3f97-0776-44b1-b22c-6526e56b986f ownerUserName: maxLength: 128 type: string description: | The userName of the owner of this resource. example: string projectReferenceId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the project this resource belongs to. example: e6c94e65-c54c-4af4-804a-fd9aa5f1bad1 projectName: maxLength: 128 type: string description: | The name of the project this resource belongs to. example: string categoryIds: maxItems: 256 minItems: 1 type: array description: | A list of globally unique identifiers that represent all the categories the resource is associated with. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9bb7bf97-ff8b-4139-9d92-4df9c7067a27 additionalProperties: false description: | Metadata associated with this resource. common.v1.0.response.ApiResponseMetadata: type: object properties: flags: maxItems: 20 minItems: 0 type: array description: | An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. items: $ref: '#/components/schemas/common.v1.0.config.Flag' links: maxItems: 20 minItems: 0 type: array description: | An array of HATEOAS style links for the response that may also include pagination links for list operations. items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' totalAvailableResults: type: integer description: | The total number of entities that are available on the server for this type. format: int32 example: 17 messages: maxItems: 20 minItems: 0 type: array description: | Information, Warning or Error messages that might provide additional contextual information related to the operation. items: $ref: '#/components/schemas/common.v1.0.config.Message' extraInfo: maxItems: 20 minItems: 0 type: array description: | An array of entity-specific metadata items: $ref: '#/components/schemas/common.v1.0.config.KVPair' additionalProperties: false description: | The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests. common.v1.0.config.Flag: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | Name of the flag. example: string value: type: boolean description: | Value of the flag. default: false additionalProperties: false description: | Many entities in the Nutanix APIs carry flags. This object captures all the flags associated with that entity through this object. The field that hosts this type of object must have an attribute called x-bounded-map-keys that tells which flags are actually present for that entity. common.v1.0.response.ApiLink: type: object properties: href: type: string description: | The URL at which the entity described by the link can be accessed. example: string rel: type: string description: | A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of "self" identifies the URL for the object. example: string additionalProperties: false description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. common.v1.0.config.Message: type: object properties: code: type: string description: | A code that uniquely identifies a message. example: string message: type: string description: | The description of the message. example: string locale: type: string description: | The locale for the message description. default: en_US severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' additionalProperties: false common.v1.0.config.KVPair: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | The key of the key-value pair. example: string value: description: The value associated with the key for this key-value pair oneOf: - type: string description: | A string value in a key-value pair. example: string - type: integer description: | An integer value in a key-value pair. example: 92 - type: boolean description: | An boolean value in a key-value pair. example: false - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of strings. items: type: string example: string - type: object additionalProperties: type: string description: | A value in a key-value pair that represents a map of string keys and values. - maxItems: 20 minItems: 0 type: array description: | A value in a key-value pair that represents an array of maps of string keys and values. items: $ref: '#/components/schemas/common.v1.0.config.MapOfStringWrapper' - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of integers. items: type: integer example: 52 additionalProperties: false description: | A map describing a set of keys and their corresponding values. common.v1.0.config.MessageSeverity: type: string description: | The message severity. enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-enumDescriptions: ERROR: | Error indicating failed completion. INFO: | Information about successful completion. $UNKNOWN: | Unknown value. WARNING: | Warning indicating future error. $REDACTED: | Redacted value. common.v1.0.config.MapOfStringWrapper: type: object properties: map: type: object additionalProperties: type: string description: | A map with string keys and values. additionalProperties: false description: | A wrapper schema containing a map with string keys and values. volumes.v4.2.config.AttachNvmfClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/attach-nvmf-client\ \ Post operation" volumes.v4.2.config.DetachNvmfClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: prism.v4.config.TaskReference oneOf: - $ref: '#/components/schemas/prism.v4.3.config.TaskReference' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/config/volume-groups/{extId}/$actions/detach-nvmf-client\ \ Post operation" volumes.v4.2.config.VolumeGroupDelegateAccessSpec: title: Delegate access to Volume group. type: object properties: clientAccess: $ref: '#/components/schemas/volumes.v4.2.config.ClientAccess' cluster: $ref: '#/components/schemas/volumes.v4.2.config.ClusterScope' additionalProperties: false description: Delegates access to Volume Group so that the VG may be directly accessed from PE. volumes.v4.2.config.ClientAccess: title: Client level access on Volume Group. type: string description: Allows client level access to Volume Group. enum: - NONE - ISCSI_CLIENT - VM_CLIENT - $UNKNOWN - $REDACTED x-enumDescriptions: ISCSI_CLIENT: Allows access to Volume Group and iSCSI client. NONE: "Allows access to Volume Group only, with no access to any of the client." $UNKNOWN: | Unknown value. VM_CLIENT: Allows access to Volume Group and VM client. $REDACTED: | Redacted value. volumes.v4.2.config.ClusterScope: title: Cluster wide Volume Group access. required: - clusterExtId type: object properties: clusterExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Cluster Uuid. example: 41e12b3a-f4fa-4662-beeb-27e99df86982 additionalProperties: false description: Allows cluster wide access to Volume Group. volumes.v4.2.config.AccessToken: title: Volume group Discovery Response type: object properties: jwtToken: type: string description: JWT token in string format. This token must be set as a session cookie while making V2 API call for Volume Groups. example: string additionalProperties: false description: "The response contains a JWT token, that needs to be set as a header\ \ when invoking the Volume Group endpoint with NTNX_IGW_SESSION='JWT-TOKEN'." volumes.v4.2.stats.GetVolumeGroupStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.stats.VolumeGroupStats oneOf: - $ref: '#/components/schemas/volumes.v4.2.stats.VolumeGroupStats' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{extId}\ \ Get operation" volumes.v4.2.stats.VolumeGroupStats: title: Volume group stats model description: A model that stores the Volume group stats. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: volumeGroupExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Uuid of the Volume Group. example: 74f9847a-f2ba-4f07-8674-1a2d87549f82 deprecated: true controllerUserBytes: maxItems: 100 minItems: 0 type: array description: Controller user bytes. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumIOPS: maxItems: 100 minItems: 0 type: array description: Controller I/O rate measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumReadIOPS: maxItems: 100 minItems: 0 type: array description: Controller read I/O measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumWriteIOPS: maxItems: 100 minItems: 0 type: array description: Controller write I/O measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerReadIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller read I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerWriteIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller write I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgReadIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average read I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgWriteIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average write I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' hydrationRemainingBytes: maxItems: 100 minItems: 0 type: array description: Number of bytes that are left to hydrate the Volume Group. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' additionalProperties: false volumes.v4.2.stats.TimeValuePair: type: object properties: timestamp: type: string description: Timestamp is returned in Epoch format. format: date-time example: 2009-09-23T14:30:00-07:00 value: type: integer description: Value of the stat at the corresponding timestamp value represented in Int64 format. format: int64 example: 49 additionalProperties: false common.v1.0.stats.DownSamplingOperator: type: string description: | The operator to use while performing down-sampling on stats data. Allowed values are SUM, MIN, MAX, AVG, COUNT and LAST. enum: - SUM - MIN - MAX - AVG - COUNT - LAST - $UNKNOWN - $REDACTED x-enumDescriptions: AVG: | Aggregation indicating mean or average of all values. MIN: | Aggregation containing lowest of all values. MAX: | Aggregation containing highest of all values. LAST: | Aggregation containing only the last recorded value. SUM: | Aggregation with sum of all values. COUNT: | Aggregation containing total count of values. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. common.v1.0.response.ExternalizableAbstractModel: description: | A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel allOf: - $ref: '#/components/schemas/common.v1.0.config.TenantAwareModel' - type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier of an instance that is suitable for external consumption. nullable: true readOnly: true example: 431e86d6-495b-4f30-bfcf-fc0933dcb152 links: maxItems: 20 minItems: 0 type: array description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. readOnly: true items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' additionalProperties: false common.v1.0.config.TenantAwareModel: type: object properties: tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server). readOnly: true example: 4f6d83c1-c71b-4a17-b1f6-51429b6c16b1 additionalProperties: false description: | A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server. volumes.v4.2.stats.GetVolumeDiskStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: volumes.v4.stats.VolumeDiskStats oneOf: - $ref: '#/components/schemas/volumes.v4.2.stats.VolumeDiskStats' - $ref: '#/components/schemas/volumes.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /volumes/v4.2/stats/volume-groups/{volumeGroupExtId}/disks/{extId}\ \ Get operation" volumes.v4.2.stats.VolumeDiskStats: title: Volume disk stats model description: A model that stores the Volume disk stats. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: volumeDiskExtId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Uuid of the Volume Disk. example: 36996998-174c-49f4-a047-689ec95ed65d deprecated: true controllerUserBytes: maxItems: 100 minItems: 0 type: array description: Controller user bytes. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumIOPS: maxItems: 100 minItems: 0 type: array description: Controller I/O rate measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumReadIOPS: maxItems: 100 minItems: 0 type: array description: Controller read I/O measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerNumWriteIOPS: maxItems: 100 minItems: 0 type: array description: Controller write I/O measured in iops. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerReadIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller read I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerWriteIOBandwidthKBps: maxItems: 100 minItems: 0 type: array description: Controller write I/O bandwidth measured in Kbps. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgReadIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average read I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' controllerAvgWriteIOLatencyUsecs: maxItems: 100 minItems: 0 type: array description: Controller average write I/O latency measured in microseconds. readOnly: true items: $ref: '#/components/schemas/volumes.v4.2.stats.TimeValuePair' additionalProperties: false common.v1.0.config.EntityReference: type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier of an instance that is suitable for external consumption. example: c1349051-6edb-4c1e-b52f-edd1ad515e71 name: maxLength: 256 type: string description: | Name of the entity represented by this reference. example: string uris: maxItems: 100 minItems: 0 type: array description: | URI of entity represented by this reference. items: type: string example: string entityType: $ref: '#/components/schemas/common.v1.0.config.EntityType' additionalProperties: false description: Represents another entity that has been referenced by this entity. common.v1.0.config.EntityType: type: string description: | Type of entity represented by this reference, e.g., VPC. enum: - CLUSTER - VM - STORAGE_CONTAINER - VOLUME_GROUP - TASK - IMAGE - CATEGORY - NODE - VPC - SUBNET - ROUTING_POLICY - FLOATING_IP - VPN_GATEWAY - VPN_CONNECTION - DIRECT_CONNECT - DIRECT_CONNECT_VIF - VIRTUAL_NIC - VIRTUAL_SWITCH - VM_DISK - VOLUME_DISK - DISK_RECOVERY_POINT - VTEP_GATEWAY - RECOVERY_PLAN - RECOVERY_PLAN_JOB - AVAILABILITY_ZONE - VIRTUAL_NETWORK - CONSISTENCY_GROUP - SUBNET_EXTENSION - $UNKNOWN - $REDACTED x-enumDescriptions: VOLUME_GROUP: | Entity representing a volume group. ROUTING_POLICY: | Entity representing a Routing Policy. DIRECT_CONNECT_VIF: | Entity representing a Direct Connect Virtual Interface. AVAILABILITY_ZONE: | Entity representing an Availability Zone. STORAGE_CONTAINER: | Entity representing a storage container. VPC: | Entity representing a Virtual Private Cloud. VPN_CONNECTION: | Entity representing a VPN Connection. VOLUME_DISK: | Entity representing a Volume Disk. VPN_GATEWAY: | Entity representing a VPN Gateway. IMAGE: | Entity representing an image that can be used for creating VM disks etc. CATEGORY: | Entity representing a category in the form of a Key Value pair. RECOVERY_PLAN: | Entity representing a Disaster Recovery Plan. CLUSTER: | Entity representing a Nutanix managed cluster. DISK_RECOVERY_POINT: | Entity representing the recovery point of a protected Disk. CONSISTENCY_GROUP: | Entity representing a Consistency Group. VIRTUAL_NIC: | Entity representing a Virtual Network Interface Card. TASK: | Entity representing a task. VIRTUAL_SWITCH: | Entity representing a Virtual Switch. VIRTUAL_NETWORK: | Entity representing a Virtual Network. NODE: | Entity representing a node in a Nutanix managed cluster. FLOATING_IP: | Entity representing a Floating IP. $REDACTED: | Redacted value. SUBNET: | Entity representing a Subnet. VM_DISK: | Entity representing a VM Disk. VTEP_GATEWAY: | Entity representing a Virtual Tunnel End Point. VM: | Entity representing an AHV or ESX Virtual Machine. RECOVERY_PLAN_JOB: | Entity representing a Disaster Recovery Plan Job. DIRECT_CONNECT: | Entity representing a Direct Connect. SUBNET_EXTENSION: | Entity representing a Subnet Extension. $UNKNOWN: | Unknown value. common.v1.0.config.IPAddressOrFQDN: type: object properties: ipv4: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' ipv6: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' fqdn: $ref: '#/components/schemas/common.v1.0.config.FQDN' additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4/IPv6 format or a Fully Qualified Domain Name. common.v1.0.config.IPv4Address: required: - value type: object properties: value: pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" type: string description: | The IPv4 address of the host. example: 254.180.178.15 prefixLength: maximum: 32 minimum: 0 type: integer description: | The prefix length of the network to which this host IPv4 address belongs. format: int32 default: 32 additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4 format. common.v1.0.config.IPv6Address: required: - value type: object properties: value: pattern: "^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\ .){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\ .){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$" type: string description: | The IPv6 address of the host. example: 7d9a:64df:8ddf:d839:c6c4:eae3:5c0b:a4ea prefixLength: maximum: 128 minimum: 0 type: integer description: | The prefix length of the network to which this host IPv6 address belongs. format: int32 default: 128 additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv6 format. common.v1.0.config.FQDN: type: object properties: value: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: | The fully qualified domain name of the host. example: string additionalProperties: false description: | A fully qualified domain name that specifies its exact location in the tree hierarchy of the Domain Name System. volumes.v4.2.error.ErrorResponse: type: object properties: error: oneOf: - type: array items: $ref: '#/components/schemas/volumes.v4.2.error.AppMessage' - $ref: '#/components/schemas/volumes.v4.2.error.SchemaValidationError' additionalProperties: false description: An error response indicates that the operation has failed either due to a client error(4XX) or server error(5XX). Please look at the HTTP status code and namespace specific error code and error message for further details. x-platform-generated: true volumes.v4.2.error.AppMessage: type: object properties: message: type: string description: The message string. example: string severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' code: type: string description: "The code associated with this message. This string is typically\ \ prefixed with the namespace to which the endpoint belongs. For example:\ \ VMM-40000" example: string locale: type: string description: Locale for this message. The default locale would be 'en-US'. default: en_US errorGroup: type: string description: The error group associated with this message of severity ERROR. example: string argumentsMap: type: object additionalProperties: type: string description: The map of argument name to value. additionalProperties: false description: Message with associated severity describing status of the current operation. x-platform-generated: true volumes.v4.2.error.MessageSeverity: type: string description: Enum schema MessageSeverity enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-platform-generated: true x-codegen-hint: $any: - type: entity-identifier properties: identifiers: - value: $UNKNOWN index: 201 - value: $REDACTED index: 202 - value: INFO index: 203 - value: WARNING index: 204 - value: ERROR index: 205 volumes.v4.2.error.SchemaValidationError: type: object properties: timestamp: type: string description: Timestamp of the response. format: date-time example: 2009-09-23T14:30:00-07:00 statusCode: type: integer description: The HTTP status code of the response. example: 73 error: type: string description: The generic error message for the response. example: string path: type: string description: API path on which the request was made. example: string validationErrorMessages: type: array description: List of validation error messages items: $ref: '#/components/schemas/volumes.v4.2.error.SchemaValidationErrorMessage' additionalProperties: false description: This schema is generated from SchemaValidationError.java x-platform-generated: true volumes.v4.2.error.SchemaValidationErrorMessage: type: object properties: location: type: string description: "The part of the request that failed validation. Validation\ \ can fail for path, query parameters, and request body." example: string message: type: string description: The detailed message for the validation error. example: string attributePath: type: string description: The path of the attribute that failed validation in the schema. example: string additionalProperties: false description: This schema is generated from SchemaValidationErrorMessage.java x-platform-generated: true prism.v4.3.config.TaskReference: type: object properties: extId: pattern: "^[a-zA-Z0-9/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" type: string description: A globally unique identifier for a task. example: QmFzZTY0RW5jb2RlZA==:b442029f-c47f-425f-b99b-32a667679b26 additionalProperties: false description: A reference to a task tracking an asynchronous operation. The status of the task can be queried by making a GET request to the task URI provided in the metadata section of the API response. securitySchemes: basicAuthScheme: type: http scheme: basic apiKeyAuthScheme: type: apiKey name: X-ntnx-api-key in: header