openapi: 3.0.1 info: title: Nutanix Cluster Management APIs description: "Manage Hosts, Clusters and other Infrastructure." version: 1.0.0 x-logo: altText: Clustermgmt Logo url: https://developers.nutanix.com/api/v1/namespaces/clustermgmt/images/clustermgmt-logo-img.svg x-repo-name: clustermgmt x-minimum-negotiation-version: v4.2 servers: - url: "https://{host}:{port}/api" security: - basicAuthScheme: [] - apiKeyAuthScheme: [] tags: - name: Bmc description: | The baseboard management controller (BMC) v4 APIs allow you to read, create, update, and delete out-of-band (OOB) BMC credentials. x-displayName: BMC - name: Disks description: Represents the physical Disks on a Cluster. A disk is a storage device that stores and retrieves data. x-displayName: Disks - name: Clusters description: | Represents the Cluster entity. Provides the basic infrastructure for compute, storage and networking. This includes the operations that can be carried out on cluster and its sub-resources - host (node), rsyslog servers etc and actions that can be performed on cluster - add a node, remove a node, attach categories. - name: ClusterProfiles description: | Represents the Cluster Profile entity. This includes cluster settings or configurations which will be applied to clusters. x-displayName: Cluster Profiles - name: PcieDevices description: | Represents a serial expansion bus standard (Peripheral Component Interconnect Express) for connecting a VM to one or more peripheral devices. x-displayName: Pcie Devices - name: PasswordManager description: | Provides the ability to manage system user passwords. Additionally, it provides the ability to list password details for clusters. x-displayName: Password Managers - name: SSLCertificate description: | Provides the ability to manage SSL certificates for clusters. This includes the ability to retrieve and update SSL certificates for clusters. x-displayName: SSL Certificates - name: VcenterExtensions description: Represents vCenter server extensions to manage Nutanix clusters. x-displayName: Vcenter Extensions - name: StorageContainers description: A Storage Container is a subset of available storage within a Storage Pool for users to configure any storage-efficiency related features. x-displayName: Storage Containers paths: /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info: get: tags: - Bmc summary: Get BMC details description: Get BMC details of a host. operationId: getBmcInfo parameters: - name: clusterExtId in: path description: UUID of the cluster. 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: ee7c0fa9-caa2-4035-8c2d-30c02c3f8be0 - name: extId in: path description: UUID of the host. 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: 51a5af65-616f-455d-8609-a2c5af92d553 responses: "200": description: Returns the requested BMC details. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.BmcInfo' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ Get operation" x-permissions: operationName: Get BMC Info deploymentList: - ON_PREM roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin - name: User Admin - name: Prism Viewer x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: Small count: 1 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: 2024.3.1 x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.hw.java.client.ApiClient;\n\ import com.nutanix.hw.java.client.api.BmcApi;\nimport com.nutanix.dp1.hw.clustermgmt.v4.request.Bmc.GetBmcInfoRequest;\n\ import com.nutanix.dp1.hw.clustermgmt.v4.config.GetBmcInfoResponse;\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 \ \ BmcApi bmcApi = new BmcApi(apiClient);\n\n \n String\ \ clusterExtId = \"B1d5e83A-E8Bb-ADBD-0C1d-DD2ba6bAfeDF\";\n \n \ \ String extId = \"1FD878B9-a7a8-fdDc-cc0B-CCEDFA3A9aa2\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetBmcInfoResponse\ \ getBmcInfoResponse = bmcApi.getBmcInfo(GetBmcInfoRequest.builder()\n \ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getBmcInfoResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BmcApi } from \"@nutanix-api/clustermgmt-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 bmcApi = new BmcApi(apiClientInstance);\n\nfunction sample() {\n\n \ \ \n let clusterExtId = \"5F2a7EfB-8Eb5-336A-BFCc-FD1BFb4C89A6\";\n\ \ \n let extId = \"b0aA6CAD-6b0a-Ea5E-BaA4-5B2B3fe1695b\";\n\n\n\n\ \n\n bmcApi.getBmcInfo(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ bmc_api = ntnx_clustermgmt_py_client.BmcApi(api_client=client)\n \ \ \n cluster_ext_id = \"9CfcBaDE-E256-ddfC-5AbD-f704D4b11293\"\n \ \ \n ext_id = \"1C1E8ebC-13E1-F5AC-FBEd-Afe7aC85974b\"\n\n\n try:\n\ \ api_response = bmc_api.get_bmc_info(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/bmc\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BmcServiceApiInstance\ \ *api.BmcServiceApi\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\ \ BmcServiceApiInstance = api.NewBmcServiceApi(ApiClientInstance)\n \ \ ctx := context.Background()\n\n \n clusterExtId := \"d2623CaF-E00b-A2E6-CaeC-67cDfac779c9\"\ \n \n extId := \"E50efE5C-4AcA-6F18-AbF5-CeEDE9AA5FFe\"\n\n\n request\ \ := bmc.GetBmcInfoRequest{ ClusterExtId: &clusterExtId, ExtId: &extId }\n\ \ response, error := BmcServiceApiInstance.GetBmcInfo(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.BmcInfo)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/88cBbEEc-D79d-a2BA-6E6F-21d17deeA6E2/hosts/AbbDAE8A-CeFe-e5Eb-cffe-ca562b69ec6d/bmc-info" \ --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/clustermgmt/v4.2/config/clusters/FF6Fcefb-1bDc-e3ef-4FEb-19Cd73f27DeE/hosts/e5C954bd-f8D7-Fc5a-bf3b-cfDC17Fa22E3/bmc-info" - lang: Csharp source: "\n\nusing Nutanix.HwSDK.Client;\nusing Nutanix.HwSDK.Api;\nusing\ \ Nutanix.HwSDK.Model.Clustermgmt.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 \ \ BmcApi bmcApi = new BmcApi(client);\n\n String clusterExtId =\ \ \"02A4Ff0c-CA0B-ECAc-8BcC-ED3BEe9D6E9E\";\n String extId = \"a3BBf79A-dCFe-7dDE-DB6B-38A4da9bb9AF\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetBmcInfoRequest {\n ClusterExtId = clusterExtId,\n\ \ ExtId = extId\n };\n try {\n GetBmcInfoResponse\ \ getBmcInfoResponse = bmcApi.GetBmcInfo(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Bmc summary: Update BMC summary description: Updates the BMC summary information based on the provided identifier. operationId: updateBmcInfo parameters: - name: clusterExtId in: path description: UUID of the cluster. 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: 5bdebcbf-8e6d-40f2-993b-a24892fdf9b0 - name: extId in: path description: UUID of the host. 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: cbd4f945-9b47-477e-a824-379229ff67f7 - 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: f6b6c034-1913-4b64-8584-41e270e15742 requestBody: description: Update BMC info body content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.BmcInfo' required: true responses: "202": description: The requested BMC information is updated. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ Put operation" x-permissions: operationName: Update BMC Info deploymentList: - ON_PREM roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: Small count: 1 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: 2024.3.1 x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.hw.java.client.ApiClient;\n\ import com.nutanix.hw.java.client.api.BmcApi;\nimport com.nutanix.dp1.hw.clustermgmt.v4.request.Bmc.UpdateBmcInfoRequest;\n\ \nimport java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport\ \ com.nutanix.dp1.hw.clustermgmt.v4.config.BmcInfo;\nimport com.nutanix.dp1.hw.clustermgmt.v4.config.UpdateBmcInfoResponse;\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 \ \ BmcApi bmcApi = new BmcApi(apiClient);\n\n BmcInfo bmcInfo =\ \ new BmcInfo();\n\n // BmcInfo object initializations here...\n\ \ \n String clusterExtId = \"b4A8F7dD-c7bC-E827-E983-ADEC5bFAFcBa\"\ ;\n \n String extId = \"7FDC0dAf-dDDb-0eBA-B8aa-ee2BBb0417Ac\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.getEtag(getResponse);\n\ \ HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n */\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ UpdateBmcInfoResponse updateBmcInfoResponse = bmcApi.updateBmcInfo(UpdateBmcInfoRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), bmcInfo, opts);\n\n System.out.println(updateBmcInfoResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, BmcApi, BmcInfo } from \"@nutanix-api/clustermgmt-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 bmcApi = new BmcApi(apiClientInstance);\n\nfunction sample() {\n \ \ let bmcInfo = new BmcInfo();\n\n // BmcInfo object initializations\ \ here...\n bmcInfo = JSON.stringify(bmcInfo);\n\n \n let clusterExtId\ \ = \"fcBF1DBB-e0D5-eCad-af1f-2FaD1e3CEBAc\";\n \n let extId = \"\ 0ca7AA6e-fDbe-88e2-91Fa-1e8AcEFaaFF9\";\n\n\n /*\n Some Create, Update,\ \ and Delete operations generally require an If-Match header with a value\ \ to be passed in order to protect against concurrent updates.\n The\ \ value that needs to be sent in the If-Match header needs to be retrieved\ \ by performing a Read(Get) operation on the same resource.\n ETags can\ \ be retrieved by calling a static method of ApiClient as below:\n let\ \ etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\" : etagValue};\n\ \ */\n bmcApi.updateBmcInfo(clusterExtId, extId, bmcInfo, 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}\nsample()\n" - lang: Python source: "\nimport ntnx_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ bmc_api = ntnx_clustermgmt_py_client.BmcApi(api_client=client)\n \ \ bmcInfo = ntnx_clustermgmt_py_client.BmcInfo()\n\n # BmcInfo object\ \ initializations here...\n \n cluster_ext_id = \"d8B2CdBa-a5dF-ee7d-ab20-eeddfE9CcBdD\"\ \n \n ext_id = \"53cdD29B-859b-DEea-eedC-8C0fbd0AD91a\"\n\n \"\"\ \"\n Some Create, Update, and Delete operations generally require an\ \ If-Match header with a value to be passed in order to protect against\ \ concurrent updates.\n The value that needs to be sent in the If-Match\ \ header needs to be retrieved by performing a Read(Get) operation on the\ \ same resource.\n ETags can be retrieved by calling a static method\ \ of ApiClient as below:\n etag_value = ApiClient.get_etag(get_api_response)\n\ \ \"\"\"\n\n try:\n api_response = bmc_api.update_bmc_info(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=bmcInfo, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/bmc\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n BmcServiceApiInstance\ \ *api.BmcServiceApi\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\ \ BmcServiceApiInstance = api.NewBmcServiceApi(ApiClientInstance)\n \ \ ctx := context.Background()\n\n bmcInfo := import1.NewBmcInfo()\n\ \n // BmcInfo object initializations here...\n\n \n clusterExtId\ \ := \"9A47FefB-a496-372a-4fBD-dEc28AeeF74B\"\n \n extId := \"9ecEF800-fc57-a8Cf-0ACf-c0D8dBC975bb\"\ \n\n /*\n Some Create, Update, and Delete operations generally require\ \ an If-Match header with a value to be passed in order to protect against\ \ concurrent updates.\n The value that needs to be sent in the If-Match\ \ header needs to be retrieved by performing a Read(Get) operation on the\ \ same resource.\n ETags can be retrieved by calling a static method\ \ of ApiClient as below:\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \ */\n\n request := bmc.UpdateBmcInfoRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId, Body: bmcInfo }\n response, error := BmcServiceApiInstance.UpdateBmcInfo(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/clustermgmt/v4.2/config/clusters/BA7dDbBa-a2D4-E59b-EF37-14FFfCcfba26/hosts/e1FBcFdc-B0cE-3d06-D063-c9FDEe2cdccE/bmc-info" \ --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 {"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"credential":{"username":"test-user","password":"string","$objectType":"common.v1.config.BasicAuth"},"status":"$UNKNOWN","$objectType":"clustermgmt.v4.config.BmcInfo"} \ - 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 {"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"credential":{"username":"test-user","password":"string","$objectType":"common.v1.config.BasicAuth"},"status":"$UNKNOWN","$objectType":"clustermgmt.v4.config.BmcInfo"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/a9Af13ca-C2C0-d4bE-fA86-CdDbEF7d1CE5/hosts/DDb00FeE-78BD-41AB-d1bA-e6DaaDFd3AA9/bmc-info" - lang: Csharp source: "\n\nusing Nutanix.HwSDK.Client;\nusing Nutanix.HwSDK.Api;\nusing\ \ Nutanix.HwSDK.Model.Clustermgmt.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 \ \ BmcApi bmcApi = new BmcApi(client);\n\n BmcInfo bmcInfo = new\ \ BmcInfo();\n\n // BmcInfo object initializations here...\n\n \ \ String clusterExtId = \"aCADcf9c-DB46-eaDD-Ee73-DB9A8F88BcB3\";\n \ \ String extId = \"A68b987D-ebDe-Dd1F-dEDF-cFFfc86ab46e\";\n\n /*\n\ \ Some Create, Update, and Delete operations generally require an\ \ If-Match header with a value to be passed in order to protect against\ \ concurrent updates.\n The value that needs to be sent in the If-Match\ \ header needs to be retrieved by performing a Read(Get) operation on the\ \ same resource.\n ETags can be retrieved by calling a static method\ \ of ApiClient as below:\n String eTag = ApiClient.GetEtag(getResponse);\n\ \ Dictionary opts = new Dictionary();\n\ \ opts[\"If-Match\"] = eTag;\n */\n // Create request\ \ object with parameters\n var request = new UpdateBmcInfoRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ Body = bmcInfo,\n \n \n };\n \ \ try {\n UpdateBmcInfoResponse updateBmcInfoResponse =\ \ bmcApi.UpdateBmcInfo(request, opts);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /clustermgmt/v4.2/config/cluster-profiles: get: tags: - ClusterProfiles summary: List cluster profiles description: "Fetches a list of cluster profile entities. A profile consists\ \ of different cluster settings like Network Time Protocol(NTP), Domain Name\ \ System(DNS), and so on." operationId: listClusterProfiles 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: clusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=clusterCount\ \ eq 13" - name: createTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=createTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: createdBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=createdBy\ \ eq '703a0369-d038-487c-9ea0-b01ab35eef15'" - name: driftedClusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=driftedClusterCount\ \ eq 4" - name: lastUpdateTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=lastUpdateTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: lastUpdatedBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=lastUpdatedBy\ \ eq '451911cf-a337-4d66-8781-0bee3e460757'" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$filter=name\ \ eq 'Test Cluster Profile'" - 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: clusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=clusterCount" - name: createTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=createTime" - name: createdBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=createdBy" - name: driftedClusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=driftedClusterCount" - name: lastUpdateTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=lastUpdateTime" - name: lastUpdatedBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=lastUpdatedBy" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$orderby=name" - 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: allowedOverrides example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=allowedOverrides" - name: clusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=clusterCount" - name: clusters example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=clusters" - name: createTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=createTime" - name: createdBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=createdBy" - name: description example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=description" - name: driftedClusterCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=driftedClusterCount" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=extId" - name: lastUpdateTime example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=lastUpdateTime" - name: lastUpdatedBy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=lastUpdatedBy" - name: links example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=links" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=name" - name: nameServerIpList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=nameServerIpList" - name: nfsSubnetWhitelist example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=nfsSubnetWhitelist" - name: ntpServerConfigList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=ntpServerConfigList" - name: ntpServerIpList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=ntpServerIpList" - name: pulseStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=pulseStatus" - name: rsyslogServerList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=rsyslogServerList" - name: smtpServer example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=smtpServer" - name: snmpConfig example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=snmpConfig" - name: tenantId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/cluster-profiles?$select=tenantId" responses: "200": description: Returns a list of requested cluster profiles. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles Get operation x-permissions: operationName: View Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin - name: Cluster Viewer - 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.ListClusterProfilesRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListClusterProfilesApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(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 ListClusterProfilesApiResponse\ \ listClusterProfilesApiResponse = clusterProfilesApi.listClusterProfiles(ListClusterProfilesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listClusterProfilesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClusterProfilesApi } from "@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(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["$select"] = "string_sample_data"; clusterProfilesApi.listClusterProfiles(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = cluster_profiles_api.list_cluster_profiles(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := clusterprofiles.ListClusterProfilesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_:\ \ nil }\n response, error := ClusterProfilesServiceApiInstance.ListClusterProfiles(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.ClusterProfile)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles?$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/clustermgmt/v4.2/config/cluster-profiles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \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 ListClusterProfilesRequest {\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListClusterProfilesApiResponse listClusterProfilesApiResponse\ \ = clusterProfilesApi.ListClusterProfiles(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - ClusterProfiles summary: Create a cluster profile description: Creates a cluster profile with the settings provided in the request body. operationId: createClusterProfile 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: 9535e85e-7318-449e-9f46-7963e962eb08 requestBody: description: The required parameters to create a cluster profile. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' required: true responses: "202": description: Task ID to monitor the cluster profile creation workflow. 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 /clustermgmt/v4.2/config/cluster-profiles 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles Post operation x-permissions: operationName: Create Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.clu.java.client.ApiClient; import com.nutanix.clu.java.client.api.ClusterProfilesApi; import com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.CreateClusterProfileRequest; import com.nutanix.dp1.clu.clustermgmt.v4.config.ClusterProfile; import com.nutanix.dp1.clu.clustermgmt.v4.config.CreateClusterProfileApiResponse; 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. ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient); ClusterProfile clusterProfile = new ClusterProfile(); // ClusterProfile object initializations here... clusterProfile.setName("Test Cluster Profile"); // required field try { // Pass in parameters using the request builder object associated with the operation. CreateClusterProfileApiResponse createClusterProfileApiResponse = clusterProfilesApi.createClusterProfile(CreateClusterProfileRequest.builder() .build(), clusterProfile); System.out.println(createClusterProfileApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, ClusterProfilesApi, ClusterProfile } from "@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance); function sample() { let clusterProfile = new ClusterProfile(); // ClusterProfile object initializations here... clusterProfile.setName("Test Cluster Profile"); // required field clusterProfile = JSON.stringify(clusterProfile); clusterProfilesApi.createClusterProfile(clusterProfile).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_clustermgmt_py_client if __name__ == "__main__": # Configure the client config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config) cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client) clusterProfile = ntnx_clustermgmt_py_client.ClusterProfile() # ClusterProfile object initializations here... clusterProfile.name = "Test Cluster Profile" # required field try: api_response = cluster_profiles_api.create_cluster_profile(body=clusterProfile) print(api_response) except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles" import1 "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient ClusterProfilesServiceApiInstance *api.ClusterProfilesServiceApi ) 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. ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance) ctx := context.Background() clusterProfile := import1.NewClusterProfile() // ClusterProfile object initializations here... request := clusterprofiles.CreateClusterProfileRequest{ Body: clusterProfile } response, error := ClusterProfilesServiceApiInstance.CreateClusterProfile(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/clustermgmt/v4.2/config/cluster-profiles" \ --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":"TestClusterProfile","description":"TestClusterProfileDescription","createTime":"2015-07-20T15:49:04-07:00","lastUpdateTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","clusterCount":0,"driftedClusterCount":0,"clusters":[{"extId":"string","isCompliant":true,"lastSyncedTime":"2015-07-20T15:49:04-07:00","configDrifts":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.ManagedCluster"}],"allowedOverrides":["$UNKNOWN"],"nameServerIpList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"nfsSubnetWhitelist":["10.110.106.45/255.255.255.255"],"snmpConfig":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"isEnabled":true,"users":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"}],"transports":[{"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"}],"traps":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"}],"$objectType":"clustermgmt.v4.config.SnmpConfig"},"rsyslogServerList":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"}],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterProfile"} \ - 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":"TestClusterProfile","description":"TestClusterProfileDescription","createTime":"2015-07-20T15:49:04-07:00","lastUpdateTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","clusterCount":0,"driftedClusterCount":0,"clusters":[{"extId":"string","isCompliant":true,"lastSyncedTime":"2015-07-20T15:49:04-07:00","configDrifts":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.ManagedCluster"}],"allowedOverrides":["$UNKNOWN"],"nameServerIpList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"nfsSubnetWhitelist":["10.110.106.45/255.255.255.255"],"snmpConfig":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"isEnabled":true,"users":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"}],"transports":[{"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"}],"traps":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"}],"$objectType":"clustermgmt.v4.config.SnmpConfig"},"rsyslogServerList":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"}],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterProfile"} \ - "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n ClusterProfile clusterProfile = new ClusterProfile();\n\n //\ \ ClusterProfile object initializations here...\n clusterProfile.Name\ \ = \"Test Cluster Profile\"; // required field\n\n\n // Create\ \ request object with parameters\n var request = new CreateClusterProfileRequest\ \ {\n Body = clusterProfile\n };\n try {\n \ \ CreateClusterProfileApiResponse createClusterProfileApiResponse\ \ = clusterProfilesApi.CreateClusterProfile(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" x-supported-versions: - product: PC version: "2024.3" /clustermgmt/v4.2/config/cluster-profiles/{extId}: get: tags: - ClusterProfiles summary: Get cluster profile description: "Fetches a cluster profile. A profile consists of different cluster\ \ settings like Network Time Protocol(NTP), Domain Name System(DNS), and so\ \ on." operationId: getClusterProfileById parameters: - name: extId in: path description: UUID of the cluster profile. 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: 5ed9b456-8242-4bd1-af23-4d8a5c55197f responses: "200": description: Returns the requested cluster profile. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin - name: Cluster Viewer - 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.GetClusterProfileByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetClusterProfileApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient);\n\ \n \n String extId = \"AD3Bd0d5-AD69-a6e9-Fa8D-B7B2afAaFeED\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetClusterProfileApiResponse\ \ getClusterProfileApiResponse = clusterProfilesApi.getClusterProfileById(GetClusterProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getClusterProfileApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClusterProfilesApi } from \"@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"0CF0BD47-FcbD-4F0A-daaC-C4f8bbac50fF\"\ ;\n\n\n\n\n\n clusterProfilesApi.getClusterProfileById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ \n ext_id = \"FcffAF36-dDcA-dBaC-8D6c-3c7c0b1FdECe\"\n\n\n try:\n\ \ api_response = cluster_profiles_api.get_cluster_profile_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"97EA1eFF-AfF5-373B-aA4a-Facff6EA7d1c\"\ \n\n\n request := clusterprofiles.GetClusterProfileByIdRequest{ ExtId:\ \ &extId }\n response, error := ClusterProfilesServiceApiInstance.GetClusterProfileById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.ClusterProfile)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles/C0c8aEE4-df6b-66F0-e5EF-62ff8Ea18cdf" \ --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/clustermgmt/v4.2/config/cluster-profiles/565FC96B-3CD7-9aD4-5FAd-C6DdDc36A4FD" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n String extId = \"F37dC3C6-aCF0-7EEA-fE6C-ABec8cfFbECF\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetClusterProfileByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetClusterProfileApiResponse getClusterProfileApiResponse\ \ = clusterProfilesApi.GetClusterProfileById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" put: tags: - ClusterProfiles summary: Update cluster profile description: "Updates a cluster profile. A profile consists of different cluster\ \ settings like Network Time Protocol(NTP), Domain Name System(DNS), and so\ \ on." operationId: updateClusterProfileById parameters: - name: extId in: path description: UUID of the cluster profile. 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: 1e7a0304-f084-4af9-adf1-94b9cdedddfe - 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: 09af9095-7c5a-4be3-8712-da57278dcf79 - name: $dryrun in: query description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. required: false style: form explode: false schema: type: boolean description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. example: true requestBody: description: Updates a cluster profile with the settings provided in request body. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' required: true responses: "202": description: Task ID to monitor the cluster profile update. 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 /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Put operation" x-permissions: operationName: Update Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.UpdateClusterProfileByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.GetClusterProfileByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.ClusterProfile;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetClusterProfileApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateClusterProfileApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient);\n\ \n ClusterProfile clusterProfile = new ClusterProfile();\n\n \ \ // ClusterProfile object initializations here...\n clusterProfile.setName(\"\ Test Cluster Profile\"); // required field\n \n String extId\ \ = \"ef0CC3Fa-FAde-Cb03-F976-2Ca4e550c5e2\";\n \n boolean\ \ dryrun = true;\n\n // perform GET call\n GetClusterProfileApiResponse\ \ getResponse = null;\n try {\n getResponse = clusterProfilesApi.getClusterProfileById(GetClusterProfileByIdRequest.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 UpdateClusterProfileApiResponse\ \ updateClusterProfileApiResponse = clusterProfilesApi.updateClusterProfileById(UpdateClusterProfileByIdRequest.builder()\n\ \ .extId(extId)\n .$dryrun(dryrun)\n \ \ .build(), clusterProfile, opts);\n\n System.out.println(updateClusterProfileApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClusterProfilesApi, ClusterProfile, GetClusterProfileApiResponse\ \ } from \"@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance);\n\n\ function sample() {\n let clusterProfile = new ClusterProfile();\n\n\ \ // ClusterProfile object initializations here...\n clusterProfile.setName(\"\ Test Cluster Profile\"); // required field\n clusterProfile = JSON.stringify(clusterProfile);\n\ \n \n let extId = \"dAe8CC5e-d8b0-BEeC-cA0A-DCdBd01F3Cdf\";\n\n \ \ // Construct Optional Parameters\n var opts = {};\n opts[\"$dryrun\"\ ] = true;\n\n // Perform Get call\n clusterProfilesApi.getClusterProfileById(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 clusterProfilesApi.updateClusterProfileById(extId,\ \ clusterProfile, opts, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ clusterProfile = ntnx_clustermgmt_py_client.ClusterProfile()\n\n \ \ # ClusterProfile object initializations here...\n clusterProfile.name\ \ = \"Test Cluster Profile\" # required field\n \n ext_id = \"EAA0b0a8-433d-E7B1-F537-AEbfdEDD7DeE\"\ \n \n dryrun = True\n\n try:\n api_response = cluster_profiles_api.get_cluster_profile_by_id(extId=ext_id)\n\ \ except ntnx_clustermgmt_py_client.rest.ApiException as e:\n \ \ print(e)\n # Extract E-Tag Header\n etag_value = ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = cluster_profiles_api.update_cluster_profile_by_id(extId=ext_id,\ \ body=clusterProfile, _dryrun=dryrun, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n clusterProfile := import1.NewClusterProfile()\n\ \n // ClusterProfile object initializations here...\n\n \n extId\ \ := \"a2F43F65-3fc4-Fce2-8cc1-f3eAdEd2AB67\"\n \n dryrun_ := true\n\ \n getRequest := clusterprofiles.GetClusterProfileByIdRequest{ extId:\ \ &extId }\n getResponse, err := ClusterProfilesServiceApiInstance.GetClusterProfileById(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 := clusterprofiles.UpdateClusterProfileByIdRequest{ ExtId:\ \ &extId, Body: clusterProfile, Dryrun_: &dryrun_ }\n response, error\ \ := ClusterProfilesServiceApiInstance.UpdateClusterProfileById(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/clustermgmt/v4.2/config/cluster-profiles/e72acb7c-7Be3-CD0A-e45E-0a116bC27DfB?$dryrun=true" \ --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":"TestClusterProfile","description":"TestClusterProfileDescription","createTime":"2015-07-20T15:49:04-07:00","lastUpdateTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","clusterCount":0,"driftedClusterCount":0,"clusters":[{"extId":"string","isCompliant":true,"lastSyncedTime":"2015-07-20T15:49:04-07:00","configDrifts":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.ManagedCluster"}],"allowedOverrides":["$UNKNOWN"],"nameServerIpList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"nfsSubnetWhitelist":["10.110.106.45/255.255.255.255"],"snmpConfig":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"isEnabled":true,"users":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"}],"transports":[{"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"}],"traps":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"}],"$objectType":"clustermgmt.v4.config.SnmpConfig"},"rsyslogServerList":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"}],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterProfile"} \ - 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":"TestClusterProfile","description":"TestClusterProfileDescription","createTime":"2015-07-20T15:49:04-07:00","lastUpdateTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","clusterCount":0,"driftedClusterCount":0,"clusters":[{"extId":"string","isCompliant":true,"lastSyncedTime":"2015-07-20T15:49:04-07:00","configDrifts":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.ManagedCluster"}],"allowedOverrides":["$UNKNOWN"],"nameServerIpList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"nfsSubnetWhitelist":["10.110.106.45/255.255.255.255"],"snmpConfig":{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"isEnabled":true,"users":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"}],"transports":[{"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"}],"traps":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"}],"$objectType":"clustermgmt.v4.config.SnmpConfig"},"rsyslogServerList":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"}],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterProfile"} \ - "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles/3A6AfcaF-4Ec4-Ef3f-62bB-F21aCDEFBFBa?$dryrun=true" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n ClusterProfile clusterProfile = new ClusterProfile();\n\n //\ \ ClusterProfile object initializations here...\n clusterProfile.Name\ \ = \"Test Cluster Profile\"; // required field\n\n String extId =\ \ \"BbaDc587-F62A-fE5C-aBba-Fd5a756DCA57\";\n boolean dryrun = true;\n\ \n // perform GET call\n var getRequest = new GetClusterProfileByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetClusterProfileApiResponse\ \ getResponse = clusterProfilesApi.GetClusterProfileById(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 UpdateClusterProfileByIdRequest {\n ExtId = extId,\n\ \ Body = clusterProfile,\n Dryrun = dryrun,\n \ \ \n \n };\n try {\n UpdateClusterProfileApiResponse\ \ updateClusterProfileApiResponse = clusterProfilesApi.UpdateClusterProfileById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - ClusterProfiles summary: Delete cluster profile description: "Deletes cluster profile. A profile consists of different cluster\ \ settings like Network Time Protocol(NTP), Domain Name System(DNS), and so\ \ on." operationId: deleteClusterProfileById parameters: - name: extId in: path description: UUID of the cluster profile. 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: 90de2c4c-a8f6-416c-a191-36f99394998b - 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: 50a2a13f-9b8c-4223-8341-ecf550ffd5fa responses: "202": description: Task ID to monitor the cluster profile deletion. 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 /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Delete operation" x-permissions: operationName: Delete Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.DeleteClusterProfileByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteClusterProfileApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient);\n\ \n \n String extId = \"Dffe575e-Aaee-6e3a-8B1e-521Ae8fBdb6C\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteClusterProfileApiResponse\ \ deleteClusterProfileApiResponse = clusterProfilesApi.deleteClusterProfileById(DeleteClusterProfileByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(deleteClusterProfileApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClusterProfilesApi } from \"@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance);\n\n\ function sample() {\n\n \n let extId = \"Bbfebbe8-F02A-fBFd-31df-7aEf92A8Dbbb\"\ ;\n\n\n\n\n\n clusterProfilesApi.deleteClusterProfileById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ \n ext_id = \"A4dfaeD6-BB58-6ba0-4c3B-A5EA5CaF6416\"\n\n\n try:\n\ \ api_response = cluster_profiles_api.delete_cluster_profile_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"6cC06adA-cbEF-d7c0-df79-cae6DEcAfbee\"\ \n\n\n request := clusterprofiles.DeleteClusterProfileByIdRequest{ ExtId:\ \ &extId }\n response, error := ClusterProfilesServiceApiInstance.DeleteClusterProfileById(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/clustermgmt/v4.2/config/cluster-profiles/DEaE8082-22D2-0650-2BF2-cDD7CBd5c97f" \ --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/clustermgmt/v4.2/config/cluster-profiles/Bcf4bfcA-cEa1-b7E9-4AE8-C1cDc1bBca2D" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n String extId = \"221a7Afb-bb64-48Db-0bEC-3EdB9A85D54d\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DeleteClusterProfileByIdRequest {\n ExtId = extId\n \ \ };\n try {\n DeleteClusterProfileApiResponse deleteClusterProfileApiResponse\ \ = clusterProfilesApi.DeleteClusterProfileById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" x-supported-versions: - product: PC version: "2024.3" /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/disassociate-cluster: post: tags: - ClusterProfiles summary: Disassociate cluster from a cluster profile description: Disassociate cluster from a cluster profile. This will halt the application and monitoring of the clusters. operationId: disassociateClusterFromClusterProfile parameters: - name: extId in: path description: UUID of the cluster profile. 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: 1a9bd8be-9870-44b5-9e46-d9837d593bcd - 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: 19ed8bb8-54ed-4970-84f6-414ed2f74814 requestBody: description: Request body that will accept a list of clusters to disassociate from the cluster profile. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterReferenceListSpec' required: true responses: "202": description: Task ID to monitor the disassociation of clusters from the profile. 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 /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/disassociate-cluster\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/disassociate-cluster\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/disassociate-cluster\ \ Post operation" x-permissions: operationName: Disassociate Cluster Profile Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.DisassociateClusterFromClusterProfileRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ClusterReferenceListSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DisassociateClusterFromClusterProfileApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient);\n\ \n ClusterReferenceListSpec clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n \ \ clusterReferenceListSpec.setClusters(new ArrayList<>()); // required\ \ field\n \n String extId = \"Fe7AEb61-39Fe-B74a-87d6-e07c0ae6BAab\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DisassociateClusterFromClusterProfileApiResponse\ \ disassociateClusterFromClusterProfileApiResponse = clusterProfilesApi.disassociateClusterFromClusterProfile(DisassociateClusterFromClusterProfileRequest.builder()\n\ \ .extId(extId)\n .build(), clusterReferenceListSpec);\n\ \n System.out.println(disassociateClusterFromClusterProfileApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClusterProfilesApi, ClusterReferenceListSpec\ \ } from \"@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance);\n\n\ function sample() {\n let clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n clusterReferenceListSpec.setClusters([]);\ \ // required field\n clusterReferenceListSpec = JSON.stringify(clusterReferenceListSpec);\n\ \n \n let extId = \"E77305fb-c78D-AEcB-7dee-eE0a98DaF1aA\";\n\n\n\n\ \n\n clusterProfilesApi.disassociateClusterFromClusterProfile(extId,\ \ clusterReferenceListSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ clusterReferenceListSpec = ntnx_clustermgmt_py_client.ClusterReferenceListSpec()\n\ \n # ClusterReferenceListSpec object initializations here...\n clusterReferenceListSpec.clusters\ \ = [] # required field\n \n ext_id = \"CdAeFEDb-83Fb-bc5b-5cf7-F61DEbcbb8Bb\"\ \n\n\n try:\n api_response = cluster_profiles_api.disassociate_cluster_from_cluster_profile(extId=ext_id,\ \ body=clusterReferenceListSpec)\n print(api_response)\n except\ \ ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n clusterReferenceListSpec := import1.NewClusterReferenceListSpec()\n\ \n // ClusterReferenceListSpec object initializations here...\n\n \ \ \n extId := \"fDEF0Fe7-9Fa0-5DB0-FA1B-5AdbDdfe8323\"\n\n\n request\ \ := clusterprofiles.DisassociateClusterFromClusterProfileRequest{ ExtId:\ \ &extId, Body: clusterReferenceListSpec }\n response, error := ClusterProfilesServiceApiInstance.DisassociateClusterFromClusterProfile(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/clustermgmt/v4.2/config/cluster-profiles/0C3ace43-CD45-FAf3-c8aa-AF32FAfBEE0A/$actions/disassociate-cluster" \ --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 {"clusters":[{"uuid":"string","name":"TestClusterName","$objectType":"clustermgmt.v4.config.ClusterReference"}],"$objectType":"clustermgmt.v4.config.ClusterReferenceListSpec"} \ - 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 {"clusters":[{"uuid":"string","name":"TestClusterName","$objectType":"clustermgmt.v4.config.ClusterReference"}],"$objectType":"clustermgmt.v4.config.ClusterReferenceListSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles/Ed885ED7-AABF-DDe0-cBf8-18e3aE7dF1Fa/$actions/disassociate-cluster" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n ClusterReferenceListSpec clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n \ \ clusterReferenceListSpec.Clusters = new ArrayList(); // required field\n\ \n String extId = \"a1FeEb7b-8986-EAa5-cfBF-05edE8E0Ab2a\";\n\n \ \ // Create request object with parameters\n var request = new\ \ DisassociateClusterFromClusterProfileRequest {\n ExtId = extId,\n\ \ Body = clusterReferenceListSpec\n };\n try {\n\ \ DisassociateClusterFromClusterProfileApiResponse disassociateClusterFromClusterProfileApiResponse\ \ = clusterProfilesApi.DisassociateClusterFromClusterProfile(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/apply: post: tags: - ClusterProfiles summary: Apply cluster profile description: Applies or associates clusters to a profile. The clusters will be added for application and monitoring. operationId: applyClusterProfile parameters: - name: extId in: path description: UUID of the cluster profile. 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: b8e56715-db07-4ffb-acf7-2e0601eb1cf5 - 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: ef5fe21a-affa-4469-a76f-2b832ccb5bdf - name: $dryrun in: query description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. required: false style: form explode: false schema: type: boolean description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. example: true requestBody: description: Request body that will contain a list of clusters to apply to a cluster profile. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterReferenceListSpec' required: true responses: "202": description: Task ID to monitor the apply profile 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 /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/apply\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/apply\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/apply\ \ Post operation" x-permissions: operationName: Apply Cluster Profile deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClusterProfilesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.ClusterProfiles.ApplyClusterProfileRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ClusterReferenceListSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ApplyClusterProfileApiResponse;\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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(apiClient);\n\ \n ClusterReferenceListSpec clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n \ \ clusterReferenceListSpec.setClusters(new ArrayList<>()); // required\ \ field\n \n String extId = \"Cb40fCF2-BfEA-e5b0-E0EF-ce5DD1ee3Dfa\"\ ;\n \n boolean dryrun = true;\n\n try {\n \ \ // Pass in parameters using the request builder object associated with\ \ the operation.\n ApplyClusterProfileApiResponse applyClusterProfileApiResponse\ \ = clusterProfilesApi.applyClusterProfile(ApplyClusterProfileRequest.builder()\n\ \ .extId(extId)\n .$dryrun(dryrun)\n \ \ .build(), clusterReferenceListSpec);\n\n System.out.println(applyClusterProfileApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClusterProfilesApi, ClusterReferenceListSpec\ \ } from \"@nutanix-api/clustermgmt-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 clusterProfilesApi = new ClusterProfilesApi(apiClientInstance);\n\n\ function sample() {\n let clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n clusterReferenceListSpec.setClusters([]);\ \ // required field\n clusterReferenceListSpec = JSON.stringify(clusterReferenceListSpec);\n\ \n \n let extId = \"af5D50c8-d7dE-DadC-dfbD-DEaabc6Af5fE\";\n\n \ \ // Construct Optional Parameters\n var opts = {};\n opts[\"$dryrun\"\ ] = true;\n\n\n\n\n clusterProfilesApi.applyClusterProfile(extId, clusterReferenceListSpec,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cluster_profiles_api = ntnx_clustermgmt_py_client.ClusterProfilesApi(api_client=client)\n\ \ clusterReferenceListSpec = ntnx_clustermgmt_py_client.ClusterReferenceListSpec()\n\ \n # ClusterReferenceListSpec object initializations here...\n clusterReferenceListSpec.clusters\ \ = [] # required field\n \n ext_id = \"3B63ce0a-9Dcf-db86-19ed-95472F1F9Db7\"\ \n \n dryrun = True\n\n\n try:\n api_response = cluster_profiles_api.apply_cluster_profile(extId=ext_id,\ \ body=clusterReferenceListSpec, _dryrun=dryrun)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusterprofiles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClusterProfilesServiceApiInstance\ \ *api.ClusterProfilesServiceApi\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\ \ ClusterProfilesServiceApiInstance = api.NewClusterProfilesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n clusterReferenceListSpec := import1.NewClusterReferenceListSpec()\n\ \n // ClusterReferenceListSpec object initializations here...\n\n \ \ \n extId := \"Dc1abDaF-b92e-CC2B-DedC-A3C9ae1B03cE\"\n \n dryrun_\ \ := true\n\n\n request := clusterprofiles.ApplyClusterProfileRequest{\ \ ExtId: &extId, Body: clusterReferenceListSpec, Dryrun_: &dryrun_ }\n \ \ response, error := ClusterProfilesServiceApiInstance.ApplyClusterProfile(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/clustermgmt/v4.2/config/cluster-profiles/AbdEFCc9-8CcB-f0F0-bAba-09F0Fd2BFEce/$actions/apply?$dryrun=true" \ --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 {"clusters":[{"uuid":"string","name":"TestClusterName","$objectType":"clustermgmt.v4.config.ClusterReference"}],"$objectType":"clustermgmt.v4.config.ClusterReferenceListSpec"} \ - 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 {"clusters":[{"uuid":"string","name":"TestClusterName","$objectType":"clustermgmt.v4.config.ClusterReference"}],"$objectType":"clustermgmt.v4.config.ClusterReferenceListSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/cluster-profiles/b2520aA0-Ffca-cCb4-Dd1a-cEadacFAebFA/$actions/apply?$dryrun=true" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClusterProfilesApi clusterProfilesApi = new ClusterProfilesApi(client);\n\ \n ClusterReferenceListSpec clusterReferenceListSpec = new ClusterReferenceListSpec();\n\ \n // ClusterReferenceListSpec object initializations here...\n \ \ clusterReferenceListSpec.Clusters = new ArrayList(); // required field\n\ \n String extId = \"9C56Ea4F-4DAF-9C0c-bcCA-E22d5FC38BcF\";\n \ \ boolean dryrun = true;\n\n // Create request object with parameters\n\ \ var request = new ApplyClusterProfileRequest {\n ExtId\ \ = extId,\n Body = clusterReferenceListSpec,\n Dryrun\ \ = dryrun\n };\n try {\n ApplyClusterProfileApiResponse\ \ applyClusterProfileApiResponse = clusterProfilesApi.ApplyClusterProfile(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/associate-categories: post: tags: - Clusters summary: Associate categories to the cluster description: "Attach categories to the cluster identified by {clusterExtId}." operationId: associateCategoriesToCluster parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: b0ddba3c-eccd-4a57-9a4d-ecf3ab0494b4 requestBody: description: The specifications required for updating categories to the entity. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.CategoryEntityReferences' required: true responses: "202": description: Associated categories to the cluster. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/associate-categories\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/associate-categories\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/associate-categories\ \ Post operation" x-permissions: operationName: Associate Cluster Categories deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.AssociateCategoriesToClusterRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.CategoryEntityReferences;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.AssociateCategoriesToClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n CategoryEntityReferences\ \ categoryEntityReferences = new CategoryEntityReferences();\n\n \ \ // CategoryEntityReferences object initializations here...\n categoryEntityReferences.setCategories(new\ \ ArrayList<>()); // required field\n \n String clusterExtId\ \ = \"7ABCCE6E-A54a-D44a-ba5c-c4bFAe3dDfBf\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n AssociateCategoriesToClusterApiResponse\ \ associateCategoriesToClusterApiResponse = clustersApi.associateCategoriesToCluster(AssociateCategoriesToClusterRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ categoryEntityReferences);\n\n System.out.println(associateCategoriesToClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, CategoryEntityReferences } from\ \ \"@nutanix-api/clustermgmt-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.\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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n categoryEntityReferences.setCategories([]);\ \ // required field\n categoryEntityReferences = JSON.stringify(categoryEntityReferences);\n\ \n \n let clusterExtId = \"Bac9aafe-cCEe-9CF9-de0A-9d39E6C1dcC6\"\ ;\n\n\n\n\n\n clustersApi.associateCategoriesToCluster(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ categoryEntityReferences = ntnx_clustermgmt_py_client.CategoryEntityReferences()\n\ \n # CategoryEntityReferences object initializations here...\n categoryEntityReferences.categories\ \ = [] # required field\n \n cluster_ext_id = \"0A2FCb41-991c-cBEf-3Bd8-4FBBd0bE899B\"\ \n\n\n try:\n api_response = clusters_api.associate_categories_to_cluster(clusterExtId=cluster_ext_id,\ \ body=categoryEntityReferences)\n print(api_response)\n except\ \ ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n categoryEntityReferences := import1.NewCategoryEntityReferences()\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ \n clusterExtId := \"deFf2f6c-1EaF-5872-bC57-004fbb0241be\"\n\n\n \ \ request := clusters.AssociateCategoriesToClusterRequest{ ClusterExtId:\ \ &clusterExtId, Body: categoryEntityReferences }\n response, error :=\ \ ClustersServiceApiInstance.AssociateCategoriesToCluster(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/clustermgmt/v4.2/config/clusters/8a9effbF-EdFF-0A93-BF57-aEc7DEBa14E3/$actions/associate-categories" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"categories":["string"],"$objectType":"clustermgmt.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":["string"],"$objectType":"clustermgmt.v4.config.CategoryEntityReferences"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/B5edFfdf-58FD-180c-CdAC-aA8cdbD3EaDb/$actions/associate-categories" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n CategoryEntityReferences\ \ categoryEntityReferences = new CategoryEntityReferences();\n\n //\ \ CategoryEntityReferences object initializations here...\n categoryEntityReferences.Categories\ \ = new ArrayList(); // required field\n\n String clusterExtId = \"\ AD9322d8-DDcD-Cfed-b7df-86f0C65BafcD\";\n\n // Create request object\ \ with parameters\n var request = new AssociateCategoriesToClusterRequest\ \ {\n ClusterExtId = clusterExtId,\n Body = categoryEntityReferences\n\ \ };\n try {\n AssociateCategoriesToClusterApiResponse\ \ associateCategoriesToClusterApiResponse = clustersApi.AssociateCategoriesToCluster(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/disassociate-categories: post: tags: - Clusters summary: Disassociate categories from the cluster description: "Detach categories from the cluster identified by {clusterExtId}." operationId: disassociateCategoriesFromCluster parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 3258f6c6-5bfd-4a48-b610-b99659e2e7d5 requestBody: description: The specifications required for updating categories to the entity. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.CategoryEntityReferences' required: true responses: "202": description: Disassociated categories from the cluster. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/disassociate-categories\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/disassociate-categories\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/disassociate-categories\ \ Post operation" x-permissions: operationName: Disassociate Cluster Categories deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DisassociateCategoriesFromClusterRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.CategoryEntityReferences;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DisassociateCategoriesFromClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n CategoryEntityReferences\ \ categoryEntityReferences = new CategoryEntityReferences();\n\n \ \ // CategoryEntityReferences object initializations here...\n categoryEntityReferences.setCategories(new\ \ ArrayList<>()); // required field\n \n String clusterExtId\ \ = \"eCcAfcb3-820B-4c86-Eaec-11EEdC58cC52\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n DisassociateCategoriesFromClusterApiResponse\ \ disassociateCategoriesFromClusterApiResponse = clustersApi.disassociateCategoriesFromCluster(DisassociateCategoriesFromClusterRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ categoryEntityReferences);\n\n System.out.println(disassociateCategoriesFromClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, CategoryEntityReferences } from\ \ \"@nutanix-api/clustermgmt-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.\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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let categoryEntityReferences = new CategoryEntityReferences();\n\ \n // CategoryEntityReferences object initializations here...\n categoryEntityReferences.setCategories([]);\ \ // required field\n categoryEntityReferences = JSON.stringify(categoryEntityReferences);\n\ \n \n let clusterExtId = \"492eAB8B-c2bE-EEe5-eddB-ADAB6ECbf6B3\"\ ;\n\n\n\n\n\n clustersApi.disassociateCategoriesFromCluster(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ categoryEntityReferences = ntnx_clustermgmt_py_client.CategoryEntityReferences()\n\ \n # CategoryEntityReferences object initializations here...\n categoryEntityReferences.categories\ \ = [] # required field\n \n cluster_ext_id = \"c6DB1897-2fa6-C6fD-2AC0-c1acea3b74Ae\"\ \n\n\n try:\n api_response = clusters_api.disassociate_categories_from_cluster(clusterExtId=cluster_ext_id,\ \ body=categoryEntityReferences)\n print(api_response)\n except\ \ ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n categoryEntityReferences := import1.NewCategoryEntityReferences()\n\ \n // CategoryEntityReferences object initializations here...\n\n \ \ \n clusterExtId := \"f6DD01d6-e07C-4a65-4AF4-CfEcBC09dc9e\"\n\n\n \ \ request := clusters.DisassociateCategoriesFromClusterRequest{ ClusterExtId:\ \ &clusterExtId, Body: categoryEntityReferences }\n response, error :=\ \ ClustersServiceApiInstance.DisassociateCategoriesFromCluster(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/clustermgmt/v4.2/config/clusters/A0B7AEBF-Cdb4-D68d-A44b-EFfbefB194C5/$actions/disassociate-categories" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"categories":["string"],"$objectType":"clustermgmt.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":["string"],"$objectType":"clustermgmt.v4.config.CategoryEntityReferences"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/Fd2e261C-De2f-BFFc-cC1e-feD56aCcAcdA/$actions/disassociate-categories" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n CategoryEntityReferences\ \ categoryEntityReferences = new CategoryEntityReferences();\n\n //\ \ CategoryEntityReferences object initializations here...\n categoryEntityReferences.Categories\ \ = new ArrayList(); // required field\n\n String clusterExtId = \"\ 3cD5Ef3C-EADa-AbAD-Ecba-CDbCc7ebF6cB\";\n\n // Create request object\ \ with parameters\n var request = new DisassociateCategoriesFromClusterRequest\ \ {\n ClusterExtId = clusterExtId,\n Body = categoryEntityReferences\n\ \ };\n try {\n DisassociateCategoriesFromClusterApiResponse\ \ disassociateCategoriesFromClusterApiResponse = clustersApi.DisassociateCategoriesFromCluster(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{extId}: get: tags: - Clusters summary: Get details of a cluster description: "Fetches the cluster entity details identified by {extId}." operationId: getClusterById parameters: - name: extId in: path description: Indicates the UUID of a cluster. 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: 3e0a94d7-646e-4944-bb18-901cbadd0f31 - 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.- clusterProfile - storageSummary required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterProfile - name: storageSummary responses: "200": description: The requested Cluster entity. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Get operation" x-permissions: operationName: View Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Developer - name: Prism Admin - name: Prism Viewer - name: Project Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Objects Admin - name: Network Infra Admin - name: VPC Admin - name: Consumer - name: Storage Admin - name: Storage Viewer - name: Files Admin - name: Cluster Admin - name: Cluster Viewer - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: Kubernetes Admin - name: Monitoring Admin - name: Project Manager - name: Backup Admin - name: Flow Admin - name: Flow Viewer - name: Flow Policy Author - name: NCM Connector - name: Security Dashboard Admin - name: Security Dashboard Viewer - name: LocalAccountManager Admin - name: LocalAccountManager Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetClusterByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String extId = \"aA6Dbc2d-cc9b-dFbf-EE5f-E5dAa5Da3eaF\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetClusterApiResponse\ \ getClusterApiResponse = clustersApi.getClusterById(GetClusterByIdRequest.builder()\n\ \ .extId(extId)\n .$expand(null)\n \ \ .build());\n\n System.out.println(getClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"6bcE5D7D-F21D-b5b3-D93d-EEFe3537d809\";\n\ \n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $expand\"] = \"string_sample_data\";\n\n\n\n\n clustersApi.getClusterById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n ext_id = \"DfEaB774-ceE6-0d5A-eF92-26AAE8ACAcBB\"\n\n\n try:\n\ \ api_response = clusters_api.get_cluster_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"F3FaAe3c-3655-F5a9-9Cfc-BdFC9700eBE1\"\ \n\n\n request := clusters.GetClusterByIdRequest{ ExtId: &extId, Expand_:\ \ nil }\n response, error := ClustersServiceApiInstance.GetClusterById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Cluster)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/3FeEFAeF-bfdd-AAbe-8f7e-dC0a7F9eAfaD?$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/clustermgmt/v4.2/config/clusters/cbFdeecA-C1C2-eEeB-a8D7-eEca6DFe7Cae?$expand=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ extId = \"E3A1aCD8-f3Dc-bAAC-B1a6-bCaCEbfaeBf9\";\n String expand\ \ = \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new GetClusterByIdRequest {\n ExtId =\ \ extId,\n Expand = expand\n };\n try {\n \ \ GetClusterApiResponse getClusterApiResponse = clustersApi.GetClusterById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - Clusters summary: Update cluster description: Update cluster operation. operationId: updateClusterById parameters: - name: extId in: path description: Indicates the UUID of a cluster. 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: c5768090-028f-4100-8468-7ed25f67a16d - 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 requestBody: description: Cluster resource to update. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' required: true responses: "202": description: Cluster resource is updated. 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 /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Put operation" x-permissions: operationName: Update Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin - name: Backup Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.UpdateClusterByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetClusterByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.Cluster;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetClusterApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n Cluster\ \ cluster = new Cluster();\n\n // Cluster object initializations\ \ here...\n \n String extId = \"CE8A8Ff1-2F63-53cD-9AAC-EC7f0cD0fEED\"\ ;\n\n // perform GET call\n GetClusterApiResponse getResponse\ \ = null;\n try {\n getResponse = clustersApi.getClusterById(GetClusterByIdRequest.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 UpdateClusterApiResponse\ \ updateClusterApiResponse = clustersApi.updateClusterById(UpdateClusterByIdRequest.builder()\n\ \ .extId(extId)\n .build(), cluster, opts);\n\ \n System.out.println(updateClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, Cluster, GetClusterApiResponse\ \ } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let cluster = new Cluster();\n\n // Cluster object initializations\ \ here...\n cluster = JSON.stringify(cluster);\n\n \n let extId\ \ = \"2aEf5afE-68FC-C2cb-ECFC-BE88fcAaa24C\";\n\n\n // Perform Get call\n\ \ clustersApi.getClusterById(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 clustersApi.updateClusterById(extId,\ \ cluster, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ cluster = ntnx_clustermgmt_py_client.Cluster()\n\n # Cluster object\ \ initializations here...\n \n ext_id = \"ca82dD8a-FDA5-CDf1-664e-bfE5aB4148F6\"\ \n\n try:\n api_response = clusters_api.get_cluster_by_id(extId=ext_id)\n\ \ except ntnx_clustermgmt_py_client.rest.ApiException as e:\n \ \ print(e)\n # Extract E-Tag Header\n etag_value = ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = clusters_api.update_cluster_by_id(extId=ext_id,\ \ body=cluster, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n cluster := import1.NewCluster()\n\ \n // Cluster object initializations here...\n\n \n extId := \"\ 42e7aF9c-5C23-d8Ac-C85C-9dC7Db6AeeFe\"\n\n getRequest := clusters.GetClusterByIdRequest{\ \ extId: &extId }\n getResponse, err := ClustersServiceApiInstance.GetClusterById(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 := clusters.UpdateClusterByIdRequest{ ExtId: &extId, Body:\ \ cluster }\n response, error := ClustersServiceApiInstance.UpdateClusterById(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/clustermgmt/v4.2/config/clusters/cCaec1Dd-ee36-D798-CA2b-d55c0aFA49f2" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"test_cluster_name","nodes":{"numberOfNodes":0,"nodeList":[{"controllerVmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nodeUuid":"string","hostIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"clustermgmt.v4.config.NodeListItemReference"}],"$objectType":"clustermgmt.v4.config.NodeReference"},"config":{"incarnationId":0,"buildInfo":{"buildType":"release/opt","version":"6.7","fullVersion":"el7.3-release-fraser-6.5.5.6-stable-e36389d5f36fa8e7cacfdccdc2049f85206c6d7c","commitId":"da8e2cbac08b1d4171e451b7ce008c4f1430d54d","shortCommitId":"f978e71","$objectType":"clustermgmt.v4.config.BuildReference"},"hypervisorTypes":["$UNKNOWN"],"clusterFunction":["$UNKNOWN"],"timezone":"UTC/IST","authorizedPublicKeyList":[{"name":"Testpublickeyname","key":"Testkey","$objectType":"clustermgmt.v4.config.PublicKey"}],"redundancyFactor":0,"clusterSoftwareMap":[{"softwareType":"$UNKNOWN","version":"string","$objectType":"clustermgmt.v4.config.SoftwareMapReference"}],"clusterArch":"$UNKNOWN","faultToleranceState":{"currentMaxFaultTolerance":0,"desiredMaxFaultTolerance":0,"domainAwarenessLevel":"$UNKNOWN","currentClusterFaultTolerance":"$UNKNOWN","desiredClusterFaultTolerance":"$UNKNOWN","redundancyStatus":{"isCassandraPreparationDone":true,"isZookeeperPreparationDone":true,"$objectType":"clustermgmt.v4.config.RedundancyStatusDetails"},"$objectType":"clustermgmt.v4.config.FaultToleranceState"},"isRemoteSupportEnabled":true,"operationMode":"$UNKNOWN","isLts":true,"isPasswordRemoteLoginEnabled":true,"encryptionInTransitStatus":"$UNKNOWN","encryptionOption":["$UNKNOWN"],"encryptionScope":["$UNKNOWN"],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"isAvailable":true,"clusterType":"$UNKNOWN","$objectType":"clustermgmt.v4.config.ClusterConfigReference"},"network":{"externalAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalDataServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalSubnet":"10.49.144.0/255.255.240.0","internalSubnet":"192.138.5.0/255.255.255.128","nfsSubnetWhitelist":["string"],"nameServerIpList":[{"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"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"masqueradingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"masqueradingPort":0,"managementServer":{"ip":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"type":"$UNKNOWN","isDrsEnabled":true,"isRegistered":true,"isInUse":true,"$objectType":"clustermgmt.v4.config.ManagementServerRef"},"fqdn":"string","keyManagementServerType":"$UNKNOWN","backplane":{"isSegmentationEnabled":true,"vlanTag":0,"subnet":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"netmask":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"clustermgmt.v4.config.BackplaneNetworkParams"},"httpProxyList":[{"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"username":"string","password":"string","name":"string","proxyTypes":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.HttpProxyConfig"}],"httpProxyWhiteList":[{"targetType":"$UNKNOWN","target":"string","$objectType":"clustermgmt.v4.config.HttpProxyWhiteListConfig"}],"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterNetworkReference"},"upgradeStatus":"$UNKNOWN","vmCount":0,"inefficientVmCount":0,"containerName":"Testcontainer_name","categories":["string"],"clusterProfileExtId":"string","backupEligibilityScore":0,"$objectType":"clustermgmt.v4.config.Cluster"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"test_cluster_name","nodes":{"numberOfNodes":0,"nodeList":[{"controllerVmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nodeUuid":"string","hostIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"clustermgmt.v4.config.NodeListItemReference"}],"$objectType":"clustermgmt.v4.config.NodeReference"},"config":{"incarnationId":0,"buildInfo":{"buildType":"release/opt","version":"6.7","fullVersion":"el7.3-release-fraser-6.5.5.6-stable-e36389d5f36fa8e7cacfdccdc2049f85206c6d7c","commitId":"da8e2cbac08b1d4171e451b7ce008c4f1430d54d","shortCommitId":"f978e71","$objectType":"clustermgmt.v4.config.BuildReference"},"hypervisorTypes":["$UNKNOWN"],"clusterFunction":["$UNKNOWN"],"timezone":"UTC/IST","authorizedPublicKeyList":[{"name":"Testpublickeyname","key":"Testkey","$objectType":"clustermgmt.v4.config.PublicKey"}],"redundancyFactor":0,"clusterSoftwareMap":[{"softwareType":"$UNKNOWN","version":"string","$objectType":"clustermgmt.v4.config.SoftwareMapReference"}],"clusterArch":"$UNKNOWN","faultToleranceState":{"currentMaxFaultTolerance":0,"desiredMaxFaultTolerance":0,"domainAwarenessLevel":"$UNKNOWN","currentClusterFaultTolerance":"$UNKNOWN","desiredClusterFaultTolerance":"$UNKNOWN","redundancyStatus":{"isCassandraPreparationDone":true,"isZookeeperPreparationDone":true,"$objectType":"clustermgmt.v4.config.RedundancyStatusDetails"},"$objectType":"clustermgmt.v4.config.FaultToleranceState"},"isRemoteSupportEnabled":true,"operationMode":"$UNKNOWN","isLts":true,"isPasswordRemoteLoginEnabled":true,"encryptionInTransitStatus":"$UNKNOWN","encryptionOption":["$UNKNOWN"],"encryptionScope":["$UNKNOWN"],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"isAvailable":true,"clusterType":"$UNKNOWN","$objectType":"clustermgmt.v4.config.ClusterConfigReference"},"network":{"externalAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalDataServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalSubnet":"10.49.144.0/255.255.240.0","internalSubnet":"192.138.5.0/255.255.255.128","nfsSubnetWhitelist":["string"],"nameServerIpList":[{"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"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"masqueradingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"masqueradingPort":0,"managementServer":{"ip":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"type":"$UNKNOWN","isDrsEnabled":true,"isRegistered":true,"isInUse":true,"$objectType":"clustermgmt.v4.config.ManagementServerRef"},"fqdn":"string","keyManagementServerType":"$UNKNOWN","backplane":{"isSegmentationEnabled":true,"vlanTag":0,"subnet":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"netmask":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"clustermgmt.v4.config.BackplaneNetworkParams"},"httpProxyList":[{"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"username":"string","password":"string","name":"string","proxyTypes":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.HttpProxyConfig"}],"httpProxyWhiteList":[{"targetType":"$UNKNOWN","target":"string","$objectType":"clustermgmt.v4.config.HttpProxyWhiteListConfig"}],"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterNetworkReference"},"upgradeStatus":"$UNKNOWN","vmCount":0,"inefficientVmCount":0,"containerName":"Testcontainer_name","categories":["string"],"clusterProfileExtId":"string","backupEligibilityScore":0,"$objectType":"clustermgmt.v4.config.Cluster"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/0Fd9Beb3-32aF-ebBb-DADB-bFCBB7c4D5dA" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n Cluster\ \ cluster = new Cluster();\n\n // Cluster object initializations here...\n\ \n String extId = \"Dc1C1CbB-Ec40-8bDD-fDc8-BfF341faab4B\";\n\n \ \ // perform GET call\n var getRequest = new GetClusterByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetClusterApiResponse\ \ getResponse = clustersApi.GetClusterById(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 UpdateClusterByIdRequest {\n ExtId = extId,\n\ \ Body = cluster,\n \n \n };\n \ \ try {\n UpdateClusterApiResponse updateClusterApiResponse\ \ = clustersApi.UpdateClusterById(request, opts);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - Clusters summary: Delete a cluster description: "Deletes the cluster identified by {extId}." operationId: deleteClusterById parameters: - name: extId in: path description: Indicates the UUID of a cluster. 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: 9d815404-8900-4f92-87a9-9784a3520cee - 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: cb4aa935-4dc3-4c6d-96ec-7848c76fba3d - name: $dryrun in: query description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. required: false style: form explode: false schema: type: boolean description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. example: false responses: "202": description: Cluster deleted. 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 /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Delete operation" x-permissions: operationName: Destroy Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.1" - product: PE version: "6.8" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DeleteClusterByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String extId = \"5eFBE9F3-64BD-fa40-D0b3-e26e16b7E1f4\";\n \ \ \n boolean dryrun = true;\n\n try {\n // Pass\ \ in parameters using the request builder object associated with the operation.\n\ \ DeleteClusterApiResponse deleteClusterApiResponse = clustersApi.deleteClusterById(DeleteClusterByIdRequest.builder()\n\ \ .extId(extId)\n .$dryrun(dryrun)\n \ \ .build());\n\n System.out.println(deleteClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"9ed3B309-327f-d3cc-Ba94-DE7BF4EC57AF\";\n\ \n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $dryrun\"] = true;\n\n\n\n\n clustersApi.deleteClusterById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n ext_id = \"EEAf05cD-Ca1d-9cfF-cABA-b1a0DdEfe94D\"\n \n \ \ dryrun = True\n\n\n try:\n api_response = clusters_api.delete_cluster_by_id(extId=ext_id,\ \ _dryrun=dryrun)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"5f9ABb3C-B7Bb-d6de-dE5B-3aCedfBe0edA\"\ \n \n dryrun_ := true\n\n\n request := clusters.DeleteClusterByIdRequest{\ \ ExtId: &extId, Dryrun_: &dryrun_ }\n response, error := ClustersServiceApiInstance.DeleteClusterById(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/clustermgmt/v4.2/config/clusters/4ecbAEbf-44C9-FBEf-cfCa-6ceDeFfaeBe5?$dryrun=true" \ --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/clustermgmt/v4.2/config/clusters/932f3F45-BBAE-2fBa-A349-BdcaCfd05f27?$dryrun=true" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ extId = \"4DC4726C-5cbC-A89E-b6df-BEbFDf04e2A6\";\n boolean dryrun\ \ = true;\n\n // Create request object with parameters\n var\ \ request = new DeleteClusterByIdRequest {\n ExtId = extId,\n\ \ Dryrun = dryrun\n };\n try {\n DeleteClusterApiResponse\ \ deleteClusterApiResponse = clustersApi.DeleteClusterById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters: get: tags: - Clusters summary: Get the list of clusters description: Lists all cluster entities registered to Prism Central. operationId: listClusters 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: backupEligibilityScore example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=backupEligibilityScore\ \ eq 1" - name: clusterProfileExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=clusterProfileExtId\ \ eq '04b2b9e1-1602-4f82-afc8-087a0eedc39e'" - name: config/buildInfo/version example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/buildInfo/version\ \ eq '6.7'" - name: config/clusterFunction example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/clusterFunction/any(a:a\ \ eq Clustermgmt.Config.ClusterFunctionRef'AOS')" - name: config/clusterType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/clusterType\ \ eq Clustermgmt.Config.ClusterType'HYPER_CONVERGED'" - name: config/encryptionInTransitStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/encryptionInTransitStatus\ \ eq Clustermgmt.Config.EncryptionStatus'ENABLED'" - name: config/encryptionOption example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/encryptionOption/any(a:a\ \ eq Clustermgmt.Config.EncryptionOptionInfo'SOFTWARE')" - name: config/encryptionScope example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/encryptionScope/any(a:a\ \ eq Clustermgmt.Config.EncryptionScopeInfo'CLUSTER')" - name: config/hypervisorTypes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/hypervisorTypes/any(a:a\ \ eq Clustermgmt.Config.HypervisorType'AHV')" - name: config/isAvailable example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=config/isAvailable\ \ eq false" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=name\ \ eq 'test_cluster_name'" - name: network/keyManagementServerType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=network/keyManagementServerType\ \ eq Clustermgmt.Config.KeyManagementServerType'LOCAL'" - name: upgradeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$filter=upgradeStatus\ \ eq Clustermgmt.Config.UpgradeStatus'PENDING'" - 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: backupEligibilityScore example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=backupEligibilityScore" - name: config/buildInfo/version example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=config/buildInfo/version" - name: config/clusterType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=config/clusterType" - name: config/isAvailable example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=config/isAvailable" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=extId" - name: inefficientVmCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=inefficientVmCount" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=name" - name: network/keyManagementServerType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=network/keyManagementServerType" - name: nodes/numberOfNodes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=nodes/numberOfNodes" - name: upgradeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=upgradeStatus" - name: vmCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$orderby=vmCount" - name: $apply in: query description: "A URL query parameter that allows clients to specify a sequence\ \ of transformations to the entity set, such as groupby, filter, aggregate\ \ etc. As of now only support for groupby exists.For example '$apply=groupby((templateName))'\ \ would get all templates grouped by templateName." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: config/buildInfo/version example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$apply=groupby(config/buildInfo/version)" - name: nodes/numberOfNodes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$apply=groupby(nodes/numberOfNodes)" - 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: clusterProfile example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$expand=clusterProfile" - name: storageSummary example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$expand=storageSummary" - 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: backupEligibilityScore example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$select=backupEligibilityScore" - name: inefficientVmCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$select=inefficientVmCount" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$select=name" - name: upgradeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$select=upgradeStatus" - name: vmCount example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters?$select=vmCount" responses: "200": description: The requested Cluster entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters Get operation x-permissions: operationName: View Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Developer - name: Prism Admin - name: Prism Viewer - name: Project Admin - deprecated: true name: Self-Service Admin - name: Super Admin - name: Objects Admin - name: Network Infra Admin - name: VPC Admin - name: Consumer - name: Storage Admin - name: Storage Viewer - name: Files Admin - name: Cluster Admin - name: Cluster Viewer - name: Virtual Machine Admin - name: Virtual Machine Operator - name: Virtual Machine Viewer - name: Kubernetes Admin - name: Project Manager - name: Flow Admin - name: Flow Viewer - name: Flow Policy Author - name: NCM Connector - name: Security Dashboard Admin - name: Security Dashboard Viewer - name: LocalAccountManager Admin - name: LocalAccountManager Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListClustersRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListClustersApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(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 ListClustersApiResponse listClustersApiResponse\ \ = clustersApi.listClusters(ListClustersRequest.builder()\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .$apply(null)\n \ \ .$expand(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listClustersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClustersApi } from "@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(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["$apply"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; clustersApi.listClusters(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_clusters(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := clusters.ListClustersRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Apply_: nil, Expand_: nil,\ \ Select_: nil }\n response, error := ClustersServiceApiInstance.ListClusters(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Cluster)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters?$apply=string_sample_data&$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/clustermgmt/v4.2/config/clusters?$apply=string_sample_data&$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.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n int page\ \ = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String apply =\ \ \"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 ListClustersRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby,\n Apply = apply,\n\ \ Expand = expand,\n Select = select\n };\n\ \ try {\n ListClustersApiResponse listClustersApiResponse\ \ = clustersApi.ListClusters(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" post: tags: - Clusters summary: Create a cluster description: Cluster create operation. operationId: createCluster 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: 66d6353c-619e-477f-95b6-48dbe06a6d90 - name: $dryrun in: query description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. required: false style: form explode: false schema: type: boolean description: | A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. example: false requestBody: description: The required parameters for cluster create workflow. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' required: true responses: "202": description: Cluster created. 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 /clustermgmt/v4.2/config/clusters 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters Post operation x-permissions: operationName: Create Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.CreateClusterRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.Cluster;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.CreateClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n Cluster\ \ cluster = new Cluster();\n\n // Cluster object initializations\ \ here...\n \n boolean dryrun = true;\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n CreateClusterApiResponse createClusterApiResponse\ \ = clustersApi.createCluster(CreateClusterRequest.builder()\n \ \ .$dryrun(dryrun)\n .build(), cluster);\n\n \ \ System.out.println(createClusterApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClustersApi, Cluster } from "@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance); function sample() { let cluster = new Cluster(); // Cluster object initializations here... cluster = JSON.stringify(cluster); // Construct Optional Parameters var opts = {}; opts["$dryrun"] = true; clustersApi.createCluster(cluster, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ cluster = ntnx_clustermgmt_py_client.Cluster()\n\n # Cluster object\ \ initializations here...\n \n dryrun = True\n\n\n try:\n \ \ api_response = clusters_api.create_cluster(body=cluster, _dryrun=dryrun)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n cluster := import1.NewCluster()\n\ \n // Cluster object initializations here...\n\n \n dryrun_ :=\ \ true\n\n\n request := clusters.CreateClusterRequest{ Body: cluster,\ \ Dryrun_: &dryrun_ }\n response, error := ClustersServiceApiInstance.CreateCluster(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/clustermgmt/v4.2/config/clusters?$dryrun=true" \ --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":"test_cluster_name","nodes":{"numberOfNodes":0,"nodeList":[{"controllerVmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nodeUuid":"string","hostIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"clustermgmt.v4.config.NodeListItemReference"}],"$objectType":"clustermgmt.v4.config.NodeReference"},"config":{"incarnationId":0,"buildInfo":{"buildType":"release/opt","version":"6.7","fullVersion":"el7.3-release-fraser-6.5.5.6-stable-e36389d5f36fa8e7cacfdccdc2049f85206c6d7c","commitId":"da8e2cbac08b1d4171e451b7ce008c4f1430d54d","shortCommitId":"f978e71","$objectType":"clustermgmt.v4.config.BuildReference"},"hypervisorTypes":["$UNKNOWN"],"clusterFunction":["$UNKNOWN"],"timezone":"UTC/IST","authorizedPublicKeyList":[{"name":"Testpublickeyname","key":"Testkey","$objectType":"clustermgmt.v4.config.PublicKey"}],"redundancyFactor":0,"clusterSoftwareMap":[{"softwareType":"$UNKNOWN","version":"string","$objectType":"clustermgmt.v4.config.SoftwareMapReference"}],"clusterArch":"$UNKNOWN","faultToleranceState":{"currentMaxFaultTolerance":0,"desiredMaxFaultTolerance":0,"domainAwarenessLevel":"$UNKNOWN","currentClusterFaultTolerance":"$UNKNOWN","desiredClusterFaultTolerance":"$UNKNOWN","redundancyStatus":{"isCassandraPreparationDone":true,"isZookeeperPreparationDone":true,"$objectType":"clustermgmt.v4.config.RedundancyStatusDetails"},"$objectType":"clustermgmt.v4.config.FaultToleranceState"},"isRemoteSupportEnabled":true,"operationMode":"$UNKNOWN","isLts":true,"isPasswordRemoteLoginEnabled":true,"encryptionInTransitStatus":"$UNKNOWN","encryptionOption":["$UNKNOWN"],"encryptionScope":["$UNKNOWN"],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"isAvailable":true,"clusterType":"$UNKNOWN","$objectType":"clustermgmt.v4.config.ClusterConfigReference"},"network":{"externalAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalDataServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalSubnet":"10.49.144.0/255.255.240.0","internalSubnet":"192.138.5.0/255.255.255.128","nfsSubnetWhitelist":["string"],"nameServerIpList":[{"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"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"masqueradingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"masqueradingPort":0,"managementServer":{"ip":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"type":"$UNKNOWN","isDrsEnabled":true,"isRegistered":true,"isInUse":true,"$objectType":"clustermgmt.v4.config.ManagementServerRef"},"fqdn":"string","keyManagementServerType":"$UNKNOWN","backplane":{"isSegmentationEnabled":true,"vlanTag":0,"subnet":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"netmask":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"clustermgmt.v4.config.BackplaneNetworkParams"},"httpProxyList":[{"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"username":"string","password":"string","name":"string","proxyTypes":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.HttpProxyConfig"}],"httpProxyWhiteList":[{"targetType":"$UNKNOWN","target":"string","$objectType":"clustermgmt.v4.config.HttpProxyWhiteListConfig"}],"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterNetworkReference"},"upgradeStatus":"$UNKNOWN","vmCount":0,"inefficientVmCount":0,"containerName":"Testcontainer_name","categories":["string"],"clusterProfileExtId":"string","backupEligibilityScore":0,"$objectType":"clustermgmt.v4.config.Cluster"} \ - 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":"test_cluster_name","nodes":{"numberOfNodes":0,"nodeList":[{"controllerVmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"nodeUuid":"string","hostIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"$objectType":"clustermgmt.v4.config.NodeListItemReference"}],"$objectType":"clustermgmt.v4.config.NodeReference"},"config":{"incarnationId":0,"buildInfo":{"buildType":"release/opt","version":"6.7","fullVersion":"el7.3-release-fraser-6.5.5.6-stable-e36389d5f36fa8e7cacfdccdc2049f85206c6d7c","commitId":"da8e2cbac08b1d4171e451b7ce008c4f1430d54d","shortCommitId":"f978e71","$objectType":"clustermgmt.v4.config.BuildReference"},"hypervisorTypes":["$UNKNOWN"],"clusterFunction":["$UNKNOWN"],"timezone":"UTC/IST","authorizedPublicKeyList":[{"name":"Testpublickeyname","key":"Testkey","$objectType":"clustermgmt.v4.config.PublicKey"}],"redundancyFactor":0,"clusterSoftwareMap":[{"softwareType":"$UNKNOWN","version":"string","$objectType":"clustermgmt.v4.config.SoftwareMapReference"}],"clusterArch":"$UNKNOWN","faultToleranceState":{"currentMaxFaultTolerance":0,"desiredMaxFaultTolerance":0,"domainAwarenessLevel":"$UNKNOWN","currentClusterFaultTolerance":"$UNKNOWN","desiredClusterFaultTolerance":"$UNKNOWN","redundancyStatus":{"isCassandraPreparationDone":true,"isZookeeperPreparationDone":true,"$objectType":"clustermgmt.v4.config.RedundancyStatusDetails"},"$objectType":"clustermgmt.v4.config.FaultToleranceState"},"isRemoteSupportEnabled":true,"operationMode":"$UNKNOWN","isLts":true,"isPasswordRemoteLoginEnabled":true,"encryptionInTransitStatus":"$UNKNOWN","encryptionOption":["$UNKNOWN"],"encryptionScope":["$UNKNOWN"],"pulseStatus":{"isEnabled":true,"piiScrubbingLevel":"$UNKNOWN","$objectType":"clustermgmt.v4.config.PulseStatus"},"isAvailable":true,"clusterType":"$UNKNOWN","$objectType":"clustermgmt.v4.config.ClusterConfigReference"},"network":{"externalAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalDataServiceIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"externalSubnet":"10.49.144.0/255.255.240.0","internalSubnet":"192.138.5.0/255.255.255.128","nfsSubnetWhitelist":["string"],"nameServerIpList":[{"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"}],"ntpServerIpList":[{"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"}],"smtpServer":{"emailAddress":"string","server":{"ipAddress":{"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"},"port":0,"username":"user1","password":"string","$objectType":"clustermgmt.v4.config.SmtpNetwork"},"type":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SmtpServerRef"},"masqueradingIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"masqueradingPort":0,"managementServer":{"ip":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"type":"$UNKNOWN","isDrsEnabled":true,"isRegistered":true,"isInUse":true,"$objectType":"clustermgmt.v4.config.ManagementServerRef"},"fqdn":"string","keyManagementServerType":"$UNKNOWN","backplane":{"isSegmentationEnabled":true,"vlanTag":0,"subnet":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"netmask":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"$objectType":"clustermgmt.v4.config.BackplaneNetworkParams"},"httpProxyList":[{"ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"username":"string","password":"string","name":"string","proxyTypes":["$UNKNOWN"],"$objectType":"clustermgmt.v4.config.HttpProxyConfig"}],"httpProxyWhiteList":[{"targetType":"$UNKNOWN","target":"string","$objectType":"clustermgmt.v4.config.HttpProxyWhiteListConfig"}],"ntpServerConfigList":[{"ntpServerAddress":{"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"},"encryptionAlgorithm":"$UNKNOWN","encryptionKey":"D1C7E7236ADB73FABACE4F49C7358B60155AA6CF","encryptionKeyId":0,"$objectType":"clustermgmt.v4.config.NtpServerConfig"}],"$objectType":"clustermgmt.v4.config.ClusterNetworkReference"},"upgradeStatus":"$UNKNOWN","vmCount":0,"inefficientVmCount":0,"containerName":"Testcontainer_name","categories":["string"],"clusterProfileExtId":"string","backupEligibilityScore":0,"$objectType":"clustermgmt.v4.config.Cluster"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters?$dryrun=true" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n Cluster\ \ cluster = new Cluster();\n\n // Cluster object initializations here...\n\ \n boolean dryrun = true;\n\n // Create request object with\ \ parameters\n var request = new CreateClusterRequest {\n \ \ Body = cluster,\n Dryrun = dryrun\n };\n \ \ try {\n CreateClusterApiResponse createClusterApiResponse =\ \ clustersApi.CreateCluster(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp: get: tags: - Clusters summary: Get SNMP config details of a cluster description: "Fetches SNMP config details of the cluster identified by {clusterExtId}." operationId: getSnmpConfigByClusterId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: f0808c03-fbd9-496c-8578-9d5f196299a3 responses: "200": description: The requested SNMP configuration. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpConfig' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp\ \ Get operation" x-permissions: operationName: View Cluster Snmp Configuration deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetSnmpConfigByClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetSnmpConfigByClusterIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"9AE1CEC9-d3Ff-E2AE-E986-98DDDAec74c0\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSnmpConfigByClusterIdApiResponse\ \ getSnmpConfigByClusterIdApiResponse = clustersApi.getSnmpConfigByClusterId(GetSnmpConfigByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build());\n\ \n System.out.println(getSnmpConfigByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"bcfDdBbf-77DE-3D38-BcD8-CCa65b1Ca10C\"\ ;\n\n\n\n\n\n clustersApi.getSnmpConfigByClusterId(clusterExtId).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"FDDAFf56-afF1-A9Be-6b01-B5b80Df8fdE4\"\n\n\ \n try:\n api_response = clusters_api.get_snmp_config_by_cluster_id(clusterExtId=cluster_ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"367BDaFb-c0eE-F2cB-7B29-cbA00Dbb6Edb\"\ \n\n\n request := clusters.GetSnmpConfigByClusterIdRequest{ ClusterExtId:\ \ &clusterExtId }\n response, error := ClustersServiceApiInstance.GetSnmpConfigByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SnmpConfig)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/aAabbaf5-CA5B-a94A-DeFD-3Da8c13D69aF/snmp" \ --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/clustermgmt/v4.2/config/clusters/DdF2c3af-4F58-dCf6-E82F-eBaFDd1f2dC2/snmp" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"faC9deEa-Ec9a-cCc9-C282-eDEAde5DaD0c\";\n\n //\ \ Create request object with parameters\n var request = new GetSnmpConfigByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId\n };\n try {\n\ \ GetSnmpConfigByClusterIdApiResponse getSnmpConfigByClusterIdApiResponse\ \ = clustersApi.GetSnmpConfigByClusterId(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/update-status: post: tags: - Clusters summary: Update SNMP status description: "Updates the status of SNMP configuration associated with the cluster\ \ identified by {clusterExtId}." operationId: updateSnmpStatus parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: db77722b-f7c4-43dc-aa5e-7c72e2d52329 requestBody: description: SNMP status. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpStatusParam' required: true responses: "202": description: SNMP status updated. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/update-status\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/update-status\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/update-status\ \ Post operation" x-permissions: operationName: Update Cluster Snmp Status deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.UpdateSnmpStatusRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpStatusParam;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateSnmpStatusApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpStatusParam\ \ snmpStatusParam = new SnmpStatusParam();\n\n // SnmpStatusParam\ \ object initializations here...\n snmpStatusParam.setIsEnabled(true);\ \ // required field\n \n String clusterExtId = \"8dD6d756-6F0a-CBfe-D05E-4cA255f95BfA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateSnmpStatusApiResponse\ \ updateSnmpStatusApiResponse = clustersApi.updateSnmpStatus(UpdateSnmpStatusRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ snmpStatusParam);\n\n System.out.println(updateSnmpStatusApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, SnmpStatusParam } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpStatusParam = new SnmpStatusParam();\n\n // SnmpStatusParam\ \ object initializations here...\n snmpStatusParam.setIsEnabled(true);\ \ // required field\n snmpStatusParam = JSON.stringify(snmpStatusParam);\n\ \n \n let clusterExtId = \"26eAfF5f-bbf4-4aFA-fAF2-9d5B2aDaf6cE\"\ ;\n\n\n\n\n\n clustersApi.updateSnmpStatus(clusterExtId, snmpStatusParam).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpStatusParam = ntnx_clustermgmt_py_client.SnmpStatusParam()\n\n\ \ # SnmpStatusParam object initializations here...\n snmpStatusParam.is_enabled\ \ = True # required field\n \n cluster_ext_id = \"79FFaEFA-EBcA-A2B5-bacd-FAFdB05c13AF\"\ \n\n\n try:\n api_response = clusters_api.update_snmp_status(clusterExtId=cluster_ext_id,\ \ body=snmpStatusParam)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpStatusParam := import1.NewSnmpStatusParam()\n\ \n // SnmpStatusParam object initializations here...\n\n \n clusterExtId\ \ := \"Cd89ea74-D88c-Cd0e-aCFf-8Afac2a06EcF\"\n\n\n request := clusters.UpdateSnmpStatusRequest{\ \ ClusterExtId: &clusterExtId, Body: snmpStatusParam }\n response, error\ \ := ClustersServiceApiInstance.UpdateSnmpStatus(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/clustermgmt/v4.2/config/clusters/fcfeDFC0-DDCe-2F02-e4aF-3F7baA9dC2aa/snmp/$actions/update-status" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"isEnabled":true,"$objectType":"clustermgmt.v4.config.SnmpStatusParam"} \ - 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 {"isEnabled":true,"$objectType":"clustermgmt.v4.config.SnmpStatusParam"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/bc9cddf0-abA6-37Bd-F9de-CcCfCAcAd5aa/snmp/$actions/update-status" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpStatusParam\ \ snmpStatusParam = new SnmpStatusParam();\n\n // SnmpStatusParam object\ \ initializations here...\n snmpStatusParam.IsEnabled = true; // required\ \ field\n\n String clusterExtId = \"E009B2b7-F1E5-b83b-8b18-c2eBFFcBcefb\"\ ;\n\n // Create request object with parameters\n var request\ \ = new UpdateSnmpStatusRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = snmpStatusParam\n };\n try {\n \ \ UpdateSnmpStatusApiResponse updateSnmpStatusApiResponse = clustersApi.UpdateSnmpStatus(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/add-transports: post: tags: - Clusters summary: Add SNMP transport ports and protocol details description: "Adds transport ports and protocol details to the SNMP configuration\ \ associated with the cluster identified by {clusterExtId}." operationId: addSnmpTransport parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: fb4168e7-1230-4b9c-9c83-4abb8c9ac1b7 requestBody: description: SNMP transports to add. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTransport' required: true responses: "202": description: SNMP transport ports and protocols are added. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/add-transports\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/add-transports\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/add-transports\ \ Post operation" x-permissions: operationName: Add Cluster Snmp Transport deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.AddSnmpTransportRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpProtocol;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTransport;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.AddSnmpTransportsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpTransport\ \ snmpTransport = new SnmpTransport();\n\n // SnmpTransport object\ \ initializations here...\n snmpTransport.setPort(1); // required\ \ field\n snmpTransport.setProtocol(SnmpProtocol.UNKNOWN); // required\ \ field\n \n String clusterExtId = \"57cede3b-fE11-C8AF-Cb9a-Bc5D74b6EdbF\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n AddSnmpTransportsApiResponse\ \ addSnmpTransportsApiResponse = clustersApi.addSnmpTransport(AddSnmpTransportRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ snmpTransport);\n\n System.out.println(addSnmpTransportsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, SnmpProtocol, SnmpTransport }\ \ from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpTransport = new SnmpTransport();\n\n // SnmpTransport\ \ object initializations here...\n snmpTransport.setPort(1); // required\ \ field\n snmpTransport.setProtocol(SnmpProtocol.UNKNOWN); // required\ \ field\n snmpTransport = JSON.stringify(snmpTransport);\n\n \n \ \ let clusterExtId = \"dfdbE1dc-1d2D-aCD1-BEFd-fF1eAbfdbe4b\";\n\n\n\n\n\ \n clustersApi.addSnmpTransport(clusterExtId, snmpTransport).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpTransport = ntnx_clustermgmt_py_client.SnmpTransport()\n\n #\ \ SnmpTransport object initializations here...\n snmpTransport.port =\ \ 1 # required field\n snmpTransport.protocol = ntnx_clustermgmt_py_client.SnmpProtocol._UNKNOWN\ \ # required field\n \n cluster_ext_id = \"b5aBaD5B-dFBc-Dc1f-C3ff-eb99A60fd6fE\"\ \n\n\n try:\n api_response = clusters_api.add_snmp_transport(clusterExtId=cluster_ext_id,\ \ body=snmpTransport)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpTransport := import1.NewSnmpTransport()\n\ \n // SnmpTransport object initializations here...\n\n \n clusterExtId\ \ := \"aDB5dFBa-bf80-1b6C-c3Ea-Ddd2C12B8eEB\"\n\n\n request := clusters.AddSnmpTransportRequest{\ \ ClusterExtId: &clusterExtId, Body: snmpTransport }\n response, error\ \ := ClustersServiceApiInstance.AddSnmpTransport(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/clustermgmt/v4.2/config/clusters/456Ff3B7-FAaF-eB2A-FdD1-531056232ec4/snmp/$actions/add-transports" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"} \ - 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 {"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/Fe57aEdD-cDeC-c3E5-C2eD-AAee8C9Bf12d/snmp/$actions/add-transports" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpTransport\ \ snmpTransport = new SnmpTransport();\n\n // SnmpTransport object\ \ initializations here...\n snmpTransport.Port = 1; // required field\n\ \ snmpTransport.Protocol = SnmpProtocol.UNKNOWN; // required field\n\ \n String clusterExtId = \"4cDcBa17-5aae-9ab7-fBf1-1D1E4AfEfAA8\";\n\ \n // Create request object with parameters\n var request\ \ = new AddSnmpTransportRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = snmpTransport\n };\n try {\n \ \ AddSnmpTransportsApiResponse addSnmpTransportsApiResponse = clustersApi.AddSnmpTransport(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/remove-transports: post: tags: - Clusters summary: Remove SNMP transport ports and protocol details description: "Removes transport ports and protocol detail from the SNMP configuration\ \ associated with the cluster identified by {clusterExtId}." operationId: removeSnmpTransport parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: f3512c6f-f30b-4f40-bbc8-52ffe669c42b requestBody: description: SNMP transports to remove. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTransport' required: true responses: "202": description: SNMP transport ports and protocols are removed. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/remove-transports\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/remove-transports\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/remove-transports\ \ Post operation" x-permissions: operationName: Remove Cluster Snmp Transport deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.RemoveSnmpTransportRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpProtocol;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTransport;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.RemoveSnmpTransportsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpTransport\ \ snmpTransport = new SnmpTransport();\n\n // SnmpTransport object\ \ initializations here...\n snmpTransport.setPort(1); // required\ \ field\n snmpTransport.setProtocol(SnmpProtocol.UNKNOWN); // required\ \ field\n \n String clusterExtId = \"AfEcC3C0-ae9F-fcbe-b93B-fCc6925eCd7d\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n RemoveSnmpTransportsApiResponse\ \ removeSnmpTransportsApiResponse = clustersApi.removeSnmpTransport(RemoveSnmpTransportRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ snmpTransport);\n\n System.out.println(removeSnmpTransportsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, SnmpProtocol, SnmpTransport }\ \ from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpTransport = new SnmpTransport();\n\n // SnmpTransport\ \ object initializations here...\n snmpTransport.setPort(1); // required\ \ field\n snmpTransport.setProtocol(SnmpProtocol.UNKNOWN); // required\ \ field\n snmpTransport = JSON.stringify(snmpTransport);\n\n \n \ \ let clusterExtId = \"bfD77BCA-cDC6-BbAC-Cc0F-AACcb86fe4Fb\";\n\n\n\n\n\ \n clustersApi.removeSnmpTransport(clusterExtId, snmpTransport).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpTransport = ntnx_clustermgmt_py_client.SnmpTransport()\n\n #\ \ SnmpTransport object initializations here...\n snmpTransport.port =\ \ 1 # required field\n snmpTransport.protocol = ntnx_clustermgmt_py_client.SnmpProtocol._UNKNOWN\ \ # required field\n \n cluster_ext_id = \"e4De59cf-4DbA-b5DF-3AFF-bd2bFeF515fF\"\ \n\n\n try:\n api_response = clusters_api.remove_snmp_transport(clusterExtId=cluster_ext_id,\ \ body=snmpTransport)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpTransport := import1.NewSnmpTransport()\n\ \n // SnmpTransport object initializations here...\n\n \n clusterExtId\ \ := \"c0ebf2Ad-6b0A-3A8c-aEfc-9DEb2c7Dc4bF\"\n\n\n request := clusters.RemoveSnmpTransportRequest{\ \ ClusterExtId: &clusterExtId, Body: snmpTransport }\n response, error\ \ := ClustersServiceApiInstance.RemoveSnmpTransport(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/clustermgmt/v4.2/config/clusters/DCF11Ed9-D8E7-5Bda-acc6-cbACC32effce/snmp/$actions/remove-transports" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"} \ - 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 {"protocol":"$UNKNOWN","port":0,"$objectType":"clustermgmt.v4.config.SnmpTransport"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/6AA185f4-dC5B-3a1A-ab4A-aCCB705D8FBc/snmp/$actions/remove-transports" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpTransport\ \ snmpTransport = new SnmpTransport();\n\n // SnmpTransport object\ \ initializations here...\n snmpTransport.Port = 1; // required field\n\ \ snmpTransport.Protocol = SnmpProtocol.UNKNOWN; // required field\n\ \n String clusterExtId = \"2fcb5CDe-a27B-Cbd3-6bef-Ef87cC4221De\";\n\ \n // Create request object with parameters\n var request\ \ = new RemoveSnmpTransportRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = snmpTransport\n };\n try {\n \ \ RemoveSnmpTransportsApiResponse removeSnmpTransportsApiResponse = clustersApi.RemoveSnmpTransport(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users: post: tags: - Clusters summary: Add SNMP user description: "Adds SNMP user configuration to the cluster identified by {clusterExtId}." operationId: createSnmpUser parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: b52ffd28-766b-49ab-82fd-714936050ea3 requestBody: description: SNMP user to add. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpUser' required: true responses: "202": description: SNMP user is added. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users\ \ Post operation" x-permissions: operationName: Create Cluster Snmp User deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.CreateSnmpUserRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpAuthType;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpUser;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.CreateSnmpUserApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpUser\ \ snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.setAuthKey(\"Test_SNMP_user_authentication_key.\"\ ); // required field\n snmpUser.setAuthType(SnmpAuthType.UNKNOWN);\ \ // required field\n snmpUser.setUsername(\"Test UserName\"); \ \ // required field\n \n String clusterExtId = \"94c1CCBa-294e-6BCE-7Ecd-eDD0bef7a258\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n CreateSnmpUserApiResponse\ \ createSnmpUserApiResponse = clustersApi.createSnmpUser(CreateSnmpUserRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ snmpUser);\n\n System.out.println(createSnmpUserApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, SnmpAuthType, SnmpUser } from\ \ \"@nutanix-api/clustermgmt-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.\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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.setAuthKey(\"Test_SNMP_user_authentication_key.\"\ ); // required field\n snmpUser.setAuthType(SnmpAuthType.UNKNOWN); \ \ // required field\n snmpUser.setUsername(\"Test UserName\"); // required\ \ field\n snmpUser = JSON.stringify(snmpUser);\n\n \n let clusterExtId\ \ = \"07fA0FDf-cCBf-cE3e-EEDF-FCfA544d8Fd1\";\n\n\n\n\n\n clustersApi.createSnmpUser(clusterExtId,\ \ snmpUser).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpUser = ntnx_clustermgmt_py_client.SnmpUser()\n\n # SnmpUser\ \ object initializations here...\n snmpUser.auth_key = \"Test_SNMP_user_authentication_key.\"\ \ # required field\n snmpUser.auth_type = ntnx_clustermgmt_py_client.SnmpAuthType._UNKNOWN\ \ # required field\n snmpUser.username = \"Test UserName\" # required\ \ field\n \n cluster_ext_id = \"e8B1cB2b-6692-bF3A-f48b-df2FCcfDd24c\"\ \n\n\n try:\n api_response = clusters_api.create_snmp_user(clusterExtId=cluster_ext_id,\ \ body=snmpUser)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpUser := import1.NewSnmpUser()\n\ \n // SnmpUser object initializations here...\n\n \n clusterExtId\ \ := \"Bb0Fe32F-f1B4-bfAb-E6dA-ffbfBBafDF8E\"\n\n\n request := clusters.CreateSnmpUserRequest{\ \ ClusterExtId: &clusterExtId, Body: snmpUser }\n response, error :=\ \ ClustersServiceApiInstance.CreateSnmpUser(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/clustermgmt/v4.2/config/clusters/de7c09F8-aBEd-8Bc6-0B5B-b8C1f3f425f8/snmp/users" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"} \ - 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 {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/Ea2f73dc-b6Be-DA81-fEAc-9fEB4FbfDBFf/snmp/users" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpUser\ \ snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.AuthKey = \"Test_SNMP_user_authentication_key.\"\ ; // required field\n snmpUser.AuthType = SnmpAuthType.UNKNOWN; //\ \ required field\n snmpUser.Username = \"Test UserName\"; // required\ \ field\n\n String clusterExtId = \"EDcbe9f4-1dbf-7D1A-9FDF-acF17F7CECbF\"\ ;\n\n // Create request object with parameters\n var request\ \ = new CreateSnmpUserRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = snmpUser\n };\n try {\n CreateSnmpUserApiResponse\ \ createSnmpUserApiResponse = clustersApi.CreateSnmpUser(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}: get: tags: - Clusters summary: Get SNMP user information description: "Fetches SNMP user configuration details identified by {extId}\ \ associated with the cluster identified by {clusterExtId}." operationId: getSnmpUserById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 7845f5c7-cc0e-42c1-9893-34f59a9d4408 - name: extId in: path description: SNMP user UUID. 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: 4f9abd25-9d64-49aa-bb9c-6bcfe6cf9ba5 responses: "200": description: SNMP user retrieved. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpUser' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Snmp User deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetSnmpUserByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetSnmpUserApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"16BfDafB-dCB5-0a2F-DC3c-5EF1BaFdEf3A\"\ ;\n \n String extId = \"E3B97fc3-6AeB-1A8b-E4Ce-adfef559a0fC\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSnmpUserApiResponse\ \ getSnmpUserApiResponse = clustersApi.getSnmpUserById(GetSnmpUserByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getSnmpUserApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"eeb89cAB-eFB1-3DBd-fB3c-75c88AAcbCE8\"\ ;\n \n let extId = \"8C8a7a7f-Cbd6-22ab-edeA-87732C4d2317\";\n\n\n\ \n\n\n clustersApi.getSnmpUserById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"143fD5Da-Ca8D-3cb9-70Bb-c59B5cab6f2d\"\n \ \ \n ext_id = \"EBDCD8C6-9AC4-edaF-DeCf-aCDbb5edA7cd\"\n\n\n try:\n\ \ api_response = clusters_api.get_snmp_user_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"B07D0dC3-C206-91Fd-bE0e-4fC854BFC4eA\"\ \n \n extId := \"ECADDddC-75a0-0dFD-beBC-C71fAF0DA3BD\"\n\n\n request\ \ := clusters.GetSnmpUserByIdRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId }\n response, error := ClustersServiceApiInstance.GetSnmpUserById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SnmpUser)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/e1cCFbcf-2D7f-aa5D-cff4-b1aCE42EdCE4/snmp/users/abC1Dd5f-C36b-CffB-Eae7-89F6ddfa2fAB" \ --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/clustermgmt/v4.2/config/clusters/41bdDA6D-878d-AAcd-aE5F-eF3BDcBcEAf6/snmp/users/ffd7ADE7-fEc8-7AA2-a823-ae794f6eC7e3" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"0343dDAb-EaFE-672E-fAC7-c5FBb5055bA3\";\n String\ \ extId = \"EeabEB7b-FAC3-2b75-5Edf-CadF0b50ba7d\";\n\n // Create\ \ request object with parameters\n var request = new GetSnmpUserByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n GetSnmpUserApiResponse getSnmpUserApiResponse\ \ = clustersApi.GetSnmpUserById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Clusters summary: Update SNMP user description: "Updates SNMP user configuration identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: updateSnmpUserById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 86446ec5-a073-4c9b-adac-f135ae8cc15e - name: extId in: path description: SNMP user UUID. 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: 81d19dba-bb8e-46b7-9d46-c0822f4d91b8 - 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 requestBody: description: SNMP user to update. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpUser' required: true responses: "202": description: SNMP user is updated. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Put operation" x-permissions: operationName: Update Cluster Snmp User deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.UpdateSnmpUserByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetSnmpUserByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpAuthType;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpUser;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.GetSnmpUserApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateSnmpUserApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpUser\ \ snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.setAuthKey(\"Test_SNMP_user_authentication_key.\"\ ); // required field\n snmpUser.setAuthType(SnmpAuthType.UNKNOWN);\ \ // required field\n snmpUser.setUsername(\"Test UserName\"); \ \ // required field\n \n String clusterExtId = \"6D2CE685-4AB7-9AA6-28Ae-5506Dffb994f\"\ ;\n \n String extId = \"CCa79aBc-67f1-eb1a-67a3-AdEaaECC84eD\"\ ;\n\n // perform GET call\n GetSnmpUserApiResponse getResponse\ \ = null;\n try {\n getResponse = clustersApi.getSnmpUserById(GetSnmpUserByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\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 UpdateSnmpUserApiResponse\ \ updateSnmpUserApiResponse = clustersApi.updateSnmpUserById(UpdateSnmpUserByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), snmpUser, opts);\n\n System.out.println(updateSnmpUserApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, SnmpAuthType, SnmpUser, GetSnmpUserApiResponse\ \ } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.setAuthKey(\"Test_SNMP_user_authentication_key.\"\ ); // required field\n snmpUser.setAuthType(SnmpAuthType.UNKNOWN); \ \ // required field\n snmpUser.setUsername(\"Test UserName\"); // required\ \ field\n snmpUser = JSON.stringify(snmpUser);\n\n \n let clusterExtId\ \ = \"F50cf1E1-8bbd-dD3E-07EA-1cd9B4dFD9D5\";\n \n let extId = \"\ 2AEA8CCb-91Ed-beed-684B-C35Aa0EC8Ca2\";\n\n\n // Perform Get call\n \ \ clustersApi.getSnmpUserById(clusterExtId, 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 clustersApi.updateSnmpUserById(clusterExtId,\ \ extId, snmpUser, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpUser = ntnx_clustermgmt_py_client.SnmpUser()\n\n # SnmpUser\ \ object initializations here...\n snmpUser.auth_key = \"Test_SNMP_user_authentication_key.\"\ \ # required field\n snmpUser.auth_type = ntnx_clustermgmt_py_client.SnmpAuthType._UNKNOWN\ \ # required field\n snmpUser.username = \"Test UserName\" # required\ \ field\n \n cluster_ext_id = \"AfDDd7dc-6eab-B8cE-dccd-ee40D4B6cACf\"\ \n \n ext_id = \"FBC6a1A9-2E5f-2a63-Fa5E-7CB11EE13acD\"\n\n try:\n\ \ api_response = clusters_api.get_snmp_user_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n except ntnx_clustermgmt_py_client.rest.ApiException\ \ as e:\n print(e)\n # Extract E-Tag Header\n etag_value =\ \ ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\n try:\n\ \ api_response = clusters_api.update_snmp_user_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=snmpUser, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpUser := import1.NewSnmpUser()\n\ \n // SnmpUser object initializations here...\n\n \n clusterExtId\ \ := \"Eefb96bb-5aCe-FeF6-Cdc0-ABF7e3BCFe27\"\n \n extId := \"6dCd7c5a-B7C5-dF2c-f9F4-3c0AaAa92ec3\"\ \n\n getRequest := clusters.GetSnmpUserByIdRequest{ clusterExtId: &clusterExtId,\ \ extId: &extId }\n getResponse, err := ClustersServiceApiInstance.GetSnmpUserById(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 := clusters.UpdateSnmpUserByIdRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId, Body: snmpUser }\n response, error := ClustersServiceApiInstance.UpdateSnmpUserById(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/clustermgmt/v4.2/config/clusters/BE02f463-4FDe-DeAF-AAaC-12aD0f97CB8c/snmp/users/f9f9dc11-Ccee-B1cA-FC53-15A8cec9b2dA" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"TestUserName","authType":"$UNKNOWN","authKey":"Test_SNMP_user_authentication_key.","privType":"$UNKNOWN","privKey":"Test_SNMP_user_encryption_key.","$objectType":"clustermgmt.v4.config.SnmpUser"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/f0D37B7A-9408-13bB-BE76-8D523DA43632/snmp/users/E1BDaD33-ac57-Aeea-2Cdc-f0FaF7ADCbeB" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpUser\ \ snmpUser = new SnmpUser();\n\n // SnmpUser object initializations\ \ here...\n snmpUser.AuthKey = \"Test_SNMP_user_authentication_key.\"\ ; // required field\n snmpUser.AuthType = SnmpAuthType.UNKNOWN; //\ \ required field\n snmpUser.Username = \"Test UserName\"; // required\ \ field\n\n String clusterExtId = \"c8AA8Ed7-0Eaf-911B-cfde-fEaCcdbEf8b9\"\ ;\n String extId = \"5BdFf071-dcFc-Baec-D8DC-F22Eb3A66A3c\";\n\n \ \ // perform GET call\n var getRequest = new GetSnmpUserByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ };\n var getRequest = new GetSnmpUserByIdRequest {\n \ \ ClusterExtId = clusterExtId,\n ExtId = extId\n \ \ };\n try {\n GetSnmpUserApiResponse getResponse =\ \ clustersApi.GetSnmpUserById(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 UpdateSnmpUserByIdRequest {\n ClusterExtId =\ \ clusterExtId,\n ExtId = extId,\n Body = snmpUser,\n\ \ \n \n };\n try {\n UpdateSnmpUserApiResponse\ \ updateSnmpUserApiResponse = clustersApi.UpdateSnmpUserById(request, opts);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - Clusters summary: Delete SNMP user description: "Deletes SNMP user configuration identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: deleteSnmpUserById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 006dcf95-b04b-43d9-b6d1-191cde20ab56 - name: extId in: path description: SNMP user UUID. 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: 965e3629-a975-4b54-8e4f-066a2c0815ba responses: "202": description: SNMP user is deleted. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Delete operation" x-permissions: operationName: Delete Cluster Snmp User deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DeleteSnmpUserByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteSnmpUserApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"eEeBecaA-0C9D-EcBc-fC90-E8fAa8cA3BBA\"\ ;\n \n String extId = \"1BEf3cA4-eE3E-EaC3-ca79-BbDb801b00bF\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteSnmpUserApiResponse\ \ deleteSnmpUserApiResponse = clustersApi.deleteSnmpUserById(DeleteSnmpUserByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(deleteSnmpUserApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"35B30Ecd-a0C2-6CD1-AAFE-BdAef6d1F2a2\"\ ;\n \n let extId = \"dE3b8755-bDdD-FcfB-ECcE-4C9dcac0A5e2\";\n\n\n\ \n\n\n clustersApi.deleteSnmpUserById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"EF3Ef12A-cBDa-BF98-070f-d4CD1356EcbD\"\n \ \ \n ext_id = \"15cB5a07-CDD0-EAf9-aCBc-b1F4Ae6Df83d\"\n\n\n try:\n\ \ api_response = clusters_api.delete_snmp_user_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"E6fefBA9-Faac-ab69-cBEC-Ed6fAc2dB7AA\"\ \n \n extId := \"DDdFbdf5-A1e9-E8FF-AcAa-bC2daEbbfDFa\"\n\n\n request\ \ := clusters.DeleteSnmpUserByIdRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId }\n response, error := ClustersServiceApiInstance.DeleteSnmpUserById(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/clustermgmt/v4.2/config/clusters/CEF2cdBF-DdFE-7FEF-4CB6-28c1DCEE07ee/snmp/users/eAF36dED-FdDb-fD40-5a20-6A6A13B1BCF5" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/cbc7b561-Ae5f-F2dd-A0Fa-fC3dfEFDeaE2/snmp/users/3deEDadb-Eae8-E72A-Bd94-CfeBC1cB20b9" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"b92BAb2E-fdeF-DDf7-ef8F-8257fEbf8add\";\n String\ \ extId = \"f5edeC1f-C4bA-c3E8-6cCd-038Ef56DB6ff\";\n\n // Create\ \ request object with parameters\n var request = new DeleteSnmpUserByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n DeleteSnmpUserApiResponse deleteSnmpUserApiResponse\ \ = clustersApi.DeleteSnmpUserById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps: post: tags: - Clusters summary: Add SNMP trap description: "Add SNMP trap configuration associated with the cluster identified\ \ by {clusterExtId}." operationId: createSnmpTrap parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: e08d257a-b028-4e3e-b6f6-ebd0dbb54a83 requestBody: description: SNMP trap to add. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrap' required: true responses: "202": description: SNMP trap is added. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps\ \ Post operation" x-permissions: operationName: Create Cluster Snmp Trap deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.CreateSnmpTrapRequest;\n\ import com.nutanix.dp1.clu.common.v1.config.IPAddress;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTrapVersion;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTrap;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.CreateSnmpTrapApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpTrap\ \ snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.setAddress(new IPAddress()); // required field\n\ \ snmpTrap.setVersion(SnmpTrapVersion.UNKNOWN); // required field\n\ \ \n String clusterExtId = \"76AcaFff-8Eaf-84bD-DC00-EbBcdD2dcAB6\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n CreateSnmpTrapApiResponse\ \ createSnmpTrapApiResponse = clustersApi.createSnmpTrap(CreateSnmpTrapRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ snmpTrap);\n\n System.out.println(createSnmpTrapApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, IPAddress, SnmpTrapVersion, SnmpTrap\ \ } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.setAddress(new IPAddress()); // required field\n\ \ snmpTrap.setVersion(SnmpTrapVersion.UNKNOWN); // required field\n\ \ snmpTrap = JSON.stringify(snmpTrap);\n\n \n let clusterExtId\ \ = \"cBB1bDEd-5cCA-39Bd-9eAE-1FFBF9d28aFf\";\n\n\n\n\n\n clustersApi.createSnmpTrap(clusterExtId,\ \ snmpTrap).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpTrap = ntnx_clustermgmt_py_client.SnmpTrap()\n\n # SnmpTrap\ \ object initializations here...\n snmpTrap.address = ntnx_clustermgmt_py_client.IPAddress()\ \ # required field\n snmpTrap.version = ntnx_clustermgmt_py_client.SnmpTrapVersion._UNKNOWN\ \ # required field\n \n cluster_ext_id = \"C2f50ccc-faCc-1C1D-EDb8-F5Ec4BfC0F7E\"\ \n\n\n try:\n api_response = clusters_api.create_snmp_trap(clusterExtId=cluster_ext_id,\ \ body=snmpTrap)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpTrap := import1.NewSnmpTrap()\n\ \n // SnmpTrap object initializations here...\n\n \n clusterExtId\ \ := \"cFd9b0E8-EdcF-155F-Cfcc-B79c3CbC00fE\"\n\n\n request := clusters.CreateSnmpTrapRequest{\ \ ClusterExtId: &clusterExtId, Body: snmpTrap }\n response, error :=\ \ ClustersServiceApiInstance.CreateSnmpTrap(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/clustermgmt/v4.2/config/clusters/76ae101c-42fB-fec6-40dA-36eF0B4a5bE6/snmp/traps" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"} \ - 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 {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/8b43ddB1-Edb2-bE5E-dbEB-BbF103DEdcED/snmp/traps" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Common.V1.Config;\nusing Nutanix.CluSDK.Model.Clustermgmt.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\ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpTrap\ \ snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.Address = new IPAddress(); // required field\n\ \ snmpTrap.Version = SnmpTrapVersion.UNKNOWN; // required field\n\n\ \ String clusterExtId = \"Dba087aA-cE91-cEC3-f98B-923fadDBCD6B\";\n\ \n // Create request object with parameters\n var request\ \ = new CreateSnmpTrapRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = snmpTrap\n };\n try {\n CreateSnmpTrapApiResponse\ \ createSnmpTrapApiResponse = clustersApi.CreateSnmpTrap(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}: get: tags: - Clusters summary: Get SNMP trap configuration details description: " Fetches SNMP trap configuration details identified by {extId}\ \ associated with the cluster identified by {clusterExtId}." operationId: getSnmpTrapById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 8ff889dd-f17b-4a7a-a659-84078621e0e6 - name: extId in: path description: SNMP trap UUID. 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: 7bf14125-566b-42e8-b3d1-672261ba9ff9 responses: "200": description: SNMP trap retrieved. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrap' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Snmp Trap deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetSnmpTrapByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetSnmpTrapApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"c4aaAfb3-f06f-Ec52-CE1A-fC29eCDAaAdE\"\ ;\n \n String extId = \"BCEE2Dac-BDdA-8A50-bbCB-3406C8a6d7cA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSnmpTrapApiResponse\ \ getSnmpTrapApiResponse = clustersApi.getSnmpTrapById(GetSnmpTrapByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getSnmpTrapApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"6d62DD8a-AAe2-cBab-dDAd-3Dff5EB9CfCd\"\ ;\n \n let extId = \"5D71ECCd-1465-c2DE-8255-b5B4b64bAAc1\";\n\n\n\ \n\n\n clustersApi.getSnmpTrapById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"7fcbcf6C-5Ced-B07f-D45b-BcbeCCfDDEA5\"\n \ \ \n ext_id = \"55f1e723-cCDA-3efB-D6ce-Df21DD788bFc\"\n\n\n try:\n\ \ api_response = clusters_api.get_snmp_trap_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"BE57e9Eb-9eD1-bBAF-BEf9-2Db8AAfcF078\"\ \n \n extId := \"59eDF1b8-c32a-e113-c03c-ddE6c663bFdA\"\n\n\n request\ \ := clusters.GetSnmpTrapByIdRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId }\n response, error := ClustersServiceApiInstance.GetSnmpTrapById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SnmpTrap)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/Dcc2D29a-0AEf-9F5d-E009-E7aa215F90D8/snmp/traps/ab2787DC-D4Be-2C3a-FEBb-BecE1FcAA1cE" \ --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/clustermgmt/v4.2/config/clusters/C0d97ed6-8dFB-Fed6-cCC7-B66aaAfD1cC2/snmp/traps/65dAdfEE-2A7e-22C4-A041-DF3cddCad8Cf" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"eEDAEBaC-788f-f44c-6FEe-AFAD74C7aBdB\";\n String\ \ extId = \"dfED5DCc-eE9c-bC9a-CB36-CBFBceFCCeCC\";\n\n // Create\ \ request object with parameters\n var request = new GetSnmpTrapByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n GetSnmpTrapApiResponse getSnmpTrapApiResponse\ \ = clustersApi.GetSnmpTrapById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Clusters summary: Update SNMP trap description: "Update SNMP trap configuration identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: updateSnmpTrapById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: f6afe03d-4a18-46c6-8b3c-8d2e6b4d9d37 - name: extId in: path description: SNMP trap UUID. 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: 18aeff58-4f82-473f-8baa-af06bff06ca4 - 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 requestBody: description: SNMP trap to update. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrap' required: true responses: "202": description: SNMP trap is updated. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Put operation" x-permissions: operationName: Update Cluster Snmp Trap deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.UpdateSnmpTrapByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetSnmpTrapByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.common.v1.config.IPAddress;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTrapVersion;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.SnmpTrap;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.GetSnmpTrapApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateSnmpTrapApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n SnmpTrap\ \ snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.setAddress(new IPAddress()); // required field\n\ \ snmpTrap.setVersion(SnmpTrapVersion.UNKNOWN); // required field\n\ \ \n String clusterExtId = \"2fB476f0-3AAF-F39A-5Cb2-6ADaAeac9D81\"\ ;\n \n String extId = \"4eCb8C5E-6Be3-Bd7E-67F3-6e2EACDEAC38\"\ ;\n\n // perform GET call\n GetSnmpTrapApiResponse getResponse\ \ = null;\n try {\n getResponse = clustersApi.getSnmpTrapById(GetSnmpTrapByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\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 UpdateSnmpTrapApiResponse\ \ updateSnmpTrapApiResponse = clustersApi.updateSnmpTrapById(UpdateSnmpTrapByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), snmpTrap, opts);\n\n System.out.println(updateSnmpTrapApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, IPAddress, SnmpTrapVersion, SnmpTrap,\ \ GetSnmpTrapApiResponse } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.setAddress(new IPAddress()); // required field\n\ \ snmpTrap.setVersion(SnmpTrapVersion.UNKNOWN); // required field\n\ \ snmpTrap = JSON.stringify(snmpTrap);\n\n \n let clusterExtId\ \ = \"cC60bbd0-BDE6-a69c-bcb8-Cd7A2E124Dbe\";\n \n let extId = \"\ EeeAb279-eC99-4efD-5bff-b141BdeDc8b9\";\n\n\n // Perform Get call\n \ \ clustersApi.getSnmpTrapById(clusterExtId, 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 clustersApi.updateSnmpTrapById(clusterExtId,\ \ extId, snmpTrap, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ snmpTrap = ntnx_clustermgmt_py_client.SnmpTrap()\n\n # SnmpTrap\ \ object initializations here...\n snmpTrap.address = ntnx_clustermgmt_py_client.IPAddress()\ \ # required field\n snmpTrap.version = ntnx_clustermgmt_py_client.SnmpTrapVersion._UNKNOWN\ \ # required field\n \n cluster_ext_id = \"b4CDF52E-0af5-Bdbb-fA30-a9DB83b9Fcf3\"\ \n \n ext_id = \"1C83cc4a-Ca62-3BBd-4b1f-cd31EEA002C7\"\n\n try:\n\ \ api_response = clusters_api.get_snmp_trap_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n except ntnx_clustermgmt_py_client.rest.ApiException\ \ as e:\n print(e)\n # Extract E-Tag Header\n etag_value =\ \ ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\n try:\n\ \ api_response = clusters_api.update_snmp_trap_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=snmpTrap, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n snmpTrap := import1.NewSnmpTrap()\n\ \n // SnmpTrap object initializations here...\n\n \n clusterExtId\ \ := \"d3d37fbc-B3aA-FCCE-6bcC-9b7bD288F4ca\"\n \n extId := \"0C23F0FB-eC6e-CCCF-6DbC-a1cEa5cBF2fA\"\ \n\n getRequest := clusters.GetSnmpTrapByIdRequest{ clusterExtId: &clusterExtId,\ \ extId: &extId }\n getResponse, err := ClustersServiceApiInstance.GetSnmpTrapById(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 := clusters.UpdateSnmpTrapByIdRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId, Body: snmpTrap }\n response, error := ClustersServiceApiInstance.UpdateSnmpTrapById(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/clustermgmt/v4.2/config/clusters/69C2ed7B-Da0F-BbaF-DDAF-fEcdFD7BeFb9/snmp/traps/dAFb2ceb-2aFb-0f8f-72FA-b51C38214b3C" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"address":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"username":"TestUserName","protocol":"$UNKNOWN","port":0,"shouldInform":true,"engineId":"TestsnmpengineId","version":"$UNKNOWN","recieverName":"TestReceiverName","communityString":"snmp-servercommunitypublicRO192.168.1.0255.255.255.0","$objectType":"clustermgmt.v4.config.SnmpTrap"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/F657b2Ba-C2E3-A91C-fF13-E23f11C4fdfD/snmp/traps/CFeeDBBD-f5DF-3816-E2D4-BAEc2FD3eE08" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Common.V1.Config;\nusing Nutanix.CluSDK.Model.Clustermgmt.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\ \ ClustersApi clustersApi = new ClustersApi(client);\n\n SnmpTrap\ \ snmpTrap = new SnmpTrap();\n\n // SnmpTrap object initializations\ \ here...\n snmpTrap.Address = new IPAddress(); // required field\n\ \ snmpTrap.Version = SnmpTrapVersion.UNKNOWN; // required field\n\n\ \ String clusterExtId = \"4B12f2Ce-Fe3F-2Cc5-daaC-f35A0EbEBe17\";\n\ \ String extId = \"Ff6cD7Ad-E1e3-80fb-f291-Acabb8CD65e1\";\n\n \ \ // perform GET call\n var getRequest = new GetSnmpTrapByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ };\n var getRequest = new GetSnmpTrapByIdRequest {\n \ \ ClusterExtId = clusterExtId,\n ExtId = extId\n \ \ };\n try {\n GetSnmpTrapApiResponse getResponse =\ \ clustersApi.GetSnmpTrapById(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 UpdateSnmpTrapByIdRequest {\n ClusterExtId =\ \ clusterExtId,\n ExtId = extId,\n Body = snmpTrap,\n\ \ \n \n };\n try {\n UpdateSnmpTrapApiResponse\ \ updateSnmpTrapApiResponse = clustersApi.UpdateSnmpTrapById(request, opts);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - Clusters summary: Delete SNMP trap description: "Deletes SNMP trap configuration identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: deleteSnmpTrapById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 12c572e1-8a4d-49c6-9e84-496c79eaf200 - name: extId in: path description: SNMP trap UUID. 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: b21d3580-af17-43ef-9f1d-5ff97f54413e responses: "202": description: SNMP trap is deleted. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Delete operation" x-permissions: operationName: Delete Cluster Snmp Trap deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DeleteSnmpTrapByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteSnmpTrapApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"Fb1C66aF-2E66-EeB2-9F6D-07D2bB5cdFc2\"\ ;\n \n String extId = \"b95Eb9ce-1cDD-eCa0-edbd-B8D0C92dcBBA\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteSnmpTrapApiResponse\ \ deleteSnmpTrapApiResponse = clustersApi.deleteSnmpTrapById(DeleteSnmpTrapByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(deleteSnmpTrapApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"5DfEDefc-Eedc-aA2d-3e6f-BDe9E68Cbdb1\"\ ;\n \n let extId = \"CCC6eDe2-c04c-6EAC-5cFf-41999eaB5674\";\n\n\n\ \n\n\n clustersApi.deleteSnmpTrapById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"bbCBa2B2-03ED-E9cc-Fc6b-1fFe5FFfC889\"\n \ \ \n ext_id = \"8CDdCfEB-1Be3-dEaA-8a59-cffA2352bBB1\"\n\n\n try:\n\ \ api_response = clusters_api.delete_snmp_trap_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"4AEADA0F-2dcD-Fafb-1Dd7-dAefbaCc2f9d\"\ \n \n extId := \"fC0aA39B-e8d9-6Bc6-c3dC-d9bCeFFfeE4b\"\n\n\n request\ \ := clusters.DeleteSnmpTrapByIdRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId }\n response, error := ClustersServiceApiInstance.DeleteSnmpTrapById(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/clustermgmt/v4.2/config/clusters/BC958B86-C255-fBb4-bb9C-faaEFfdf45f9/snmp/traps/D90cAEBd-dfAe-7faD-Dbd8-EEBa5fD3fDAE" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/1EB5FCef-Ecb1-F28d-EEe1-b9768aDbAB1b/snmp/traps/ffEc6DB1-ACB7-D8F5-89eB-e3ad6B277D0b" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"E6DFB51D-C4c0-B5B4-D9Bc-B1fFed32aDA5\";\n String\ \ extId = \"9a67ee11-Bf18-B3dc-FbdA-Fd30e7Afcd7b\";\n\n // Create\ \ request object with parameters\n var request = new DeleteSnmpTrapByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n DeleteSnmpTrapApiResponse deleteSnmpTrapApiResponse\ \ = clustersApi.DeleteSnmpTrapById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers: get: tags: - Clusters summary: Get the list of RSYSLOG server configurations description: "Lists the RSYSLOG server configurations associated with the cluster\ \ identified by {clusterExtId}." operationId: listRsyslogServersByClusterId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 8c177492-4764-4dd8-915a-9b2e4f1301a3 responses: "200": description: The requested RSYSLOG configuration. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 10 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ Get operation" x-permissions: operationName: View Cluster Rsyslog Server deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Project Manager - name: Security Dashboard Admin - name: Security Dashboard Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListRsyslogServersByClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListRsyslogServersByClusterIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"9DDE2EAe-3fE3-FfE3-fBAe-2aFd7bAfbd12\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ListRsyslogServersByClusterIdApiResponse\ \ listRsyslogServersByClusterIdApiResponse = clustersApi.listRsyslogServersByClusterId(ListRsyslogServersByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build());\n\ \n System.out.println(listRsyslogServersByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"A772AFFe-DDE0-5F97-05f5-5eF5391b5af9\"\ ;\n\n\n\n\n\n clustersApi.listRsyslogServersByClusterId(clusterExtId).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"EC5A8bab-D6bA-95eD-14b9-9DED67b6f45D\"\n\n\ \n try:\n api_response = clusters_api.list_rsyslog_servers_by_cluster_id(clusterExtId=cluster_ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"6DA35B7B-Ff5e-c955-2Af3-95f9Af2aaB99\"\ \n\n\n request := clusters.ListRsyslogServersByClusterIdRequest{ ClusterExtId:\ \ &clusterExtId }\n response, error := ClustersServiceApiInstance.ListRsyslogServersByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RsyslogServer)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/1EBbc70B-Ed9C-Fb0b-cade-5FBE2Db3A64D/rsyslog-servers" \ --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/clustermgmt/v4.2/config/clusters/0bE6442d-1e5F-e2Df-D41e-fF94CdceBeF3/rsyslog-servers" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"6bCcB4Bd-cC24-4feB-c0CC-E7DafA2ECEfF\";\n\n //\ \ Create request object with parameters\n var request = new ListRsyslogServersByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId\n };\n try {\n\ \ ListRsyslogServersByClusterIdApiResponse listRsyslogServersByClusterIdApiResponse\ \ = clustersApi.ListRsyslogServersByClusterId(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" post: tags: - Clusters summary: Add RSYSLOG server configuration description: "Adds RSYSLOG server configuration to the cluster identified by\ \ {clusterExtId}." operationId: createRsyslogServer parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 8448944d-3a1a-4d31-9b84-61c9eb6d31b4 requestBody: description: RSYSLOG server to add. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' required: true responses: "202": description: RSYSLOG server is added. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ Post operation" x-permissions: operationName: Create Cluster Rsyslog Server deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.CreateRsyslogServerRequest;\n\ import com.nutanix.dp1.clu.common.v1.config.IPAddress;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.RsyslogNetworkProtocol;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.RsyslogServer;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.CreateRsyslogServerApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n RsyslogServer\ \ rsyslogServer = new RsyslogServer();\n\n // RsyslogServer object\ \ initializations here...\n rsyslogServer.setIpAddress(new IPAddress());\ \ // required field\n rsyslogServer.setNetworkProtocol(RsyslogNetworkProtocol.UNKNOWN);\ \ // required field\n rsyslogServer.setPort(1); // required field\n\ \ rsyslogServer.setServerName(\"testServer1\"); // required field\n\ \ \n String clusterExtId = \"8C0f6DE5-bE99-9edE-D208-BFcb2FdAcDD7\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n CreateRsyslogServerApiResponse\ \ createRsyslogServerApiResponse = clustersApi.createRsyslogServer(CreateRsyslogServerRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ rsyslogServer);\n\n System.out.println(createRsyslogServerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, IPAddress, RsyslogNetworkProtocol,\ \ RsyslogServer } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let rsyslogServer = new RsyslogServer();\n\n // RsyslogServer\ \ object initializations here...\n rsyslogServer.setIpAddress(new IPAddress());\ \ // required field\n rsyslogServer.setNetworkProtocol(RsyslogNetworkProtocol.UNKNOWN);\ \ // required field\n rsyslogServer.setPort(1); // required field\n\ \ rsyslogServer.setServerName(\"testServer1\"); // required field\n\ \ rsyslogServer = JSON.stringify(rsyslogServer);\n\n \n let clusterExtId\ \ = \"dade6b2e-Befa-eab8-cbcC-aAf2E1Eff93B\";\n\n\n\n\n\n clustersApi.createRsyslogServer(clusterExtId,\ \ rsyslogServer).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ rsyslogServer = ntnx_clustermgmt_py_client.RsyslogServer()\n\n #\ \ RsyslogServer object initializations here...\n rsyslogServer.ip_address\ \ = ntnx_clustermgmt_py_client.IPAddress() # required field\n rsyslogServer.network_protocol\ \ = ntnx_clustermgmt_py_client.RsyslogNetworkProtocol._UNKNOWN # required\ \ field\n rsyslogServer.port = 1 # required field\n rsyslogServer.server_name\ \ = \"testServer1\" # required field\n \n cluster_ext_id = \"a3e928B0-2e1C-Fcea-8C87-A6c9f0ecC030\"\ \n\n\n try:\n api_response = clusters_api.create_rsyslog_server(clusterExtId=cluster_ext_id,\ \ body=rsyslogServer)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n rsyslogServer := import1.NewRsyslogServer()\n\ \n // RsyslogServer object initializations here...\n\n \n clusterExtId\ \ := \"2e2D4a63-7bFa-8dFD-DBad-5888Df9e2DAe\"\n\n\n request := clusters.CreateRsyslogServerRequest{\ \ ClusterExtId: &clusterExtId, Body: rsyslogServer }\n response, error\ \ := ClustersServiceApiInstance.CreateRsyslogServer(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/clustermgmt/v4.2/config/clusters/2DAfDcDf-5e3f-fFAF-E45f-7De2E4FedB7a/rsyslog-servers" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"} \ - 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 {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/0ABC66EC-Afde-6807-fcD1-EC0DbEf0baD2/rsyslog-servers" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Common.V1.Config;\nusing Nutanix.CluSDK.Model.Clustermgmt.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\ \ ClustersApi clustersApi = new ClustersApi(client);\n\n RsyslogServer\ \ rsyslogServer = new RsyslogServer();\n\n // RsyslogServer object\ \ initializations here...\n rsyslogServer.IpAddress = new IPAddress();\ \ // required field\n rsyslogServer.NetworkProtocol = RsyslogNetworkProtocol.UNKNOWN;\ \ // required field\n rsyslogServer.Port = 1; // required field\n\ \ rsyslogServer.ServerName = \"testServer1\"; // required field\n\n\ \ String clusterExtId = \"F5eccC60-1ed0-d1De-aBCf-cabb6CE129Fb\";\n\ \n // Create request object with parameters\n var request\ \ = new CreateRsyslogServerRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = rsyslogServer\n };\n try {\n \ \ CreateRsyslogServerApiResponse createRsyslogServerApiResponse = clustersApi.CreateRsyslogServer(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}: get: tags: - Clusters summary: Get RSYSLOG server configuration description: "Fetches the RSYSLOG server configuration identified by {extId}\ \ associated with the cluster identified by {clusterExtId}." operationId: getRsyslogServerById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 0d7b8f8c-c214-42d8-881e-07cf7738be47 - name: extId in: path description: RSYSLOG server UUID. 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: 71d29553-d6f3-4a49-944c-d0e81d82cae4 responses: "200": description: The requested RSYSLOG server configuration content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Rsyslog Server deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Project Manager - name: Security Dashboard Admin - name: Security Dashboard Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetRsyslogServerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetRsyslogServerApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"e7eEa835-aFa2-A28b-da9f-CBDA12F9aAED\"\ ;\n \n String extId = \"cCCFd3aD-7eFa-dbfb-D2dA-EAfe1e2FdCAF\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRsyslogServerApiResponse\ \ getRsyslogServerApiResponse = clustersApi.getRsyslogServerById(GetRsyslogServerByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getRsyslogServerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"a8B0DB3E-E5Cc-EaBd-A32b-BAFc4A1a1aca\"\ ;\n \n let extId = \"eFBcd2d5-fA6B-036e-c12c-dfF78Ae8ADcd\";\n\n\n\ \n\n\n clustersApi.getRsyslogServerById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"1DE2B50a-f84D-eecb-fcAd-cE6Ffd29dA8f\"\n \ \ \n ext_id = \"A5F1E304-a8c8-0A7b-acd4-D68Cf3B1B8eE\"\n\n\n try:\n\ \ api_response = clusters_api.get_rsyslog_server_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"EDe9e8Ba-AfBe-Bc4e-Da0e-2FcafDabdc3e\"\ \n \n extId := \"dfeBAb8B-De1A-afaC-0Be4-F7E5fECeeaa5\"\n\n\n request\ \ := clusters.GetRsyslogServerByIdRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId }\n response, error := ClustersServiceApiInstance.GetRsyslogServerById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RsyslogServer)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/DaadaEF5-ec8b-7Dcc-3ccd-Dfa7Fe72f1aa/rsyslog-servers/aB1eBDAD-229D-Da5f-BeDA-caAC87F5aaA3" \ --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/clustermgmt/v4.2/config/clusters/5fEAB41A-35d7-9Dce-b240-cca7B9bBC5dd/rsyslog-servers/aaa204E7-Fbbf-11CB-1eBd-ebC8EDE71C9d" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"B0eac69f-4b9b-98B4-B9f1-d5f85d3ebEfB\";\n String\ \ extId = \"BafbdfEa-BCDf-FFEF-B4E1-EF1A6B30ba39\";\n\n // Create\ \ request object with parameters\n var request = new GetRsyslogServerByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n GetRsyslogServerApiResponse getRsyslogServerApiResponse\ \ = clustersApi.GetRsyslogServerById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - Clusters summary: Update RSYSLOG server configuration description: Update RSYSLOG server configuration except RSYSLOG server name as it is a primary key of the entity. operationId: updateRsyslogServerById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: ab064f01-a628-456e-a6c2-7f3ac4a5e85d - name: extId in: path description: RSYSLOG server UUID. 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: e43e5cb1-c0d3-42c3-b660-0a03fbb385bb - 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 requestBody: description: RSYSLOG server to update. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' required: true responses: "202": description: RSYSLOG server is updated. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Put operation" x-permissions: operationName: Update Cluster Rsyslog Server deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.UpdateRsyslogServerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetRsyslogServerByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.common.v1.config.IPAddress;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.RsyslogNetworkProtocol;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.RsyslogServer;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.GetRsyslogServerApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateRsyslogServerApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n RsyslogServer\ \ rsyslogServer = new RsyslogServer();\n\n // RsyslogServer object\ \ initializations here...\n rsyslogServer.setIpAddress(new IPAddress());\ \ // required field\n rsyslogServer.setNetworkProtocol(RsyslogNetworkProtocol.UNKNOWN);\ \ // required field\n rsyslogServer.setPort(1); // required field\n\ \ rsyslogServer.setServerName(\"testServer1\"); // required field\n\ \ \n String clusterExtId = \"E8cEB5d2-ae00-4Fec-EFd3-3Dda5F59BDbe\"\ ;\n \n String extId = \"df19BeA3-4e6A-841c-3fac-DfEFdBeafDF4\"\ ;\n\n // perform GET call\n GetRsyslogServerApiResponse getResponse\ \ = null;\n try {\n getResponse = clustersApi.getRsyslogServerById(GetRsyslogServerByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\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 UpdateRsyslogServerApiResponse\ \ updateRsyslogServerApiResponse = clustersApi.updateRsyslogServerById(UpdateRsyslogServerByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), rsyslogServer, opts);\n\n System.out.println(updateRsyslogServerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, IPAddress, RsyslogNetworkProtocol,\ \ RsyslogServer, GetRsyslogServerApiResponse } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let rsyslogServer = new RsyslogServer();\n\n // RsyslogServer\ \ object initializations here...\n rsyslogServer.setIpAddress(new IPAddress());\ \ // required field\n rsyslogServer.setNetworkProtocol(RsyslogNetworkProtocol.UNKNOWN);\ \ // required field\n rsyslogServer.setPort(1); // required field\n\ \ rsyslogServer.setServerName(\"testServer1\"); // required field\n\ \ rsyslogServer = JSON.stringify(rsyslogServer);\n\n \n let clusterExtId\ \ = \"0a5FD95e-DFF6-fbC7-eCF2-3dcfC40Fa7fc\";\n \n let extId = \"\ aBadcB82-FdC8-C2Da-AedB-6EFbE5eC3EEe\";\n\n\n // Perform Get call\n \ \ clustersApi.getRsyslogServerById(clusterExtId, 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 clustersApi.updateRsyslogServerById(clusterExtId,\ \ extId, rsyslogServer, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ rsyslogServer = ntnx_clustermgmt_py_client.RsyslogServer()\n\n #\ \ RsyslogServer object initializations here...\n rsyslogServer.ip_address\ \ = ntnx_clustermgmt_py_client.IPAddress() # required field\n rsyslogServer.network_protocol\ \ = ntnx_clustermgmt_py_client.RsyslogNetworkProtocol._UNKNOWN # required\ \ field\n rsyslogServer.port = 1 # required field\n rsyslogServer.server_name\ \ = \"testServer1\" # required field\n \n cluster_ext_id = \"74eBbbE6-BD6e-3f5a-7EDD-3D4cdafDc0aB\"\ \n \n ext_id = \"ECE42C3F-7a6e-9FFE-ecac-dD71AcEAdcbD\"\n\n try:\n\ \ api_response = clusters_api.get_rsyslog_server_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n except ntnx_clustermgmt_py_client.rest.ApiException\ \ as e:\n print(e)\n # Extract E-Tag Header\n etag_value =\ \ ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\n try:\n\ \ api_response = clusters_api.update_rsyslog_server_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=rsyslogServer, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n rsyslogServer := import1.NewRsyslogServer()\n\ \n // RsyslogServer object initializations here...\n\n \n clusterExtId\ \ := \"DdCB48dE-eCDC-CEDb-3BDf-7051FF295d5D\"\n \n extId := \"D7E94ED5-648f-Cd8E-A8A1-dCcBF4B3e26C\"\ \n\n getRequest := clusters.GetRsyslogServerByIdRequest{ clusterExtId:\ \ &clusterExtId, extId: &extId }\n getResponse, err := ClustersServiceApiInstance.GetRsyslogServerById(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 := clusters.UpdateRsyslogServerByIdRequest{ ClusterExtId:\ \ &clusterExtId, ExtId: &extId, Body: rsyslogServer }\n response, error\ \ := ClustersServiceApiInstance.UpdateRsyslogServerById(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/clustermgmt/v4.2/config/clusters/cAADA5cd-dE14-A2f6-dCA9-Ac2406DAAC2D/rsyslog-servers/dC4BF8af-a0E4-fADC-4be3-4b9dEFBCc173" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"serverName":"testServer1","ipAddress":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"port":0,"networkProtocol":"$UNKNOWN","modules":[{"name":"$UNKNOWN","logSeverityLevel":"$UNKNOWN","shouldLogMonitorFiles":true,"$objectType":"clustermgmt.v4.config.RsyslogModuleItem"}],"$objectType":"clustermgmt.v4.config.RsyslogServer"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/cF9c16bC-B44A-dCE5-Bf2C-DDEFF01Cf2aF/rsyslog-servers/BB4a2fB2-de3f-Eeb8-FF6E-31Ec2DEeBd68" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Common.V1.Config;\nusing Nutanix.CluSDK.Model.Clustermgmt.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\ \ ClustersApi clustersApi = new ClustersApi(client);\n\n RsyslogServer\ \ rsyslogServer = new RsyslogServer();\n\n // RsyslogServer object\ \ initializations here...\n rsyslogServer.IpAddress = new IPAddress();\ \ // required field\n rsyslogServer.NetworkProtocol = RsyslogNetworkProtocol.UNKNOWN;\ \ // required field\n rsyslogServer.Port = 1; // required field\n\ \ rsyslogServer.ServerName = \"testServer1\"; // required field\n\n\ \ String clusterExtId = \"C69DabF4-DdaD-Cf0F-aAb5-Fadd5ffFCDAF\";\n\ \ String extId = \"B5EBcEd2-DeFA-fFfC-Bc79-cd7A9AbedAB6\";\n\n \ \ // perform GET call\n var getRequest = new GetRsyslogServerByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ };\n var getRequest = new GetRsyslogServerByIdRequest {\n\ \ ClusterExtId = clusterExtId,\n ExtId = extId\n \ \ };\n try {\n GetRsyslogServerApiResponse getResponse\ \ = clustersApi.GetRsyslogServerById(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 UpdateRsyslogServerByIdRequest {\n ClusterExtId\ \ = clusterExtId,\n ExtId = extId,\n Body = rsyslogServer,\n\ \ \n \n };\n try {\n UpdateRsyslogServerApiResponse\ \ updateRsyslogServerApiResponse = clustersApi.UpdateRsyslogServerById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - Clusters summary: Delete RSYSLOG server configuration description: "Deletes RSYSLOG server configuration identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: deleteRsyslogServerById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: ba522ee2-b136-485d-8de5-d75004fcc292 - name: extId in: path description: RSYSLOG server UUID. 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: 75807f90-5c4b-4e94-82e7-a67438591f6e responses: "202": description: RSYSLOG server is deleted. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Delete operation" x-permissions: operationName: Delete Cluster Rsyslog Server deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DeleteRsyslogServerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteRsyslogServerApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"b6a8E0eF-0DCB-4EDc-CeC1-5dbEC261b8C8\"\ ;\n \n String extId = \"4aEF5fC5-D9b7-56CE-CE02-Ed8DCBbF3DDE\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n DeleteRsyslogServerApiResponse\ \ deleteRsyslogServerApiResponse = clustersApi.deleteRsyslogServerById(DeleteRsyslogServerByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(deleteRsyslogServerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"7DbeAcd0-aEbd-35Cc-fF1a-dAcBAAE9DD0f\"\ ;\n \n let extId = \"aab61Cda-2DBC-3eDD-1f8C-AEDbdaAac486\";\n\n\n\ \n\n\n clustersApi.deleteRsyslogServerById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"FdBDAfd2-C9CB-74c8-71ec-1A2E2fc5Bf3c\"\n \ \ \n ext_id = \"CcaF79Ff-EA5D-AF7c-E0cd-abcF8beDEaea\"\n\n\n try:\n\ \ api_response = clusters_api.delete_rsyslog_server_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"aefBBFAB-Ebd5-65DE-392e-F707f7Faa1B4\"\ \n \n extId := \"bB9bbbBf-dDDa-0AA1-1eFe-A1FaaF68fCdD\"\n\n\n request\ \ := clusters.DeleteRsyslogServerByIdRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId }\n response, error := ClustersServiceApiInstance.DeleteRsyslogServerById(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/clustermgmt/v4.2/config/clusters/C69E0CCD-1Cc5-B9CF-A9dc-bab3Ff73afBB/rsyslog-servers/9cc6AAE9-CcE3-0020-b0Ba-ECdB1eaF4FFD" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/0D99eFEd-7eD7-dF6c-34aB-bbbd6FEFCdA0/rsyslog-servers/1fcBaeaa-8eab-fbf0-8Eb3-D69aFB2AF2a0" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"F51C48FC-BfA3-f325-c23A-fEbF2b1cBDFD\";\n String\ \ extId = \"Aa5bd6ed-6ab6-7a5E-4dDd-2bF452dBEebe\";\n\n // Create\ \ request object with parameters\n var request = new DeleteRsyslogServerByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n DeleteRsyslogServerApiResponse deleteRsyslogServerApiResponse\ \ = clustersApi.DeleteRsyslogServerById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units: get: tags: - Clusters summary: Get the list of rackable units description: "Lists the rackable units of the cluster identified by {clusterExtId}." operationId: listRackableUnitsByClusterId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 09246842-d0a4-4547-a985-c4fcfc34a163 responses: "200": description: The requested rackable unit entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 10 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnit' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units\ \ Get operation" x-permissions: operationName: View Cluster Rackable Unit deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListRackableUnitsByClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListRackableUnitsByClusterIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"0a27BE2b-6e0b-98C1-bcBe-CFd02bcB9a1a\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ListRackableUnitsByClusterIdApiResponse\ \ listRackableUnitsByClusterIdApiResponse = clustersApi.listRackableUnitsByClusterId(ListRackableUnitsByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build());\n\ \n System.out.println(listRackableUnitsByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"0C72AEBe-Aceb-f6ca-DEdf-7a6bcca7a90d\"\ ;\n\n\n\n\n\n clustersApi.listRackableUnitsByClusterId(clusterExtId).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"1bBc90c0-19eE-feED-7a06-a7DeE2f982Cd\"\n\n\ \n try:\n api_response = clusters_api.list_rackable_units_by_cluster_id(clusterExtId=cluster_ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"aBDfdAA1-B7dD-aED8-FDda-1Af18de1f17e\"\ \n\n\n request := clusters.ListRackableUnitsByClusterIdRequest{ ClusterExtId:\ \ &clusterExtId }\n response, error := ClustersServiceApiInstance.ListRackableUnitsByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.RackableUnit)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/fcebCdCE-BBBf-8EFf-1f3F-aFf3EdeA0AEE/rackable-units" \ --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/clustermgmt/v4.2/config/clusters/33ca046F-e2d8-a8A3-5edf-BfC5CFBdEEbE/rackable-units" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"3c2F05AC-D1Ac-Aeef-E0DD-fFAb4AAc7AA7\";\n\n //\ \ Create request object with parameters\n var request = new ListRackableUnitsByClusterIdRequest\ \ {\n ClusterExtId = clusterExtId\n };\n try {\n\ \ ListRackableUnitsByClusterIdApiResponse listRackableUnitsByClusterIdApiResponse\ \ = clustersApi.ListRackableUnitsByClusterId(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units/{extId}: get: tags: - Clusters summary: Get the rackable unit details description: "Fetches the rackable unit entity details identified by {extId}\ \ of the cluster identified by {clusterExtId}." operationId: getRackableUnitById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 332e389a-a4ce-4ffa-9ca7-a277d8cd1504 - name: extId in: path description: Rackable unit UUID. 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: bec98040-70b7-4a87-a264-b4e763432980 responses: "200": description: The requested rackable unit entity. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnit' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Rackable Unit deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetRackableUnitByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetRackableUnitApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"dE50CfcE-BFcc-C99F-Cbf6-DB4ACDdc33dC\"\ ;\n \n String extId = \"fDcADf55-f07f-6Bde-abEC-4Afc5EDfFDdC\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetRackableUnitApiResponse\ \ getRackableUnitApiResponse = clustersApi.getRackableUnitById(GetRackableUnitByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getRackableUnitApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"a0dEAEAb-5bDb-Cb14-68A6-1bbb8E02Ddd8\"\ ;\n \n let extId = \"e27Ad9FA-f27d-bDE2-Ec4C-fBaBAAeB3Ff8\";\n\n\n\ \n\n\n clustersApi.getRackableUnitById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"dCcF1E4F-bFaE-0aeF-2AcE-Ad756d684Ade\"\n \ \ \n ext_id = \"9D03ECD7-2BCC-DDdf-AA19-EBEFA32a5fe9\"\n\n\n try:\n\ \ api_response = clusters_api.get_rackable_unit_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"08bB8baC-cA6E-6f9a-602D-c8F9dBBbDcD4\"\ \n \n extId := \"deaB35ac-Fd7C-BC17-3b53-C3cDaefddddD\"\n\n\n request\ \ := clusters.GetRackableUnitByIdRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId }\n response, error := ClustersServiceApiInstance.GetRackableUnitById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.RackableUnit)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/ABD8d9de-c2bb-3EFD-ebdC-B4702AC1babc/rackable-units/adaDF9Db-A8ea-e33b-AF8d-cBefb5caaBAe" \ --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/clustermgmt/v4.2/config/clusters/6EB9DbAa-fAac-EeaF-Ee0E-a92Bbd00dfCd/rackable-units/f2e67AC6-0bbe-dFf3-D41b-A0faAc1E7B25" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"Fb1e0Ebe-E6bc-BAF6-83bB-8E3798D5397C\";\n String\ \ extId = \"4b7Bdef8-C4bb-F9Ee-DDD4-aEb50DEbBd03\";\n\n // Create\ \ request object with parameters\n var request = new GetRackableUnitByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n GetRackableUnitApiResponse getRackableUnitApiResponse\ \ = clustersApi.GetRackableUnitById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}: get: tags: - Clusters summary: Get the details of host associated with the cluster description: "Fetches the details of the host identified by {extId} associated\ \ with the cluster identified by {clusterExtId}." operationId: getHostById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 92de100e-1858-4e32-9854-31736096f5a2 - name: extId in: path description: Indicates the UUID of a host. 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: 3559e0a3-4d90-4aa1-bfd5-52dabddd6442 responses: "200": description: The requested Host entity. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Host deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: VPC Admin - name: Network Infra Admin - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Monitoring Admin - name: Project Manager - name: Backup Admin - name: NCM Connector - name: LocalAccountManager Admin - name: LocalAccountManager Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetHostByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetHostApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"eaD14BBD-EECf-b21B-3dFb-eFecf5Fa4eE5\"\ ;\n \n String extId = \"30AFdDB8-F9eD-eCED-dCcC-13c7B2fcfE7f\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetHostApiResponse\ \ getHostApiResponse = clustersApi.getHostById(GetHostByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build());\n\n System.out.println(getHostApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"f8dFaCeF-aDBc-ebEa-A5da-e47e7F4eacf0\"\ ;\n \n let extId = \"20E1cbf0-D969-AC6b-f2F2-bE7cEc1Ac3aF\";\n\n\n\ \n\n\n clustersApi.getHostById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"cf8c4fbE-FDde-a4Ab-BCed-e804A19E99aC\"\n \ \ \n ext_id = \"E57Fe15b-bAFA-AC42-2dcb-F3DCccB6BDE6\"\n\n\n try:\n\ \ api_response = clusters_api.get_host_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"f0bDb8ED-1656-F1D0-cdDF-64e0DdfEfeFB\"\ \n \n extId := \"CEebBede-Bd20-efeB-e3cc-cBd0cAF208c0\"\n\n\n request\ \ := clusters.GetHostByIdRequest{ ClusterExtId: &clusterExtId, ExtId: &extId\ \ }\n response, error := ClustersServiceApiInstance.GetHostById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Host)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/d9AaaBbC-aadC-3699-e0f5-5F8dEecEFCec/hosts/cE223F05-A60F-ccCA-bBE6-17eEf11616FD" \ --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/clustermgmt/v4.2/config/clusters/D1E4EFA9-EC48-dAbE-FfCf-AF0AD47FF26e/hosts/feCbCe0c-4Dc4-E1Cc-CC5a-a0e271dc278c" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"A0D0aC09-dFBC-0b6e-eA8B-FeadAE35B9BF\";\n String\ \ extId = \"6fEbBBf1-C9b6-FAEC-fa2E-1DDaFDBfBaFA\";\n\n // Create\ \ request object with parameters\n var request = new GetHostByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId\n\ \ };\n try {\n GetHostApiResponse getHostApiResponse\ \ = clustersApi.GetHostById(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts: get: tags: - Clusters summary: Get the list of hosts associated with a cluster description: "Lists all the hosts associated with the cluster identified by\ \ {clusterExtId}." operationId: listHostsByClusterId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 048db1da-0ffc-4db4-902b-710fdca498d2 - 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: bootTimeUsecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=bootTimeUsecs\ \ eq 13" - name: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=cluster/name\ \ eq 'Test Cluster Name'" - name: cluster/uuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=cluster/uuid\ \ eq 'a596ed35-8647-4ea0-b6f2-994fe2459f22'" - name: cpuCapacityHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=cpuCapacityHz\ \ eq 20" - name: cpuFrequencyHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=cpuFrequencyHz\ \ eq 85" - name: cpuModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=cpuModel\ \ eq 'Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz'" - name: defaultVhdContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=defaultVhdContainerUuid\ \ eq 'b9dec220-d9d4-43a2-ab40-d760e2d9a26e'" - name: defaultVhdLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=defaultVhdLocation\ \ eq 'Test path of Default VHD location, default value is null'" - name: defaultVmContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=defaultVmContainerUuid\ \ eq 'a1ac6433-f0d3-480a-baa1-aa38a39a2521'" - name: defaultVmLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=defaultVmLocation\ \ eq 'Test path of Default VHD location, default value is null'" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: gpuDriverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=gpuDriverVersion\ \ eq '00061837-4b34-720c-6a02-043201338600'" - name: gpuList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=gpuList/any(a:a\ \ eq ' gpu name: Nvidia_GRID_T4-1B')" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=hostName\ \ eq 'Test Host Name mostly IPV4 address'" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=hypervisor/type\ \ eq Clustermgmt.Config.HypervisorType'AHV'" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=memorySizeBytes\ \ eq 79" - name: numberOfCpuCores example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=numberOfCpuCores\ \ eq 95" - name: numberOfCpuSockets example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=numberOfCpuSockets\ \ eq 61" - name: numberOfCpuThreads example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$filter=numberOfCpuThreads\ \ eq 1" - 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: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=cluster/name" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=extId" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=hostName" - name: hostType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=hostType" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=hypervisor/type" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$orderby=memorySizeBytes" - name: $apply in: query description: "A URL query parameter that allows clients to specify a sequence\ \ of transformations to the entity set, such as groupby, filter, aggregate\ \ etc. As of now only support for groupby exists.For example '$apply=groupby((templateName))'\ \ would get all templates grouped by templateName." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$apply=groupby(cluster/name)" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$apply=groupby(hypervisor/type)" - 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: blockModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=blockModel" - name: blockSerial example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=blockSerial" - name: bootTimeUsecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=bootTimeUsecs" - name: cluster example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=cluster" - name: cpuCapacityHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=cpuCapacityHz" - name: cpuFrequencyHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=cpuFrequencyHz" - name: cpuModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=cpuModel" - name: defaultVhdContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=defaultVhdContainerUuid" - name: defaultVhdLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=defaultVhdLocation" - name: defaultVmContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=defaultVmContainerUuid" - name: defaultVmLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=defaultVmLocation" - name: failoverClusterFqdn example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=failoverClusterFqdn" - name: failoverClusterNodeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=failoverClusterNodeStatus" - name: gpuDriverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=gpuDriverVersion" - name: gpuList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=gpuList" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=hostName" - name: hostType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=hostType" - name: isRebootPending example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=isRebootPending" - name: maintenanceState example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=maintenanceState" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=memorySizeBytes" - name: nodeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=nodeStatus" - name: numberOfCpuCores example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=numberOfCpuCores" - name: numberOfCpuSockets example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=numberOfCpuSockets" - name: numberOfCpuThreads example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts?$select=numberOfCpuThreads" responses: "200": description: The requested Host entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts\ \ Get operation" x-permissions: operationName: View Cluster Host deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: VPC Admin - name: Network Infra Admin - name: Project Manager - name: Backup Admin - name: NCM Connector - name: LocalAccountManager Admin - name: LocalAccountManager Viewer 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListHostsByClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListHostsByClusterIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"eF413DcE-EDC6-ABEC-b6A4-00e7bBfbaaD6\"\ ;\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 ListHostsByClusterIdApiResponse\ \ listHostsByClusterIdApiResponse = clustersApi.listHostsByClusterId(ListHostsByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$apply(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listHostsByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"E55982F5-6DAB-BFe8-acAe-EAFba8BFFe6E\"\ ;\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[\"$apply\"\ ] = \"string_sample_data\";\n opts[\"$select\"] = \"string_sample_data\"\ ;\n\n\n\n\n clustersApi.listHostsByClusterId(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"72c73Cb9-cDce-FaDf-6Eb3-A1BE0Ff8C3E3\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_hosts_by_cluster_id(clusterExtId=cluster_ext_id, _page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"e3CF645e-4D8d-ADF6-caaa-d8Ec6DEc5dff\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := clusters.ListHostsByClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil, Apply_: nil, Select_: nil }\n response, error :=\ \ ClustersServiceApiInstance.ListHostsByClusterId(ctx, &request)\n if\ \ error != nil {\n fmt.Println(error)\n return\n }\n \ \ data, _ := response.GetData().([]import1.Host)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/7bFcED75-5e7A-8EEc-bbCf-e3DBef9E8efF/hosts?$apply=string_sample_data&$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/clustermgmt/v4.2/config/clusters/dcB0dcDC-f68c-AF6D-0dB8-f7BCa0EfA14c/hosts?$apply=string_sample_data&$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"Aec902aE-Dbeb-cCD3-DEea-adfC74C98FDC\";\n int page\ \ = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String apply =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListHostsByClusterIdRequest {\n ClusterExtId = clusterExtId,\n\ \ Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby,\n Apply = apply,\n\ \ Select = select\n };\n try {\n ListHostsByClusterIdApiResponse\ \ listHostsByClusterIdApiResponse = clustersApi.ListHostsByClusterId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes: post: tags: - Clusters summary: Discover unconfigured nodes description: "Get the unconfigured node details such as node UUID, node position,\ \ node IP, foundation version and more." operationId: discoverUnconfiguredNodes parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 0261b459-2c2e-446d-8be6-94f61663bb02 requestBody: description: Discover unconfigured node details. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeDiscoveryParams' required: true responses: "202": description: Returns the task UUID which can be used to track the progress and the node discovery information. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes\ \ Post operation" x-permissions: operationName: Discover Cluster Unconfigured Nodes deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.DiscoverUnconfiguredNodesRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.NodeDiscoveryParams;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DiscoverUnconfiguredNodesApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n NodeDiscoveryParams\ \ nodeDiscoveryParams = new NodeDiscoveryParams();\n\n // NodeDiscoveryParams\ \ object initializations here...\n \n String clusterExtId\ \ = \"E1edFd2a-bcFF-6bae-e0dA-cEBfc7A2dA6f\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n DiscoverUnconfiguredNodesApiResponse\ \ discoverUnconfiguredNodesApiResponse = clustersApi.discoverUnconfiguredNodes(DiscoverUnconfiguredNodesRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ nodeDiscoveryParams);\n\n System.out.println(discoverUnconfiguredNodesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, NodeDiscoveryParams } from \"\ @nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let nodeDiscoveryParams = new NodeDiscoveryParams();\n\n //\ \ NodeDiscoveryParams object initializations here...\n nodeDiscoveryParams\ \ = JSON.stringify(nodeDiscoveryParams);\n\n \n let clusterExtId =\ \ \"fA7Bddbd-eC28-9b4C-deEC-6AeD9dbFdc4E\";\n\n\n\n\n\n clustersApi.discoverUnconfiguredNodes(clusterExtId,\ \ nodeDiscoveryParams).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ nodeDiscoveryParams = ntnx_clustermgmt_py_client.NodeDiscoveryParams()\n\ \n # NodeDiscoveryParams object initializations here...\n \n cluster_ext_id\ \ = \"Ab172E09-737F-0a2C-E3e8-f59b70fdaaCD\"\n\n\n try:\n api_response\ \ = clusters_api.discover_unconfigured_nodes(clusterExtId=cluster_ext_id,\ \ body=nodeDiscoveryParams)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nodeDiscoveryParams := import1.NewNodeDiscoveryParams()\n\ \n // NodeDiscoveryParams object initializations here...\n\n \n \ \ clusterExtId := \"E4BF6BED-fDfD-B89C-7CA7-cc9eAaF2bFd6\"\n\n\n request\ \ := clusters.DiscoverUnconfiguredNodesRequest{ ClusterExtId: &clusterExtId,\ \ Body: nodeDiscoveryParams }\n response, error := ClustersServiceApiInstance.DiscoverUnconfiguredNodes(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/clustermgmt/v4.2/config/clusters/80Ed2bbf-f5cc-5D51-918C-2CcaB52eB7fB/$actions/discover-unconfigured-nodes" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"addressType":"$UNKNOWN","ipFilterList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"uuidFilterList":["string"],"timeout":0,"interfaceFilterList":["TestInterfacename"],"isManualDiscovery":true,"$objectType":"clustermgmt.v4.config.NodeDiscoveryParams"} \ - 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 {"addressType":"$UNKNOWN","ipFilterList":[{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"}],"uuidFilterList":["string"],"timeout":0,"interfaceFilterList":["TestInterfacename"],"isManualDiscovery":true,"$objectType":"clustermgmt.v4.config.NodeDiscoveryParams"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/572bBAA6-0Ebd-7a7F-fEFE-feb40D8576D0/$actions/discover-unconfigured-nodes" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n NodeDiscoveryParams\ \ nodeDiscoveryParams = new NodeDiscoveryParams();\n\n // NodeDiscoveryParams\ \ object initializations here...\n\n String clusterExtId = \"4DBf9Da7-10f6-1EFF-E7b6-55eD9ffe3Edf\"\ ;\n\n // Create request object with parameters\n var request\ \ = new DiscoverUnconfiguredNodesRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = nodeDiscoveryParams\n };\n try {\n \ \ DiscoverUnconfiguredNodesApiResponse discoverUnconfiguredNodesApiResponse\ \ = clustersApi.DiscoverUnconfiguredNodes(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details: post: tags: - Clusters summary: Get network information of unconfigured nodes description: Get a dictionary of cluster networks and available uplinks on the given nodes. This API is not supported for XEN hypervisor type. operationId: fetchNodeNetworkingDetails parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: bbf05a8e-d7e5-42ba-89ab-99926d52a0dd requestBody: description: Node specific details required to fetch node networking information. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeDetails' required: true responses: "202": description: Returns the task UUID which can be used to track the progress and contains node networking information. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details\ \ Post operation" x-permissions: operationName: Fetch Cluster Node Networking Details deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.FetchNodeNetworkingDetailsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.NodeDetails;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.FetchNodeNetworkingDetailsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n NodeDetails\ \ nodeDetails = new NodeDetails();\n\n // NodeDetails object initializations\ \ here...\n nodeDetails.setNodeList(new ArrayList<>()); // required\ \ field\n \n String clusterExtId = \"40f8095F-2Fc5-cDf9-511b-0eBB634EFA4F\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n FetchNodeNetworkingDetailsApiResponse\ \ fetchNodeNetworkingDetailsApiResponse = clustersApi.fetchNodeNetworkingDetails(FetchNodeNetworkingDetailsRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ nodeDetails);\n\n System.out.println(fetchNodeNetworkingDetailsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, NodeDetails } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let nodeDetails = new NodeDetails();\n\n // NodeDetails object\ \ initializations here...\n nodeDetails.setNodeList([]); // required\ \ field\n nodeDetails = JSON.stringify(nodeDetails);\n\n \n let\ \ clusterExtId = \"fDEC9a82-cFF5-ef0E-6526-FEBAeDD1dcCA\";\n\n\n\n\n\n \ \ clustersApi.fetchNodeNetworkingDetails(clusterExtId, nodeDetails).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ nodeDetails = ntnx_clustermgmt_py_client.NodeDetails()\n\n # NodeDetails\ \ object initializations here...\n nodeDetails.node_list = [] # required\ \ field\n \n cluster_ext_id = \"25Bf6EDD-cCEd-1fe3-8bce-Eb8DcFAeaA5d\"\ \n\n\n try:\n api_response = clusters_api.fetch_node_networking_details(clusterExtId=cluster_ext_id,\ \ body=nodeDetails)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nodeDetails := import1.NewNodeDetails()\n\ \n // NodeDetails object initializations here...\n\n \n clusterExtId\ \ := \"1Ee9E2aA-7FdF-38dc-beDc-61810f7FFd16\"\n\n\n request := clusters.FetchNodeNetworkingDetailsRequest{\ \ ClusterExtId: &clusterExtId, Body: nodeDetails }\n response, error\ \ := ClustersServiceApiInstance.FetchNodeNetworkingDetails(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/clustermgmt/v4.2/config/clusters/B1cdC10F-EAeC-A5c3-dE75-fdFEE7dd097E/$actions/fetch-node-networking-details" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"nodeList":[{"nodeUuid":"string","blockId":"TestBlockID","nodePosition":"A/B","cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"model":"NX-1065-G8","isComputeOnly":true,"isLightCompute":true,"hypervisorType":"$UNKNOWN","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","currentNetworkInterface":"eth0/eth1","isRoboMixedHypervisor":true,"$objectType":"clustermgmt.v4.config.NodeListNetworkingDetails"}],"requestType":"expand_cluster/npe","$objectType":"clustermgmt.v4.config.NodeDetails"} \ - 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 {"nodeList":[{"nodeUuid":"string","blockId":"TestBlockID","nodePosition":"A/B","cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"model":"NX-1065-G8","isComputeOnly":true,"isLightCompute":true,"hypervisorType":"$UNKNOWN","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","currentNetworkInterface":"eth0/eth1","isRoboMixedHypervisor":true,"$objectType":"clustermgmt.v4.config.NodeListNetworkingDetails"}],"requestType":"expand_cluster/npe","$objectType":"clustermgmt.v4.config.NodeDetails"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/DCBcbDB5-1eFD-F9DB-A27c-d0Baa4B00DFE/$actions/fetch-node-networking-details" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n NodeDetails\ \ nodeDetails = new NodeDetails();\n\n // NodeDetails object initializations\ \ here...\n nodeDetails.NodeList = new ArrayList(); // required field\n\ \n String clusterExtId = \"C5e2bCBA-D3AB-38ad-B1A3-BcDD7e2cbF36\";\n\ \n // Create request object with parameters\n var request\ \ = new FetchNodeNetworkingDetailsRequest {\n ClusterExtId =\ \ clusterExtId,\n Body = nodeDetails\n };\n try\ \ {\n FetchNodeNetworkingDetailsApiResponse fetchNodeNetworkingDetailsApiResponse\ \ = clustersApi.FetchNodeNetworkingDetails(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/expand-cluster: post: tags: - Clusters summary: Add node on a cluster description: Add node on a cluster. This API is not supported for XEN hypervisor type. operationId: expandCluster parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 2de35ce0-55b7-4fbf-962b-6b644cf5dcb0 - 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: fbe060a9-4504-4106-8ecf-cc5dcb82fa94 requestBody: description: Property of the node to be added. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ExpandClusterParams' required: true responses: "202": description: Node added to cluster. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/expand-cluster\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/expand-cluster\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/expand-cluster\ \ Post operation" x-permissions: operationName: Expand Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ExpandClusterRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.NodeParam;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.ExpandClusterParams;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ExpandClusterApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n ExpandClusterParams\ \ expandClusterParams = new ExpandClusterParams();\n\n // ExpandClusterParams\ \ object initializations here...\n expandClusterParams.setNodeParams(new\ \ NodeParam()); // required field\n \n String clusterExtId\ \ = \"1f6EDFe3-bCDB-Fee6-C8ff-b9BF8cDDd12c\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ExpandClusterApiResponse expandClusterApiResponse\ \ = clustersApi.expandCluster(ExpandClusterRequest.builder()\n \ \ .clusterExtId(clusterExtId)\n .build(), expandClusterParams);\n\ \n System.out.println(expandClusterApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, NodeParam, ExpandClusterParams\ \ } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let expandClusterParams = new ExpandClusterParams();\n\n //\ \ ExpandClusterParams object initializations here...\n expandClusterParams.setNodeParams(new\ \ NodeParam()); // required field\n expandClusterParams = JSON.stringify(expandClusterParams);\n\ \n \n let clusterExtId = \"0b2accFd-9Ad8-b70C-27a0-b9EDCEDCe58F\"\ ;\n\n\n\n\n\n clustersApi.expandCluster(clusterExtId, expandClusterParams).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ expandClusterParams = ntnx_clustermgmt_py_client.ExpandClusterParams()\n\ \n # ExpandClusterParams object initializations here...\n expandClusterParams.node_params\ \ = ntnx_clustermgmt_py_client.NodeParam() # required field\n \n \ \ cluster_ext_id = \"9DdAD0c4-a8b4-47C7-665c-d7BA561FE1fB\"\n\n\n try:\n\ \ api_response = clusters_api.expand_cluster(clusterExtId=cluster_ext_id,\ \ body=expandClusterParams)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n expandClusterParams := import1.NewExpandClusterParams()\n\ \n // ExpandClusterParams object initializations here...\n\n \n \ \ clusterExtId := \"DEE6CCe1-ADe9-f3E5-FBfD-4BC6aaEcC95f\"\n\n\n request\ \ := clusters.ExpandClusterRequest{ ClusterExtId: &clusterExtId, Body: expandClusterParams\ \ }\n response, error := ClustersServiceApiInstance.ExpandCluster(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/clustermgmt/v4.2/config/clusters/eDEA671B-Ca8e-59d7-C9EA-D7C0ba2cCDCE/$actions/expand-cluster" \ --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 {"nodeParams":{"blockList":[{"blockId":"8F3K144","rackName":"syd47-f01c64-au421","$objectType":"clustermgmt.v4.config.BlockItem"}],"nodeList":[{"nodeUuid":"string","blockId":"9F3K144","nodePosition":"B","hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"hypervisorHostname":"hestia03-2","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","isLightCompute":true,"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"model":"NX-1065-G8","currentNetworkInterface":"eth0/eth1/Networkadapter1","networks":[{"name":"string","networks":["string"],"uplinks":{"active":[{"mac":"01:2B:3C:4D:5E:6F","name":"Main-Uplink","value":"10.0.0.1","$objectType":"clustermgmt.v4.config.UplinksField"}],"standby":[{"mac":"01:2B:3C:4D:5E:6F","name":"Main-Uplink","value":"10.0.0.1","$objectType":"clustermgmt.v4.config.UplinksField"}],"$objectType":"clustermgmt.v4.config.Uplinks"},"vswitchExtId":"123e4567-e89b-12d3-a456-426614174000","$objectType":"clustermgmt.v4.config.UplinkNetworkItem"}],"luksStatus":"$UNKNOWN","$objectType":"clustermgmt.v4.config.NodeItem"}],"computeNodeList":[{"nodeUuid":"string","blockId":"RU-987654321","nodePosition":"B","hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"hypervisorHostname":"hv-cluster-01","model":"NX-5000","$objectType":"clustermgmt.v4.config.ComputeNodeItem"}],"hypervisorIsos":[{"type":"$UNKNOWN","md5Sum":"Foremptystring==>d41d8cd98f00b204e9800998ecf8427e","$objectType":"clustermgmt.v4.config.HypervisorIsoMap"}],"hypervSku":"datacenter_gui","bundleInfo":{"name":"TestBundleName","$objectType":"clustermgmt.v4.config.BundleInfo"},"shouldSkipHostNetworking":true,"$objectType":"clustermgmt.v4.config.NodeParam"},"configParams":{"shouldSkipDiscovery":true,"shouldSkipImaging":true,"shouldValidateRackAwareness":true,"isNosCompatible":true,"isComputeOnly":true,"isNeverScheduleable":true,"targetHypervisor":"kvm","hyperv":{"domainDetails":{"userName":"TestUserName","password":"TestUserPassword","clusterName":"TestClusterName","$objectType":"clustermgmt.v4.config.UserInfo"},"failoverClusterDetails":{"userName":"TestUserName","password":"TestUserPassword","clusterName":"TestClusterName","$objectType":"clustermgmt.v4.config.UserInfo"},"$objectType":"clustermgmt.v4.config.HypervCredentials"},"$objectType":"clustermgmt.v4.config.ConfigParams"},"shouldSkipAddNode":true,"shouldSkipPreExpandChecks":true,"$objectType":"clustermgmt.v4.config.ExpandClusterParams"} \ - 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 {"nodeParams":{"blockList":[{"blockId":"8F3K144","rackName":"syd47-f01c64-au421","$objectType":"clustermgmt.v4.config.BlockItem"}],"nodeList":[{"nodeUuid":"string","blockId":"9F3K144","nodePosition":"B","hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"hypervisorHostname":"hestia03-2","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","isLightCompute":true,"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"model":"NX-1065-G8","currentNetworkInterface":"eth0/eth1/Networkadapter1","networks":[{"name":"string","networks":["string"],"uplinks":{"active":[{"mac":"01:2B:3C:4D:5E:6F","name":"Main-Uplink","value":"10.0.0.1","$objectType":"clustermgmt.v4.config.UplinksField"}],"standby":[{"mac":"01:2B:3C:4D:5E:6F","name":"Main-Uplink","value":"10.0.0.1","$objectType":"clustermgmt.v4.config.UplinksField"}],"$objectType":"clustermgmt.v4.config.Uplinks"},"vswitchExtId":"123e4567-e89b-12d3-a456-426614174000","$objectType":"clustermgmt.v4.config.UplinkNetworkItem"}],"luksStatus":"$UNKNOWN","$objectType":"clustermgmt.v4.config.NodeItem"}],"computeNodeList":[{"nodeUuid":"string","blockId":"RU-987654321","nodePosition":"B","hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"hypervisorHostname":"hv-cluster-01","model":"NX-5000","$objectType":"clustermgmt.v4.config.ComputeNodeItem"}],"hypervisorIsos":[{"type":"$UNKNOWN","md5Sum":"Foremptystring==>d41d8cd98f00b204e9800998ecf8427e","$objectType":"clustermgmt.v4.config.HypervisorIsoMap"}],"hypervSku":"datacenter_gui","bundleInfo":{"name":"TestBundleName","$objectType":"clustermgmt.v4.config.BundleInfo"},"shouldSkipHostNetworking":true,"$objectType":"clustermgmt.v4.config.NodeParam"},"configParams":{"shouldSkipDiscovery":true,"shouldSkipImaging":true,"shouldValidateRackAwareness":true,"isNosCompatible":true,"isComputeOnly":true,"isNeverScheduleable":true,"targetHypervisor":"kvm","hyperv":{"domainDetails":{"userName":"TestUserName","password":"TestUserPassword","clusterName":"TestClusterName","$objectType":"clustermgmt.v4.config.UserInfo"},"failoverClusterDetails":{"userName":"TestUserName","password":"TestUserPassword","clusterName":"TestClusterName","$objectType":"clustermgmt.v4.config.UserInfo"},"$objectType":"clustermgmt.v4.config.HypervCredentials"},"$objectType":"clustermgmt.v4.config.ConfigParams"},"shouldSkipAddNode":true,"shouldSkipPreExpandChecks":true,"$objectType":"clustermgmt.v4.config.ExpandClusterParams"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/66aF5681-EebF-FDBb-eadf-eBf0E11E7ceD/$actions/expand-cluster" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n ExpandClusterParams\ \ expandClusterParams = new ExpandClusterParams();\n\n // ExpandClusterParams\ \ object initializations here...\n expandClusterParams.NodeParams =\ \ new NodeParam(); // required field\n\n String clusterExtId = \"\ 1b35a0B8-eEC5-7B9d-2Dfb-50E3Be9cDdEd\";\n\n // Create request object\ \ with parameters\n var request = new ExpandClusterRequest {\n \ \ ClusterExtId = clusterExtId,\n Body = expandClusterParams\n\ \ };\n try {\n ExpandClusterApiResponse expandClusterApiResponse\ \ = clustersApi.ExpandCluster(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements: post: tags: - Clusters summary: Get hypervisor ISO upload information description: Provides information on whether hypervisor ISO upload is required or not. This API is not supported for XEN hypervisor type. operationId: checkHypervisorRequirements parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 4cf5f328-6ece-47df-a4f6-e3e7a12ebd37 requestBody: description: Parameters to get information on whether hypervisor ISO upload is required or not. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorUploadParam' required: true responses: "202": description: Provides information on whether hypervisor ISO upload is required or not. This API is not supported for XEN hypervisor type. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements\ \ Post operation" x-permissions: operationName: Check Cluster Hypervisor Requirements deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.CheckHypervisorRequirementsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.HypervisorUploadParam;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.CheckHypervisorRequirementsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n HypervisorUploadParam\ \ hypervisorUploadParam = new HypervisorUploadParam();\n\n // HypervisorUploadParam\ \ object initializations here...\n hypervisorUploadParam.setNodeList(new\ \ ArrayList<>()); // required field\n \n String clusterExtId\ \ = \"A6aBdF68-c0aF-1157-ACb2-F55Ebbf26B84\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n CheckHypervisorRequirementsApiResponse\ \ checkHypervisorRequirementsApiResponse = clustersApi.checkHypervisorRequirements(CheckHypervisorRequirementsRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ hypervisorUploadParam);\n\n System.out.println(checkHypervisorRequirementsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, HypervisorUploadParam } from \"\ @nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let hypervisorUploadParam = new HypervisorUploadParam();\n\n \ \ // HypervisorUploadParam object initializations here...\n hypervisorUploadParam.setNodeList([]);\ \ // required field\n hypervisorUploadParam = JSON.stringify(hypervisorUploadParam);\n\ \n \n let clusterExtId = \"Fe5cc5CF-fDFF-41Cd-cAdE-7AfFdF9fFCEC\"\ ;\n\n\n\n\n\n clustersApi.checkHypervisorRequirements(clusterExtId, hypervisorUploadParam).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ hypervisorUploadParam = ntnx_clustermgmt_py_client.HypervisorUploadParam()\n\ \n # HypervisorUploadParam object initializations here...\n hypervisorUploadParam.node_list\ \ = [] # required field\n \n cluster_ext_id = \"5dbBca93-cA54-B09D-c9DE-DaECcd6bef0a\"\ \n\n\n try:\n api_response = clusters_api.check_hypervisor_requirements(clusterExtId=cluster_ext_id,\ \ body=hypervisorUploadParam)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n hypervisorUploadParam := import1.NewHypervisorUploadParam()\n\ \n // HypervisorUploadParam object initializations here...\n\n \n\ \ clusterExtId := \"4Bfa0dac-048f-5B06-577F-23CFF0FFeb65\"\n\n\n request\ \ := clusters.CheckHypervisorRequirementsRequest{ ClusterExtId: &clusterExtId,\ \ Body: hypervisorUploadParam }\n response, error := ClustersServiceApiInstance.CheckHypervisorRequirements(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/clustermgmt/v4.2/config/clusters/2750Cfa7-AE62-ffb3-f01C-b5dB6CAfDFFA/$actions/check-hypervisor-requirements" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"nodeList":[{"nodeUuid":"string","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","model":"NX-8155-G","blockId":"8F3K144","isLightCompute":true,"hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"isMinimumComputeNode":true,"luksStatus":"$UNKNOWN","$objectType":"clustermgmt.v4.config.HypervisorUploadNodeListItem"}],"$objectType":"clustermgmt.v4.config.HypervisorUploadParam"} \ - 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 {"nodeList":[{"nodeUuid":"string","hypervisorVersion":"Nutanix20220304.480","nosVersion":"7.0","model":"NX-8155-G","blockId":"8F3K144","isLightCompute":true,"hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"isMinimumComputeNode":true,"luksStatus":"$UNKNOWN","$objectType":"clustermgmt.v4.config.HypervisorUploadNodeListItem"}],"$objectType":"clustermgmt.v4.config.HypervisorUploadParam"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/dCDEFaEf-AeE3-03fb-17f6-1BA2F4FA1bf7/$actions/check-hypervisor-requirements" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n HypervisorUploadParam\ \ hypervisorUploadParam = new HypervisorUploadParam();\n\n // HypervisorUploadParam\ \ object initializations here...\n hypervisorUploadParam.NodeList =\ \ new ArrayList(); // required field\n\n String clusterExtId = \"\ ef3cb5De-EDdf-eDA9-e8fA-cABF92980f0C\";\n\n // Create request object\ \ with parameters\n var request = new CheckHypervisorRequirementsRequest\ \ {\n ClusterExtId = clusterExtId,\n Body = hypervisorUploadParam\n\ \ };\n try {\n CheckHypervisorRequirementsApiResponse\ \ checkHypervisorRequirementsApiResponse = clustersApi.CheckHypervisorRequirements(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/validate-node: post: tags: - Clusters summary: Validates hypervisor bundle and node uplinks description: Validates hypervisor bundle and node uplinks of the node. This API is not supported for XEN hypervisor type. operationId: validateNode parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: c4fc9ef4-cdfe-4d0c-8795-0f715cb805e1 requestBody: description: Request body for node validation. It can be OneOf between hypervisor bundle and node uplinks. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ValidateNodeParam' required: true responses: "202": description: Task generated for node validation. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/validate-node\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/validate-node\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/validate-node\ \ Post operation" x-permissions: operationName: Validate Cluster Node deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ValidateNodeRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ValidateNodeParam;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.ValidateNodeApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n ValidateNodeParam\ \ validateNodeParam = new ValidateNodeParam();\n\n // ValidateNodeParam\ \ object initializations here...\n validateNodeParam.setSpec(SOME_RAW_DATA);\ \ // required field\n \n String clusterExtId = \"6B1DfB3b-bB4C-6feA-d7CE-E1F2FA85E12b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ValidateNodeApiResponse\ \ validateNodeApiResponse = clustersApi.validateNode(ValidateNodeRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ validateNodeParam);\n\n System.out.println(validateNodeApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, ValidateNodeParam } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let validateNodeParam = new ValidateNodeParam();\n\n // ValidateNodeParam\ \ object initializations here...\n validateNodeParam.setSpec(SOME_RAW_DATA);\ \ // required field\n validateNodeParam = JSON.stringify(validateNodeParam);\n\ \n \n let clusterExtId = \"DF2A5f0F-Df3f-0c11-3eab-dbBDdfBEAEb0\"\ ;\n\n\n\n\n\n clustersApi.validateNode(clusterExtId, validateNodeParam).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ validateNodeParam = ntnx_clustermgmt_py_client.ValidateNodeParam()\n\ \n # ValidateNodeParam object initializations here...\n validateNodeParam.spec\ \ = SOME_RAW_DATA # required field\n \n cluster_ext_id = \"25Fca5DE-bed0-01fc-FfBC-bd3f0CaDaDae\"\ \n\n\n try:\n api_response = clusters_api.validate_node(clusterExtId=cluster_ext_id,\ \ body=validateNodeParam)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n validateNodeParam := import1.NewValidateNodeParam()\n\ \n // ValidateNodeParam object initializations here...\n\n \n clusterExtId\ \ := \"DFeFedA6-C51d-cFfC-FcCB-d7A682b55AAC\"\n\n\n request := clusters.ValidateNodeRequest{\ \ ClusterExtId: &clusterExtId, Body: validateNodeParam }\n response,\ \ error := ClustersServiceApiInstance.ValidateNode(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/clustermgmt/v4.2/config/clusters/B9bAF4ca-Caeb-30AC-1D3E-FeBEEddb19e5/$actions/validate-node" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"spec":{"bundleInfo":{"name":"TestBundleName","$objectType":"clustermgmt.v4.config.BundleInfo"},"nodeList":[{"nodeUuid":"string","blockId":"RU-123456789","nodePosition":"A","hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"hypervisorHostname":"string","hypervisorVersion":"Nutanix20220304.480","nosVersion":"6.5.4","isLightCompute":true,"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"model":"string","currentNetworkInterface":"string","$objectType":"clustermgmt.v4.config.NodeInfo"}],"$objectType":"clustermgmt.v4.config.BundleParam"},"$objectType":"clustermgmt.v4.config.ValidateNodeParam"} \ - 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 {"spec":{"bundleInfo":{"name":"TestBundleName","$objectType":"clustermgmt.v4.config.BundleInfo"},"nodeList":[{"nodeUuid":"string","blockId":"RU-123456789","nodePosition":"A","hypervisorType":"$UNKNOWN","isRoboMixedHypervisor":true,"hypervisorHostname":"string","hypervisorVersion":"Nutanix20220304.480","nosVersion":"6.5.4","isLightCompute":true,"ipmiIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"digitalCertificateMapList":[{"key":"TestDigitalcertificateKeyName","value":"TestDigitalcertificateKeyValue","$objectType":"clustermgmt.v4.config.DigitalCertificateMapReference"}],"cvmIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"hypervisorIp":{"ipv4":{"value":"string","prefixLength":32,"$objectType":"common.v1.config.IPv4Address"},"ipv6":{"value":"string","prefixLength":128,"$objectType":"common.v1.config.IPv6Address"},"$objectType":"common.v1.config.IPAddress"},"model":"string","currentNetworkInterface":"string","$objectType":"clustermgmt.v4.config.NodeInfo"}],"$objectType":"clustermgmt.v4.config.BundleParam"},"$objectType":"clustermgmt.v4.config.ValidateNodeParam"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/bcFecAf3-DbD7-d5CD-eFf0-CAbc5ebcb4D9/$actions/validate-node" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n ValidateNodeParam\ \ validateNodeParam = new ValidateNodeParam();\n\n // ValidateNodeParam\ \ object initializations here...\n validateNodeParam.Spec = SOME_RAW_DATA;\ \ // required field\n\n String clusterExtId = \"bDDCECC1-B7CA-DD7f-aBFA-48eab1a6Ffc4\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ValidateNodeRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = validateNodeParam\n };\n try {\n \ \ ValidateNodeApiResponse validateNodeApiResponse = clustersApi.ValidateNode(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/remove-node: post: tags: - Clusters summary: Remove nodes from the cluster description: "Removes nodes from cluster identified by {extId}." operationId: removeNode parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: adafed34-0f37-4279-999d-f0daf92ebb09 - 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: 6775b20b-64ec-44ca-9fec-0f31cc2d68ce requestBody: description: Parameters to remove nodes from cluster. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeRemovalParams' required: true responses: "202": description: Task generated for node removal. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/remove-node\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/remove-node\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/remove-node\ \ Post operation" x-permissions: operationName: Remove Cluster Node deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.RemoveNodeRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.NodeRemovalParams;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.RemoveNodeApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n NodeRemovalParams\ \ nodeRemovalParams = new NodeRemovalParams();\n\n // NodeRemovalParams\ \ object initializations here...\n nodeRemovalParams.setNodeUuids(new\ \ ArrayList<>()); // required field\n \n String clusterExtId\ \ = \"420e9dDa-3A31-Bba6-e0Ef-Db7de70D0eF1\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n RemoveNodeApiResponse removeNodeApiResponse\ \ = clustersApi.removeNode(RemoveNodeRequest.builder()\n \ \ .clusterExtId(clusterExtId)\n .build(), nodeRemovalParams);\n\ \n System.out.println(removeNodeApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, NodeRemovalParams } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let nodeRemovalParams = new NodeRemovalParams();\n\n // NodeRemovalParams\ \ object initializations here...\n nodeRemovalParams.setNodeUuids([]);\ \ // required field\n nodeRemovalParams = JSON.stringify(nodeRemovalParams);\n\ \n \n let clusterExtId = \"fe6dacA9-7bAb-5ba3-DBD9-cE0c4a51517b\"\ ;\n\n\n\n\n\n clustersApi.removeNode(clusterExtId, nodeRemovalParams).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ nodeRemovalParams = ntnx_clustermgmt_py_client.NodeRemovalParams()\n\ \n # NodeRemovalParams object initializations here...\n nodeRemovalParams.node_uuids\ \ = [] # required field\n \n cluster_ext_id = \"6aF85ED6-DDfb-b0F6-4eb1-bB4EDaE4efa5\"\ \n\n\n try:\n api_response = clusters_api.remove_node(clusterExtId=cluster_ext_id,\ \ body=nodeRemovalParams)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n nodeRemovalParams := import1.NewNodeRemovalParams()\n\ \n // NodeRemovalParams object initializations here...\n\n \n clusterExtId\ \ := \"2C735fC1-CBB8-bdfA-dd27-83D48BF5e5EE\"\n\n\n request := clusters.RemoveNodeRequest{\ \ ClusterExtId: &clusterExtId, Body: nodeRemovalParams }\n response,\ \ error := ClustersServiceApiInstance.RemoveNode(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/clustermgmt/v4.2/config/clusters/28AfafCB-0fDA-bcEE-cC82-fDBe7fA1A8de/$actions/remove-node" \ --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 {"shouldSkipPrechecks":true,"shouldSkipRemove":true,"nodeUuids":["string"],"extraParams":{"shouldSkipUpgradeCheck":true,"shouldSkipSpaceCheck":true,"shouldSkipAddCheck":true,"$objectType":"clustermgmt.v4.config.NodeRemovalExtraParam"},"$objectType":"clustermgmt.v4.config.NodeRemovalParams"} \ - 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 {"shouldSkipPrechecks":true,"shouldSkipRemove":true,"nodeUuids":["string"],"extraParams":{"shouldSkipUpgradeCheck":true,"shouldSkipSpaceCheck":true,"shouldSkipAddCheck":true,"$objectType":"clustermgmt.v4.config.NodeRemovalExtraParam"},"$objectType":"clustermgmt.v4.config.NodeRemovalParams"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/3B3EE6eb-AbD4-Ff8d-90ab-C4eb8Ff90569/$actions/remove-node" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n NodeRemovalParams\ \ nodeRemovalParams = new NodeRemovalParams();\n\n // NodeRemovalParams\ \ object initializations here...\n nodeRemovalParams.NodeUuids = new\ \ ArrayList(); // required field\n\n String clusterExtId = \"088Db9e3-aCDB-eAaa-b23F-f8Ea19AeD7FF\"\ ;\n\n // Create request object with parameters\n var request\ \ = new RemoveNodeRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = nodeRemovalParams\n };\n try {\n \ \ RemoveNodeApiResponse removeNodeApiResponse = clustersApi.RemoveNode(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/task-response/{extId}: get: tags: - Clusters summary: Get task response based on the type of request description: Get task response based on the type of request. operationId: fetchTaskResponse parameters: - name: extId in: path description: The external identifier of the task. 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: 3faf58b8-3a27-4a81-a315-5c139db73f00 - name: taskResponseType in: query required: true style: form explode: true schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.TaskResponseType' responses: "200": description: Get the response based on the search type. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.TaskResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/task-response/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/task-response/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/task-response/{extId}\ \ Get operation" x-permissions: operationName: Fetch Task Response deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.FetchTaskResponseRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.FetchTaskApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String extId = \"abffac2d-eb3B-ACf7-b37E-7feEA7eAfB74\";\n \ \ \n Object taskResponseType = SOME_RAW_DATA;\n\n try {\n\ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n FetchTaskApiResponse fetchTaskApiResponse\ \ = clustersApi.fetchTaskResponse(FetchTaskResponseRequest.builder()\n \ \ .extId(extId)\n .taskResponseType(taskResponseType)\n\ \ .build());\n\n System.out.println(fetchTaskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"A0ACa6bf-4Bea-9D1d-8Bde-9f3bCba8FEbD\";\n\ \ \n let taskResponseType = SOME_RAW_DATA;\n\n\n\n\n\n clustersApi.fetchTaskResponse(extId,\ \ taskResponseType).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n ext_id = \"dcdCeD9f-d2D6-ECA6-C28b-dfa8ec116CC6\"\n \n \ \ task_response_type = SOME_RAW_DATA\n\n\n try:\n api_response\ \ = clusters_api.fetch_task_response(extId=ext_id, _taskResponseType=task_response_type)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"B1fbEFE2-3A9f-5aBf-feC0-07DFfeccfeaD\"\ \n \n taskResponseType := SOME_RAW_DATA\n\n\n request := clusters.FetchTaskResponseRequest{\ \ ExtId: &extId, TaskResponseType: &taskResponseType }\n response, error\ \ := ClustersServiceApiInstance.FetchTaskResponse(ctx, &request)\n if\ \ error != nil {\n fmt.Println(error)\n return\n }\n \ \ data, _ := response.GetData().(import1.TaskResponse)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/task-response/E73ede87-F50a-f8Fb-3b5D-c5dd26FA25AA?taskResponseType=SOME_RAW_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/clustermgmt/v4.2/config/task-response/E81EFFAc-ECb9-6afa-e2ad-e37D5ccCffbb?taskResponseType=SOME_RAW_DATA" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ extId = \"Ffef323D-a7DF-e2fd-8dE9-BACa0bff2FCD\";\n Object taskResponseType\ \ = SOME_RAW_DATA;\n\n // Create request object with parameters\n\ \ var request = new FetchTaskResponseRequest {\n ExtId\ \ = extId,\n TaskResponseType = taskResponseType\n };\n\ \ try {\n FetchTaskApiResponse fetchTaskApiResponse =\ \ clustersApi.FetchTaskResponse(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles: get: tags: - Clusters summary: List Virtual GPU profiles. description: List Virtual GPU profiles. operationId: listVirtualGpuProfiles parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: c16fb36d-1034-4e34-9e4f-be05e46af5e6 - 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: virtualGpuConfig/deviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/deviceId\ \ eq 69" - name: virtualGpuConfig/deviceName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/deviceName\ \ eq 'Test Device Name'" - name: virtualGpuConfig/frameBufferSizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/frameBufferSizeBytes\ \ eq 16" - name: virtualGpuConfig/maxInstancesPerVm example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/maxInstancesPerVm\ \ eq 91" - name: virtualGpuConfig/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/type\ \ eq Clustermgmt.Config.GpuType'PASSTHROUGH_GRAPHICS'" - name: virtualGpuConfig/vendorName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$filter=virtualGpuConfig/vendorName\ \ eq 'Test Vendor Name'" - 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: virtualGpuConfig/deviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$orderby=virtualGpuConfig/deviceId" - name: virtualGpuConfig/frameBufferSizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles?$orderby=virtualGpuConfig/frameBufferSizeBytes" responses: "200": description: The requested virtual GPU profiles in a cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualGpuProfile' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles\ \ Get operation" x-permissions: operationName: View Cluster Vgpu Profiles deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListVirtualGpuProfilesRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListVirtualGpuProfilesApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"BCcf728b-0d1c-EfAF-705f-BEdC5dE7EbEA\"\ ;\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 ListVirtualGpuProfilesApiResponse\ \ listVirtualGpuProfilesApiResponse = clustersApi.listVirtualGpuProfiles(ListVirtualGpuProfilesRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listVirtualGpuProfilesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"7d87a89B-c1A5-0fbA-edE6-c6dd9CaA2EAf\"\ ;\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 clustersApi.listVirtualGpuProfiles(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"B986FA2F-bd4a-ae4A-f6AE-fD89CbdeCdC2\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_virtual_gpu_profiles(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"Ecc9b5bF-Fbbd-Ad96-BBcE-0Da3ECEd632c\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := clusters.ListVirtualGpuProfilesRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := ClustersServiceApiInstance.ListVirtualGpuProfiles(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VirtualGpuProfile)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/58BccFdB-8fc3-ac3E-EadD-5AdC0FDaeBad/virtual-gpu-profiles?$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/clustermgmt/v4.2/config/clusters/C09Ed0F9-DcEC-F5c1-c3E8-EFcF9B14eAE9/virtual-gpu-profiles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"a5e4d0Ad-Ae3c-837f-9C2C-BdEd7BdFCA8b\";\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 ListVirtualGpuProfilesRequest\ \ {\n ClusterExtId = clusterExtId,\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby\n };\n try {\n ListVirtualGpuProfilesApiResponse\ \ listVirtualGpuProfilesApiResponse = clustersApi.ListVirtualGpuProfiles(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles: get: tags: - Clusters summary: List Physical GPU profiles. description: List Physical GPU profiles. operationId: listPhysicalGpuProfiles parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 8c4cc854-dbe5-4fe9-881a-adf69ee67112 - 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: physicalGpuConfig/deviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$filter=physicalGpuConfig/deviceId\ \ eq 52" - name: physicalGpuConfig/deviceName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$filter=physicalGpuConfig/deviceName\ \ eq 'Test Device Name'" - name: physicalGpuConfig/frameBufferSizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$filter=physicalGpuConfig/frameBufferSizeBytes\ \ eq 68" - name: physicalGpuConfig/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$filter=physicalGpuConfig/type\ \ eq Clustermgmt.Config.GpuType'PASSTHROUGH_GRAPHICS'" - name: physicalGpuConfig/vendorName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$filter=physicalGpuConfig/vendorName\ \ eq 'Test Vendor Name'" - 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: physicalGpuConfig/deviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$orderby=physicalGpuConfig/deviceId" - name: physicalGpuConfig/frameBufferSizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles?$orderby=physicalGpuConfig/frameBufferSizeBytes" responses: "200": description: The requested physical GPU profiles in a cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.PhysicalGpuProfile' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles\ \ Get operation" x-permissions: operationName: View Cluster Pgpu Profiles deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListPhysicalGpuProfilesRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListPhysicalGpuProfilesApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"Dfcc5Bbd-cBCD-4d3e-A6aF-6138e8AB94Fb\"\ ;\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 ListPhysicalGpuProfilesApiResponse\ \ listPhysicalGpuProfilesApiResponse = clustersApi.listPhysicalGpuProfiles(ListPhysicalGpuProfilesRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .build());\n\n System.out.println(listPhysicalGpuProfilesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"CAb4BDa1-f2Fb-8de0-a574-D9912ddDCeCD\"\ ;\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 clustersApi.listPhysicalGpuProfiles(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"A44c1DC3-DcfD-AcaA-eadb-2aAC064Cf2f0\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_physical_gpu_profiles(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"A8853b6F-78Bb-B3a8-f2Be-BD0a1e7795F2\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := clusters.ListPhysicalGpuProfilesRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil }\n response, error := ClustersServiceApiInstance.ListPhysicalGpuProfiles(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.PhysicalGpuProfile)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/0ddEb3Db-129c-EF2C-5Db9-1eD5cD9DEcD8/physical-gpu-profiles?$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/clustermgmt/v4.2/config/clusters/6EFb14aD-59B0-b5D0-Feb8-c9ED0bccF2Bd/physical-gpu-profiles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"Ad78bADC-3AA3-2cfc-ed3d-3EA48ffC7B7f\";\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 ListPhysicalGpuProfilesRequest\ \ {\n ClusterExtId = clusterExtId,\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby\n };\n try {\n ListPhysicalGpuProfilesApiResponse\ \ listPhysicalGpuProfilesApiResponse = clustersApi.ListPhysicalGpuProfiles(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/hosts: get: tags: - Clusters summary: Get the list of all host entities description: Lists all host entities across clusters registered to Prism Central. operationId: listHosts 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: bootTimeUsecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=bootTimeUsecs\ \ eq 13" - name: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=cluster/name\ \ eq 'Test Cluster Name'" - name: cluster/uuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=cluster/uuid\ \ eq 'a596ed35-8647-4ea0-b6f2-994fe2459f22'" - name: cpuCapacityHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=cpuCapacityHz\ \ eq 20" - name: cpuFrequencyHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=cpuFrequencyHz\ \ eq 85" - name: cpuModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=cpuModel\ \ eq 'Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz'" - name: defaultVhdContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=defaultVhdContainerUuid\ \ eq 'b9dec220-d9d4-43a2-ab40-d760e2d9a26e'" - name: defaultVhdLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=defaultVhdLocation\ \ eq 'Test path of Default VHD location, default value is null'" - name: defaultVmContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=defaultVmContainerUuid\ \ eq 'a1ac6433-f0d3-480a-baa1-aa38a39a2521'" - name: defaultVmLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=defaultVmLocation\ \ eq 'Test path of Default VHD location, default value is null'" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: gpuDriverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=gpuDriverVersion\ \ eq '00061837-4b34-720c-6a02-043201338600'" - name: gpuList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=gpuList/any(a:a\ \ eq ' gpu name: Nvidia_GRID_T4-1B')" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=hostName\ \ eq 'Test Host Name mostly IPV4 address'" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=hypervisor/type\ \ eq Clustermgmt.Config.HypervisorType'AHV'" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=memorySizeBytes\ \ eq 79" - name: numberOfCpuCores example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=numberOfCpuCores\ \ eq 95" - name: numberOfCpuSockets example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=numberOfCpuSockets\ \ eq 61" - name: numberOfCpuThreads example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$filter=numberOfCpuThreads\ \ eq 1" - 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: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=cluster/name" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=extId" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=hostName" - name: hostType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=hostType" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=hypervisor/type" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$orderby=memorySizeBytes" - name: $apply in: query description: "A URL query parameter that allows clients to specify a sequence\ \ of transformations to the entity set, such as groupby, filter, aggregate\ \ etc. As of now only support for groupby exists.For example '$apply=groupby((templateName))'\ \ would get all templates grouped by templateName." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: cluster/name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$apply=groupby(cluster/name)" - name: hypervisor/type example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$apply=groupby(hypervisor/type)" - 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: blockModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=blockModel" - name: blockSerial example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=blockSerial" - name: bootTimeUsecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=bootTimeUsecs" - name: cluster example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=cluster" - name: cpuCapacityHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=cpuCapacityHz" - name: cpuFrequencyHz example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=cpuFrequencyHz" - name: cpuModel example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=cpuModel" - name: defaultVhdContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=defaultVhdContainerUuid" - name: defaultVhdLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=defaultVhdLocation" - name: defaultVmContainerUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=defaultVmContainerUuid" - name: defaultVmLocation example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=defaultVmLocation" - name: failoverClusterFqdn example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=failoverClusterFqdn" - name: failoverClusterNodeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=failoverClusterNodeStatus" - name: gpuDriverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=gpuDriverVersion" - name: gpuList example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=gpuList" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=hostName" - name: hostType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=hostType" - name: isRebootPending example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=isRebootPending" - name: maintenanceState example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=maintenanceState" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=memorySizeBytes" - name: nodeStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=nodeStatus" - name: numberOfCpuCores example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=numberOfCpuCores" - name: numberOfCpuSockets example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=numberOfCpuSockets" - name: numberOfCpuThreads example: "https://{host}:{port}/api/clustermgmt/v4.2/config/hosts?$select=numberOfCpuThreads" responses: "200": description: The requested Host entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/hosts 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/hosts 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/hosts Get operation x-permissions: operationName: View Host deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Storage Admin - name: VPC Admin - name: Network Infra Admin - name: Cluster Admin - name: Cluster Viewer - name: Virtual Machine Admin - name: Virtual Machine Operator - name: NCM Connector 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListHostsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListHostsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(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 ListHostsApiResponse listHostsApiResponse\ \ = clustersApi.listHosts(ListHostsRequest.builder()\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$apply(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listHostsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClustersApi } from "@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(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["$apply"] = "string_sample_data"; opts["$select"] = "string_sample_data"; clustersApi.listHosts(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_hosts(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := clusters.ListHostsRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Apply_: nil, Select_: nil }\n \ \ response, error := ClustersServiceApiInstance.ListHosts(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.Host)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/hosts?$apply=string_sample_data&$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/clustermgmt/v4.2/config/hosts?$apply=string_sample_data&$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n int page\ \ = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String apply =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListHostsRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Apply = apply,\n Select = select\n };\n \ \ try {\n ListHostsApiResponse listHostsApiResponse = clustersApi.ListHosts(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics: get: tags: - Clusters summary: Get a list of host NICs description: "Lists all host NICs for the host identified by {hostExtId} belonging\ \ to the cluster identified by {clusterExtId}." operationId: listHostNicsByHostId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: f3e82f09-ee52-4db2-a48a-31ef8d82ba70 - name: hostExtId in: path description: Indicates the UUID of a host. 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: c431d22b-6d36-4ba2-b5e7-7ba0fda290b0 - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=clusterExtId\ \ eq 'e281eade-28d1-41dc-a836-62f571f95a19'" - name: discoveryProtocol example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=discoveryProtocol\ \ eq 'NDP,LLDP'" - name: driverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=driverVersion\ \ eq 'i40e:2.26.8'" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: firmwareVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=firmwareVersion\ \ eq '8.50 0x8000be22 1.3082.0'" - name: hostDescription example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=hostDescription\ \ eq 'Test Host Description'" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=interfaceStatus\ \ eq 'Up,Down'" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=isDhcpEnabled\ \ eq false" - name: linkCapacityInMbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=linkCapacityInMbps\ \ eq 36" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=linkSpeedInKbps\ \ eq 97" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=macAddress\ \ eq '6c:be:ff:41:80:b7'" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=mtuInBytes\ \ eq 71" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=name\ \ eq 'Test host NIC name'" - name: nicProfileExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=nicProfileExtId\ \ eq '96153bf4-9f43-4ecc-b695-9969db76c67b'" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=nodeUuid\ \ eq 'ad5d0010-1639-4355-afe3-844c63f49511'" - name: pciModelId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=pciModelId\ \ eq '15b3:a2d6'" - name: rxRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=rxRingSizeInBytes\ \ eq 54" - name: supportedCapabilities example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=supportedCapabilities/any(a:a\ \ eq 'SRIOV,DPOFFLOAD')" - name: switchDeviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=switchDeviceId\ \ eq 'p4r6r08-leaf2'" - name: switchMacAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=switchMacAddress\ \ eq 'a4:08:c4:ee:a2:cd'" - name: switchPortId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=switchPortId\ \ eq 'ethernet5:3'" - name: switchVlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=switchVlanId\ \ eq '4095'" - name: txRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=txRingSizeInBytes\ \ eq 29" - name: virtualSwitchExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$filter=virtualSwitchExtId\ \ eq '84487385-6ab9-491c-af45-6400d64c8f85'" - 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/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$orderby=extId" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$orderby=name" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$orderby=nodeUuid" - 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: discoveryProtocol example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=discoveryProtocol" - name: hostDescription example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=hostDescription" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=interfaceStatus" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=isDhcpEnabled" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=linkSpeedInKbps" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=macAddress" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=mtuInBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=name" - name: nicProfileExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=nicProfileExtId" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=nodeUuid" - name: pciModelId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=pciModelId" - name: rxRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=rxRingSizeInBytes" - name: switchDeviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=switchDeviceId" - name: switchMacAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=switchMacAddress" - name: switchManagementIp example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=switchManagementIp" - name: switchPortId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=switchPortId" - name: switchVlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=switchVlanId" - name: txRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=txRingSizeInBytes" - name: virtualSwitchExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics?$select=virtualSwitchExtId" responses: "200": description: The requested host NIC entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics\ \ Get operation" x-permissions: operationName: View Cluster Host Nic deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListHostNicsByHostIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListHostNicsByHostIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"bBfEF0b8-60C1-cF8f-d1Ba-fD52F0AE6bB6\"\ ;\n \n String hostExtId = \"f4fA7feC-aBEF-CCbB-De1f-A2AdD4ce4bcb\"\ ;\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 ListHostNicsByHostIdApiResponse\ \ listHostNicsByHostIdApiResponse = clustersApi.listHostNicsByHostId(ListHostNicsByHostIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .hostExtId(hostExtId)\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listHostNicsByHostIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"CcaFB4E8-fcEc-BFeF-eEBd-dfe3Ef627f01\"\ ;\n \n let hostExtId = \"B3Fa4f1A-5D05-89CE-1A2F-b959DEaBf5b4\";\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 clustersApi.listHostNicsByHostId(clusterExtId,\ \ hostExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"102A9eCd-C3D5-AcaC-4C78-0CcDBAaCAe1C\"\n \ \ \n host_ext_id = \"1b8AA1b4-dd86-Ae45-2B8d-a53d96caBF68\"\n \n\ \ page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_host_nics_by_host_id(clusterExtId=cluster_ext_id,\ \ hostExtId=host_ext_id, _page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"5AAE5c66-2eE1-5B7a-5FeE-fA3aDdCaA0Ce\"\ \n \n hostExtId := \"Be2fDBd5-1BaD-35aD-AEc0-aFB012fF1FA3\"\n \n\ \ page_ := 0\n \n limit_ := 50\n\n\n request := clusters.ListHostNicsByHostIdRequest{\ \ ClusterExtId: &clusterExtId, HostExtId: &hostExtId, Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response, error\ \ := ClustersServiceApiInstance.ListHostNicsByHostId(ctx, &request)\n \ \ if error != nil {\n fmt.Println(error)\n return\n }\n\ \ data, _ := response.GetData().([]import1.HostNic)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/Bcab70bE-8aAF-E6cE-B7E6-4dA5EBdFcacA/hosts/cA6DdCEE-2bac-a226-7C3D-75Ee30BAEB60/host-nics?$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/clustermgmt/v4.2/config/clusters/Aefc3aB2-e5aE-9fcF-F85E-daAaB7B890Af/hosts/9aAA4cc4-23de-cb2c-E9a0-Eb524bdBBE0c/host-nics?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"6dC15Bfd-E7aC-66c5-6EcD-4Ab6BAd53EB9\";\n String\ \ hostExtId = \"43Aca7bD-DD8E-BD0D-d7ca-BFb3489b3faA\";\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 ListHostNicsByHostIdRequest {\n ClusterExtId\ \ = clusterExtId,\n HostExtId = hostExtId,\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListHostNicsByHostIdApiResponse listHostNicsByHostIdApiResponse\ \ = clustersApi.ListHostNicsByHostId(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/config/host-nics: get: tags: - Clusters summary: Lists all host NICs description: Fetches a list of all host NICs for all the clusters attached to the PC. operationId: listHostNics 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=clusterExtId\ \ eq 'e281eade-28d1-41dc-a836-62f571f95a19'" - name: discoveryProtocol example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=discoveryProtocol\ \ eq 'NDP,LLDP'" - name: driverVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=driverVersion\ \ eq 'i40e:2.26.8'" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: firmwareVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=firmwareVersion\ \ eq '8.50 0x8000be22 1.3082.0'" - name: hostDescription example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=hostDescription\ \ eq 'Test Host Description'" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=interfaceStatus\ \ eq 'Up,Down'" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=isDhcpEnabled\ \ eq false" - name: linkCapacityInMbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=linkCapacityInMbps\ \ eq 36" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=linkSpeedInKbps\ \ eq 97" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=macAddress\ \ eq '6c:be:ff:41:80:b7'" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=mtuInBytes\ \ eq 71" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=name\ \ eq 'Test host NIC name'" - name: nicProfileExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=nicProfileExtId\ \ eq '96153bf4-9f43-4ecc-b695-9969db76c67b'" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=nodeUuid\ \ eq 'ad5d0010-1639-4355-afe3-844c63f49511'" - name: pciModelId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=pciModelId\ \ eq '15b3:a2d6'" - name: rxRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=rxRingSizeInBytes\ \ eq 54" - name: supportedCapabilities example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=supportedCapabilities/any(a:a\ \ eq 'SRIOV,DPOFFLOAD')" - name: switchDeviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=switchDeviceId\ \ eq 'p4r6r08-leaf2'" - name: switchMacAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=switchMacAddress\ \ eq 'a4:08:c4:ee:a2:cd'" - name: switchPortId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=switchPortId\ \ eq 'ethernet5:3'" - name: switchVlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=switchVlanId\ \ eq '4095'" - name: txRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=txRingSizeInBytes\ \ eq 29" - name: virtualSwitchExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$filter=virtualSwitchExtId\ \ eq '84487385-6ab9-491c-af45-6400d64c8f85'" - 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/clustermgmt/v4.2/config/host-nics?$orderby=extId" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$orderby=name" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$orderby=nodeUuid" - 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: discoveryProtocol example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=discoveryProtocol" - name: hostDescription example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=hostDescription" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=interfaceStatus" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=isDhcpEnabled" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=linkSpeedInKbps" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=macAddress" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=mtuInBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=name" - name: nicProfileExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=nicProfileExtId" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=nodeUuid" - name: pciModelId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=pciModelId" - name: rxRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=rxRingSizeInBytes" - name: switchDeviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=switchDeviceId" - name: switchMacAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=switchMacAddress" - name: switchManagementIp example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=switchManagementIp" - name: switchPortId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=switchPortId" - name: switchVlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=switchVlanId" - name: txRingSizeInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=txRingSizeInBytes" - name: virtualSwitchExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/host-nics?$select=virtualSwitchExtId" responses: "200": description: The requested PC clusters' host NIC entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/host-nics 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/host-nics 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/host-nics Get operation x-permissions: operationName: View Host Nic deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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 versions: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListHostNicsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListHostNicsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(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 ListHostNicsApiResponse listHostNicsApiResponse\ \ = clustersApi.listHostNics(ListHostNicsRequest.builder()\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listHostNicsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, ClustersApi } from "@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(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["$select"] = "string_sample_data"; clustersApi.listHostNics(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_host_nics(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := clusters.ListHostNicsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := ClustersServiceApiInstance.ListHostNics(ctx, &request)\n if\ \ error != nil {\n fmt.Println(error)\n return\n }\n \ \ data, _ := response.GetData().([]import1.HostNic)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/host-nics?$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/clustermgmt/v4.2/config/host-nics?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\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 ListHostNicsRequest {\n Page = page,\n\ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Select = select\n };\n try {\n \ \ ListHostNicsApiResponse listHostNicsApiResponse = clustersApi.ListHostNics(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{extId}: get: tags: - Clusters summary: Get host NIC description: "Get the host NIC entity of the host identified by {hostExtId}\ \ belonging to the cluster identified by {clusterExtId}." operationId: getHostNicById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: c047a651-dfc2-48c4-8488-80de7d0fdd3e - name: hostExtId in: path description: Indicates the UUID of a host. 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: 66a5602c-db2d-4132-ba0c-25d47ffa3149 - name: extId in: path description: Indicates the UUID of a host NIC. 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: b33ba0bc-673b-47c7-845d-b461ed0c162d responses: "200": description: The requested host NIC entity. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Host Nic deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetHostNicByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetHostNicApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"cCaFc0E1-4a1f-D70F-1ecC-f0b8c6BDDeeC\"\ ;\n \n String hostExtId = \"4F4e85bc-D28C-db37-B0db-CEb6ea1FC068\"\ ;\n \n String extId = \"CBba0de4-b76d-AafC-CecC-e6B32fFdde59\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetHostNicApiResponse\ \ getHostNicApiResponse = clustersApi.getHostNicById(GetHostNicByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .hostExtId(hostExtId)\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getHostNicApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"AD110fAC-E2CB-7938-6ffa-cDDA7aBdb4Ed\"\ ;\n \n let hostExtId = \"072Fde1A-D6AF-9EaD-EBBF-dBE26C61AbBC\";\n\ \ \n let extId = \"AdFbadcF-3fD7-EC0F-cCCc-F1adeF4C78bD\";\n\n\n\n\ \n\n clustersApi.getHostNicById(clusterExtId, hostExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"6e925E2b-7E3f-D3Dd-dBB4-D1dafBBABabf\"\n \ \ \n host_ext_id = \"5AAC0Abc-9fAd-8dEd-cDa6-5FFCf2C04BBB\"\n \n\ \ ext_id = \"0c2fced9-1eec-bFC9-Aa14-B1a6ecCEF5FC\"\n\n\n try:\n \ \ api_response = clusters_api.get_host_nic_by_id(clusterExtId=cluster_ext_id,\ \ hostExtId=host_ext_id, extId=ext_id)\n print(api_response)\n \ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"4Ff9cCCD-04dD-9fEA-FF36-Cfbc0AD9dAeb\"\ \n \n hostExtId := \"cdfc58CC-95aa-EF82-Ef73-A41c7a3D2AdE\"\n \n\ \ extId := \"EE9ef5Df-dA8E-0ac0-cF1d-5a1D44edFCba\"\n\n\n request\ \ := clusters.GetHostNicByIdRequest{ ClusterExtId: &clusterExtId, HostExtId:\ \ &hostExtId, ExtId: &extId }\n response, error := ClustersServiceApiInstance.GetHostNicById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.HostNic)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/aa1Fe4DB-bC54-cACb-F0fe-6BF31C964b84/hosts/cACCd2ed-8Aab-9f8e-53Fe-9eB7337aeAdF/host-nics/2eFBCAEe-94B9-6c85-E7cD-ED5FeD4b8fe8" \ --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/clustermgmt/v4.2/config/clusters/dEb018Dd-D7D6-31b9-BAbB-eDDf5CfCdCe5/hosts/Acbb733c-e8CB-BFd9-ddFA-Ece5152e6ACC/host-nics/49b28dfa-ADDC-daAa-7cDE-068C91D7aaAd" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"b85e3aB9-3aE8-ecEa-f13e-ACdadB2dFCf5\";\n String\ \ hostExtId = \"F02ddB66-EaEF-df5a-A5e1-bDa68E0e9702\";\n String extId\ \ = \"eadaaCaD-ab5F-c3CE-b031-aa2ACaC72C0d\";\n\n // Create request\ \ object with parameters\n var request = new GetHostNicByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n HostExtId = hostExtId,\n\ \ ExtId = extId\n };\n try {\n GetHostNicApiResponse\ \ getHostNicApiResponse = clustersApi.GetHostNicById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics: get: tags: - Clusters summary: Get the list of virtual NICs description: "Lists all virtual NICs for the host identified by {extId} belonging\ \ to the cluster identified by {clusterExtId}." operationId: listVirtualNicsByHostId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 5a66d14b-04a7-4255-93b9-5b7c2196729c - name: hostExtId in: path description: Indicates the UUID of a host. 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: cfe8a16f-e2f6-4838-84cc-c8eafd3bb3c9 - 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/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=interfaceStatus\ \ eq 'Up,Down'" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=isDhcpEnabled\ \ eq true" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=linkSpeedInKbps\ \ eq 24" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=macAddress\ \ eq 'cb:8f:bb:91:0c:db'" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=mtuInBytes\ \ eq 22" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=name\ \ eq 'Test Virtual Nic Name'" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=nodeUuid\ \ eq '40a1df1d-59bf-4bd9-83ba-51c8f0e7785f'" - name: vlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$filter=vlanId\ \ eq 30" - 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/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$orderby=extId" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$orderby=name" - 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: hostDescription example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=hostDescription" - name: interfaceStatus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=interfaceStatus" - name: isDhcpEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=isDhcpEnabled" - name: linkSpeedInKbps example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=linkSpeedInKbps" - name: macAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=macAddress" - name: mtuInBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=mtuInBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=name" - name: nodeUuid example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=nodeUuid" - name: vlanId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics?$select=vlanId" responses: "200": description: The requested virtual NIC entities of the host. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualNic' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics\ \ Get operation" x-permissions: operationName: View Cluster Host Virtual Nic deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ListVirtualNicsByHostIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListVirtualNicsByHostIdApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"1F8A62C5-BC06-BDa7-CFdE-6e55Acfb0eCd\"\ ;\n \n String hostExtId = \"FFeA9dE6-eFdc-Fd4f-B452-afecE6DAFD6E\"\ ;\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 ListVirtualNicsByHostIdApiResponse\ \ listVirtualNicsByHostIdApiResponse = clustersApi.listVirtualNicsByHostId(ListVirtualNicsByHostIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .hostExtId(hostExtId)\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listVirtualNicsByHostIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"acA8cfaE-C3bd-8BcD-21A3-7C249DbCCf28\"\ ;\n \n let hostExtId = \"2EFff00e-f5bD-9e1B-eecf-25acdCdE80fC\";\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 clustersApi.listVirtualNicsByHostId(clusterExtId,\ \ hostExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"Ee4ed03B-dBEA-1C3C-DbF4-8cb14Ef92AcE\"\n \ \ \n host_ext_id = \"a4CEF16B-8adb-d1cF-9cfA-ffbdD1eEcdaA\"\n \n\ \ page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = clusters_api.list_virtual_nics_by_host_id(clusterExtId=cluster_ext_id,\ \ hostExtId=host_ext_id, _page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"2Ae7B0b9-55af-dBBB-089e-aA085aBf2E7E\"\ \n \n hostExtId := \"EFc99bCE-f4e2-A3EE-CED7-E7a12c1ECE1A\"\n \n\ \ page_ := 0\n \n limit_ := 50\n\n\n request := clusters.ListVirtualNicsByHostIdRequest{\ \ ClusterExtId: &clusterExtId, HostExtId: &hostExtId, Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response, error\ \ := ClustersServiceApiInstance.ListVirtualNicsByHostId(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.VirtualNic)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/a8CF1eB3-459f-dcb8-C327-24d5b66feC4a/hosts/3ecc8CFE-FeA8-aAbA-94f1-DfA4eD450cd6/virtual-nics?$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/clustermgmt/v4.2/config/clusters/0C1E30bF-2A17-D40e-ff24-caFBDaDfBDcC/hosts/c1369DAe-20FC-CACB-F31F-e5070FEBFcbE/virtual-nics?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"eDff0ad9-FDFD-cBD7-Ceaa-b0A7F3A0d56e\";\n String\ \ hostExtId = \"eEc0Fefd-cf9a-c7CD-b60F-8aCAb04AAFba\";\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 ListVirtualNicsByHostIdRequest {\n \ \ ClusterExtId = clusterExtId,\n HostExtId = hostExtId,\n \ \ Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby,\n Select = select\n\ \ };\n try {\n ListVirtualNicsByHostIdApiResponse\ \ listVirtualNicsByHostIdApiResponse = clustersApi.ListVirtualNicsByHostId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{extId}: get: tags: - Clusters summary: Get virtual NIC description: "Get the virtual NIC entity of the host identified by {hostExtId}\ \ belonging to the cluster identified by {clusterExtId}." operationId: getVirtualNicById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 227cc8d2-5452-4534-b278-9f155192fe36 - name: hostExtId in: path description: Indicates the UUID of a host. 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: 7e6ca1f2-71bb-446d-a7f8-33138929d10a - name: extId in: path description: Virtual NIC UUID. 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: cfc95182-6cf8-4857-b97f-8661e9b6bbe5 responses: "200": description: The requested virtual NIC entity. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualNic' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Host Virtual Nic deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetVirtualNicByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetVirtualNicApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"4f4378BB-159f-eb00-cDac-3de0b1E6a9F9\"\ ;\n \n String hostExtId = \"BdFDCEAa-0cFb-b660-acAB-aAaC0c379Fe0\"\ ;\n \n String extId = \"afA7CEDc-97CF-9BBE-dEa2-7aD04EB5ac6E\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVirtualNicApiResponse\ \ getVirtualNicApiResponse = clustersApi.getVirtualNicById(GetVirtualNicByIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .hostExtId(hostExtId)\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getVirtualNicApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"aEafC99C-bC1a-bcE7-eeab-cF35EdbaAb9F\"\ ;\n \n let hostExtId = \"c9EC6D68-c9A0-a83C-8FeF-F56baD54A8Ce\";\n\ \ \n let extId = \"6af54B7B-Cbb9-cbF0-5efF-eDdaAE5A9AEa\";\n\n\n\n\ \n\n clustersApi.getVirtualNicById(clusterExtId, hostExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"cFcffBe8-5C9D-3b2f-0Ce3-607eD16BFA0D\"\n \ \ \n host_ext_id = \"EaBD9bcf-bBB5-CFbd-6ecB-6Ea045faDAEd\"\n \n\ \ ext_id = \"a88DfEeB-D3f1-DEdf-6DcA-a2Fb1D95FdBB\"\n\n\n try:\n \ \ api_response = clusters_api.get_virtual_nic_by_id(clusterExtId=cluster_ext_id,\ \ hostExtId=host_ext_id, extId=ext_id)\n print(api_response)\n \ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"9F16EBA4-B0DF-04b8-84fb-DdAb6bFf176A\"\ \n \n hostExtId := \"D681fEc9-Ba38-AAFA-Dfd2-ea70EF8ee45E\"\n \n\ \ extId := \"feebFC97-F1af-12Dc-dC6D-D35bFeDf3F4A\"\n\n\n request\ \ := clusters.GetVirtualNicByIdRequest{ ClusterExtId: &clusterExtId, HostExtId:\ \ &hostExtId, ExtId: &extId }\n response, error := ClustersServiceApiInstance.GetVirtualNicById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VirtualNic)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/eeDaAD5F-e4Aa-a2Da-cef6-EFBCCD73CEe1/hosts/afcEaa1b-ffBe-Ba0C-9Bab-C4CEfae1Ee3E/virtual-nics/DE4fDFCf-6a92-beC9-cDE8-e9A2f8A2AB3D" \ --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/clustermgmt/v4.2/config/clusters/fa0F035E-CaEb-D6f9-bd8F-8F478BCEace2/hosts/B9FBCcFB-78B9-c46f-0CFD-8B7decdBcAae/virtual-nics/A972E4c5-ba9D-edcD-beC2-7FcEBaBfa8bF" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"ACdAeA0E-4a8f-EBCc-FadD-bDDcFa417FA1\";\n String\ \ hostExtId = \"AaBECDCe-FA1E-6FBE-Aa13-D3e5AbE4e7cc\";\n String extId\ \ = \"27fD6AFb-CfdE-F4Aa-CCBB-FFeaFC9FcAAb\";\n\n // Create request\ \ object with parameters\n var request = new GetVirtualNicByIdRequest\ \ {\n ClusterExtId = clusterExtId,\n HostExtId = hostExtId,\n\ \ ExtId = extId\n };\n try {\n GetVirtualNicApiResponse\ \ getVirtualNicApiResponse = clustersApi.GetVirtualNicById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance: post: tags: - Clusters summary: Enter host into maintenance mode description: "Enter host identified by {extId} into maintenance mode belonging\ \ to the cluster identified by {clusterExtId}." operationId: enterHostMaintenance parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 7b6a182c-125d-4d33-8c53-33d5faf6f55b - name: extId in: path description: Indicates the UUID of a host. 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: 05a58968-d373-46cd-91c8-9daa74210f0f - 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: 0c27e666-1ee2-47dc-bb7e-4a03606a21fb requestBody: description: Property of the host to be put into maintenance mode. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.operations.EnterHostMaintenanceSpec' required: true responses: "202": description: Host entered into maintenance mode. 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 /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance\ \ Post operation" x-permissions: operationName: Enter Cluster Host Maintenance deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.EnterHostMaintenanceRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.operations.EnterHostMaintenanceSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.operations.EnterHostMaintenanceApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n EnterHostMaintenanceSpec\ \ enterHostMaintenanceSpec = new EnterHostMaintenanceSpec();\n\n \ \ // EnterHostMaintenanceSpec object initializations here...\n \n\ \ String clusterExtId = \"1fbE35dD-e1d8-5bD5-E4DD-bbbB847cbcb6\"\ ;\n \n String extId = \"78cB4Af2-AAC9-cBbf-Dc67-EfED4b51FEBD\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n EnterHostMaintenanceApiResponse\ \ enterHostMaintenanceApiResponse = clustersApi.enterHostMaintenance(EnterHostMaintenanceRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), enterHostMaintenanceSpec);\n\n System.out.println(enterHostMaintenanceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, EnterHostMaintenanceSpec } from\ \ \"@nutanix-api/clustermgmt-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.\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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let enterHostMaintenanceSpec = new EnterHostMaintenanceSpec();\n\ \n // EnterHostMaintenanceSpec object initializations here...\n enterHostMaintenanceSpec\ \ = JSON.stringify(enterHostMaintenanceSpec);\n\n \n let clusterExtId\ \ = \"De9deD5C-93bd-B19f-DbbE-EdaE561FEfAA\";\n \n let extId = \"\ A32ee18B-eDa7-7C67-fdD7-8FC8EeAC57e1\";\n\n\n\n\n\n clustersApi.enterHostMaintenance(clusterExtId,\ \ extId, enterHostMaintenanceSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ enterHostMaintenanceSpec = ntnx_clustermgmt_py_client.EnterHostMaintenanceSpec()\n\ \n # EnterHostMaintenanceSpec object initializations here...\n \n\ \ cluster_ext_id = \"B7aE4e8C-eEAa-3caa-4E63-a2fA7Fc0A2cc\"\n \n \ \ ext_id = \"BBf2dFC8-Dd7B-3BCf-E977-aDadEec6Bb8B\"\n\n\n try:\n \ \ api_response = clusters_api.enter_host_maintenance(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=enterHostMaintenanceSpec)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/operations\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n enterHostMaintenanceSpec := import1.NewEnterHostMaintenanceSpec()\n\ \n // EnterHostMaintenanceSpec object initializations here...\n\n \ \ \n clusterExtId := \"4aFD5fEA-8ba2-A5a7-B4eC-2bA6cd7479ff\"\n \n\ \ extId := \"FCc6cC09-36eA-2cC2-BE0c-fEfAee75ddAC\"\n\n\n request\ \ := clusters.EnterHostMaintenanceRequest{ ClusterExtId: &clusterExtId,\ \ ExtId: &extId, Body: enterHostMaintenanceSpec }\n response, error :=\ \ ClustersServiceApiInstance.EnterHostMaintenance(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/clustermgmt/v4.2/operations/clusters/DFCedBac-CaDF-9Eec-27c6-4987D07015bA/hosts/4C6De6Ef-c039-b95b-7E2C-5aC6B1de9ECD/$actions/enter-host-maintenance" \ --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 {"vcenterInfo":{"address":{"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"},"credentials":{"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"},"$objectType":"clustermgmt.v4.config.VcenterInfo"},"timeoutSeconds":0,"shouldRollbackOnFailure":true,"shouldShutdownNonMigratableUvms":false,"$objectType":"clustermgmt.v4.operations.EnterHostMaintenanceSpec"} \ - 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 {"vcenterInfo":{"address":{"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"},"credentials":{"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"},"$objectType":"clustermgmt.v4.config.VcenterInfo"},"timeoutSeconds":0,"shouldRollbackOnFailure":true,"shouldShutdownNonMigratableUvms":false,"$objectType":"clustermgmt.v4.operations.EnterHostMaintenanceSpec"} \ - "https://host:port/api/clustermgmt/v4.2/operations/clusters/ab9fE0e8-ee3b-8dca-CFBA-cA7A24007CAe/hosts/a53f46b8-cbb0-AbD9-C458-23BBd85e9F2A/$actions/enter-host-maintenance" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.V4.Operations;\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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n EnterHostMaintenanceSpec\ \ enterHostMaintenanceSpec = new EnterHostMaintenanceSpec();\n\n //\ \ EnterHostMaintenanceSpec object initializations here...\n\n String\ \ clusterExtId = \"Faff4F27-E9E6-5aC0-8deE-CCefE1C0FF8b\";\n String\ \ extId = \"a9aFFFbf-a6BE-D0ab-fB01-e2B0abCB2cFD\";\n\n // Create\ \ request object with parameters\n var request = new EnterHostMaintenanceRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ Body = enterHostMaintenanceSpec\n };\n try {\n\ \ EnterHostMaintenanceApiResponse enterHostMaintenanceApiResponse\ \ = clustersApi.EnterHostMaintenance(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance: post: tags: - Clusters summary: Exit host from maintenance mode description: "Exit host identified by {extId} from maintenance mode belonging\ \ to the cluster identified by {clusterExtId}." operationId: exitHostMaintenance parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 89631643-3de9-4622-8d07-fbe5e707a61b - name: extId in: path description: Indicates the UUID of a host. 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: a747de77-764f-4912-9aa2-152f7e720bc9 - 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: 0ccdfc3e-799e-4a84-88f1-8572d4089705 requestBody: description: Property of the host to be exited from maintenance mode. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.operations.HostMaintenanceCommonSpec' required: true responses: "202": description: Host exited from maintenance mode. 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 /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance\ \ Post operation" x-permissions: operationName: Exit Cluster Host Maintenance deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin 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: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.ExitHostMaintenanceRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.operations.HostMaintenanceCommonSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.operations.ExitHostMaintenanceApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n HostMaintenanceCommonSpec\ \ hostMaintenanceCommonSpec = new HostMaintenanceCommonSpec();\n\n \ \ // HostMaintenanceCommonSpec object initializations here...\n \ \ \n String clusterExtId = \"4A063FE2-52D3-1e32-8dcd-CD90A1f70AbA\"\ ;\n \n String extId = \"aacEAB79-F5ce-cfFe-E5Cd-EBD3493cb8C5\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ExitHostMaintenanceApiResponse\ \ exitHostMaintenanceApiResponse = clustersApi.exitHostMaintenance(ExitHostMaintenanceRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .extId(extId)\n\ \ .build(), hostMaintenanceCommonSpec);\n\n System.out.println(exitHostMaintenanceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi, HostMaintenanceCommonSpec } from\ \ \"@nutanix-api/clustermgmt-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.\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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n let hostMaintenanceCommonSpec = new HostMaintenanceCommonSpec();\n\ \n // HostMaintenanceCommonSpec object initializations here...\n hostMaintenanceCommonSpec\ \ = JSON.stringify(hostMaintenanceCommonSpec);\n\n \n let clusterExtId\ \ = \"BceDf8a2-DBfF-Beec-F6E4-eF7fa5aBA7ca\";\n \n let extId = \"\ e422BF7D-D32b-703C-e79d-eFf0b86BFE5f\";\n\n\n\n\n\n clustersApi.exitHostMaintenance(clusterExtId,\ \ extId, hostMaintenanceCommonSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ hostMaintenanceCommonSpec = ntnx_clustermgmt_py_client.HostMaintenanceCommonSpec()\n\ \n # HostMaintenanceCommonSpec object initializations here...\n \n\ \ cluster_ext_id = \"C6FB0E8b-aeBB-dcFf-ca9F-5Ddf1bf2adFe\"\n \n \ \ ext_id = \"7B6a2afD-c641-D8Ba-ABbe-EF3BBe3e5C2a\"\n\n\n try:\n \ \ api_response = clusters_api.exit_host_maintenance(clusterExtId=cluster_ext_id,\ \ extId=ext_id, body=hostMaintenanceCommonSpec)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/operations\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n hostMaintenanceCommonSpec := import1.NewHostMaintenanceCommonSpec()\n\ \n // HostMaintenanceCommonSpec object initializations here...\n\n \ \ \n clusterExtId := \"C4fFAfE6-aDEC-2Af0-c6cC-8adB6AccAec8\"\n \n\ \ extId := \"94FB5eab-cCfa-C3D4-Ad2E-dC3CbCBb7edD\"\n\n\n request\ \ := clusters.ExitHostMaintenanceRequest{ ClusterExtId: &clusterExtId, ExtId:\ \ &extId, Body: hostMaintenanceCommonSpec }\n response, error := ClustersServiceApiInstance.ExitHostMaintenance(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/clustermgmt/v4.2/operations/clusters/BC1aFFCE-7cbf-BcDd-bFAf-F4A3C7baE2Eb/hosts/F19eAede-0CEC-Fb0a-5CfC-B2ADCC0db5DB/$actions/exit-host-maintenance" \ --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 {"vcenterInfo":{"address":{"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"},"credentials":{"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"},"$objectType":"clustermgmt.v4.config.VcenterInfo"},"timeoutSeconds":0,"$objectType":"clustermgmt.v4.operations.HostMaintenanceCommonSpec"} \ - 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 {"vcenterInfo":{"address":{"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"},"credentials":{"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"},"$objectType":"clustermgmt.v4.config.VcenterInfo"},"timeoutSeconds":0,"$objectType":"clustermgmt.v4.operations.HostMaintenanceCommonSpec"} \ - "https://host:port/api/clustermgmt/v4.2/operations/clusters/fCd64B26-0dbF-deC5-7ABf-F9bbbbfDA4ad/hosts/C2fb275f-a26a-eBD8-c67D-bc4F0edcca6C/$actions/exit-host-maintenance" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.V4.Operations;\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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n HostMaintenanceCommonSpec\ \ hostMaintenanceCommonSpec = new HostMaintenanceCommonSpec();\n\n \ \ // HostMaintenanceCommonSpec object initializations here...\n\n String\ \ clusterExtId = \"D4f3D44F-Cd99-aFfb-8C81-cadeCeeA6Bdd\";\n String\ \ extId = \"ad0BCCCC-B2D4-aBb0-a0DF-37B1eaDBCFBc\";\n\n // Create\ \ request object with parameters\n var request = new ExitHostMaintenanceRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ Body = hostMaintenanceCommonSpec\n };\n try {\n\ \ ExitHostMaintenanceApiResponse exitHostMaintenanceApiResponse\ \ = clustersApi.ExitHostMaintenance(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/stats/clusters/{extId}: get: tags: - Clusters summary: Get cluster statistics description: "Get the statistics data of the cluster identified by {clusterExtId}." operationId: getClusterStats parameters: - name: extId in: path description: Indicates the UUID of a cluster. 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: ddd1ade0-5708-4aa5-b8dd-2e610abab5ca - 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: aggregateHypervisorMemoryUsagePpm - name: aggregateHypervisorMemoryUsagePpmLowerBuf - name: aggregateHypervisorMemoryUsagePpmUpperBuf - name: controllerAvgIoLatencyUsecs - name: controllerAvgIoLatencyUsecsLowerBuf - name: controllerAvgIoLatencyUsecsUpperBuf - name: controllerAvgReadIoLatencyUsecs - name: controllerAvgReadIoLatencyUsecsLowerBuf - name: controllerAvgReadIoLatencyUsecsUpperBuf - name: controllerAvgWriteIoLatencyUsecs - name: controllerAvgWriteIoLatencyUsecsLowerBuf - name: controllerAvgWriteIoLatencyUsecsUpperBuf - name: controllerNumIops - name: controllerNumIopsLowerBuf - name: controllerNumIopsUpperBuf - name: controllerNumReadIops - name: controllerNumReadIopsLowerBuf - name: controllerNumReadIopsUpperBuf - name: controllerNumWriteIops - name: controllerNumWriteIopsLowerBuf - name: controllerNumWriteIopsUpperBuf - name: controllerReadIoBandwidthKbps - name: controllerReadIoBandwidthKbpsLowerBuf - name: controllerReadIoBandwidthKbpsUpperBuf - name: controllerWriteIoBandwidthKbps - name: controllerWriteIoBandwidthKbpsLowerBuf - name: controllerWriteIoBandwidthKbpsUpperBuf - name: cpuCapacityHz - name: cpuUsageHz - name: freePhysicalStorageBytes - name: healthCheckScore - name: hypervisorCpuUsagePpm - name: hypervisorCpuUsagePpmLowerBuf - name: hypervisorCpuUsagePpmUpperBuf - name: ioBandwidthKbps - name: ioBandwidthKbpsLowerBuf - name: ioBandwidthKbpsUpperBuf - name: logicalStorageUsageBytes - name: memoryCapacityBytes - name: overallMemoryUsageBytes - name: overallSavingsBytes - name: overallSavingsRatio - name: overcommittedVmsReclaimableMemoryBytes - name: powerConsumptionInstantWatt - name: recycleBinUsageBytes - name: snapshotCapacityBytes - name: storageCapacityBytes - name: storageUsageBytes responses: "200": description: Get cluster statistics response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.stats.ClusterStats' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetClusterStatsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.stats.ClusterStatsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String extId = \"fcE6A6f9-7Eb8-b1Ee-fcef-6244cda2b83f\";\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 ClusterStatsApiResponse\ \ clusterStatsApiResponse = clustersApi.getClusterStats(GetClusterStatsRequest.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(clusterStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"2FD2C40d-dD2f-4b63-0Ddd-2dEa5bED1DFa\";\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 clustersApi.getClusterStats(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_clustermgmt_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n ext_id = \"5dDB86cB-EA9d-dA63-fE6F-A013E87602ec\"\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 = clusters_api.get_cluster_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"A80AcF6e-DaAa-E7Dc-4bdB-b4AebfAcD1B6\"\ \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 := clusters.GetClusterStatsRequest{ ExtId: &extId, StartTime_:\ \ &startTime_, EndTime_: &endTime_, SamplingInterval_: &samplingInterval_,\ \ StatType_: &statType_, Select_: nil }\n response, error := ClustersServiceApiInstance.GetClusterStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.ClusterStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/stats/clusters/FdbaD046-7A15-AE4F-4ed3-cCBb22c69Ca4?$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/clustermgmt/v4.2/stats/clusters/fa9c1e33-f39a-8ACA-6dEa-7cC0B722cec6?$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.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ extId = \"EcD6Cd86-aEc0-f6e7-eAbE-aDA4B13fFfFC\";\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 GetClusterStatsRequest\ \ {\n ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType,\n Select = select\n \ \ };\n try {\n ClusterStatsApiResponse clusterStatsApiResponse\ \ = clustersApi.GetClusterStats(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /clustermgmt/v4.2/stats/clusters/{clusterExtId}/hosts/{extId}: get: tags: - Clusters summary: Get host statistics description: "Get the statistics data of the host identified by {hostExtId}\ \ belonging to the cluster identified by {clusterExtId}." operationId: getHostStats parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 0945d614-b510-4e47-8b41-c8667cedfe58 - name: extId in: path description: Indicates the UUID of a host. 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: 6d1ec993-4633-4ee3-9497-82a3c1ea0e2d - 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: aggregateHypervisorMemoryUsagePpm - name: aggregateHypervisorMemoryUsagePpmLowerBuf - name: aggregateHypervisorMemoryUsagePpmUpperBuf - name: controllerAvgIoLatencyUsecs - name: controllerAvgIoLatencyUsecsLowerBuf - name: controllerAvgIoLatencyUsecsUpperBuf - name: controllerAvgReadIoLatencyUsecs - name: controllerAvgReadIoLatencyUsecsLowerBuf - name: controllerAvgReadIoLatencyUsecsUpperBuf - name: controllerAvgWriteIoLatencyUsecs - name: controllerAvgWriteIoLatencyUsecsLowerBuf - name: controllerAvgWriteIoLatencyUsecsUpperBuf - name: controllerNumIops - name: controllerNumIopsLowerBuf - name: controllerNumIopsUpperBuf - name: controllerNumReadIops - name: controllerNumReadIopsLowerBuf - name: controllerNumReadIopsUpperBuf - name: controllerNumWriteIops - name: controllerNumWriteIopsLowerBuf - name: controllerNumWriteIopsUpperBuf - name: controllerReadIoBandwidthKbps - name: controllerReadIoBandwidthKbpsLowerBuf - name: controllerReadIoBandwidthKbpsUpperBuf - name: controllerWriteIoBandwidthKbps - name: controllerWriteIoBandwidthKbpsLowerBuf - name: controllerWriteIoBandwidthKbpsUpperBuf - name: cpuCapacityHz - name: cpuUsageHz - name: freePhysicalStorageBytes - name: healthCheckScore - name: hypervisorCpuUsagePpm - name: hypervisorCpuUsagePpmLowerBuf - name: hypervisorCpuUsagePpmUpperBuf - name: ioBandwidthKbps - name: ioBandwidthKbpsLowerBuf - name: ioBandwidthKbpsUpperBuf - name: logicalStorageUsageBytes - name: memoryCapacityBytes - name: memoryOvercommitPoolSizePpm - name: overallMemoryUsageBytes - name: overallMemoryUsagePpm - name: overallMemoryUsagePpmLowerBuf - name: overallMemoryUsagePpmUpperBuf - name: overcommittedVmsReclaimableMemoryBytes - name: powerConsumptionInstantWatt - name: storageCapacityBytes - name: storageUsageBytes responses: "200": description: Get host statistics response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.stats.HostStats' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{clusterExtId}/hosts/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{clusterExtId}/hosts/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{clusterExtId}/hosts/{extId}\ \ Get operation" x-permissions: operationName: View Host Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super 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.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.ClustersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Clusters.GetHostStatsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.stats.HostStatsApiResponse;\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 \ \ ClustersApi clustersApi = new ClustersApi(apiClient);\n\n \n\ \ String clusterExtId = \"FCb5Ae0a-aDaF-eBDF-DD42-DcE4DACDEB9E\"\ ;\n \n String extId = \"Aac6F2D0-CFDA-56fa-71Ba-53cF7c3B8D30\"\ ;\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 \ \ HostStatsApiResponse hostStatsApiResponse = clustersApi.getHostStats(GetHostStatsRequest.builder()\n\ \ .clusterExtId(clusterExtId)\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(hostStatsApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClustersApi } from \"@nutanix-api/clustermgmt-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 clustersApi = new ClustersApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let clusterExtId = \"AB2fdE4A-FCbF-70E6-bfCd-0E7A99bFAFFd\"\ ;\n \n let extId = \"A8bEBEAa-5f6B-ceCd-EB4f-aaEe0dAA9cbe\";\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 clustersApi.getHostStats(clusterExtId,\ \ 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_clustermgmt_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ clusters_api = ntnx_clustermgmt_py_client.ClustersApi(api_client=client)\n\ \ \n cluster_ext_id = \"25B6EBF5-db9C-eACf-bdae-D82cDAaffEbB\"\n \ \ \n ext_id = \"08104eba-efFd-C8C7-cCEA-B9DC3c6ee9dE\"\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 = clusters_api.get_host_stats(clusterExtId=cluster_ext_id,\ \ extId=ext_id, _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/clusters\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClustersServiceApiInstance\ \ *api.ClustersServiceApi\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\ \ ClustersServiceApiInstance = api.NewClustersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"a3F28Cbb-AFfa-8FF1-aceA-1Dae1AbDDd4A\"\ \n \n extId := \"8Db1FdfD-AcB8-46DC-dd57-efcD7C947fF1\"\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 := clusters.GetHostStatsRequest{\ \ ClusterExtId: &clusterExtId, ExtId: &extId, StartTime_: &startTime_, EndTime_:\ \ &endTime_, SamplingInterval_: &samplingInterval_, StatType_: &statType_,\ \ Select_: nil }\n response, error := ClustersServiceApiInstance.GetHostStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.HostStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/stats/clusters/aFe4AfdF-4C10-b335-8faa-bbFFeaeeFB3b/hosts/A5Ec0adA-5acf-CAa8-7F7e-ED186E3EAdaC?$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/clustermgmt/v4.2/stats/clusters/e5FfB2AA-Ce2b-3D6D-F5ca-E8CeC72E221e/hosts/DFf4f7EA-Ff1E-41A0-Cf79-5cCCCd7Ba3e9?$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.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ ClustersApi clustersApi = new ClustersApi(client);\n\n String\ \ clusterExtId = \"Bdd2EDbE-2ffa-EDd5-608E-6FfB4BdeFB28\";\n String\ \ extId = \"caBbEef3-CDcc-0aE7-dfb9-ccA9846Eb3cb\";\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 GetHostStatsRequest\ \ {\n ClusterExtId = clusterExtId,\n ExtId = extId,\n\ \ StartTime = startTime,\n EndTime = endTime,\n \ \ SamplingInterval = samplingInterval,\n StatType =\ \ statType,\n Select = select\n };\n try {\n \ \ HostStatsApiResponse hostStatsApiResponse = clustersApi.GetHostStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms: get: tags: - Clusters summary: Get a list of CVMs associated with a cluster description: "Get the list of all the CVMs belonging to the cluster identified\ \ by {clusterExtId}." operationId: listCvmsbyClusterId parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: b915f3a9-8317-4ca9-a3bd-567af9f37a48 - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=clusterExtId\ \ eq 'c6893797-f323-4813-88f0-d7428b0a318a'" - name: hypervisorType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=hypervisorType\ \ eq Clustermgmt.Config.HypervisorType'AHV'" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=memorySizeBytes\ \ eq 48" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=name\ \ eq 'NTX-hostname-CVM'" - name: nodeExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=nodeExtId\ \ eq 'ef132bce-c4f1-49bc-aa57-0ef056fbb2f1'" - name: numVcpus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$filter=numVcpus\ \ eq 4" - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$orderby=clusterExtId" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$orderby=memorySizeBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$orderby=name" - name: nodeExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$orderby=nodeExtId" - name: numVcpus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$orderby=numVcpus" - 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: backplaneIpAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=backplaneIpAddress" - name: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=clusterExtId" - name: hypervisorType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=hypervisorType" - name: ipAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=ipAddress" - name: memorySizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=memorySizeBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=name" - name: nodeExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=nodeExtId" - name: numVcpus example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms?$select=numVcpus" responses: "200": description: Response containing the list of CVMs associated with a specific cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cvm' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms\ \ Get operation" x-permissions: operationName: View Cluster Cvm deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin - name: Cluster Viewer - 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: "7.5" - product: PE version: "7.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.CvmsApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Cvms.ListCvmsbyClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListCvmsByClusterIdApiResponse;\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 \ \ CvmsApi cvmsApi = new CvmsApi(apiClient);\n\n \n String\ \ clusterExtId = \"0c9D5aBE-F2cf-e2A7-9FBE-1cEaAA8edA9d\";\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 ListCvmsByClusterIdApiResponse\ \ listCvmsByClusterIdApiResponse = cvmsApi.listCvmsbyClusterId(ListCvmsbyClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listCvmsByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, CvmsApi } from \"@nutanix-api/clustermgmt-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 cvmsApi = new CvmsApi(apiClientInstance);\n\nfunction sample() {\n\n\ \ \n let clusterExtId = \"eE0DaD7a-Ce4f-eed4-EaDe-0aBAC6C4c9Db\";\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 cvmsApi.listCvmsbyClusterId(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cvms_api = ntnx_clustermgmt_py_client.CvmsApi(api_client=client)\n\ \ \n cluster_ext_id = \"Bf8Fea2b-fc8e-c173-D46B-b1687Caa7f5b\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = cvms_api.list_cvmsby_cluster_id(clusterExtId=cluster_ext_id, _page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/cvms\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CvmsServiceApiInstance\ \ *api.CvmsServiceApi\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\ \ CvmsServiceApiInstance = api.NewCvmsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"A14ce0f3-d0fE-A4bd-C8ce-Ee5a4A0EFeCA\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := cvms.ListCvmsbyClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil, Orderby_: nil, Select_: nil }\n response, error := CvmsServiceApiInstance.ListCvmsbyClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Cvm)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/4C33130e-1e4D-2BBD-b0Ad-4AaBCeB3FB2C/cvms?$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/clustermgmt/v4.2/config/clusters/FD6cdBFb-FaAa-2Bf1-Fcc0-Bdd10E5dd6DF/cvms?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ CvmsApi cvmsApi = new CvmsApi(client);\n\n String clusterExtId\ \ = \"65a4bD9c-De4b-d1B2-7A9f-7dd702D3a38d\";\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 ListCvmsbyClusterIdRequest {\n ClusterExtId = clusterExtId,\n\ \ Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Orderby = orderby,\n Select = select\n\ \ };\n try {\n ListCvmsByClusterIdApiResponse listCvmsByClusterIdApiResponse\ \ = cvmsApi.ListCvmsbyClusterId(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" x-supported-versions: - product: PC version: "7.5" - product: PE version: "7.5" /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/{extId}: get: tags: - Clusters summary: Get the details of a specific CVM associated with a cluster description: "Get the details of the CVMs identified by {extId} belonging to\ \ the cluster identified by {clusterExtId}." operationId: getCvmById parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 52c0da11-1f03-4288-87a9-67962ed85bc6 - name: extId in: path description: External identifier for the CVM. 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: 6291e8ee-fe2c-4bf6-b6e1-49f9c3bede27 responses: "200": description: Response containing the details of a specific CVM associated with a cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cvm' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/{extId}\ \ Get operation" x-permissions: operationName: View Cluster Cvm deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin - name: Cluster Viewer - 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: "7.5" - product: PE version: "7.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.CvmsApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Cvms.GetCvmByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetCvmApiResponse;\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 \ \ CvmsApi cvmsApi = new CvmsApi(apiClient);\n\n \n String\ \ clusterExtId = \"aa78AF53-93fb-c8cE-B4CE-518Ca3aCEeCf\";\n \n \ \ String extId = \"Df0a46fD-3913-dBaE-4a10-cFAAfa73D46f\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetCvmApiResponse getCvmApiResponse\ \ = cvmsApi.getCvmById(GetCvmByIdRequest.builder()\n .clusterExtId(clusterExtId)\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getCvmApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, CvmsApi } from \"@nutanix-api/clustermgmt-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 cvmsApi = new CvmsApi(apiClientInstance);\n\nfunction sample() {\n\n\ \ \n let clusterExtId = \"D50DdCbB-bEf6-0241-dbee-cE6C2100e9dA\";\n\ \ \n let extId = \"aaB55A6e-39Ae-a6de-A7BB-B36c2CA47aD9\";\n\n\n\n\ \n\n cvmsApi.getCvmById(clusterExtId, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cvms_api = ntnx_clustermgmt_py_client.CvmsApi(api_client=client)\n\ \ \n cluster_ext_id = \"AbB86d9f-DE9B-De6f-5DEd-b0ECE954FCd3\"\n \ \ \n ext_id = \"B3adECda-f9CC-FCBf-Aabe-Fca3dC1Bfc25\"\n\n\n try:\n\ \ api_response = cvms_api.get_cvm_by_id(clusterExtId=cluster_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/cvms\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CvmsServiceApiInstance\ \ *api.CvmsServiceApi\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\ \ CvmsServiceApiInstance = api.NewCvmsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"4E7EdC9F-6caD-E9FE-C079-9caa0e70cfac\"\ \n \n extId := \"ce2C81EE-fBeB-f933-bF2e-c6Ac4EeDdeE0\"\n\n\n request\ \ := cvms.GetCvmByIdRequest{ ClusterExtId: &clusterExtId, ExtId: &extId\ \ }\n response, error := CvmsServiceApiInstance.GetCvmById(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.Cvm)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/dF0b7E1C-d5CF-A4Ad-4b77-Ec4EF4745Df7/cvms/060aC3AF-beDe-4592-4E2d-fE5d0bfcddbf" \ --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/clustermgmt/v4.2/config/clusters/FEBbD6E6-dbb4-235c-A3df-d55AeF4F12C3/cvms/cB04F3Ac-1C86-e7bf-E0BE-C75ED57E6EBe" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ CvmsApi cvmsApi = new CvmsApi(client);\n\n String clusterExtId\ \ = \"5B8AeEfd-eCcd-Eafc-fBDc-10fdFDFB3655\";\n String extId = \"ccEACCae-dEdd-BecF-3DEc-ca4EBEaBDf8b\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetCvmByIdRequest {\n ClusterExtId = clusterExtId,\n\ \ ExtId = extId\n };\n try {\n GetCvmApiResponse\ \ getCvmApiResponse = cvmsApi.GetCvmById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" x-supported-versions: - product: PC version: "7.5" - product: PE version: "7.5" /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/$actions/reconfigure: post: tags: - Clusters summary: Reconfigure CVMs within a cluster description: "Reconfigure CVMs within a cluster identified by {clusterExtId}." operationId: reconfigureCvms parameters: - name: clusterExtId in: path description: Indicates the UUID of a cluster. 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: 61aa674b-d4ed-4a5f-aa02-8051ec09639e - 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: 1541123f-228c-42ed-b66f-567b232952cf requestBody: description: Request body for reconfiguring CVMs in a cluster. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.CvmReconfigurationSpec' required: true responses: "202": description: Response after reconfiguring CVMs in a cluster. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/$actions/reconfigure\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/$actions/reconfigure\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/$actions/reconfigure\ \ Post operation" x-permissions: operationName: Reconfigure Cluster Cvm deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin 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: "7.5" - product: PE version: "7.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.CvmsApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Cvms.ReconfigureCvmsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.CvmReconfigurationSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ReconfigureCvmsApiResponse;\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 \ \ CvmsApi cvmsApi = new CvmsApi(apiClient);\n\n CvmReconfigurationSpec\ \ cvmReconfigurationSpec = new CvmReconfigurationSpec();\n\n // CvmReconfigurationSpec\ \ object initializations here...\n \n String clusterExtId\ \ = \"D9CBcfD1-0066-Ae4f-81fe-8dFb8cAE4F55\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ReconfigureCvmsApiResponse reconfigureCvmsApiResponse\ \ = cvmsApi.reconfigureCvms(ReconfigureCvmsRequest.builder()\n \ \ .clusterExtId(clusterExtId)\n .build(), cvmReconfigurationSpec);\n\ \n System.out.println(reconfigureCvmsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, CvmsApi, CvmReconfigurationSpec } from \"@nutanix-api/clustermgmt-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 cvmsApi = new CvmsApi(apiClientInstance);\n\nfunction sample() {\n \ \ let cvmReconfigurationSpec = new CvmReconfigurationSpec();\n\n //\ \ CvmReconfigurationSpec object initializations here...\n cvmReconfigurationSpec\ \ = JSON.stringify(cvmReconfigurationSpec);\n\n \n let clusterExtId\ \ = \"CBBbD1A3-bFDb-fa8F-ca2c-dCAaB4BE5ec3\";\n\n\n\n\n\n cvmsApi.reconfigureCvms(clusterExtId,\ \ cvmReconfigurationSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ cvms_api = ntnx_clustermgmt_py_client.CvmsApi(api_client=client)\n\ \ cvmReconfigurationSpec = ntnx_clustermgmt_py_client.CvmReconfigurationSpec()\n\ \n # CvmReconfigurationSpec object initializations here...\n \n \ \ cluster_ext_id = \"e5FbdC6D-4Df0-DC8D-FD8F-979b10ef34Cc\"\n\n\n try:\n\ \ api_response = cvms_api.reconfigure_cvms(clusterExtId=cluster_ext_id,\ \ body=cvmReconfigurationSpec)\n print(api_response)\n except\ \ ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/cvms\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CvmsServiceApiInstance\ \ *api.CvmsServiceApi\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\ \ CvmsServiceApiInstance = api.NewCvmsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n cvmReconfigurationSpec := import1.NewCvmReconfigurationSpec()\n\ \n // CvmReconfigurationSpec object initializations here...\n\n \n\ \ clusterExtId := \"AceBd3a8-A8DC-aFdc-3fAE-70CBBADe66da\"\n\n\n request\ \ := cvms.ReconfigureCvmsRequest{ ClusterExtId: &clusterExtId, Body: cvmReconfigurationSpec\ \ }\n response, error := CvmsServiceApiInstance.ReconfigureCvms(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/clustermgmt/v4.2/config/clusters/5BAcDABA-39e0-EfAf-b651-EDDeb2b4Eeb4/cvms/$actions/reconfigure" \ --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 {"numVcpus":4,"memorySizeBytes":0,"$objectType":"clustermgmt.v4.config.CvmReconfigurationSpec"} \ - 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 {"numVcpus":4,"memorySizeBytes":0,"$objectType":"clustermgmt.v4.config.CvmReconfigurationSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/1FC4f0Eb-6bE7-3c67-ca1C-bf5b06bDABbd/cvms/$actions/reconfigure" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ CvmsApi cvmsApi = new CvmsApi(client);\n\n CvmReconfigurationSpec\ \ cvmReconfigurationSpec = new CvmReconfigurationSpec();\n\n // CvmReconfigurationSpec\ \ object initializations here...\n\n String clusterExtId = \"bdC5C6EF-3Dcd-DD41-8B0a-cFCBfB21b7dd\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ReconfigureCvmsRequest {\n ClusterExtId = clusterExtId,\n\ \ Body = cvmReconfigurationSpec\n };\n try {\n\ \ ReconfigureCvmsApiResponse reconfigureCvmsApiResponse = cvmsApi.ReconfigureCvms(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/disks/{extId}: get: tags: - Disks summary: Get Disk by its external identifier description: Fetch the details of the Disk identified by external identifier. operationId: getDiskById parameters: - name: extId in: path description: The external identifier of the 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: 595c8ce9-6af4-48af-9edf-3fe7c508c599 responses: "200": description: Returns the details of the requested Disk. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.Disk' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}\ \ Get operation" x-permissions: operationName: View Disk deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Cluster Viewer - name: Cluster Admin - name: Super Admin 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.GetDiskByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetDiskApiResponse;\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 \ \ DisksApi disksApi = new DisksApi(apiClient);\n\n \n String\ \ extId = \"89b4cEBA-6fcC-93bd-1a1F-dB5a7aBfe8bb\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n GetDiskApiResponse getDiskApiResponse\ \ = disksApi.getDiskById(GetDiskByIdRequest.builder()\n .extId(extId)\n\ \ .build());\n\n System.out.println(getDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DisksApi } from \"@nutanix-api/clustermgmt-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 disksApi = new DisksApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"EDDCEFf6-3a0F-ef31-0AB4-35B1bff3CcE6\";\n\n\n\n\ \n\n disksApi.getDiskById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ \n ext_id = \"fbA6f3dd-84bF-7dFd-f97A-cECe6CA0408C\"\n\n\n try:\n\ \ api_response = disks_api.get_disk_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"a557aD23-2ED0-b900-bcDe-fC2BDbdCb50F\"\ \n\n\n request := disks.GetDiskByIdRequest{ ExtId: &extId }\n response,\ \ error := DisksServiceApiInstance.GetDiskById(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.Disk)\n fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/disks/9CcD62ea-0FEB-8D59-B93C-9beEEdE14e5e" \ --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/clustermgmt/v4.2/config/disks/9Bab6adF-FDe3-CACa-C9BE-1E0F90C9EAA9" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n String extId = \"\ 1AbDaBfe-8EE1-Fc3e-FdeF-47BdecfDff7E\";\n\n // Create request object\ \ with parameters\n var request = new GetDiskByIdRequest {\n \ \ ExtId = extId\n };\n try {\n GetDiskApiResponse\ \ getDiskApiResponse = disksApi.GetDiskById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - Disks summary: Removes Disk from a cluster description: Marks Disk identified by external identifier for removal. operationId: deleteDiskById parameters: - name: extId in: path description: The external identifier of the 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: 205e7da7-48ae-412b-a83c-7b3ca0380fd0 responses: "202": description: Returns the task ID with reference to Disk removal. The task is completed when the Disk is marked for removal. 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 /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}\ \ Delete operation" x-permissions: operationName: Delete Disk deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 4 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.9" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.DeleteDiskByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteDiskApiResponse;\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 \ \ DisksApi disksApi = new DisksApi(apiClient);\n\n \n String\ \ extId = \"edc8FbFc-fff9-3Fc2-aC97-bA71e6A76FEd\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n DeleteDiskApiResponse deleteDiskApiResponse\ \ = disksApi.deleteDiskById(DeleteDiskByIdRequest.builder()\n \ \ .extId(extId)\n .build());\n\n System.out.println(deleteDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DisksApi } from \"@nutanix-api/clustermgmt-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 disksApi = new DisksApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"A954A6df-23de-5DC8-Abc2-acBDFa2BFEBB\";\n\n\n\n\ \n\n disksApi.deleteDiskById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ \n ext_id = \"fCda7aFd-CD9d-Aba0-F6Fb-AAf7A16fbbC8\"\n\n\n try:\n\ \ api_response = disks_api.delete_disk_by_id(extId=ext_id)\n \ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"061ea5D2-28cB-4BC2-e6AB-e9ffe6BfCFEC\"\ \n\n\n request := disks.DeleteDiskByIdRequest{ ExtId: &extId }\n response,\ \ error := DisksServiceApiInstance.DeleteDiskById(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/clustermgmt/v4.2/config/disks/fFd7fE9b-AF0D-536b-D967-Fbf2DfFd86E1" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method DELETE \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/clustermgmt/v4.2/config/disks/6da3BC7F-DCdd-fFCE-d6EA-E5baB46DB2dB" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n String extId = \"\ bBfFFc04-5943-fdb4-ACD1-bf5BFd2E4Aea\";\n\n // Create request object\ \ with parameters\n var request = new DeleteDiskByIdRequest {\n \ \ ExtId = extId\n };\n try {\n DeleteDiskApiResponse\ \ deleteDiskApiResponse = disksApi.DeleteDiskById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/disks: get: tags: - Disks summary: Get Disks for all the clusters description: Fetches Disk details from all clusters registered with Prism Central. operationId: listDisks 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: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=clusterName\ \ eq 'string'" - name: diskAdvanceConfig/isOnline example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=diskAdvanceConfig/isOnline\ \ eq true" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=hostName\ \ eq 'string'" - name: serialNumber example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=serialNumber\ \ eq 'string'" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=status\ \ eq Clustermgmt.Config.DiskStatus'NORMAL'" - name: storageTier example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$filter=storageTier\ \ eq Clustermgmt.Config.StorageTier'SSD_PCIE'" - 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: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=clusterName" - name: diskAdvanceConfig/isOnline example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=diskAdvanceConfig/isOnline" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=extId" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=hostName" - name: serialNumber example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=serialNumber" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=status" - name: storageTier example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$orderby=storageTier" - name: $apply in: query description: "A URL query parameter that allows clients to specify a sequence\ \ of transformations to the entity set, such as groupby, filter, aggregate\ \ etc. As of now only support for groupby exists.For example '$apply=groupby((templateName))'\ \ would get all templates grouped by templateName." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$apply=groupby((clusterName))" - name: diskAdvanceConfig/isOnline example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$apply=groupby(diskAdvanceConfig/isOnline)" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$apply=groupby((hostName))" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$apply=groupby((status))" - name: storageTier example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$apply=groupby((storageTier))" - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=clusterExtId" - name: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=clusterName" - name: cvmIpAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=cvmIpAddress" - name: diskAdvanceConfig/hasBootPartitionsOnly example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/hasBootPartitionsOnly" - name: diskAdvanceConfig/isBootDisk example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isBootDisk" - name: diskAdvanceConfig/isDataMigrated example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isDataMigrated" - name: diskAdvanceConfig/isDiagnosticInfoAvailable example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isDiagnosticInfoAvailable" - name: diskAdvanceConfig/isErrorFoundInLog example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isErrorFoundInLog" - name: diskAdvanceConfig/isMarkedForRemoval example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isMarkedForRemoval" - name: diskAdvanceConfig/isMounted example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isMounted" - name: diskAdvanceConfig/isOnline example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isOnline" - name: diskAdvanceConfig/isPasswordProtected example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isPasswordProtected" - name: diskAdvanceConfig/isPlannedOutage example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isPlannedOutage" - name: diskAdvanceConfig/isSelfEncryptingDrive example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isSelfEncryptingDrive" - name: diskAdvanceConfig/isSelfManagedNvme example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isSelfManagedNvme" - name: diskAdvanceConfig/isSpdkManaged example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isSpdkManaged" - name: diskAdvanceConfig/isSuspectedUnhealthy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isSuspectedUnhealthy" - name: diskAdvanceConfig/isUnderDiagnosis example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isUnderDiagnosis" - name: diskAdvanceConfig/isUnhealthy example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskAdvanceConfig/isUnhealthy" - name: diskSizeBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=diskSizeBytes" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=extId" - name: firmwareVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=firmwareVersion" - name: hostName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=hostName" - name: links example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=links" - name: location example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=location" - name: model example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=model" - name: mountPath example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=mountPath" - name: nodeExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=nodeExtId" - name: nodeIpAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=nodeIpAddress" - name: nvmePciePath example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=nvmePciePath" - name: physicalCapacityBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=physicalCapacityBytes" - name: serialNumber example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=serialNumber" - name: serviceVMId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=serviceVMId" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=status" - name: storagePoolExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=storagePoolExtId" - name: storageTier example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=storageTier" - name: targetFirmwareVersion example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=targetFirmwareVersion" - name: tenantId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=tenantId" - name: vendor example: "https://{host}:{port}/api/clustermgmt/v4.2/config/disks?$select=vendor" responses: "200": description: Returns a paginated list of Disks from all clusters registered with Prism Central. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Disk' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/disks Get operation x-permissions: operationName: View Disk deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Cluster Viewer - name: Cluster Admin - name: Super Admin 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.ListDisksRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListDisksApiResponse;\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 \ \ DisksApi disksApi = new DisksApi(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 ListDisksApiResponse listDisksApiResponse\ \ = disksApi.listDisks(ListDisksRequest.builder()\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$apply(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listDisksApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, DisksApi } from "@nutanix-api/clustermgmt-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 disksApi = new DisksApi(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["$apply"] = "string_sample_data"; opts["$select"] = "string_sample_data"; disksApi.listDisks(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = disks_api.list_disks(_page=page, _limit=limit)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := disks.ListDisksRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Apply_: nil, Select_: nil }\n \ \ response, error := DisksServiceApiInstance.ListDisks(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.Disk)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/disks?$apply=string_sample_data&$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/clustermgmt/v4.2/config/disks?$apply=string_sample_data&$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n int page = 0;\n\ \ int limit = 50;\n String filter = \"string_sample_data\";\n\ \ String orderby = \"string_sample_data\";\n String apply = \"\ string_sample_data\";\n String select = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListDisksRequest {\n Page = page,\n Limit =\ \ limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Apply = apply,\n Select = select\n };\n \ \ try {\n ListDisksApiResponse listDisksApiResponse = disksApi.ListDisks(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{extId}/$actions/add-disk: post: tags: - Disks summary: Adds Disk to a cluster description: "Repartitions and adds the Disk to a cluster, or adds an old Disk\ \ again to a cluster that is marked for removal." operationId: addDisk parameters: - name: extId in: path description: The external identifier of the cluster on which Disk will be added. 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: 5511b21a-a2d2-4609-9d58-94f19dfdd043 requestBody: description: Request model to add a disk to a cluster. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.DiskAdditionSpec' required: true responses: "202": description: Returns the task ID for addition of Disk to cluster. The task is complete when the Disk is added to the cluster. 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 /clustermgmt/v4.2/config/clusters/{extId}/$actions/add-disk\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}/$actions/add-disk\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}/$actions/add-disk\ \ Post operation" x-permissions: operationName: Add Disk To Cluster deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Cluster Admin x-rate-limit: - type: xsmall count: 1 timeUnit: seconds - type: small count: 4 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.9" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.AddDiskRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DiskAdditionSpec;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.AddDiskApiResponse;\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 \ \ DisksApi disksApi = new DisksApi(apiClient);\n\n DiskAdditionSpec\ \ diskAdditionSpec = new DiskAdditionSpec();\n\n // DiskAdditionSpec\ \ object initializations here...\n diskAdditionSpec.setSerialNumber(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"4ed0eBFA-F6E9-eBcF-C0Da-dBbA2CAF03DA\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n AddDiskApiResponse addDiskApiResponse\ \ = disksApi.addDisk(AddDiskRequest.builder()\n .extId(extId)\n\ \ .build(), diskAdditionSpec);\n\n System.out.println(addDiskApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DisksApi, DiskAdditionSpec } from \"@nutanix-api/clustermgmt-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 disksApi = new DisksApi(apiClientInstance);\n\nfunction sample() {\n\ \ let diskAdditionSpec = new DiskAdditionSpec();\n\n // DiskAdditionSpec\ \ object initializations here...\n diskAdditionSpec.setSerialNumber(\"\ string_sample_data\"); // required field\n diskAdditionSpec = JSON.stringify(diskAdditionSpec);\n\ \n \n let extId = \"35A78Fc3-B915-57f5-ECDb-Ccb72EaeF91b\";\n\n\n\n\ \n\n disksApi.addDisk(extId, diskAdditionSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ diskAdditionSpec = ntnx_clustermgmt_py_client.DiskAdditionSpec()\n\n\ \ # DiskAdditionSpec object initializations here...\n diskAdditionSpec.serial_number\ \ = \"string_sample_data\" # required field\n \n ext_id = \"a1bfFECE-eEF8-f6Ae-6eAc-AbebD3CBEF9b\"\ \n\n\n try:\n api_response = disks_api.add_disk(extId=ext_id,\ \ body=diskAdditionSpec)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n diskAdditionSpec := import1.NewDiskAdditionSpec()\n\ \n // DiskAdditionSpec object initializations here...\n\n \n extId\ \ := \"aCFfd5EC-7fdC-dB2a-da12-2eaeddbeE05e\"\n\n\n request := disks.AddDiskRequest{\ \ ExtId: &extId, Body: diskAdditionSpec }\n response, error := DisksServiceApiInstance.AddDisk(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/clustermgmt/v4.2/config/clusters/cEEEE1BF-FEF1-3f5b-bEAf-80E1A3ab3D8B/$actions/add-disk" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"serialNumber":"string","diskPartitionInfo":{"partitionType":"$UNKNOWN","driveReplacementOption":"$UNKNOWN","$objectType":"clustermgmt.v4.config.DiskPartitionInfo"},"$objectType":"clustermgmt.v4.config.DiskAdditionSpec"} \ - 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 {"serialNumber":"string","diskPartitionInfo":{"partitionType":"$UNKNOWN","driveReplacementOption":"$UNKNOWN","$objectType":"clustermgmt.v4.config.DiskPartitionInfo"},"$objectType":"clustermgmt.v4.config.DiskAdditionSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/BDfeee9F-24B5-fEA4-F89a-a6bb7Ee3aA4E/$actions/add-disk" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n DiskAdditionSpec\ \ diskAdditionSpec = new DiskAdditionSpec();\n\n // DiskAdditionSpec\ \ object initializations here...\n diskAdditionSpec.SerialNumber =\ \ \"string_sample_data\"; // required field\n\n String extId = \"\ BdE0F0dE-6AAf-AaCc-da1e-8d1c27f3cabc\";\n\n // Create request object\ \ with parameters\n var request = new AddDiskRequest {\n \ \ ExtId = extId,\n Body = diskAdditionSpec\n };\n \ \ try {\n AddDiskApiResponse addDiskApiResponse = disksApi.AddDisk(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/disks/{extId}/$actions/update-led-state: post: tags: - Disks summary: Update LED state of a Disk description: Updates the LED state of a Disk to on or off. operationId: updateDiskLEDState parameters: - name: extId in: path description: The external identifier of the 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: 0be51093-6b88-40ae-8d03-cba4c2058832 requestBody: description: Request model for updating LED state of the Disk. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.LEDStateUpdationSpec' required: true responses: "202": description: Returns the task ID corresponding to the update request. 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 /clustermgmt/v4.2/config/disks/{extId}/$actions/update-led-state\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}/$actions/update-led-state\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}/$actions/update-led-state\ \ Post operation" x-permissions: operationName: Update LED State Disk deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: small count: 4 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 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.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.UpdateDiskLEDStateRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.LEDStateUpdationSpec;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateDiskLEDStateTaskResponse;\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 \ \ DisksApi disksApi = new DisksApi(apiClient);\n\n LEDStateUpdationSpec\ \ lEDStateUpdationSpec = new LEDStateUpdationSpec();\n\n // LEDStateUpdationSpec\ \ object initializations here...\n lEDStateUpdationSpec.setIsEngaged(true);\ \ // required field\n \n String extId = \"b0aeC1de-8CAE-79fA-fd6d-F61BFa6EaeAe\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateDiskLEDStateTaskResponse\ \ updateDiskLEDStateTaskResponse = disksApi.updateDiskLEDState(UpdateDiskLEDStateRequest.builder()\n\ \ .extId(extId)\n .build(), lEDStateUpdationSpec);\n\ \n System.out.println(updateDiskLEDStateTaskResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DisksApi, LEDStateUpdationSpec } from \"@nutanix-api/clustermgmt-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 disksApi = new DisksApi(apiClientInstance);\n\nfunction sample() {\n\ \ let lEDStateUpdationSpec = new LEDStateUpdationSpec();\n\n // LEDStateUpdationSpec\ \ object initializations here...\n lEDStateUpdationSpec.setIsEngaged(true);\ \ // required field\n lEDStateUpdationSpec = JSON.stringify(lEDStateUpdationSpec);\n\ \n \n let extId = \"b4F0Af44-B2EB-Fea0-27cb-F4daB3Bed5f6\";\n\n\n\n\ \n\n disksApi.updateDiskLEDState(extId, lEDStateUpdationSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ lEDStateUpdationSpec = ntnx_clustermgmt_py_client.LEDStateUpdationSpec()\n\ \n # LEDStateUpdationSpec object initializations here...\n lEDStateUpdationSpec.is_engaged\ \ = True # required field\n \n ext_id = \"d0317Fe2-f6eb-038D-DaFe-729eF3ebFbE2\"\ \n\n\n try:\n api_response = disks_api.update_disk_led_state(extId=ext_id,\ \ body=lEDStateUpdationSpec)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n lEDStateUpdationSpec := import1.NewLEDStateUpdationSpec()\n\ \n // LEDStateUpdationSpec object initializations here...\n\n \n \ \ extId := \"FBBB88DD-6fcC-c8DA-1BEA-94Aaa4E9beB6\"\n\n\n request :=\ \ disks.UpdateDiskLEDStateRequest{ ExtId: &extId, Body: lEDStateUpdationSpec\ \ }\n response, error := DisksServiceApiInstance.UpdateDiskLEDState(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/clustermgmt/v4.2/config/disks/AfdbD0f8-4D1d-AB71-6aC0-f9dFAebA68Ce/$actions/update-led-state" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"isEngaged":true,"$objectType":"clustermgmt.v4.config.LEDStateUpdationSpec"} \ - 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 {"isEngaged":true,"$objectType":"clustermgmt.v4.config.LEDStateUpdationSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/disks/3b6Bbb3F-1c4D-63E0-3BAC-83da2Ce255Af/$actions/update-led-state" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n LEDStateUpdationSpec\ \ lEDStateUpdationSpec = new LEDStateUpdationSpec();\n\n // LEDStateUpdationSpec\ \ object initializations here...\n lEDStateUpdationSpec.IsEngaged =\ \ true; // required field\n\n String extId = \"c8881f92-2995-55Ac-AAda-6AAe5DA7f7eD\"\ ;\n\n // Create request object with parameters\n var request\ \ = new UpdateDiskLEDStateRequest {\n ExtId = extId,\n \ \ Body = lEDStateUpdationSpec\n };\n try {\n \ \ UpdateDiskLEDStateTaskResponse updateDiskLEDStateTaskResponse = disksApi.UpdateDiskLEDState(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/stats/disks/{extId}: get: tags: - Disks summary: Get stats for the existing Disk description: Fetch the stats information of the Disk identified by external identifier. operationId: getDiskStats parameters: - name: extId in: path description: The external identifier of the 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: aa3582bf-bb87-4426-8922-944a6e60a49d - 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: 71 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' responses: "200": description: Returns the stats for the specified Disk in the cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.stats.DiskStats' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/disks/{extId}\ \ Get operation" x-permissions: operationName: View Disk Stats deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Cluster Viewer - name: Cluster Admin - name: Super Admin 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.DisksApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.Disks.GetDiskStatsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.stats.GetDiskStatsApiResponse;\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 \ \ DisksApi disksApi = new DisksApi(apiClient);\n\n \n String\ \ extId = \"4AbDFb3d-e3dD-BEad-B6ba-C6E6F2e3d988\";\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 GetDiskStatsApiResponse getDiskStatsApiResponse\ \ = disksApi.getDiskStats(GetDiskStatsRequest.builder()\n \ \ .extId(extId)\n .$startTime(startTime)\n \ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .build());\n\n \ \ System.out.println(getDiskStatsApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DisksApi } from \"@nutanix-api/clustermgmt-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 disksApi = new DisksApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"fefc6cc2-db26-7B56-9F08-aCcAA1faFa72\";\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\n\n\ \n\n disksApi.getDiskStats(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_clustermgmt_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ disks_api = ntnx_clustermgmt_py_client.DisksApi(api_client=client)\n\ \ \n ext_id = \"eDcF5287-Bf7C-9E6E-3cdc-4BC919A515dC\"\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 = disks_api.get_disk_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/disks\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DisksServiceApiInstance\ \ *api.DisksServiceApi\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\ \ DisksServiceApiInstance = api.NewDisksServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"FAd0454f-a9F2-1e7F-6B89-f1AFaAAD8F65\"\ \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 := disks.GetDiskStatsRequest{ ExtId: &extId, StartTime_:\ \ &startTime_, EndTime_: &endTime_, SamplingInterval_: &samplingInterval_,\ \ StatType_: &statType_ }\n response, error := DisksServiceApiInstance.GetDiskStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.DiskStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/stats/disks/D6A6eAFA-D6C1-64bE-b4a1-ee8aAcc898Df?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1" \ --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/clustermgmt/v4.2/stats/disks/FeAB0AF7-CEDe-E4DD-bB7f-61ffbA497b26?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ DisksApi disksApi = new DisksApi(client);\n\n String extId = \"\ Ac09e4D5-8b9C-cb4e-DFde-caDec04A1cDB\";\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\n // Create request\ \ object with parameters\n var request = new GetDiskStatsRequest\ \ {\n ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType\n };\n try {\n \ \ GetDiskStatsApiResponse getDiskStatsApiResponse = disksApi.GetDiskStats(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/system-user-passwords: get: tags: - PasswordManager summary: List password status of system users description: Lists password status of system user accounts on supported products. operationId: listSystemUserPasswords 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=clusterExtId\ \ eq 'dcc66574-63ed-41b1-b4b0-eb60621c1738'" - name: hasHspInUse example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=hasHspInUse\ \ eq true" - name: hostIp/value example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=hostIp/value\ \ eq '83.92.41.252'" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=status\ \ eq Clustermgmt.Config.PasswordStatus'DEFAULT'" - name: systemType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=systemType\ \ eq Clustermgmt.Config.SystemType'PC'" - name: username example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$filter=username\ \ eq 'admin'" - 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: username example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$orderby=username" - 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/clustermgmt/v4.2/config/system-user-passwords?$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: hasHspInUse example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$select=hasHspInUse" - name: hostIp example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$select=hostIp" - name: status example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$select=status" - name: systemType example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$select=systemType" - name: username example: "https://{host}:{port}/api/clustermgmt/v4.2/config/system-user-passwords?$select=username" responses: "200": description: Returns a list of password statuses. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SystemUserPassword' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords Get operation x-permissions: operationName: View System User Password deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Super Admin - name: Prism Viewer - name: LocalAccountManager Admin - name: LocalAccountManager Viewer x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 10 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.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.PasswordManagerApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.PasswordManager.ListSystemUserPasswordsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListSystemUserPasswordsApiResponse;\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 \ \ PasswordManagerApi passwordManagerApi = new PasswordManagerApi(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 ListSystemUserPasswordsApiResponse\ \ listSystemUserPasswordsApiResponse = passwordManagerApi.listSystemUserPasswords(ListSystemUserPasswordsRequest.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(listSystemUserPasswordsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, PasswordManagerApi } from "@nutanix-api/clustermgmt-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 passwordManagerApi = new PasswordManagerApi(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"; passwordManagerApi.listSystemUserPasswords(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ password_manager_api = ntnx_clustermgmt_py_client.PasswordManagerApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = password_manager_api.list_system_user_passwords(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/passwordmanager\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n PasswordManagerServiceApiInstance\ \ *api.PasswordManagerServiceApi\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\ \ PasswordManagerServiceApiInstance = api.NewPasswordManagerServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := passwordmanager.ListSystemUserPasswordsRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_:\ \ nil, Select_: nil }\n response, error := PasswordManagerServiceApiInstance.ListSystemUserPasswords(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.SystemUserPassword)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/system-user-passwords?$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/clustermgmt/v4.2/config/system-user-passwords?$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.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ PasswordManagerApi passwordManagerApi = new PasswordManagerApi(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 ListSystemUserPasswordsRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Expand = expand,\n Select = select\n\ \ };\n try {\n ListSystemUserPasswordsApiResponse\ \ listSystemUserPasswordsApiResponse = passwordManagerApi.ListSystemUserPasswords(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/system-user-passwords/{extId}/$actions/change-password: post: tags: - PasswordManager summary: Initiate password update for a system user description: Initiate change password request for a system user on a supported product. operationId: changeSystemUserPasswordById parameters: - name: extId in: path description: External identifier of the system user password. 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: e641d1a7-1bdf-4787-ae1c-db5f61f9a792 - 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: 056cde18-ed31-45f3-b1b1-e161b7d62158 requestBody: description: Contains the required specifications for a password update operation. content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.ChangePasswordSpec' required: true responses: "202": description: Returns the task ID corresponding to the password update request. 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 /clustermgmt/v4.2/config/system-user-passwords/{extId}/$actions/change-password\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords/{extId}/$actions/change-password\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords/{extId}/$actions/change-password\ \ Post operation" x-permissions: operationName: Change Password System User Password deploymentList: - ON_PREM roleList: - name: Prism Admin - name: Super Admin - name: LocalAccountManager Admin x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 10 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.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.PasswordManagerApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.PasswordManager.ChangeSystemUserPasswordByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ChangePasswordSpec;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.ChangeSystemUserPasswordApiResponse;\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 \ \ PasswordManagerApi passwordManagerApi = new PasswordManagerApi(apiClient);\n\ \n ChangePasswordSpec changePasswordSpec = new ChangePasswordSpec();\n\ \n // ChangePasswordSpec object initializations here...\n \ \ changePasswordSpec.setNewPassword(\"SOME_PASSWORD_DATA\"); // required\ \ field\n \n String extId = \"9CADCBbB-F0D8-D5cB-9aCA-2D3a1Ffc520f\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ChangeSystemUserPasswordApiResponse\ \ changeSystemUserPasswordApiResponse = passwordManagerApi.changeSystemUserPasswordById(ChangeSystemUserPasswordByIdRequest.builder()\n\ \ .extId(extId)\n .build(), changePasswordSpec);\n\ \n System.out.println(changeSystemUserPasswordApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, PasswordManagerApi, ChangePasswordSpec } from\ \ \"@nutanix-api/clustermgmt-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.\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 passwordManagerApi = new PasswordManagerApi(apiClientInstance);\n\n\ function sample() {\n let changePasswordSpec = new ChangePasswordSpec();\n\ \n // ChangePasswordSpec object initializations here...\n changePasswordSpec.setNewPassword(\"\ SOME_PASSWORD_DATA\"); // required field\n changePasswordSpec = JSON.stringify(changePasswordSpec);\n\ \n \n let extId = \"a4aB0CBc-d5DF-fefb-ACDa-aBD5A0ddEaF5\";\n\n\n\n\ \n\n passwordManagerApi.changeSystemUserPasswordById(extId, changePasswordSpec).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ password_manager_api = ntnx_clustermgmt_py_client.PasswordManagerApi(api_client=client)\n\ \ changePasswordSpec = ntnx_clustermgmt_py_client.ChangePasswordSpec()\n\ \n # ChangePasswordSpec object initializations here...\n changePasswordSpec.new_password\ \ = \"SOME_PASSWORD_DATA\" # required field\n \n ext_id = \"DfFFF38f-cFb6-bBda-e0ed-ACfeFF0caE3C\"\ \n\n\n try:\n api_response = password_manager_api.change_system_user_password_by_id(extId=ext_id,\ \ body=changePasswordSpec)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/passwordmanager\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n PasswordManagerServiceApiInstance\ \ *api.PasswordManagerServiceApi\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\ \ PasswordManagerServiceApiInstance = api.NewPasswordManagerServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n changePasswordSpec := import1.NewChangePasswordSpec()\n\ \n // ChangePasswordSpec object initializations here...\n\n \n \ \ extId := \"bAf9BBCe-99F4-f4c2-cefa-2D5fFe2B2dfA\"\n\n\n request :=\ \ passwordmanager.ChangeSystemUserPasswordByIdRequest{ ExtId: &extId, Body:\ \ changePasswordSpec }\n response, error := PasswordManagerServiceApiInstance.ChangeSystemUserPasswordById(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/clustermgmt/v4.2/config/system-user-passwords/C5Da9ac9-bbd7-286b-cdDc-ee34cB8BFB1f/$actions/change-password" \ --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 {"currentPassword":"string","newPassword":"string","$objectType":"clustermgmt.v4.config.ChangePasswordSpec"} \ - 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 {"currentPassword":"string","newPassword":"string","$objectType":"clustermgmt.v4.config.ChangePasswordSpec"} \ - "https://host:port/api/clustermgmt/v4.2/config/system-user-passwords/e6cdbcfb-bcB0-3Bfc-27ef-E0FE9a1a6Adb/$actions/change-password" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ PasswordManagerApi passwordManagerApi = new PasswordManagerApi(client);\n\ \n ChangePasswordSpec changePasswordSpec = new ChangePasswordSpec();\n\ \n // ChangePasswordSpec object initializations here...\n changePasswordSpec.NewPassword\ \ = \"SOME_PASSWORD_DATA\"; // required field\n\n String extId = \"\ 7D6EAFad-dbAf-A88E-B21E-8ACcdAb21Dbe\";\n\n // Create request object\ \ with parameters\n var request = new ChangeSystemUserPasswordByIdRequest\ \ {\n ExtId = extId,\n Body = changePasswordSpec\n\ \ };\n try {\n ChangeSystemUserPasswordApiResponse\ \ changeSystemUserPasswordApiResponse = passwordManagerApi.ChangeSystemUserPasswordById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/ahv/config/pcie-devices: get: tags: - PcieDevices summary: Fetch the PCIe devices description: Fetch the PCIe devices operationId: listPcieDevices 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=clusterExtId\ \ eq '8233a91f-a10b-458c-a452-5701ac98b07b'" - name: configuration/classId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/classId\ \ eq 38" - name: configuration/deviceId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/deviceId\ \ eq 60" - name: configuration/progIFace example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/progIFace\ \ eq 24" - name: configuration/subClassId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/subClassId\ \ eq 4" - name: configuration/subSystemId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/subSystemId\ \ eq 95" - name: configuration/subSystemVendorId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/subSystemVendorId\ \ eq 63" - name: configuration/vendorId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=configuration/vendorId\ \ eq 90" - name: description example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=description\ \ eq 'Test PCIE device Description'" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=extId\ \ eq 'bf1928fd-9791-4770-9905-974efba538be'" - name: hostExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=hostExtId\ \ eq '70b1ee5a-0cba-47f6-b096-501a35ee69b6'" - name: ownerVmExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=ownerVmExtId\ \ eq '31c4f166-40b7-4961-9e4a-2416094a54c6'" - name: state example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=state\ \ eq Clustermgmt.Ahv.Config.PcieDeviceState'UVM_AVAILABLE'" - name: type example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=type\ \ eq Clustermgmt.Ahv.Config.PcieDeviceType'MASS_STORAGE_CONTROLLER'" - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=clusterExtId" - name: configuration example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=configuration" - name: description example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=description" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=extId" - name: hostExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=hostExtId" - name: ownerVmExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=ownerVmExtId" - name: state example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=state" - name: type example: "https://{host}:{port}/api/clustermgmt/v4.2/ahv/config/pcie-devices?$select=type" responses: "200": description: The requested PCIe device entities content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.ahv.config.PcieDevice' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/ahv/config/pcie-devices 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/ahv/config/pcie-devices 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/ahv/config/pcie-devices Get operation x-permissions: operationName: View Pcie Device deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Cluster Viewer - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Super Admin - name: Project Manager x-supported-versions: - product: PC version: "2024.3" - product: PE version: "7.0" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.PcieDevicesApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.PcieDevices.ListPcieDevicesRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.ahv.config.ListPcieDevicesApiResponse;\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 \ \ PcieDevicesApi pcieDevicesApi = new PcieDevicesApi(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 ListPcieDevicesApiResponse\ \ listPcieDevicesApiResponse = pcieDevicesApi.listPcieDevices(ListPcieDevicesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listPcieDevicesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, PcieDevicesApi } from "@nutanix-api/clustermgmt-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 pcieDevicesApi = new PcieDevicesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$select"] = "string_sample_data"; pcieDevicesApi.listPcieDevices(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ pcie_devices_api = ntnx_clustermgmt_py_client.PcieDevicesApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = pcie_devices_api.list_pcie_devices(_page=page, _limit=limit)\n \ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/pciedevices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/ahv/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n PcieDevicesServiceApiInstance\ \ *api.PcieDevicesServiceApi\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\ \ PcieDevicesServiceApiInstance = api.NewPcieDevicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := pciedevices.ListPcieDevicesRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Select_: nil }\n response, error :=\ \ PcieDevicesServiceApiInstance.ListPcieDevices(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().([]import1.PcieDevice)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=string_sample_data&$limit=50&$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/clustermgmt/v4.2/ahv/config/pcie-devices?$filter=string_sample_data&$limit=50&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.V4.Ahv;\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 \ \ PcieDevicesApi pcieDevicesApi = new PcieDevicesApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String select = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListPcieDevicesRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Select = select\n };\n try {\n \ \ ListPcieDevicesApiResponse listPcieDevicesApiResponse = pcieDevicesApi.ListPcieDevices(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate: get: tags: - SSLCertificate summary: Get SSL certificate details for a specified cluster description: Provides detailed information about the SSL certificate in privacy-enhanced mail (.pem) format for the specified cluster. operationId: getSSLCertificate parameters: - name: clusterExtId in: path description: UUID of the cluster to which the host NIC belongs. 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: 0acd0ee9-ff3c-4f9a-9407-7249d183dd51 responses: "200": description: Returns metadata and status of the SSL certificate in a structured response format. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.SSLCertificate' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ Get operation" x-permissions: operationName: View Cluster SSL Certificate deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin - name: Cluster Viewer - name: Prism Viewer x-rate-limit: - type: xsmall count: 5 timeUnit: minutes - type: small count: 5 timeUnit: minutes - type: large count: 5 timeUnit: minutes - type: xlarge count: 5 timeUnit: minutes 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.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.SSLCertificateApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.SSLCertificate.GetSSLCertificateRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetSSLCertificateApiResponse;\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 \ \ SSLCertificateApi sSLCertificateApi = new SSLCertificateApi(apiClient);\n\ \n \n String clusterExtId = \"dcb5d464-0cCC-FDFa-b9Ca-aCa7EAE99BC1\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSSLCertificateApiResponse\ \ getSSLCertificateApiResponse = sSLCertificateApi.getSSLCertificate(GetSSLCertificateRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build());\n\ \n System.out.println(getSSLCertificateApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SSLCertificateApi } from \"@nutanix-api/clustermgmt-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 sSLCertificateApi = new SSLCertificateApi(apiClientInstance);\n\nfunction\ \ sample() {\n\n \n let clusterExtId = \"Acbf74De-ccE1-BeEa-41eD-BEFd58FFcaeF\"\ ;\n\n\n\n\n\n sSLCertificateApi.getSSLCertificate(clusterExtId).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ s_sl_certificate_api = ntnx_clustermgmt_py_client.SSLCertificateApi(api_client=client)\n\ \ \n cluster_ext_id = \"dDEB5d8a-A554-c846-b1Cb-19AEd4a79feE\"\n\n\ \n try:\n api_response = s_sl_certificate_api.get_ssl_certificate(clusterExtId=cluster_ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/sslcertificate\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SSLCertificateServiceApiInstance\ \ *api.SSLCertificateServiceApi\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\ \ SSLCertificateServiceApiInstance = api.NewSSLCertificateServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"83509501-bfBf-90fC-9F01-33DcA9cCaeAd\"\ \n\n\n request := sslcertificate.GetSSLCertificateRequest{ ClusterExtId:\ \ &clusterExtId }\n response, error := SSLCertificateServiceApiInstance.GetSSLCertificate(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SSLCertificate)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/8DEbCdb7-AdE0-dbC6-de1F-4faaCA0D7F2e/ssl-certificate" \ --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/clustermgmt/v4.2/config/clusters/eCbcBBe5-BC6F-CE2D-E8De-5bc9CAcfA8aB/ssl-certificate" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ SSLCertificateApi sSLCertificateApi = new SSLCertificateApi(client);\n\ \n String clusterExtId = \"D43dfBb7-Fad0-8fDF-EfBf-Fc7E4fFa49dA\";\n\ \n // Create request object with parameters\n var request\ \ = new GetSSLCertificateRequest {\n ClusterExtId = clusterExtId\n\ \ };\n try {\n GetSSLCertificateApiResponse getSSLCertificateApiResponse\ \ = sSLCertificateApi.GetSSLCertificate(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" put: tags: - SSLCertificate summary: Update the SSL certificate for a specific cluster description: "To update the SSL certificate for a specific cluster, you must\ \ provide a valid certificate payload in Base64 format. You can either import\ \ a new SSL certificate or replace an existing one by supplying all necessary\ \ fields, including the Base64-encoded certificate and private key. Alternatively,\ \ you can regenerate a self-signed certificate by specifying the privateKeyAlgorithm,\ \ noting that only the RSA_2048 algorithm is supported for SSL certificate\ \ regeneration. This process helps maintain the security and integrity of\ \ your cluster's communications by allowing you to update or regenerate the\ \ SSL certificate as needed." operationId: updateSSLCertificate parameters: - name: clusterExtId in: path description: UUID of the cluster to which the host NIC belongs. 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: ffb808a8-4e97-4628-8957-334013e4e57e - 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: 32f07940-84be-4d89-b917-812c5c73303e requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.SSLCertificate' required: true responses: "202": description: Returns the task ID corresponding to the certificate update request. 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 /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ Put operation" x-permissions: operationName: Update Cluster SSL Certificate deploymentList: - ON_PREM - CLOUD roleList: - name: Cluster Admin - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 1 timeUnit: minutes - type: small count: 1 timeUnit: minutes - type: large count: 1 timeUnit: minutes - type: xlarge count: 1 timeUnit: minutes 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.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.SSLCertificateApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.SSLCertificate.UpdateSSLCertificateRequest;\n\ \nimport java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.PrivateKeyAlgorithm;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.SSLCertificate;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateSSLCertificateApiResponse;\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 \ \ SSLCertificateApi sSLCertificateApi = new SSLCertificateApi(apiClient);\n\ \n SSLCertificate sSLCertificate = new SSLCertificate();\n\n \ \ // SSLCertificate object initializations here...\n sSLCertificate.setPrivateKeyAlgorithm(PrivateKeyAlgorithm.UNKNOWN);\ \ // required field\n \n String clusterExtId = \"E6E3F2b2-b3a2-3aB5-3c24-cC94D3FbFDd0\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.getEtag(getResponse);\n\ \ HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n */\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ UpdateSSLCertificateApiResponse updateSSLCertificateApiResponse = sSLCertificateApi.updateSSLCertificate(UpdateSSLCertificateRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .build(),\ \ sSLCertificate, opts);\n\n System.out.println(updateSSLCertificateApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SSLCertificateApi, PrivateKeyAlgorithm, SSLCertificate\ \ } from \"@nutanix-api/clustermgmt-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 sSLCertificateApi = new SSLCertificateApi(apiClientInstance);\n\nfunction\ \ sample() {\n let sSLCertificate = new SSLCertificate();\n\n // SSLCertificate\ \ object initializations here...\n sSLCertificate.setPrivateKeyAlgorithm(PrivateKeyAlgorithm.UNKNOWN);\ \ // required field\n sSLCertificate = JSON.stringify(sSLCertificate);\n\ \n \n let clusterExtId = \"06dF79dA-bCeA-DDbc-f0F5-AFee2F42AF0E\"\ ;\n\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in the\ \ If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n */\n sSLCertificateApi.updateSSLCertificate(clusterExtId,\ \ sSLCertificate, 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}\nsample()\n" - lang: Python source: "\nimport ntnx_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ s_sl_certificate_api = ntnx_clustermgmt_py_client.SSLCertificateApi(api_client=client)\n\ \ sSLCertificate = ntnx_clustermgmt_py_client.SSLCertificate()\n\n \ \ # SSLCertificate object initializations here...\n sSLCertificate.private_key_algorithm\ \ = ntnx_clustermgmt_py_client.PrivateKeyAlgorithm._UNKNOWN # required\ \ field\n \n cluster_ext_id = \"4A6B7d6A-17b6-05DD-ab3f-4fddBFfD1011\"\ \n\n \"\"\"\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in the\ \ If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n etag_value = ApiClient.get_etag(get_api_response)\n\ \ \"\"\"\n\n try:\n api_response = s_sl_certificate_api.update_ssl_certificate(clusterExtId=cluster_ext_id,\ \ body=sSLCertificate, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/sslcertificate\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SSLCertificateServiceApiInstance\ \ *api.SSLCertificateServiceApi\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\ \ SSLCertificateServiceApiInstance = api.NewSSLCertificateServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n sSLCertificate := import1.NewSSLCertificate()\n\ \n // SSLCertificate object initializations here...\n\n \n clusterExtId\ \ := \"fdFFdCAb-7B7B-f08C-45aC-cfAafC3B8Be9\"\n\n /*\n Some Create,\ \ Update, and Delete operations generally require an If-Match header with\ \ a value to be passed in order to protect against concurrent updates.\n\ \ The value that needs to be sent in the If-Match header needs to be\ \ retrieved by performing a Read(Get) operation on the same resource.\n\ \ ETags can be retrieved by calling a static method of ApiClient as below:\n\ \ etagValue := ApiClientInstance.GetEtag(getResponse)\n */\n\n \ \ request := sslcertificate.UpdateSSLCertificateRequest{ ClusterExtId: &clusterExtId,\ \ Body: sSLCertificate }\n response, error := SSLCertificateServiceApiInstance.UpdateSSLCertificate(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/clustermgmt/v4.2/config/clusters/DBDCB63d-DcdA-dfAD-c80d-eF8fF0B9ADc0/ssl-certificate" \ --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 {"passphrase":"password","privateKey":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI1ekNDQVk2Z0F3SLS0tCg==","publicCertificate":"LS0tLS1CRUdJTiBDRVJUSUZJJUSURS0tLS0tCk1JSUUZJQ0FURS0tLS0tCg==","caChain":"LS0tLS1CRUdJTiBFQyBQUkURS0tLS0tCk1JSUlVkFURSBLRVktLS0tLQo=","privateKeyAlgorithm":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SSLCertificate"} \ - 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 {"passphrase":"password","privateKey":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI1ekNDQVk2Z0F3SLS0tCg==","publicCertificate":"LS0tLS1CRUdJTiBDRVJUSUZJJUSURS0tLS0tCk1JSUUZJQ0FURS0tLS0tCg==","caChain":"LS0tLS1CRUdJTiBFQyBQUkURS0tLS0tCk1JSUlVkFURSBLRVktLS0tLQo=","privateKeyAlgorithm":"$UNKNOWN","$objectType":"clustermgmt.v4.config.SSLCertificate"} \ - "https://host:port/api/clustermgmt/v4.2/config/clusters/BD3E41bF-F8dd-6C3B-FBcF-8a0d6cFB3aA0/ssl-certificate" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ SSLCertificateApi sSLCertificateApi = new SSLCertificateApi(client);\n\ \n SSLCertificate sSLCertificate = new SSLCertificate();\n\n //\ \ SSLCertificate object initializations here...\n sSLCertificate.PrivateKeyAlgorithm\ \ = PrivateKeyAlgorithm.UNKNOWN; // required field\n\n String clusterExtId\ \ = \"Fd682Bf0-0e4f-b15A-6Aeb-c9cef2fcBeE8\";\n\n /*\n Some\ \ Create, Update, and Delete operations generally require an If-Match header\ \ with a value to be passed in order to protect against concurrent updates.\n\ \ The value that needs to be sent in the If-Match header needs to\ \ be retrieved by performing a Read(Get) operation on the same resource.\n\ \ ETags can be retrieved by calling a static method of ApiClient\ \ as below:\n String eTag = ApiClient.GetEtag(getResponse);\n \ \ Dictionary opts = new Dictionary();\n\ \ opts[\"If-Match\"] = eTag;\n */\n // Create request\ \ object with parameters\n var request = new UpdateSSLCertificateRequest\ \ {\n ClusterExtId = clusterExtId,\n Body = sSLCertificate,\n\ \ \n \n };\n try {\n UpdateSSLCertificateApiResponse\ \ updateSSLCertificateApiResponse = sSLCertificateApi.UpdateSSLCertificate(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/storage-containers: get: tags: - StorageContainers summary: List Storage Containers description: | Lists the Storage Containers available in the cluster. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users. operationId: listStorageContainers 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: affinityHostExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=affinityHostExtId\ \ eq 'fe131beb-2f8d-4f29-a449-5444740dbd5e'" - name: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=clusterExtId\ \ eq 'e75f6a35-dd46-4ac2-9e06-14184a342f34'" - name: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=clusterName\ \ eq 'string'" - name: compressionDelaySecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=compressionDelaySecs\ \ eq 59" - name: containerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=containerExtId\ \ eq 'be13a630-b7a7-408d-85f7-1017b73ca108'" - name: isShared example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=isShared\ \ eq false" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=name\ \ eq 'string'" - name: ownerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=ownerExtId\ \ eq '46e14011-0962-4569-a3f2-d4fbdb23828c'" - name: replicationFactor example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=replicationFactor\ \ eq 51" - name: storagePoolExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$filter=storagePoolExtId\ \ eq 'aa4434d8-e9c6-4c54-8cc8-537ec59a3993'" - 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: affinityHostExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=affinityHostExtId" - name: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=clusterName" - name: compressionDelaySecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=compressionDelaySecs" - name: containerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=containerExtId" - name: erasureCode example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=erasureCode" - name: isShared example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=isShared" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=name" - name: replicationFactor example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$orderby=replicationFactor" - 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: affinityHostExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=affinityHostExtId" - name: cacheDeduplication example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=cacheDeduplication" - name: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=clusterExtId" - name: clusterName example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=clusterName" - name: compressionDelaySecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=compressionDelaySecs" - name: containerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=containerExtId" - name: erasureCode example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=erasureCode" - name: erasureCodeDelaySecs example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=erasureCodeDelaySecs" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=extId" - name: externalStorageExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=externalStorageExtId" - name: hasHigherEcFaultDomainPreference example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=hasHigherEcFaultDomainPreference" - name: isCompressionEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isCompressionEnabled" - name: isEncrypted example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isEncrypted" - name: isInlineEcEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isInlineEcEnabled" - name: isInternal example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isInternal" - name: isMarkedForRemoval example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isMarkedForRemoval" - name: isNfsWhitelistInherited example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isNfsWhitelistInherited" - name: isShared example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isShared" - name: isSoftwareEncryptionEnabled example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=isSoftwareEncryptionEnabled" - name: links example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=links" - name: logicalAdvertisedCapacityBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=logicalAdvertisedCapacityBytes" - name: logicalExplicitReservedCapacityBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=logicalExplicitReservedCapacityBytes" - name: logicalImplicitReservedCapacityBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=logicalImplicitReservedCapacityBytes" - name: maxCapacityBytes example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=maxCapacityBytes" - name: name example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=name" - name: nfsWhitelistAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=nfsWhitelistAddress" - name: onDiskDedup example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=onDiskDedup" - name: ownerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=ownerExtId" - name: replicationFactor example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=replicationFactor" - name: storagePoolExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=storagePoolExtId" - name: tenantId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/storage-containers?$select=tenantId" responses: "200": description: Returns the list of storage containers. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers Get operation x-permissions: deploymentList: - ON_PREM - CLOUD operationName: View Storage Container roleList: - name: Consumer - name: CSI System - name: Developer - name: Kubernetes Data Services System - name: Operator - name: Prism Admin - name: Prism Viewer - name: Project Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Storage Viewer - name: Super Admin - name: Backup Admin - name: Project Manager - name: NCM Connector 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.ListStorageContainersRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListStorageContainersApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(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 ListStorageContainersApiResponse\ \ listStorageContainersApiResponse = storageContainersApi.listStorageContainers(ListStorageContainersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listStorageContainersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, StorageContainersApi } from "@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(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["$select"] = "string_sample_data"; storageContainersApi.listStorageContainers(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = storage_containers_api.list_storage_containers(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := storagecontainers.ListStorageContainersRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_:\ \ nil }\n response, error := StorageContainersServiceApiInstance.ListStorageContainers(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.StorageContainer)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/storage-containers?$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/clustermgmt/v4.2/config/storage-containers?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \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 ListStorageContainersRequest {\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListStorageContainersApiResponse listStorageContainersApiResponse\ \ = storageContainersApi.ListStorageContainers(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" post: tags: - StorageContainers summary: Create a Storage Container description: "Creates a new Storage Container with the specified configuration\ \ on the cluster identified by cluster’s external identifier. The location\ \ header received in the API response contains the URL of the task object,\ \ which can be used to further track the status of the request." operationId: createStorageContainer parameters: - name: X-Cluster-Id in: header description: The external identifier of the remote cluster to which the request is forwarded. 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: fdabdf0a-202d-4ccf-8ef0-ad7d6f2ae17f - 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: 8d23df44-1e94-4e70-9777-0de6ccaea7ac requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' required: true responses: "202": description: Returns the status code indicating the request for creating a new storage container is accepted but not completed yet. 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 /clustermgmt/v4.2/config/storage-containers 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers Post operation x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Create Storage Container roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.clu.java.client.ApiClient; import com.nutanix.clu.java.client.api.StorageContainersApi; import com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.CreateStorageContainerRequest; import com.nutanix.dp1.clu.clustermgmt.v4.config.StorageContainer; import com.nutanix.dp1.clu.clustermgmt.v4.config.CreateStorageContainerApiResponse; 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. StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient); StorageContainer storageContainer = new StorageContainer(); // StorageContainer object initializations here... storageContainer.setName("string_sample_data"); // required field try { // Pass in parameters using the request builder object associated with the operation. CreateStorageContainerApiResponse createStorageContainerApiResponse = storageContainersApi.createStorageContainer(CreateStorageContainerRequest.builder() .build(), storageContainer); System.out.println(createStorageContainerApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, StorageContainersApi, StorageContainer } from "@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance); function sample() { let storageContainer = new StorageContainer(); // StorageContainer object initializations here... storageContainer.setName("string_sample_data"); // required field storageContainer = JSON.stringify(storageContainer); storageContainersApi.createStorageContainer(storageContainer).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_clustermgmt_py_client if __name__ == "__main__": # Configure the client config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config) storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client) storageContainer = ntnx_clustermgmt_py_client.StorageContainer() # StorageContainer object initializations here... storageContainer.name = "string_sample_data" # required field try: api_response = storage_containers_api.create_storage_container(body=storageContainer) print(api_response) except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers" import1 "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config" import2 "github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config" ) var ( ApiClientInstance *client.ApiClient StorageContainersServiceApiInstance *api.StorageContainersServiceApi ) 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. StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance) ctx := context.Background() storageContainer := import1.NewStorageContainer() // StorageContainer object initializations here... request := storagecontainers.CreateStorageContainerRequest{ Body: storageContainer } response, error := StorageContainersServiceApiInstance.CreateStorageContainer(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/clustermgmt/v4.2/config/storage-containers" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Cluster-Id: E3eCEadA-dce4-90Bf-2C3E-cCdC4BBd1C01' \ --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"}],"containerExtId":"string","ownerExtId":"string","name":"string","clusterExtId":"string","storagePoolExtId":"string","isMarkedForRemoval":true,"maxCapacityBytes":0,"logicalExplicitReservedCapacityBytes":0,"logicalImplicitReservedCapacityBytes":0,"logicalAdvertisedCapacityBytes":0,"replicationFactor":0,"nfsWhitelistAddress":[{"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"}],"isNfsWhitelistInherited":true,"erasureCode":"$UNKNOWN","isInlineEcEnabled":true,"hasHigherEcFaultDomainPreference":true,"erasureCodeDelaySecs":0,"cacheDeduplication":"$UNKNOWN","onDiskDedup":"$UNKNOWN","isCompressionEnabled":true,"compressionDelaySecs":0,"isInternal":true,"isSoftwareEncryptionEnabled":true,"isEncrypted":true,"affinityHostExtId":"string","clusterName":"string","isShared":true,"externalStorageExtId":"string","$objectType":"clustermgmt.v4.config.StorageContainer"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Cluster-Id: D2faedE9-dcD2-ACbf-2Ca8-CE89bcBD1cbB' \ --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"}],"containerExtId":"string","ownerExtId":"string","name":"string","clusterExtId":"string","storagePoolExtId":"string","isMarkedForRemoval":true,"maxCapacityBytes":0,"logicalExplicitReservedCapacityBytes":0,"logicalImplicitReservedCapacityBytes":0,"logicalAdvertisedCapacityBytes":0,"replicationFactor":0,"nfsWhitelistAddress":[{"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"}],"isNfsWhitelistInherited":true,"erasureCode":"$UNKNOWN","isInlineEcEnabled":true,"hasHigherEcFaultDomainPreference":true,"erasureCodeDelaySecs":0,"cacheDeduplication":"$UNKNOWN","onDiskDedup":"$UNKNOWN","isCompressionEnabled":true,"compressionDelaySecs":0,"isInternal":true,"isSoftwareEncryptionEnabled":true,"isEncrypted":true,"affinityHostExtId":"string","clusterName":"string","isShared":true,"externalStorageExtId":"string","$objectType":"clustermgmt.v4.config.StorageContainer"} \ - "https://host:port/api/clustermgmt/v4.2/config/storage-containers" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n StorageContainer storageContainer = new StorageContainer();\n\n\ \ // StorageContainer object initializations here...\n storageContainer.Name\ \ = \"string_sample_data\"; // required field\n\n\n // Create request\ \ object with parameters\n var request = new CreateStorageContainerRequest\ \ {\n Body = storageContainer\n };\n try {\n \ \ CreateStorageContainerApiResponse createStorageContainerApiResponse\ \ = storageContainersApi.CreateStorageContainer(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/storage-containers/{extId}: get: tags: - StorageContainers summary: Get Storage Container configuration description: | Fetches the configuration details of an existing storage container identified by the external identifier. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users. operationId: getStorageContainerById parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: 6f90904a-2e56-427a-abc5-4d00b50c1a51 responses: "200": description: Returns the requested storage container details. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Get operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: View Storage Container roleList: - name: Consumer - name: CSI System - name: Developer - name: Kubernetes Data Services System - name: Operator - name: Prism Admin - name: Prism Viewer - name: Project Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Storage Viewer - name: Super Admin - name: Backup Admin - name: Project Manager - name: NCM Connector 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.GetStorageContainerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetStorageContainerApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n \n String extId = \"Bb932Aba-aEeD-c1b9-dEF0-525cadD51DBD\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetStorageContainerApiResponse\ \ getStorageContainerApiResponse = storageContainersApi.getStorageContainerById(GetStorageContainerByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getStorageContainerApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"13BbFA1E-b57A-B0f8-977E-6FDDd8faFE1F\"\ ;\n\n\n\n\n\n storageContainersApi.getStorageContainerById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n ext_id = \"FE93FA54-ABe2-D0e8-Fd26-DFc4BaFBFa67\"\n\n\n try:\n\ \ api_response = storage_containers_api.get_storage_container_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"E8Ebb3AF-A9e6-9223-BDAf-D7FaBfeC1eAC\"\ \n\n\n request := storagecontainers.GetStorageContainerByIdRequest{ ExtId:\ \ &extId }\n response, error := StorageContainersServiceApiInstance.GetStorageContainerById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.StorageContainer)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/storage-containers/aa5D5a1c-FA0d-B4FE-d7f6-10E7E13a58aF" \ --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/clustermgmt/v4.2/config/storage-containers/FcebcF2a-3Cb1-03F6-92DE-8694F8BC6bDE" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n String extId = \"2dD30A1E-a35d-d4c7-FA3E-a9EEf26dBCbD\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetStorageContainerByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetStorageContainerApiResponse getStorageContainerApiResponse\ \ = storageContainersApi.GetStorageContainerById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" put: tags: - StorageContainers summary: Update a Storage Container description: "Updates the configuration of an existing Storage Container identified\ \ by external identifier. The location header received in the API response\ \ contains the URL of the task object, which can be used to further track\ \ the status of the request." operationId: updateStorageContainerById parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: d1dc7efc-b5c2-4414-bf85-55e945253227 - 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: a31009e0-b641-4e9f-bd41-7fe145197d32 requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' required: true responses: "202": description: Returns the status code indicating the request to update storage container is accepted but not completed yet. 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 /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Put operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Update Storage Container roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager - name: Backup Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.UpdateStorageContainerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.GetStorageContainerByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.clu.clustermgmt.v4.config.StorageContainer;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.GetStorageContainerApiResponse;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.UpdateStorageContainerApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n StorageContainer storageContainer = new StorageContainer();\n\n\ \ // StorageContainer object initializations here...\n storageContainer.setName(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"ad1cf1dd-CFb9-0bA8-cCbC-D80c15B7dAee\";\n\n // perform GET\ \ call\n GetStorageContainerApiResponse getResponse = null;\n \ \ try {\n getResponse = storageContainersApi.getStorageContainerById(GetStorageContainerByIdRequest.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 UpdateStorageContainerApiResponse\ \ updateStorageContainerApiResponse = storageContainersApi.updateStorageContainerById(UpdateStorageContainerByIdRequest.builder()\n\ \ .extId(extId)\n .build(), storageContainer,\ \ opts);\n\n System.out.println(updateStorageContainerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi, StorageContainer, GetStorageContainerApiResponse\ \ } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n let storageContainer = new StorageContainer();\n\ \n // StorageContainer object initializations here...\n storageContainer.setName(\"\ string_sample_data\"); // required field\n storageContainer = JSON.stringify(storageContainer);\n\ \n \n let extId = \"FBBE3BbC-0BFc-7eC7-dD9A-cCDbfab6397F\";\n\n\n\ \ // Perform Get call\n storageContainersApi.getStorageContainerById(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 storageContainersApi.updateStorageContainerById(extId,\ \ storageContainer, 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ storageContainer = ntnx_clustermgmt_py_client.StorageContainer()\n\n\ \ # StorageContainer object initializations here...\n storageContainer.name\ \ = \"string_sample_data\" # required field\n \n ext_id = \"794e4b3E-75Ee-9C8b-FaEe-63F1e47BCfbB\"\ \n\n try:\n api_response = storage_containers_api.get_storage_container_by_id(extId=ext_id)\n\ \ except ntnx_clustermgmt_py_client.rest.ApiException as e:\n \ \ print(e)\n # Extract E-Tag Header\n etag_value = ntnx_clustermgmt_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = storage_containers_api.update_storage_container_by_id(extId=ext_id,\ \ body=storageContainer, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n storageContainer := import1.NewStorageContainer()\n\ \n // StorageContainer object initializations here...\n\n \n extId\ \ := \"7C5eB8F4-AEAA-91AD-F00C-f9AAa0Ca4ee6\"\n\n getRequest := storagecontainers.GetStorageContainerByIdRequest{\ \ extId: &extId }\n getResponse, err := StorageContainersServiceApiInstance.GetStorageContainerById(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 := storagecontainers.UpdateStorageContainerByIdRequest{ ExtId:\ \ &extId, Body: storageContainer }\n response, error := StorageContainersServiceApiInstance.UpdateStorageContainerById(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/clustermgmt/v4.2/config/storage-containers/a0FCD98e-E305-BCcF-6d5b-8Ce217EE8c9a" \ --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"}],"containerExtId":"string","ownerExtId":"string","name":"string","clusterExtId":"string","storagePoolExtId":"string","isMarkedForRemoval":true,"maxCapacityBytes":0,"logicalExplicitReservedCapacityBytes":0,"logicalImplicitReservedCapacityBytes":0,"logicalAdvertisedCapacityBytes":0,"replicationFactor":0,"nfsWhitelistAddress":[{"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"}],"isNfsWhitelistInherited":true,"erasureCode":"$UNKNOWN","isInlineEcEnabled":true,"hasHigherEcFaultDomainPreference":true,"erasureCodeDelaySecs":0,"cacheDeduplication":"$UNKNOWN","onDiskDedup":"$UNKNOWN","isCompressionEnabled":true,"compressionDelaySecs":0,"isInternal":true,"isSoftwareEncryptionEnabled":true,"isEncrypted":true,"affinityHostExtId":"string","clusterName":"string","isShared":true,"externalStorageExtId":"string","$objectType":"clustermgmt.v4.config.StorageContainer"} \ - 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"}],"containerExtId":"string","ownerExtId":"string","name":"string","clusterExtId":"string","storagePoolExtId":"string","isMarkedForRemoval":true,"maxCapacityBytes":0,"logicalExplicitReservedCapacityBytes":0,"logicalImplicitReservedCapacityBytes":0,"logicalAdvertisedCapacityBytes":0,"replicationFactor":0,"nfsWhitelistAddress":[{"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"}],"isNfsWhitelistInherited":true,"erasureCode":"$UNKNOWN","isInlineEcEnabled":true,"hasHigherEcFaultDomainPreference":true,"erasureCodeDelaySecs":0,"cacheDeduplication":"$UNKNOWN","onDiskDedup":"$UNKNOWN","isCompressionEnabled":true,"compressionDelaySecs":0,"isInternal":true,"isSoftwareEncryptionEnabled":true,"isEncrypted":true,"affinityHostExtId":"string","clusterName":"string","isShared":true,"externalStorageExtId":"string","$objectType":"clustermgmt.v4.config.StorageContainer"} \ - "https://host:port/api/clustermgmt/v4.2/config/storage-containers/2d40beF1-BEdE-daBB-CaD2-bdFd83cBdcFd" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n StorageContainer storageContainer = new StorageContainer();\n\n\ \ // StorageContainer object initializations here...\n storageContainer.Name\ \ = \"string_sample_data\"; // required field\n\n String extId = \"\ DAFdCEEf-6A4E-bdde-79eE-Ea19eAb10bB0\";\n\n // perform GET call\n\ \ var getRequest = new GetStorageContainerByIdRequest {\n \ \ ExtId = extId\n };\n try {\n GetStorageContainerApiResponse\ \ getResponse = storageContainersApi.GetStorageContainerById(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 UpdateStorageContainerByIdRequest {\n ExtId =\ \ extId,\n Body = storageContainer,\n \n \ \ \n };\n try {\n UpdateStorageContainerApiResponse\ \ updateStorageContainerApiResponse = storageContainersApi.UpdateStorageContainerById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - StorageContainers summary: Delete a Storage Container description: "Deletes an existing Storage Container identified by external identifier.\ \ The location header received in the API response contains the URL of the\ \ task object, which can be used to further track the status of the request." operationId: deleteStorageContainerById parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: c9b2c2aa-530b-4b12-9d0e-32601abf7f79 - 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: eba74eb8-541b-40e6-8281-e197b190ccbf - name: ignoreSmallFiles in: query required: false style: form explode: true schema: type: boolean description: Indicates whether the small files should be ignored. Storage containers can have small files that are measured in KBs; these files are ignored when the storage container is marked for removal. default: true responses: "202": description: Returns task ID indicating the request to delete a storage container is accepted but not completed yet. 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 /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Delete operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Delete Storage Container roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.DeleteStorageContainerByIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DeleteStorageContainerApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n \n String extId = \"EDf6Fa7E-ADEA-eE1A-d2BC-c402d5CFCAbb\"\ ;\n \n boolean ignoreSmallFiles = true;\n\n try {\n\ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n DeleteStorageContainerApiResponse deleteStorageContainerApiResponse\ \ = storageContainersApi.deleteStorageContainerById(DeleteStorageContainerByIdRequest.builder()\n\ \ .extId(extId)\n .ignoreSmallFiles(ignoreSmallFiles)\n\ \ .build());\n\n System.out.println(deleteStorageContainerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"ce699ab7-d1Ed-89DB-c5Ad-c87e5bb6aB21\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ ignoreSmallFiles\"] = true;\n\n\n\n\n storageContainersApi.deleteStorageContainerById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n ext_id = \"ccdAC15d-7d6a-7E3A-0cCd-D617afbe8B55\"\n \n \ \ ignore_small_files = True\n\n\n try:\n api_response = storage_containers_api.delete_storage_container_by_id(extId=ext_id,\ \ _ignoreSmallFiles=ignore_small_files)\n print(api_response)\n \ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"E3Eb9eaC-4EB1-FdfA-a2c8-524AC46bcAfB\"\ \n \n ignoreSmallFiles := true\n\n\n request := storagecontainers.DeleteStorageContainerByIdRequest{\ \ ExtId: &extId, IgnoreSmallFiles: &ignoreSmallFiles }\n response, error\ \ := StorageContainersServiceApiInstance.DeleteStorageContainerById(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/clustermgmt/v4.2/config/storage-containers/dd482621-FbBe-443f-CED7-C85C850cAdA6?ignoreSmallFiles=true" \ --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/clustermgmt/v4.2/config/storage-containers/5B90FddC-fBAb-2dfB-bd27-aFdEf79fADE8?ignoreSmallFiles=true" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n String extId = \"afaFd51f-4fb3-CBC2-dc43-Dd47e5A3E8aB\";\n \ \ boolean ignoreSmallFiles = true;\n\n // Create request object with\ \ parameters\n var request = new DeleteStorageContainerByIdRequest\ \ {\n ExtId = extId,\n IgnoreSmallFiles = ignoreSmallFiles\n\ \ };\n try {\n DeleteStorageContainerApiResponse\ \ deleteStorageContainerApiResponse = storageContainersApi.DeleteStorageContainerById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/mount: post: tags: - StorageContainers summary: Mount Storage Container on ESX datastore description: "Mounts the Storage Container identified by external identifier\ \ on an ESX datastore. The location header received in the API response contains\ \ the URL of the task object, which can be used to further track the status\ \ of the request." operationId: mountStorageContainer parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: fb4d1eec-848d-40aa-98b6-e6249a30c84c requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.DataStoreMount' required: true responses: "202": description: Returns task ID indicating the request to mount storage container is accepted but not completed yet. 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 /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/mount\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/mount\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/mount\ \ Post operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Mount Storage Container Datastore roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.MountStorageContainerRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DataStoreMount;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.MountStorageContainerApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n DataStoreMount dataStoreMount = new DataStoreMount();\n\n \ \ // DataStoreMount object initializations here...\n dataStoreMount.setContainerName(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"9FcBda0f-7f2F-fc2e-F4Df-bdce18D0FBFd\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n MountStorageContainerApiResponse mountStorageContainerApiResponse\ \ = storageContainersApi.mountStorageContainer(MountStorageContainerRequest.builder()\n\ \ .extId(extId)\n .build(), dataStoreMount);\n\ \n System.out.println(mountStorageContainerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi, DataStoreMount } from\ \ \"@nutanix-api/clustermgmt-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.\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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n let dataStoreMount = new DataStoreMount();\n\n\ \ // DataStoreMount object initializations here...\n dataStoreMount.setContainerName(\"\ string_sample_data\"); // required field\n dataStoreMount = JSON.stringify(dataStoreMount);\n\ \n \n let extId = \"C2451D4C-3e1E-a96d-ceb2-BbbFA2E865fA\";\n\n\n\n\ \n\n storageContainersApi.mountStorageContainer(extId, dataStoreMount).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ dataStoreMount = ntnx_clustermgmt_py_client.DataStoreMount()\n\n \ \ # DataStoreMount object initializations here...\n dataStoreMount.container_name\ \ = \"string_sample_data\" # required field\n \n ext_id = \"fCb8c87c-2Fa5-1fE4-1AFD-a08C1aba5DaA\"\ \n\n\n try:\n api_response = storage_containers_api.mount_storage_container(extId=ext_id,\ \ body=dataStoreMount)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n dataStoreMount := import1.NewDataStoreMount()\n\ \n // DataStoreMount object initializations here...\n\n \n extId\ \ := \"5c2C1eCC-9fF7-BCEb-825B-96dEEc9dFFa8\"\n\n\n request := storagecontainers.MountStorageContainerRequest{\ \ ExtId: &extId, Body: dataStoreMount }\n response, error := StorageContainersServiceApiInstance.MountStorageContainer(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/clustermgmt/v4.2/config/storage-containers/0FcEace0-dA11-a016-C0d9-A035d2BadFB9/$actions/mount" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"datastoreName":"string","containerName":"string","nodeExtIds":["string"],"isReadOnly":true,"targetPath":"string","$objectType":"clustermgmt.v4.config.DataStoreMount"} \ - 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 {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"datastoreName":"string","containerName":"string","nodeExtIds":["string"],"isReadOnly":true,"targetPath":"string","$objectType":"clustermgmt.v4.config.DataStoreMount"} \ - "https://host:port/api/clustermgmt/v4.2/config/storage-containers/F69Aafab-CaE6-Df5f-01ab-1FF55dbd7eB0/$actions/mount" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n DataStoreMount dataStoreMount = new DataStoreMount();\n\n //\ \ DataStoreMount object initializations here...\n dataStoreMount.ContainerName\ \ = \"string_sample_data\"; // required field\n\n String extId = \"\ fB5a066B-d6EE-DcEA-FEC8-f7CDF04Bb91f\";\n\n // Create request object\ \ with parameters\n var request = new MountStorageContainerRequest\ \ {\n ExtId = extId,\n Body = dataStoreMount\n \ \ };\n try {\n MountStorageContainerApiResponse mountStorageContainerApiResponse\ \ = storageContainersApi.MountStorageContainer(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/unmount: post: tags: - StorageContainers summary: Unmount Storage Container from ESX datastore description: "Unmounts the Storage Container identified by external identifier\ \ from the ESX datastore. The location header received in the API response\ \ contains the URL of the task object, which can be used to further track\ \ the status of the request." operationId: unmountStorageContainer parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: 2987c21f-7696-4bf1-b49e-eff495047679 requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.DataStoreUnmount' required: true responses: "202": description: Returns the task ID indicating the request to unmount storage container is accepted but is not completed yet. 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 /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/unmount\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/unmount\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/unmount\ \ Post operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Unmount Storage Container Datastore roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.UnmountStorageContainerRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.DataStoreUnmount;\nimport\ \ com.nutanix.dp1.clu.clustermgmt.v4.config.UnmountStorageContainerApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n DataStoreUnmount dataStoreUnmount = new DataStoreUnmount();\n\n\ \ // DataStoreUnmount object initializations here...\n dataStoreUnmount.setDatastoreName(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"a9CBF8Fc-fdEd-de17-649F-5dF4BA05BBC2\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n UnmountStorageContainerApiResponse unmountStorageContainerApiResponse\ \ = storageContainersApi.unmountStorageContainer(UnmountStorageContainerRequest.builder()\n\ \ .extId(extId)\n .build(), dataStoreUnmount);\n\ \n System.out.println(unmountStorageContainerApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi, DataStoreUnmount } from\ \ \"@nutanix-api/clustermgmt-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.\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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n let dataStoreUnmount = new DataStoreUnmount();\n\ \n // DataStoreUnmount object initializations here...\n dataStoreUnmount.setDatastoreName(\"\ string_sample_data\"); // required field\n dataStoreUnmount = JSON.stringify(dataStoreUnmount);\n\ \n \n let extId = \"9b7CD6Ac-68db-F3BA-DEab-86f2CFEE7d08\";\n\n\n\n\ \n\n storageContainersApi.unmountStorageContainer(extId, dataStoreUnmount).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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ dataStoreUnmount = ntnx_clustermgmt_py_client.DataStoreUnmount()\n\n\ \ # DataStoreUnmount object initializations here...\n dataStoreUnmount.datastore_name\ \ = \"string_sample_data\" # required field\n \n ext_id = \"BeAbbecd-4cE8-D3Df-3CeA-Bfd7bdbaBBfb\"\ \n\n\n try:\n api_response = storage_containers_api.unmount_storage_container(extId=ext_id,\ \ body=dataStoreUnmount)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n dataStoreUnmount := import1.NewDataStoreUnmount()\n\ \n // DataStoreUnmount object initializations here...\n\n \n extId\ \ := \"ABaeDBcD-B3Db-8AF7-8Efb-940317e4Afeb\"\n\n\n request := storagecontainers.UnmountStorageContainerRequest{\ \ ExtId: &extId, Body: dataStoreUnmount }\n response, error := StorageContainersServiceApiInstance.UnmountStorageContainer(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/clustermgmt/v4.2/config/storage-containers/e1DBb25c-3FBa-c5B1-bbaC-8C8d5DDF03cC/$actions/unmount" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"datastoreName":"string","nodeExtIds":["string"],"$objectType":"clustermgmt.v4.config.DataStoreUnmount"} \ - 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 {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"datastoreName":"string","nodeExtIds":["string"],"$objectType":"clustermgmt.v4.config.DataStoreUnmount"} \ - "https://host:port/api/clustermgmt/v4.2/config/storage-containers/CdBDA7af-d6eF-bDd9-54D8-307fB35ebaCD/$actions/unmount" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n DataStoreUnmount dataStoreUnmount = new DataStoreUnmount();\n\n\ \ // DataStoreUnmount object initializations here...\n dataStoreUnmount.DatastoreName\ \ = \"string_sample_data\"; // required field\n\n String extId = \"\ 1abB4FD9-E7fE-b9Db-B72E-dDc2AfE4BcB6\";\n\n // Create request object\ \ with parameters\n var request = new UnmountStorageContainerRequest\ \ {\n ExtId = extId,\n Body = dataStoreUnmount\n \ \ };\n try {\n UnmountStorageContainerApiResponse\ \ unmountStorageContainerApiResponse = storageContainersApi.UnmountStorageContainer(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores: get: tags: - StorageContainers summary: List datastores of a cluster description: Lists all the datastores associated with Storage Containers from a cluster. operationId: listDataStoresByClusterId parameters: - name: clusterExtId in: path description: The cluster from which the datastores needs to be listed. 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: ade4c098-e178-44d9-8093-24edfb35a32c - 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: containerExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores?$filter=containerExtId\ \ eq 'c9645d28-f97c-4b03-b46f-e2923987af6a'" responses: "200": description: Returns a list of datastores content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: maxItems: 300 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DataStore' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores\ \ Get operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: View Storage Container Datastore roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Storage Viewer - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 3 timeUnit: seconds - type: small count: 3 timeUnit: seconds - type: large count: 5 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.ListDataStoresByClusterIdRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ListDataStoresByClusterIdApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n \n String clusterExtId = \"26b6edec-d01d-CFb4-Ce7F-c79AEcFac193\"\ ;\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 ListDataStoresByClusterIdApiResponse\ \ listDataStoresByClusterIdApiResponse = storageContainersApi.listDataStoresByClusterId(ListDataStoresByClusterIdRequest.builder()\n\ \ .clusterExtId(clusterExtId)\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .build());\n\n System.out.println(listDataStoresByClusterIdApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let clusterExtId = \"38bBd1FD-bBD4-81F7-cAeD-eA1f1D16EA40\"\ ;\n\n // Construct Optional Parameters\n var opts = {};\n opts[\"\ $page\"] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n\n\n\n\n storageContainersApi.listDataStoresByClusterId(clusterExtId,\ \ 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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n cluster_ext_id = \"76C0Dc1F-Cf9e-cfBe-EE3F-ffEeFFeE0cf8\"\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = storage_containers_api.list_data_stores_by_cluster_id(clusterExtId=cluster_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n clusterExtId := \"E682eCfd-EeBe-D9fF-B9eE-6eF5f394aee1\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := storagecontainers.ListDataStoresByClusterIdRequest{\ \ ClusterExtId: &clusterExtId, Page_: &page_, Limit_: &limit_, Filter_:\ \ nil }\n response, error := StorageContainersServiceApiInstance.ListDataStoresByClusterId(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.DataStore)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/clusters/Eb7eAAAc-41e2-5f8D-Cb69-DeBfdcBfFEaE/storage-containers/datastores?$filter=string_sample_data&$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/clustermgmt/v4.2/config/clusters/CeD02eB2-6Ad6-C2cB-e46D-A9901CfEc2E7/storage-containers/datastores?$filter=string_sample_data&$limit=50&$page=0" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n String clusterExtId = \"62EfeEAC-effA-aAEf-d72A-D7d41F3fe2c2\";\n\ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListDataStoresByClusterIdRequest {\n ClusterExtId = clusterExtId,\n\ \ Page = page,\n Limit = limit,\n Filter\ \ = filter\n };\n try {\n ListDataStoresByClusterIdApiResponse\ \ listDataStoresByClusterIdApiResponse = storageContainersApi.ListDataStoresByClusterId(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/clear-thick-provisioned-space: post: tags: - StorageContainers summary: Clear thick provision for a Storage Container description: "Clears the thick provisioned space of the provided Storage Container.\ \ The location header received in the API response contains the URL of the\ \ task object, which can be further used to track the status of the request." operationId: clearThickProvisionedSpace parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: 2e8bbd73-571d-4500-a8b4-0e7ca30de58c - 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: 65455c0c-bafd-49d1-bc95-f3518f0a663a - name: X-Cluster-Id in: header description: The external identifier of the remote cluster to which the request is forwarded. required: false 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: f7f2b72f-ceb5-45af-834c-e42cc706b8b2 responses: "202": description: Returns the task ID indicating the request is accepted but not completed yet. 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 /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/clear-thick-provisioned-space\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/clear-thick-provisioned-space\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/clear-thick-provisioned-space\ \ Post operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: Clear Thick Provisioned Space Storage Container roleList: - name: Prism Admin - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 timeUnit: seconds - type: large count: 10 timeUnit: seconds - type: xlarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" - product: PE version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.ClearThickProvisionedSpaceRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.config.ClearThickProvisionedSpaceApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n \n String extId = \"d3E51aC9-b96B-6Fad-9DCf-Ce103AFaca06\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ClearThickProvisionedSpaceApiResponse\ \ clearThickProvisionedSpaceApiResponse = storageContainersApi.clearThickProvisionedSpace(ClearThickProvisionedSpaceRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(clearThickProvisionedSpaceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"B1ADac8A-57db-eaF9-8D0c-eEa6dE1f7fCf\"\ ;\n\n\n\n\n\n storageContainersApi.clearThickProvisionedSpace(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n ext_id = \"Cdd5EA7a-DA5e-eEee-f2aD-afCDcaA769DB\"\n\n\n try:\n\ \ api_response = storage_containers_api.clear_thick_provisioned_space(extId=ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"1ffaC0D3-8cff-ea84-0b4c-9DcE0dacD6ae\"\ \n\n\n request := storagecontainers.ClearThickProvisionedSpaceRequest{\ \ ExtId: &extId }\n response, error := StorageContainersServiceApiInstance.ClearThickProvisionedSpace(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 POST \ --url "https://host:port/api/clustermgmt/v4.2/config/storage-containers/0a9fDbBa-aF30-CCEA-aB0c-cbC88Ff6a8FF/$actions/clear-thick-provisioned-space" \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: fCaffbdf-F0F5-c6c1-BA2C-eeA1FDd1ABed' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'NTNX-Request-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6' \ --header 'X-Cluster-Id: e8a2e627-e2Ed-6f8b-ee7C-3e3dAfFbbEBD' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/clustermgmt/v4.2/config/storage-containers/fFd4Debb-EbBa-233a-eFd2-bDFBD7Fe8CfA/$actions/clear-thick-provisioned-space" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n String extId = \"41a8d28C-EbCA-CCbB-BbC5-F3ED1Fdbb286\";\n\n \ \ // Create request object with parameters\n var request = new\ \ ClearThickProvisionedSpaceRequest {\n ExtId = extId\n \ \ };\n try {\n ClearThickProvisionedSpaceApiResponse\ \ clearThickProvisionedSpaceApiResponse = storageContainersApi.ClearThickProvisionedSpace(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/stats/storage-containers/{extId}: get: tags: - StorageContainers summary: Get Stats for a Storage Container description: Fetches the statistical information for the Storage Container identified by external identifier.. operationId: getStorageContainerStats parameters: - name: extId in: path description: The external identifier of the Storage Container. 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: 7bfd2c80-8404-4fee-9dfa-eeabb599f9f6 - 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: 83 - name: $statType in: query required: false style: form explode: false schema: $ref: '#/components/schemas/common.v1.0.stats.DownSamplingOperator' responses: "200": description: Returns the stats for the specified Storage Container in the cluster. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.stats.StorageContainerStats' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/storage-containers/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/storage-containers/{extId}\ \ Get operation" x-permissions: deploymentList: - ON_PREM - CLOUD operationName: View Storage Container Stats roleList: - name: CSI System - name: Kubernetes Data Services System - name: Prism Admin - name: Prism Viewer - deprecated: true name: Self-Service Admin - name: Storage Admin - name: Storage Viewer - name: Super Admin - name: Project Manager x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: small count: 5 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.5" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.clu.java.client.ApiClient;\n\ import com.nutanix.clu.java.client.api.StorageContainersApi;\nimport com.nutanix.dp1.clu.clustermgmt.v4.request.StorageContainers.GetStorageContainerStatsRequest;\n\ import com.nutanix.dp1.clu.clustermgmt.v4.stats.GetStorageContainerStatsApiResponse;\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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(apiClient);\n\ \n \n String extId = \"ea0ebAAe-Cc21-ECDD-0CC7-da6Bad79d9fb\"\ ;\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 \ \ GetStorageContainerStatsApiResponse getStorageContainerStatsApiResponse\ \ = storageContainersApi.getStorageContainerStats(GetStorageContainerStatsRequest.builder()\n\ \ .extId(extId)\n .$startTime(startTime)\n\ \ .$endTime(endTime)\n .$samplingInterval(samplingInterval)\n\ \ .$statType(statType)\n .build());\n\n \ \ System.out.println(getStorageContainerStatsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, StorageContainersApi } from \"@nutanix-api/clustermgmt-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 storageContainersApi = new StorageContainersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"78d9F6c1-cB64-b3fa-ebbb-2eBf750B6bAE\"\ ;\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\n\n\n\n storageContainersApi.getStorageContainerStats(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_clustermgmt_py_client\nimport datetime\n\nif __name__\ \ == \"__main__\":\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ storage_containers_api = ntnx_clustermgmt_py_client.StorageContainersApi(api_client=client)\n\ \ \n ext_id = \"EBACF210-16da-eBdb-2ABa-aBeFE8e0EFe7\"\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 = storage_containers_api.get_storage_container_stats(extId=ext_id,\ \ _startTime=start_time, _endTime=end_time, _samplingInterval=sampling_interval,\ \ _statType=stat_type)\n print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/storagecontainers\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/stats\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n StorageContainersServiceApiInstance\ \ *api.StorageContainersServiceApi\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\ \ StorageContainersServiceApiInstance = api.NewStorageContainersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"dcdcC3DB-391A-e923-7Da5-8Ac9e01B3DFd\"\ \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 := storagecontainers.GetStorageContainerStatsRequest{ ExtId:\ \ &extId, StartTime_: &startTime_, EndTime_: &endTime_, SamplingInterval_:\ \ &samplingInterval_, StatType_: &statType_ }\n response, error := StorageContainersServiceApiInstance.GetStorageContainerStats(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.StorageContainerStats)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/stats/storage-containers/Eb7AFa62-2fFf-5518-3aBB-BCcEaCDbaB52?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1" \ --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/clustermgmt/v4.2/stats/storage-containers/ABdCFeaa-d5aD-DBfa-CBe6-EFB55e6dBba9?$startTime=2021-01-01T00:00:00-08:00&$statType=SOME_RAW_DATA&$endTime=2021-01-01T00:00:00-08:00&$samplingInterval=1" - lang: Csharp source: "\n\nusing Nutanix.CluSDK.Client;\nusing Nutanix.CluSDK.Api;\nusing\ \ Nutanix.CluSDK.Model.Clustermgmt.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 \ \ StorageContainersApi storageContainersApi = new StorageContainersApi(client);\n\ \n String extId = \"eF9Fa6dA-E163-ff3a-00b6-61F2b4Addb5b\";\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\n // Create request object\ \ with parameters\n var request = new GetStorageContainerStatsRequest\ \ {\n ExtId = extId,\n StartTime = startTime,\n \ \ EndTime = endTime,\n SamplingInterval = samplingInterval,\n\ \ StatType = statType\n };\n try {\n \ \ GetStorageContainerStatsApiResponse getStorageContainerStatsApiResponse\ \ = storageContainersApi.GetStorageContainerStats(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/vcenter-extensions: get: tags: - VcenterExtensions summary: List vCenter server extensions. description: List of vCenter server extensions for the clusters registered under a Prism Central server. operationId: listVcenterExtensions 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$filter=clusterExtId\ \ eq 'a57bfd97-013f-43d3-b59a-424c1f49cec3'" - name: ipAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$filter=ipAddress\ \ eq '87.240.101.179'" - name: isRegistered example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$filter=isRegistered\ \ eq false" - 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: clusterExtId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=clusterExtId" - name: extId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=extId" - name: ipAddress example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=ipAddress" - name: isRegistered example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=isRegistered" - name: links example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=links" - name: tenantId example: "https://{host}:{port}/api/clustermgmt/v4.2/config/vcenter-extensions?$select=tenantId" responses: "200": description: The list of vCenter server extensions returned successfully. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterExtension' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions Get operation x-permissions: operationName: View Vcenter Extension deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Cluster Admin - name: Cluster Viewer x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: Small count: 8 timeUnit: seconds - type: Large count: 12 timeUnit: seconds - type: XLarge count: 12 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vcnt.java.client.ApiClient;\n\ import com.nutanix.vcnt.java.client.api.VcenterExtensionsApi;\nimport com.nutanix.dp1.vcnt.clustermgmt.v4.request.VcenterExtensions.ListVcenterExtensionsRequest;\n\ import com.nutanix.dp1.vcnt.clustermgmt.v4.config.ListVcenterExtensionsApiResponse;\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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(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 ListVcenterExtensionsApiResponse\ \ listVcenterExtensionsApiResponse = vcenterExtensionsApi.listVcenterExtensions(ListVcenterExtensionsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listVcenterExtensionsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, VcenterExtensionsApi } from "@nutanix-api/clustermgmt-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 vcenterExtensionsApi = new VcenterExtensionsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$select"] = "string_sample_data"; vcenterExtensionsApi.listVcenterExtensions(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ vcenter_extensions_api = ntnx_clustermgmt_py_client.VcenterExtensionsApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = vcenter_extensions_api.list_vcenter_extensions(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/vcenterextensions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VcenterExtensionsServiceApiInstance\ \ *api.VcenterExtensionsServiceApi\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\ \ VcenterExtensionsServiceApiInstance = api.NewVcenterExtensionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := vcenterextensions.ListVcenterExtensionsRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Select_: nil }\n response,\ \ error := VcenterExtensionsServiceApiInstance.ListVcenterExtensions(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.VcenterExtension)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions?$filter=string_sample_data&$limit=50&$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/clustermgmt/v4.2/config/vcenter-extensions?$filter=string_sample_data&$limit=50&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.VcntSDK.Client;\nusing Nutanix.VcntSDK.Api;\nusing\ \ Nutanix.VcntSDK.Model.Clustermgmt.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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(client);\n\ \n int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String select = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListVcenterExtensionsRequest\ \ {\n Page = page,\n Limit = limit,\n Filter\ \ = filter,\n Select = select\n };\n try {\n \ \ ListVcenterExtensionsApiResponse listVcenterExtensionsApiResponse\ \ = vcenterExtensionsApi.ListVcenterExtensions(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/vcenter-extensions/{extId}: get: tags: - VcenterExtensions summary: Get vCenter server extension. description: Fetches vCenter server extension information for the given VcenterExtensionExtId. operationId: getVcenterExtensionById parameters: - name: extId in: path description: The globally unique identifier of vCenter Server extension instance. It should be of type UUID. 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: f91731c3-4b05-47b2-b1f0-ae98fcf2a24c responses: "200": description: vCenter server extension object returned successfully. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterExtension' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}\ \ Get operation" x-permissions: operationName: View Vcenter Extension deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Cluster Admin - name: Cluster Viewer x-rate-limit: - type: xsmall count: 8 timeUnit: seconds - type: Small count: 16 timeUnit: seconds - type: Large count: 20 timeUnit: seconds - type: XLarge count: 20 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vcnt.java.client.ApiClient;\n\ import com.nutanix.vcnt.java.client.api.VcenterExtensionsApi;\nimport com.nutanix.dp1.vcnt.clustermgmt.v4.request.VcenterExtensions.GetVcenterExtensionByIdRequest;\n\ import com.nutanix.dp1.vcnt.clustermgmt.v4.config.GetVcenterExtensionApiResponse;\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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(apiClient);\n\ \n \n String extId = \"2D6dC0cd-4CFB-2dAE-aCbB-A72eFF3b5Cd7\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetVcenterExtensionApiResponse\ \ getVcenterExtensionApiResponse = vcenterExtensionsApi.getVcenterExtensionById(GetVcenterExtensionByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getVcenterExtensionApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VcenterExtensionsApi } from \"@nutanix-api/clustermgmt-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 vcenterExtensionsApi = new VcenterExtensionsApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"CbF8bfEB-E5CF-84B5-fFBc-CcaBfFfceD23\"\ ;\n\n\n\n\n\n vcenterExtensionsApi.getVcenterExtensionById(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_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ vcenter_extensions_api = ntnx_clustermgmt_py_client.VcenterExtensionsApi(api_client=client)\n\ \ \n ext_id = \"6C79D191-5EcB-5BbB-6eF5-6Bd789d2d743\"\n\n\n try:\n\ \ api_response = vcenter_extensions_api.get_vcenter_extension_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/vcenterextensions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VcenterExtensionsServiceApiInstance\ \ *api.VcenterExtensionsServiceApi\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\ \ VcenterExtensionsServiceApiInstance = api.NewVcenterExtensionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"e5be5Df7-E3AF-9a73-9eeA-22bBB3D7Ba1e\"\ \n\n\n request := vcenterextensions.GetVcenterExtensionByIdRequest{ ExtId:\ \ &extId }\n response, error := VcenterExtensionsServiceApiInstance.GetVcenterExtensionById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.VcenterExtension)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions/De3b966b-cfBc-b93E-5B88-a7C0cE05dAEc" \ --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/clustermgmt/v4.2/config/vcenter-extensions/7D4e0150-d9Eb-ebBe-C73E-8FB6dAEBddA0" - lang: Csharp source: "\n\nusing Nutanix.VcntSDK.Client;\nusing Nutanix.VcntSDK.Api;\nusing\ \ Nutanix.VcntSDK.Model.Clustermgmt.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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(client);\n\ \n String extId = \"BcA79ead-6E87-4CCC-AA9D-d27bD7F90c24\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetVcenterExtensionByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetVcenterExtensionApiResponse getVcenterExtensionApiResponse\ \ = vcenterExtensionsApi.GetVcenterExtensionById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/register: post: tags: - VcenterExtensions summary: Register vCenter server extension. description: Registers Nutanix cluster as a vCenter server extension. operationId: registerVcenterExtension parameters: - name: extId in: path description: The globally unique identifier of vCenter Server extension instance. It should be of type UUID. 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: fe9d3898-1f22-41fd-812c-73683719dea1 - 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 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 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: c8d3006c-5fb5-45a8-b5e9-f1a9cba24a16 requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterCredentials' required: true responses: "202": description: Request Accepted. 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 /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/register\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/register\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/register\ \ Post operation" x-permissions: operationName: Register Vcenter Extension deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: Small count: 8 timeUnit: seconds - type: Large count: 12 timeUnit: seconds - type: XLarge count: 12 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vcnt.java.client.ApiClient;\n\ import com.nutanix.vcnt.java.client.api.VcenterExtensionsApi;\nimport com.nutanix.dp1.vcnt.clustermgmt.v4.request.VcenterExtensions.RegisterVcenterExtensionRequest;\n\ \nimport java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport\ \ com.nutanix.dp1.vcnt.clustermgmt.v4.config.VcenterCredentials;\nimport\ \ com.nutanix.dp1.vcnt.clustermgmt.v4.config.RegisterVcenterExtensionApiResponse;\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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(apiClient);\n\ \n VcenterCredentials vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n \ \ vcenterCredentials.setPassword(\"test_password\"); // required field\n\ \ vcenterCredentials.setUsername(\"test_user\"); // required field\n\ \ \n String extId = \"A2A1D1dB-F7fd-fce9-aCad-dFC61CD4e3C6\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.getEtag(getResponse);\n\ \ HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n */\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ RegisterVcenterExtensionApiResponse registerVcenterExtensionApiResponse\ \ = vcenterExtensionsApi.registerVcenterExtension(RegisterVcenterExtensionRequest.builder()\n\ \ .extId(extId)\n .build(), vcenterCredentials,\ \ opts);\n\n System.out.println(registerVcenterExtensionApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VcenterExtensionsApi, VcenterCredentials }\ \ from \"@nutanix-api/clustermgmt-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 vcenterExtensionsApi = new VcenterExtensionsApi(apiClientInstance);\n\ \nfunction sample() {\n let vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n vcenterCredentials.setPassword(\"\ test_password\"); // required field\n vcenterCredentials.setUsername(\"\ test_user\"); // required field\n vcenterCredentials = JSON.stringify(vcenterCredentials);\n\ \n \n let extId = \"dbbF7869-fddB-FbAe-BC5E-0aEe8Edb198d\";\n\n\n\ \ /*\n Some Create, Update, and Delete operations generally require\ \ an If-Match header with a value to be passed in order to protect against\ \ concurrent updates.\n The value that needs to be sent in the If-Match\ \ header needs to be retrieved by performing a Read(Get) operation on the\ \ same resource.\n ETags can be retrieved by calling a static method\ \ of ApiClient as below:\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n */\n vcenterExtensionsApi.registerVcenterExtension(extId,\ \ vcenterCredentials, 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}\nsample()\n" - lang: Python source: "\nimport ntnx_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ vcenter_extensions_api = ntnx_clustermgmt_py_client.VcenterExtensionsApi(api_client=client)\n\ \ vcenterCredentials = ntnx_clustermgmt_py_client.VcenterCredentials()\n\ \n # VcenterCredentials object initializations here...\n vcenterCredentials.password\ \ = \"test_password\" # required field\n vcenterCredentials.username\ \ = \"test_user\" # required field\n \n ext_id = \"bfDbA74c-A3bE-161C-b4Ed-bCEaf4eBDBe8\"\ \n\n \"\"\"\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in the\ \ If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n etag_value = ApiClient.get_etag(get_api_response)\n\ \ \"\"\"\n\n try:\n api_response = vcenter_extensions_api.register_vcenter_extension(extId=ext_id,\ \ body=vcenterCredentials, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/vcenterextensions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VcenterExtensionsServiceApiInstance\ \ *api.VcenterExtensionsServiceApi\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\ \ VcenterExtensionsServiceApiInstance = api.NewVcenterExtensionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vcenterCredentials := import1.NewVcenterCredentials()\n\ \n // VcenterCredentials object initializations here...\n\n \n \ \ extId := \"Fb5abB90-Bd3D-ce74-ac8D-Ff1BdcA552B5\"\n\n /*\n Some\ \ Create, Update, and Delete operations generally require an If-Match header\ \ with a value to be passed in order to protect against concurrent updates.\n\ \ The value that needs to be sent in the If-Match header needs to be\ \ retrieved by performing a Read(Get) operation on the same resource.\n\ \ ETags can be retrieved by calling a static method of ApiClient as below:\n\ \ etagValue := ApiClientInstance.GetEtag(getResponse)\n */\n\n \ \ request := vcenterextensions.RegisterVcenterExtensionRequest{ ExtId: &extId,\ \ Body: vcenterCredentials }\n response, error := VcenterExtensionsServiceApiInstance.RegisterVcenterExtension(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 POST \ --url "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions/7DadF4C7-f6B7-6ab6-ad38-DBfeAc36a2BD/$actions/register" \ --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 {"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --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 {"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"} \ - "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions/0Fac9eDc-Aa24-F6B7-CaFC-eebBEc6FbD6B/$actions/register" - lang: Csharp source: "\n\nusing Nutanix.VcntSDK.Client;\nusing Nutanix.VcntSDK.Api;\nusing\ \ Nutanix.VcntSDK.Model.Clustermgmt.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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(client);\n\ \n VcenterCredentials vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n vcenterCredentials.Password\ \ = \"test_password\"; // required field\n vcenterCredentials.Username\ \ = \"test_user\"; // required field\n\n String extId = \"cCBBc3F9-ebCF-ceB6-EB59-c5cDDe3b9e4D\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.GetEtag(getResponse);\n\ \ Dictionary opts = new Dictionary();\n\ \ opts[\"If-Match\"] = eTag;\n */\n // Create request\ \ object with parameters\n var request = new RegisterVcenterExtensionRequest\ \ {\n ExtId = extId,\n Body = vcenterCredentials,\n\ \ \n \n };\n try {\n RegisterVcenterExtensionApiResponse\ \ registerVcenterExtensionApiResponse = vcenterExtensionsApi.RegisterVcenterExtension(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/unregister: post: tags: - VcenterExtensions summary: Unregister vCenter server extension. description: Unregisters Nutanix cluster as a vCenter server extension. operationId: unregisterVcenterExtension parameters: - name: extId in: path description: The globally unique identifier of vCenter Server extension instance. It should be of type UUID. 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: 7fc83d7e-a18c-427d-bf7f-2792fb023eeb - 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 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 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: 71b36543-fbd3-4cb6-8c55-b9499ec10cd6 requestBody: content: application/json: schema: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterCredentials' required: true responses: "202": description: Request Accepted. 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 /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/unregister\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/unregister\ \ 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/unregister\ \ Post operation" x-permissions: operationName: Unregister Vcenter Extension deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Cluster Admin x-rate-limit: - type: xsmall count: 4 timeUnit: seconds - type: Small count: 8 timeUnit: seconds - type: Large count: 12 timeUnit: seconds - type: XLarge count: 12 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" - product: PE version: "6.7" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.vcnt.java.client.ApiClient;\n\ import com.nutanix.vcnt.java.client.api.VcenterExtensionsApi;\nimport com.nutanix.dp1.vcnt.clustermgmt.v4.request.VcenterExtensions.UnregisterVcenterExtensionRequest;\n\ \nimport java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport\ \ com.nutanix.dp1.vcnt.clustermgmt.v4.config.VcenterCredentials;\nimport\ \ com.nutanix.dp1.vcnt.clustermgmt.v4.config.UnregisterVcenterExtensionApiResponse;\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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(apiClient);\n\ \n VcenterCredentials vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n \ \ vcenterCredentials.setPassword(\"test_password\"); // required field\n\ \ vcenterCredentials.setUsername(\"test_user\"); // required field\n\ \ \n String extId = \"E7BaC64a-F35A-dA87-26d8-8BfAf90ceFFE\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.getEtag(getResponse);\n\ \ HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n */\n try {\n // Pass in parameters using\ \ the request builder object associated with the operation.\n \ \ UnregisterVcenterExtensionApiResponse unregisterVcenterExtensionApiResponse\ \ = vcenterExtensionsApi.unregisterVcenterExtension(UnregisterVcenterExtensionRequest.builder()\n\ \ .extId(extId)\n .build(), vcenterCredentials,\ \ opts);\n\n System.out.println(unregisterVcenterExtensionApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, VcenterExtensionsApi, VcenterCredentials }\ \ from \"@nutanix-api/clustermgmt-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 vcenterExtensionsApi = new VcenterExtensionsApi(apiClientInstance);\n\ \nfunction sample() {\n let vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n vcenterCredentials.setPassword(\"\ test_password\"); // required field\n vcenterCredentials.setUsername(\"\ test_user\"); // required field\n vcenterCredentials = JSON.stringify(vcenterCredentials);\n\ \n \n let extId = \"ACe0cBdE-c0fC-8cEf-1573-5Ff33FAba27e\";\n\n\n\ \ /*\n Some Create, Update, and Delete operations generally require\ \ an If-Match header with a value to be passed in order to protect against\ \ concurrent updates.\n The value that needs to be sent in the If-Match\ \ header needs to be retrieved by performing a Read(Get) operation on the\ \ same resource.\n ETags can be retrieved by calling a static method\ \ of ApiClient as below:\n let etagValue = ApiClient.getEtag(data);\n\ \ let args = {\"If-Match\" : etagValue};\n */\n vcenterExtensionsApi.unregisterVcenterExtension(extId,\ \ vcenterCredentials, 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}\nsample()\n" - lang: Python source: "\nimport ntnx_clustermgmt_py_client\n\nif __name__ == \"__main__\"\ :\n # Configure the client\n config = ntnx_clustermgmt_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_clustermgmt_py_client.ApiClient(configuration=config)\n\ \ vcenter_extensions_api = ntnx_clustermgmt_py_client.VcenterExtensionsApi(api_client=client)\n\ \ vcenterCredentials = ntnx_clustermgmt_py_client.VcenterCredentials()\n\ \n # VcenterCredentials object initializations here...\n vcenterCredentials.password\ \ = \"test_password\" # required field\n vcenterCredentials.username\ \ = \"test_user\" # required field\n \n ext_id = \"a906AEfd-75AB-bA7e-76c4-DB4F05fdd00E\"\ \n\n \"\"\"\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in the\ \ If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n etag_value = ApiClient.get_etag(get_api_response)\n\ \ \"\"\"\n\n try:\n api_response = vcenter_extensions_api.unregister_vcenter_extension(extId=ext_id,\ \ body=vcenterCredentials, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_clustermgmt_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/clustermgmt-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/request/vcenterextensions\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/clustermgmt/v4/config\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/clustermgmt-go-client/v4/models/prism/v4/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n VcenterExtensionsServiceApiInstance\ \ *api.VcenterExtensionsServiceApi\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\ \ VcenterExtensionsServiceApiInstance = api.NewVcenterExtensionsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n vcenterCredentials := import1.NewVcenterCredentials()\n\ \n // VcenterCredentials object initializations here...\n\n \n \ \ extId := \"6bC57AeC-cFde-C7CF-BDaB-d528e7b3EcED\"\n\n /*\n Some\ \ Create, Update, and Delete operations generally require an If-Match header\ \ with a value to be passed in order to protect against concurrent updates.\n\ \ The value that needs to be sent in the If-Match header needs to be\ \ retrieved by performing a Read(Get) operation on the same resource.\n\ \ ETags can be retrieved by calling a static method of ApiClient as below:\n\ \ etagValue := ApiClientInstance.GetEtag(getResponse)\n */\n\n \ \ request := vcenterextensions.UnregisterVcenterExtensionRequest{ ExtId:\ \ &extId, Body: vcenterCredentials }\n response, error := VcenterExtensionsServiceApiInstance.UnregisterVcenterExtension(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 POST \ --url "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions/C131AD9D-BecA-Bfe9-aDCb-b136CCccCC20/$actions/unregister" \ --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 {"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --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 {"username":"test_user","password":"test_password","port":0,"$objectType":"clustermgmt.v4.config.VcenterCredentials"} \ - "https://host:port/api/clustermgmt/v4.2/config/vcenter-extensions/dc25a1Cc-7c96-E7fC-5D2f-FeAdBeD2bE86/$actions/unregister" - lang: Csharp source: "\n\nusing Nutanix.VcntSDK.Client;\nusing Nutanix.VcntSDK.Api;\nusing\ \ Nutanix.VcntSDK.Model.Clustermgmt.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 \ \ VcenterExtensionsApi vcenterExtensionsApi = new VcenterExtensionsApi(client);\n\ \n VcenterCredentials vcenterCredentials = new VcenterCredentials();\n\ \n // VcenterCredentials object initializations here...\n vcenterCredentials.Password\ \ = \"test_password\"; // required field\n vcenterCredentials.Username\ \ = \"test_user\"; // required field\n\n String extId = \"eeeE5fCb-A0Bd-a98a-b3Dc-C29b6ae6eB0e\"\ ;\n\n /*\n Some Create, Update, and Delete operations generally\ \ require an If-Match header with a value to be passed in order to protect\ \ against concurrent updates.\n The value that needs to be sent in\ \ the If-Match header needs to be retrieved by performing a Read(Get) operation\ \ on the same resource.\n ETags can be retrieved by calling a static\ \ method of ApiClient as below:\n String eTag = ApiClient.GetEtag(getResponse);\n\ \ Dictionary opts = new Dictionary();\n\ \ opts[\"If-Match\"] = eTag;\n */\n // Create request\ \ object with parameters\n var request = new UnregisterVcenterExtensionRequest\ \ {\n ExtId = extId,\n Body = vcenterCredentials,\n\ \ \n \n };\n try {\n UnregisterVcenterExtensionApiResponse\ \ unregisterVcenterExtensionApiResponse = vcenterExtensionsApi.UnregisterVcenterExtension(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" components: schemas: clustermgmt.v4.2.config.GetBmcInfoResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.BmcInfo oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.BmcInfo' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ Get operation" clustermgmt.v4.2.config.BmcInfo: type: object properties: ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' credential: $ref: '#/components/schemas/common.v1.0.config.BasicAuth' status: $ref: '#/components/schemas/clustermgmt.v4.2.config.CredentialStatus' additionalProperties: false description: "BMC information, such as IP, username, password etc." clustermgmt.v4.2.config.UpdateBmcInfoResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}/bmc-info\ \ Put operation" clustermgmt.v4.2.config.CredentialStatus: type: string description: "BMC credentials status, that is, Valid, Invalid or Missing." enum: - VALID - INVALID - UNAVAILABLE - $UNKNOWN - $REDACTED x-enumDescriptions: VALID: BMC credentials are valid. UNAVAILABLE: BMC credentials are not available. INVALID: BMC credentials are invalid. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. common.v1.0.config.IPAddress: type: object properties: ipv4: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' ipv6: $ref: '#/components/schemas/common.v1.0.config.IPv6Address' additionalProperties: false description: | An unique address that identifies a device on the internet or a local network in IPv4 or IPv6 format. common.v1.0.config.BasicAuth: required: - password - username type: object properties: username: maxLength: 256 minLength: 3 type: string description: | Username required for the basic auth scheme. As per [RFC 2617](https://datatracker.ietf.org/doc/html/rfc2617) usernames might be case sensitive. example: test-user password: maxLength: 256 minLength: 3 type: string description: | Password required for the basic auth scheme. format: password example: '***********' additionalProperties: false description: | An authentication scheme that requires the client to present a username and password. The server will service the request only if it can validate the user-ID and password for the protection space of the Request-URI. 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: 83.92.41.252 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: 6004:7361:1a7d:9a64:df8d:dfd8:39c6:c4ea 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. clustermgmt.v4.2.error.ErrorResponse: type: object properties: error: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.error.AppMessage' - $ref: '#/components/schemas/clustermgmt.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 clustermgmt.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 clustermgmt.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 clustermgmt.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: 10 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/clustermgmt.v4.2.error.SchemaValidationErrorMessage' additionalProperties: false description: This schema is generated from SchemaValidationError.java x-platform-generated: true clustermgmt.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 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: 72 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: 16 - type: boolean description: | An boolean value in a key-value pair. example: true - 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: 54 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. 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==:330eb767-29ca-48bf-8e34-dbe11fdfb3e3 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. clustermgmt.v4.2.config.GetDiskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.Disk oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.Disk' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}\ \ Get operation" clustermgmt.v4.2.config.DeleteDiskApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}\ \ Delete operation" clustermgmt.v4.2.config.Disk: title: Disk model object. description: A model that represents the Disk resources. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: clusterName: maxLength: 256 type: string description: Cluster name of the Disk it belongs to. readOnly: true example: string 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: The external identifier of the cluster on which Disk will be added. readOnly: true example: 6bcbf490-b062-4f14-bafd-1611aac8c949 status: $ref: '#/components/schemas/clustermgmt.v4.2.config.DiskStatus' storageTier: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageTier' storagePoolExtId: 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 a storage pool. readOnly: true example: 2034ee8c-2199-4893-8dd6-4c3e45d985de serviceVMId: 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}::[0-9]{1,}$" type: string description: The service VM ID of the node. readOnly: true example: 94f47cac-a6e2-46ae-a4dd-1a706dafbcbc::552 nodeExtId: 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 node. readOnly: true example: 7272ddfa-1aa2-458e-99d1-034ce007bc4e cvmIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' nodeIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' mountPath: pattern: "^/home/nutanix/data/stargate-storage/disks/[A-Z0-9]{8}$" type: string description: Represents the mount path of the Disk. readOnly: true example: string location: type: integer description: Indicates the location of the Disk in a node. format: int64 readOnly: true example: 71 serialNumber: maxLength: 256 type: string description: Represents the Disk serial number. readOnly: true example: string diskSizeBytes: minimum: 524288 type: integer description: Size of the Disk in bytes. format: int64 readOnly: true example: 2507980790575670272 physicalCapacityBytes: minimum: 524288 type: integer description: Physical capacity of the Disk in bytes. format: int64 readOnly: true example: 5839284690685232128 model: maxLength: 256 type: string description: Represents the Disk model. readOnly: true example: string vendor: maxLength: 256 type: string description: Represents the Disk vendor. readOnly: true example: string nvmePciePath: type: string description: Indicates the PCIe path of NVMe devices. readOnly: true example: string firmwareVersion: maxLength: 256 type: string description: Represents the current firmware version. readOnly: true example: string targetFirmwareVersion: maxLength: 256 type: string description: Represents the target firmware version. readOnly: true example: string hostName: maxLength: 256 type: string description: Host name of the Disk to which it belongs. readOnly: true example: string diskAdvanceConfig: $ref: '#/components/schemas/clustermgmt.v4.2.config.DiskAdvanceConfig' additionalProperties: false clustermgmt.v4.2.config.DiskStatus: type: string description: Indicates the status of the Disk. enum: - NORMAL - MARKED_FOR_REMOVAL_BUT_NOT_DETACHABLE - DETACHABLE - DATA_MIGRATION_INITIATED - $UNKNOWN - $REDACTED x-enumDescriptions: MARKED_FOR_REMOVAL_BUT_NOT_DETACHABLE: Indicates that the Disk is marked for removal but is in a detachable state. DATA_MIGRATION_INITIATED: Indicates that the data migration has been initiated for the Disk. DETACHABLE: Indicates that the Disk is detachable. $UNKNOWN: | Unknown value. NORMAL: Indicates that the Disk is normal. $REDACTED: | Redacted value. clustermgmt.v4.2.config.StorageTier: type: string description: Represents the Disk storage tier. enum: - SSD_PCIE - SSD_SATA - DAS_SATA - CLOUD - SSD_MEM_NVME - $UNKNOWN - $REDACTED x-enumDescriptions: CLOUD: Represents the Disk cloud storage tier. SSD_SATA: Represents the Disk SSD_SATA storage tier. SSD_MEM_NVME: Represents the Disk SSD_MEM_NVME storage tier. SSD_PCIE: Represents the Disk SSD_PCIE storage tier. DAS_SATA: Represents the Disk DAS_SATA storage tier. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.DiskAdvanceConfig: title: Disk advance configuration object. type: object properties: isSelfEncryptingDrive: type: boolean description: Indicates whether the Disk has self-encryption enabled. example: true isSelfManagedNvme: type: boolean description: Indicates if the NVMe Disk is self-managed and does not require a host/CVM reboot. example: false isPasswordProtected: type: boolean description: Indicates whether the Disk is password protected. example: true isBootDisk: type: boolean description: Indicates if the Disk is a boot Disk. example: true hasBootPartitionsOnly: type: boolean description: Indicates if the Disk is for boot only and no Disk operations will be performed on it. example: false isSpdkManaged: type: boolean description: Indicates if NVMe device is managed by storage performance development kit(SPDK). example: true isOnline: type: boolean description: Indicates whether the Disk is online or offline. example: true isMarkedForRemoval: type: boolean description: Indicates if the Disk is marked for removal. example: false isDataMigrated: type: boolean description: Indicates if data migration is completed for the Disk. example: false isUnhealthy: type: boolean description: Indicates if the Disk is unhealthy. example: true isSuspectedUnhealthy: type: boolean description: Indicates if the Disk is suspected to be unhealthy. example: true isMounted: type: boolean description: Indicates if the Disk is mounted. example: false isUnderDiagnosis: type: boolean description: Indicates if the Disk is under diagnosis. example: true isDiagnosticInfoAvailable: type: boolean description: Indicates the Disk diagnostic information along with the device-related statistics are present. example: true isErrorFoundInLog: type: boolean description: Indicates whether or not the Disk error is seen in the kernel logs. example: true isPlannedOutage: type: boolean description: Indicates if diagnostics are running on the Disk. example: false additionalProperties: false description: A model that represents Disk advance configuration properties. clustermgmt.v4.2.config.ListDisksApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Disk' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/disks Get operation clustermgmt.v4.2.config.DiskAdditionSpec: required: - serialNumber type: object properties: serialNumber: maxLength: 256 type: string description: Represents the Disk serial number. example: string diskPartitionInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.DiskPartitionInfo' additionalProperties: false description: Request model to add a disk to a cluster. clustermgmt.v4.2.config.AddDiskApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}/$actions/add-disk\ \ Post operation" clustermgmt.v4.2.config.DiskPartitionInfo: type: object properties: partitionType: $ref: '#/components/schemas/clustermgmt.v4.2.config.PartitionType' driveReplacementOption: $ref: '#/components/schemas/clustermgmt.v4.2.config.DriveReplacementOption' additionalProperties: false description: Model for Disk partition information. clustermgmt.v4.2.config.PartitionType: type: string description: "Indicates Disk partition type. As of now, we only support 'EXT4'\ \ and 'XFS'." enum: - EXT4 - XFS - $UNKNOWN - $REDACTED x-enumDescriptions: EXT4: '''EXT4'' is a Linux File System.' XFS: '''XFS'' is a Linux File System.' $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.DriveReplacementOption: type: string description: Indicates drive replacement option. Available options are 'RMA' and 'CAPACITY_UPGRADE'. enum: - RMA - CAPACITY_UPGRADE - $UNKNOWN - $REDACTED x-enumDescriptions: CAPACITY_UPGRADE: It is a Disk replacement option that repartitions the drive and increases the total usable storage capacity. RMA: It is a Disk replacement option which ensures that the total available capacity remains the same when a faulty Disk is replaced. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.LEDStateUpdationSpec: required: - isEngaged type: object properties: isEngaged: type: boolean description: Indicates LED status of the Disk. It can either be on or off. example: true additionalProperties: false description: Request model for updating LED state of the Disk. clustermgmt.v4.2.config.UpdateDiskLEDStateTaskResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/disks/{extId}/$actions/update-led-state\ \ Post operation" clustermgmt.v4.2.stats.GetDiskStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.stats.DiskStats oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.stats.DiskStats' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/disks/{extId}\ \ Get operation" clustermgmt.v4.2.stats.DiskStats: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: diskUsagePpm: maxItems: 3000 minItems: 0 type: array description: "Disk space used on a storage device, expressed in parts\ \ per million (ppm)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskCapacityBytes: maxItems: 3000 minItems: 0 type: array description: Total storage capacity of a device in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskNumIops: maxItems: 3000 minItems: 0 type: array description: Number of I/O operations that a Disk performs per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakNumIops: maxItems: 3000 minItems: 0 type: array description: Upper limit of I/O operations that a Disk performs per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseNumIops: maxItems: 3000 minItems: 0 type: array description: Lower limit of I/O operations that a Disk can perform per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: I/O bandwidth in KB per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Upper limit of data transfer that a Disk can handle per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Lower limit of data transfer that a Disk can handle per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskAvgIoLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: Average I/O latency. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakIoLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: Upper limit of the latency of I/O operations that the Disk can handle without exceeding its standard latency level. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseIoLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: Lower limit of the latency of I/O operations that the Disk can handle without exceeding its standard latency level. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskFreeBytes: maxItems: 3000 minItems: 0 type: array description: "Free storage space available on the Disk, measured in bytes." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskUsageBytes: maxItems: 3000 minItems: 0 type: array description: "Amount of storage currently being used, measured in bytes." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskReadIops: maxItems: 3000 minItems: 0 type: array description: Number of read I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseReadIops: maxItems: 3000 minItems: 0 type: array description: Lower buffer capacity for the number of read IOPS that a Disk can handle. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakReadIops: maxItems: 3000 minItems: 0 type: array description: Upper buffer capacity for the number of read IOPS that a Disk can handle. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskWriteIops: maxItems: 3000 minItems: 0 type: array description: Number of write I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakWriteIops: maxItems: 3000 minItems: 0 type: array description: Upper buffer capacity of a number of write I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseWriteIops: maxItems: 3000 minItems: 0 type: array description: Lower buffer capacity of a number of write I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskReadIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Number of Disk read I/O per second as reported by Stargate. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakReadIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Upper buffer capacity for the amount of I/O bandwidth that a Disk can handle read operations. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseReadIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Lower buffer capacity for the amount of I/O bandwidth that a Disk can handle read operations. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskWriteIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Number of Disk write I/O per second reported by Stargate. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakWriteIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Upper buffer capacity for the amount of I/O bandwidth that a Disk can handle write operations. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseWriteIoBandwidthkbps: maxItems: 3000 minItems: 0 type: array description: Lower buffer capacity for the amount of I/O bandwidth that a Disk can handle write operations. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskReadIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Average read I/O latency, measured in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakReadIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Upper buffer capacity average read I/O latency, measured\ \ in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseReadIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Lower buffer capacity average read I/O latency, measured\ \ in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskWriteIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Average write I/O latency, measured in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskPeakWriteIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Upper buffer capacity average write I/O latency, measured\ \ in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskBaseWriteIoAvgLatencyMicrosec: maxItems: 3000 minItems: 0 type: array description: "Lower buffer capacity average write I/O latency, measured\ \ in microseconds (μs)." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskReadIoPpm: maxItems: 3000 minItems: 0 type: array description: "Disk read I/O, expressed in parts per million." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' diskWriteIoPpm: maxItems: 3000 minItems: 0 type: array description: "Disk write I/O, expressed in parts per million." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' 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: bf1928fd-9791-4770-9905-974efba538be 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.stats.TimeIntValuePair: type: object properties: value: type: integer description: Value of the stat at the recorded date and time in extended ISO-8601 format." format: int64 example: 73 timestamp: type: string description: "The date and time at which the stat was recorded.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 additionalProperties: false description: A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format." 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: 6524e13c-7e78-457f-92ad-3b6086ac7f10 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. clustermgmt.v4.2.ahv.config.ListPcieDevicesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.ahv.config.PcieDevice' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/ahv/config/pcie-devices Get operation clustermgmt.v4.2.ahv.config.PcieDevice: description: PCI Device entity description allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - 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: UUID of the cluster. readOnly: true example: 8233a91f-a10b-458c-a452-5701ac98b07b hostExtId: 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 host connected to the device readOnly: true example: 70b1ee5a-0cba-47f6-b096-501a35ee69b6 state: $ref: '#/components/schemas/clustermgmt.v4.2.ahv.config.PcieDeviceState' description: type: string description: Human readable device description readOnly: true example: Test PCIE device Description configuration: $ref: '#/components/schemas/clustermgmt.v4.2.ahv.config.PcieDeviceConfiguration' ownerVmExtId: 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 VM attached to that device when state is UVM_ASSIGNED or UVM_RESERVED readOnly: true example: 31c4f166-40b7-4961-9e4a-2416094a54c6 type: $ref: '#/components/schemas/clustermgmt.v4.2.ahv.config.PcieDeviceType' additionalProperties: false clustermgmt.v4.2.ahv.config.PcieDeviceState: type: string description: Device state enum: - UVM_AVAILABLE - UVM_RESERVED - UVM_ASSIGNED - HOST_BROKEN - HOST_UNUSED - HOST_USED - HOST_PARTITIONED - $UNKNOWN - $REDACTED x-enumDescriptions: HOST_UNUSED: The device is not used by the host and not available for assignment to the CVM or a UVM HOST_PARTITIONED: The device is partitioned and exposes virtual functions UVM_RESERVED: The device is being assigned to the UVM mentioned in the 'owner' property UVM_AVAILABLE: The device is available for passthrough to a UVM and not assigned to any UVM_ASSIGNED: The device is assigned to the UVM mentioned in the 'owner' property HOST_BROKEN: The device is broken or non-functional may be cleared when the host is restarted $UNKNOWN: | Unknown value. HOST_USED: The device is used by the host. It is not available for assignment to the CVM or a UVM $REDACTED: | Redacted value. clustermgmt.v4.2.ahv.config.PcieDeviceConfiguration: type: object properties: vendorId: type: integer description: Vendor ID format: int64 readOnly: true example: 90 deviceId: type: integer description: Device ID format: int64 readOnly: true example: 60 subSystemVendorId: type: integer description: Subsystem vendor ID format: int64 readOnly: true example: 63 subSystemId: type: integer description: Subsystem (device) ID format: int64 readOnly: true example: 95 classId: type: integer description: Class code format: int64 readOnly: true example: 38 subClassId: type: integer description: Subsystem class ID format: int64 readOnly: true example: 4 progIFace: type: integer description: Programming interface ID format: int64 readOnly: true example: 24 additionalProperties: false description: PCIe device configuration clustermgmt.v4.2.ahv.config.PcieDeviceType: type: string description: Device type according to the PCI code and ID assignment specification enum: - MASS_STORAGE_CONTROLLER - NETWORK_CONTROLLER - DISPLAY_CONTROLLER - MULTIMEDIA_DEVICE - MEMORY_CONTROLLER - BRIDGE_DEVICE - SIMPLE_COMMUNICATION_CONTROLLER - BASE_SYSTEM_PERIPHERAL - INPUT_DEVICE - DOCKING_STATION - PROCESSOR - SERIAL_BUS_CONTROLLER - WIRELESS_CONTROLLER - INTELLIGENT_IO_CONTROLLER - SATELLITE_COMMUNICATION_CONTROLLER - ENCRYPTION_DECRYPTION_CONTROLLER - DATA_ACQUISITION_AND_SIGNAL_PROCESSING_CONTROLLER - PROCESSING_ACCELERATOR - NON_ESSENTIAL_INSTRUMENTATION - $UNKNOWN - $REDACTED x-enumDescriptions: INTELLIGENT_IO_CONTROLLER: Intelligent I/O controller WIRELESS_CONTROLLER: Wireless controller NON_ESSENTIAL_INSTRUMENTATION: Non-essential instrumentation MEMORY_CONTROLLER: Memory controller PROCESSOR: Processor MASS_STORAGE_CONTROLLER: Mass storage controller NETWORK_CONTROLLER: Network controller ENCRYPTION_DECRYPTION_CONTROLLER: Encryption/Decryption controller MULTIMEDIA_DEVICE: Multimedia controller DISPLAY_CONTROLLER: Display controller SERIAL_BUS_CONTROLLER: Serial bus controller BRIDGE_DEVICE: Bridge device DOCKING_STATION: Docking station BASE_SYSTEM_PERIPHERAL: Base system peripherals $REDACTED: | Redacted value. SIMPLE_COMMUNICATION_CONTROLLER: Simple communication controller SATELLITE_COMMUNICATION_CONTROLLER: Satellite communication controller DATA_ACQUISITION_AND_SIGNAL_PROCESSING_CONTROLLER: Data acquisition and signal processing controller INPUT_DEVICE: Input device PROCESSING_ACCELERATOR: Processing accelerator $UNKNOWN: | Unknown value. clustermgmt.v4.2.config.CategoryEntityReferences: required: - categories type: object properties: categories: maxItems: 1024 minItems: 1 type: array description: List of extIds of the categories to be updated for the entity. 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: b9384ebb-59ff-43ca-a502-9f33822c40b4 additionalProperties: false description: References to category entity required to update categories in association with the entity. clustermgmt.v4.2.config.AssociateCategoriesToClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/associate-categories\ \ Post operation" clustermgmt.v4.2.config.DisassociateCategoriesFromClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/disassociate-categories\ \ Post operation" clustermgmt.v4.2.config.GetClusterApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.Cluster oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Get operation" clustermgmt.v4.2.config.Cluster: description: Cluster entity with its attributes. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 75 type: string description: Cluster name. This is part of payload for both cluster create & update operations. example: test_cluster_name nodes: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeReference' config: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterConfigReference' network: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterNetworkReference' upgradeStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.UpgradeStatus' vmCount: type: integer description: Number of VMs. format: int64 readOnly: true example: 79 inefficientVmCount: type: integer description: Number of inefficient VMs. format: int64 readOnly: true example: 23 containerName: maxLength: 64 type: string description: The name of the default container created as part of cluster creation. This is part of payload for cluster create operation only. example: Test container_name categories: maxItems: 1024 minItems: 0 type: array description: List of categories associated to the PE cluster. 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: d34f1c01-7fac-4cad-a9d0-ef36123e3647 clusterProfileExtId: 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 cluster profile. readOnly: true example: 04b2b9e1-1602-4f82-afc8-087a0eedc39e backupEligibilityScore: type: integer description: Score to indicate how much cluster is eligible for storing domain manager backup. format: int64 readOnly: true example: 1 additionalProperties: false description: Cluster entity with its attributes. clustermgmt.v4.2.config.UpdateClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{extId}\ \ Delete operation" clustermgmt.v4.2.config.NodeReference: type: object properties: numberOfNodes: type: integer description: Number of nodes in a cluster. format: int32 readOnly: true example: 25 nodeList: maxItems: 1024 minItems: 0 type: array description: List of nodes in a cluster. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeListItemReference' additionalProperties: false description: Node reference for a cluster. clustermgmt.v4.2.config.ClusterConfigReference: type: object properties: incarnationId: type: integer description: Cluster incarnation Id. This is part of payload for cluster update operation only. format: int64 readOnly: true example: 1 buildInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.BuildReference' hypervisorTypes: maxItems: 5 minItems: 0 type: array description: Hypervisor type. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' clusterFunction: maxItems: 7 minItems: 0 type: array description: "Cluster function. This is part of payload for cluster create\ \ operation only (allowed enum values for creation are AOS, ONE_NODE &\ \ TWO_NODE only)." items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterFunctionRef' timezone: type: string description: Time zone on a cluster. readOnly: true example: UTC/IST authorizedPublicKeyList: maxItems: 1024 minItems: 0 type: array description: Public ssh key details. This is part of payload for cluster update operation only. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.PublicKey' redundancyFactor: type: integer description: Redundancy factor of a cluster. This is part of payload for both cluster create & update operations. format: int64 example: 43 clusterSoftwareMap: maxItems: 3 minItems: 0 type: array description: Cluster software version details. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SoftwareMapReference' clusterArch: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterArchReference' faultToleranceState: $ref: '#/components/schemas/clustermgmt.v4.2.config.FaultToleranceState' isRemoteSupportEnabled: type: boolean description: Remote support status. readOnly: true example: false operationMode: $ref: '#/components/schemas/clustermgmt.v4.2.config.OperationMode' isLts: type: boolean description: Indicates whether the release is categorized as Long-term or not. readOnly: true example: true isPasswordRemoteLoginEnabled: type: boolean description: Indicates whether the password ssh into the cluster is enabled or not. readOnly: true example: false encryptionInTransitStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.EncryptionStatus' encryptionOption: maxItems: 3 minItems: 0 type: array description: Encryption option. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.EncryptionOptionInfo' encryptionScope: maxItems: 2 minItems: 0 type: array description: Encryption scope. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.EncryptionScopeInfo' pulseStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.PulseStatus' isAvailable: type: boolean description: Indicates if cluster is available to contact or not. readOnly: true example: false clusterType: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterType' additionalProperties: false description: Cluster configuration details. clustermgmt.v4.2.config.ClusterNetworkReference: type: object properties: externalAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' externalDataServiceIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' externalSubnet: type: string description: Cluster external subnet address. readOnly: true example: 10.49.144.0/255.255.240.0 internalSubnet: type: string description: Cluster internal subnet address. readOnly: true example: 192.138.5.0/255.255.255.128 nfsSubnetWhitelist: maxItems: 1024 minItems: 0 uniqueItems: true type: array description: NFS subnet allowlist addresses. This is part of the payload for cluster update operation only. items: pattern: "\\b(?:\\d{1,3}\\.){3}\\d{1,3}/(?:\\d{1,3}\\.){3}\\d{1,3}\\b" type: string example: string nameServerIpList: maxItems: 1024 minItems: 0 uniqueItems: true type: array description: "List of name servers on a cluster. This is a part of payload\ \ for both clusters create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' ntpServerIpList: maxItems: 1024 minItems: 0 uniqueItems: true type: array description: "List of NTP servers on a cluster. This is a part of payload\ \ for both cluster create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' smtpServer: $ref: '#/components/schemas/clustermgmt.v4.2.config.SmtpServerRef' masqueradingIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' masqueradingPort: type: integer description: The port to connect to the cluster when using masquerading IP. format: int32 readOnly: true example: 9 managementServer: $ref: '#/components/schemas/clustermgmt.v4.2.config.ManagementServerRef' fqdn: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: Cluster fully qualified domain name. This is part of payload for cluster update operation only. example: string keyManagementServerType: $ref: '#/components/schemas/clustermgmt.v4.2.config.KeyManagementServerType' backplane: $ref: '#/components/schemas/clustermgmt.v4.2.config.BackplaneNetworkParams' httpProxyList: maxItems: 1 minItems: 0 type: array description: List of HTTP Proxy server configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyConfig' httpProxyWhiteList: maxItems: 1000 minItems: 0 type: array description: Targets HTTP traffic to which is exempted from going through the configured HTTP Proxy. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyWhiteListConfig' ntpServerConfigList: maxItems: 1024 minItems: 0 type: array description: List of NTP server configurations. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NtpServerConfig' additionalProperties: false description: Network details of a cluster. clustermgmt.v4.2.config.UpgradeStatus: type: string description: Upgrade status of a cluster. enum: - PENDING - DOWNLOADING - QUEUED - PREUPGRADE - UPGRADING - SUCCEEDED - FAILED - CANCELLED - SCHEDULED - $UNKNOWN - $REDACTED x-enumDescriptions: CANCELLED: The cluster upgrade is cancelled. FAILED: The cluster upgrade failed. QUEUED: The cluster upgrade is in the queue. SUCCEEDED: The cluster was upgraded successfully. DOWNLOADING: The luster upgrade is downloading. PENDING: The cluster upgrade is in pending state. UPGRADING: The cluster is in upgrade state. $UNKNOWN: | Unknown value. PREUPGRADE: The cluster is in pre-upgrade state. SCHEDULED: The cluster upgrade is in scheduled state. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ClusterProfile: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - name type: object properties: name: maxLength: 64 pattern: "^[A-Za-z0-9._-]+$" type: string description: Name of the cluster profile. example: Test Cluster Profile description: maxLength: 1000 type: string description: Detailed description of a cluster profile. example: Test ClusterProfile Description createTime: type: string description: Creation time of a cluster profile. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdateTime: type: string description: The last updated time of a cluster profile. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: 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: Details of the user who created the cluster profile. readOnly: true example: 703a0369-d038-487c-9ea0-b01ab35eef15 lastUpdatedBy: 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: Details of the user who has recently updated the cluster profile. readOnly: true example: 451911cf-a337-4d66-8781-0bee3e460757 clusterCount: type: integer description: Count of clusters associated to a cluster profile. format: int32 readOnly: true example: 13 driftedClusterCount: type: integer description: "The count indicates the number of clusters associated with\ \ a cluster profile that has experienced drift. Drifted clusters are\ \ those in which the configuration differs from the defined profile.\ \ For example, the NTP server has different values on a cluster as compared\ \ to the profile it is attached." format: int32 readOnly: true example: 4 clusters: maxItems: 400 minItems: 1 type: array description: Managed cluster information. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ManagedCluster' allowedOverrides: maxItems: 50 minItems: 0 type: array description: Indicates if a configuration of attached clusters can be skipped from monitoring. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ConfigType' nameServerIpList: maxItems: 1024 minItems: 0 type: array description: "List of name servers on a cluster. This is a part of payload\ \ for both clusters create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ntpServerIpList: maxItems: 1024 minItems: 0 type: array description: "List of NTP servers on a cluster. This is a part of payload\ \ for both cluster create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' smtpServer: $ref: '#/components/schemas/clustermgmt.v4.2.config.SmtpServerRef' nfsSubnetWhitelist: maxItems: 1024 minItems: 0 type: array description: NFS subnet allowlist addresses. This is part of the payload for cluster update operation only. items: pattern: "\\b(?:\\d{1,3}\\.){3}\\d{1,3}/(?:\\d{1,3}\\.){3}\\d{1,3}\\\ b" type: string example: 10.110.106.45/255.255.255.255 snmpConfig: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpConfig' rsyslogServerList: maxItems: 100 minItems: 0 type: array description: RSYSLOG Server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' pulseStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.PulseStatus' ntpServerConfigList: maxItems: 1024 minItems: 0 type: array description: List of NTP server configurations. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NtpServerConfig' additionalProperties: false description: Attributes of a cluster profile entity. clustermgmt.v4.2.config.StorageSummary: type: object properties: clusterFaultTolerantCapacityInBytes: type: integer description: Cluster fault tolerance defines how many simultaneous failures within a fault domain the cluster can sustain. format: int64 readOnly: true example: 64 additionalProperties: false description: Storage summary entity and its attribute related to cluster fault tolerance. clustermgmt.v4.2.config.NodeListItemReference: type: object properties: controllerVmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' nodeUuid: 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 host. readOnly: true example: 67e22e9b-a805-4781-8847-30d8b367f228 hostIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: List of nodes in a cluster. x-required-by-operation: create: - controllerVmIp clustermgmt.v4.2.config.BuildReference: type: object properties: buildType: type: string description: Software build type. example: release/opt version: type: string description: Software version. example: "6.7" fullVersion: type: string description: Full name of software version. example: el7.3-release-fraser-6.5.5.6-stable-e36389d5f36fa8e7cacfdccdc2049f85206c6d7c commitId: type: string description: Commit Id used for version. example: da8e2cbac08b1d4171e451b7ce008c4f1430d54d shortCommitId: type: string description: Short commit Id used for version. example: f978e71 additionalProperties: false description: Build information details. clustermgmt.v4.2.config.HypervisorType: type: string description: Hypervisor type. enum: - AHV - ESX - HYPERV - XEN - NATIVEHOST - $UNKNOWN - $REDACTED x-enumDescriptions: XEN: Xen hypervisor. HYPERV: HyperV hypervisor. NATIVEHOST: "NativeHost type where AOS runs natively, without hypervisor." ESX: ESX hypervisor. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. AHV: AHV hypervisor. clustermgmt.v4.2.config.ClusterFunctionRef: type: string description: "Cluster function. This is part of payload for cluster create operation\ \ only (allowed enum values for creation are AOS, ONE_NODE & TWO_NODE only)." enum: - AOS - PRISM_CENTRAL - CLOUD_DATA_GATEWAY - AFS - ONE_NODE - TWO_NODE - ANALYTICS_PLATFORM - $UNKNOWN - $REDACTED x-enumDescriptions: PRISM_CENTRAL: Prism Central. ANALYTICS_PLATFORM: Analytic platform cluster. AOS: AOS cluster. TWO_NODE: Two node cluster. CLOUD_DATA_GATEWAY: Cloud data gateway. ONE_NODE: One node cluster. $UNKNOWN: | Unknown value. AFS: Acropolis file system. $REDACTED: | Redacted value. clustermgmt.v4.2.config.PublicKey: required: - key - name type: object properties: name: maxLength: 1024 type: string description: Ssh key name. example: Test public key name key: type: string description: Ssh key value. example: Test key additionalProperties: false description: Public ssh key details. This is part of payload for cluster update operation only. clustermgmt.v4.2.config.SoftwareMapReference: type: object properties: softwareType: $ref: '#/components/schemas/clustermgmt.v4.2.config.SoftwareTypeRef' version: type: string description: Software version. example: string additionalProperties: false description: Cluster software version details. clustermgmt.v4.2.config.ClusterArchReference: type: string description: Cluster arch. enum: - X86_64 - PPC64LE - $UNKNOWN - $REDACTED x-enumDescriptions: PPC64LE: PPC64LE cluster architecture type. $UNKNOWN: | Unknown value. X86_64: X86_64 cluster architecture type. $REDACTED: | Redacted value. clustermgmt.v4.2.config.FaultToleranceState: type: object properties: currentMaxFaultTolerance: type: integer description: Maximum fault tolerance that is supported currently. format: int32 readOnly: true example: 32 desiredMaxFaultTolerance: type: integer description: Maximum fault tolerance desired. format: int32 readOnly: true example: 29 domainAwarenessLevel: $ref: '#/components/schemas/clustermgmt.v4.2.config.DomainAwarenessLevel' currentClusterFaultTolerance: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterFaultToleranceRef' desiredClusterFaultTolerance: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterFaultToleranceRef' redundancyStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.RedundancyStatusDetails' additionalProperties: false description: Fault tolerant state of cluster. clustermgmt.v4.2.config.OperationMode: type: string description: Cluster operation mode. This is part of payload for cluster update operation only. enum: - NORMAL - READ_ONLY - STAND_ALONE - SWITCH_TO_TWO_NODE - OVERRIDE - $UNKNOWN - $REDACTED x-enumDescriptions: OVERRIDE: Override operation mode. STAND_ALONE: Stand-alone operation mode. SWITCH_TO_TWO_NODE: Switch to two-node operation mode. $UNKNOWN: | Unknown value. NORMAL: Normal operation mode. READ_ONLY: Read-only operation mode. $REDACTED: | Redacted value. clustermgmt.v4.2.config.EncryptionStatus: type: string description: Encryption in transit Status. enum: - ENABLED - DISABLED - $UNKNOWN - $REDACTED x-enumDescriptions: DISABLED: Disabled encryption status. ENABLED: Enabled encryption status. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.EncryptionOptionInfo: type: string description: Encryption option. enum: - SOFTWARE - HARDWARE - SOFTWARE_AND_HARDWARE - $UNKNOWN - $REDACTED x-enumDescriptions: HARDWARE: Hardware encryption. SOFTWARE_AND_HARDWARE: Software and hardware encryption. $UNKNOWN: | Unknown value. SOFTWARE: Software encryption. $REDACTED: | Redacted value. clustermgmt.v4.2.config.EncryptionScopeInfo: type: string description: Encryption scope. enum: - CLUSTER - CONTAINER - $UNKNOWN - $REDACTED x-enumDescriptions: CONTAINER: Container encryption scope. CLUSTER: Cluster encryption scope. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.PulseStatus: type: object properties: isEnabled: type: boolean description: Flag determines whether pulse is enabled for a cluster. example: true piiScrubbingLevel: $ref: '#/components/schemas/clustermgmt.v4.2.config.PIIScrubbingLevel' additionalProperties: false description: Pulse status for a cluster. clustermgmt.v4.2.config.ClusterType: type: string description: Type of the cluster enum: - HYPER_CONVERGED - COMPUTE - $UNKNOWN - $REDACTED x-enumDescriptions: HYPER_CONVERGED: Hyper-converged node. COMPUTE: Compute cluster $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.SoftwareTypeRef: type: string description: Software type. enum: - NOS - NCC - PRISM_CENTRAL - $UNKNOWN - $REDACTED x-enumDescriptions: PRISM_CENTRAL: Prism Central software type. NOS: NOS software. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. NCC: NCC software. clustermgmt.v4.2.config.DomainAwarenessLevel: type: string description: Domain awareness level corresponds to unit of cluster group. This is part of payload for both cluster create & update operations. enum: - NODE - BLOCK - RACK - DISK - $UNKNOWN - $REDACTED x-enumDescriptions: RACK: Rack level awareness. NODE: Node level awareness. BLOCK: Block level awareness. $UNKNOWN: | Unknown value. DISK: Disk level awareness. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ClusterFaultToleranceRef: type: string description: Cluster Fault tolerance. Set desiredClusterFaultTolerance for cluster create and update. enum: - CFT_0N_AND_0D - CFT_1N_OR_1D - CFT_2N_OR_2D - CFT_1N_AND_1D - CFT_1N_OR_1D_STRICT - CFT_2N_OR_2D_STRICT - $UNKNOWN - $REDACTED x-enumDescriptions: CFT_1N_OR_1D: System can handle fault of one node or one disk CFT_2N_OR_2D: System can handle fault of two nodes or two disks CFT_1N_AND_1D: System can handle fault of one node and one disk on the other node simultaneously CFT_1N_OR_1D_STRICT: System can handle fault of one node or one disk $UNKNOWN: | Unknown value. CFT_2N_OR_2D_STRICT: System can handle fault of two nodes or two disks $REDACTED: | Redacted value. CFT_0N_AND_0D: System can not handle any fault with a node or a disk clustermgmt.v4.2.config.RedundancyStatusDetails: type: object properties: isCassandraPreparationDone: type: boolean description: Boolean flag to indicate if Cassandra ensemble can meet the desired FT. readOnly: true example: false isZookeeperPreparationDone: type: boolean description: Boolean flag to indicate if Zookeeper ensemble can meet the desired FT. readOnly: true example: true additionalProperties: false description: Redundancy Status of the cluster readOnly: true clustermgmt.v4.2.config.PIIScrubbingLevel: type: string description: PII Scrubbing Level for pulse. enum: - DEFAULT - ALL - $UNKNOWN - $REDACTED x-enumDescriptions: ALL: Scrub All PII Information from Pulse including data like entity names and IP addresses. $UNKNOWN: | Unknown value. DEFAULT: Default PII Scrubbing level. Data like entity names and IP addresses will not be scrubbed from Pulse. $REDACTED: | Redacted value. clustermgmt.v4.2.config.SmtpServerRef: required: - emailAddress - server type: object properties: emailAddress: pattern: "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" type: string description: SMTP email address. example: john.doe@example.com server: $ref: '#/components/schemas/clustermgmt.v4.2.config.SmtpNetwork' type: $ref: '#/components/schemas/clustermgmt.v4.2.config.SmtpType' additionalProperties: false description: SMTP servers on a cluster. This is part of payload for cluster update operation only. clustermgmt.v4.2.config.ManagementServerRef: type: object properties: ip: $ref: '#/components/schemas/common.v1.0.config.IPAddress' type: $ref: '#/components/schemas/clustermgmt.v4.2.config.ManagementServerType' isDrsEnabled: type: boolean description: Indicates whether it is DRS enabled or not. example: true isRegistered: type: boolean description: Indicates whether it is registered or not. example: false isInUse: type: boolean description: Indicates whether the host is managed by an entity or not. example: false additionalProperties: false description: Management server information. clustermgmt.v4.2.config.KeyManagementServerType: type: string description: Management server type. enum: - LOCAL - PRISM_CENTRAL - EXTERNAL - $UNKNOWN - $REDACTED x-enumDescriptions: PRISM_CENTRAL: Prism Central management server. EXTERNAL: External management server. LOCAL: Local management server. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.BackplaneNetworkParams: type: object properties: isSegmentationEnabled: type: boolean description: Flag to indicate if the backplane segmentation needs to be enabled or not. example: true vlanTag: type: integer description: VLAN Id tagged to the backplane network on the cluster. This is part of cluster create payload. format: int64 example: 45 subnet: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' netmask: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' additionalProperties: false description: Params associated to the backplane network segmentation. This is part of payload for cluster create operation only. clustermgmt.v4.2.config.HttpProxyConfig: required: - name type: object properties: ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' port: type: integer description: HTTP Proxy server port configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. format: int32 example: 36 username: maxLength: 64 type: string description: HTTP Proxy server username needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. example: string password: type: string description: HTTP Proxy server password needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. example: string name: maxLength: 64 type: string description: HTTP Proxy server name configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. example: string proxyTypes: maxItems: 3 minItems: 0 type: array description: List of HTTP proxy types. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyType' additionalProperties: false description: HTTP Proxy server configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. clustermgmt.v4.2.config.HttpProxyWhiteListConfig: required: - target - targetType type: object properties: targetType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyWhiteListTargetType' target: type: string description: Target's identifier which is exempted from going through the configured HTTP Proxy. example: string additionalProperties: false description: Targets HTTP traffic to which is exempted from going through the configured HTTP Proxy. clustermgmt.v4.2.config.NtpServerConfig: required: - ntpServerAddress type: object properties: ntpServerAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' encryptionAlgorithm: $ref: '#/components/schemas/clustermgmt.v4.2.config.EncryptionAlgorithm' encryptionKey: maxLength: 128 pattern: "^(?:0[xX])?[0-9a-fA-F]+$" type: string description: Encryption key in hexadecimal format used for NTP server authentication. example: D1C7E7236ADB73FABACE4F49C7358B60155AA6CF encryptionKeyId: type: integer description: Encryption key Id used for NTP server authentication. format: int32 example: 47 additionalProperties: false description: NTP server configuration details. clustermgmt.v4.2.config.SmtpNetwork: required: - ipAddress type: object properties: ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' port: type: integer description: SMTP port. format: int32 example: 54 username: maxLength: 64 type: string description: SMTP server user name. example: user1 password: type: string description: SMTP server password. example: string additionalProperties: false description: SMTP network details. clustermgmt.v4.2.config.SmtpType: type: string description: Type of SMTP server. enum: - PLAIN - STARTTLS - SSL - $UNKNOWN - $REDACTED x-enumDescriptions: PLAIN: Plain type SMTP server. STARTTLS: Start TLS type SMTP server. $UNKNOWN: | Unknown value. SSL: SSL type SMTP server. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ManagementServerType: type: string description: Management server type. enum: - VCENTER - $UNKNOWN - $REDACTED x-enumDescriptions: VCENTER: Vcenter management server. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.HttpProxyType: type: string description: HTTP proxy type which is needed to access a cluster hosted behind a HTTP Proxy. enum: - HTTP - HTTPS - SOCKS - $UNKNOWN - $REDACTED x-enumDescriptions: HTTPS: HTTPS proxy protocol type. SOCKS: SOCKS proxy protocol type. HTTP: HTTP proxy protocol type. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.HttpProxyWhiteListTargetType: type: string description: Type of the target which is exempted from going through the configured HTTP Proxy. enum: - IPV4_ADDRESS - IPV6_ADDRESS - IPV4_NETWORK_MASK - DOMAIN_NAME_SUFFIX - HOST_NAME - $UNKNOWN - $REDACTED x-enumDescriptions: IPV6_ADDRESS: IPV6 address. HOST_NAME: Name of the host. DOMAIN_NAME_SUFFIX: Domain Name Suffix required for http proxy whitelist. IPV4_NETWORK_MASK: Network Mask of the IpV4 family. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. IPV4_ADDRESS: IPV4 address. clustermgmt.v4.2.config.EncryptionAlgorithm: type: string description: Encryption algorithm used for NTP server authentication. enum: - SHA256 - SHA384 - SHA512 - $UNKNOWN - $REDACTED x-enumDescriptions: SHA256: SHA256 encryption algorithm used for authentication. SHA384: SHA384 encryption algorithm used for authentication. $UNKNOWN: | Unknown value. SHA512: SHA512 encryption algorithm used for authentication. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ManagedCluster: 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: Indicates the UUID of a cluster. example: 3050de69-e12b-4410-bd8c-6083fcb8f07b isCompliant: type: boolean description: Indicates if the attached cluster is compliant with the cluster profile or not. readOnly: true example: true lastSyncedTime: type: string description: The most recent date and time when the cluster profile was monitored across all attached clusters. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 configDrifts: maxItems: 50 minItems: 0 type: array description: Drifted settings information. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ConfigType' additionalProperties: false description: Managed cluster information. clustermgmt.v4.2.config.ConfigType: type: string enum: - NTP_SERVER_CONFIG - NAME_SERVER_CONFIG - SMTP_SERVER_CONFIG - NFS_SUBNET_WHITELIST_CONFIG - SNMP_SERVER_CONFIG - RSYSLOG_SERVER_CONFIG - PULSE_CONFIG - $UNKNOWN - $REDACTED x-enumDescriptions: NFS_SUBNET_WHITELIST_CONFIG: NFS subnet whitelist configuration. NTP_SERVER_CONFIG: NTP server configuration. SNMP_SERVER_CONFIG: SNMP server configuration. SMTP_SERVER_CONFIG: SMTP server configuration. PULSE_CONFIG: Pulse status for a cluster. $UNKNOWN: | Unknown value. NAME_SERVER_CONFIG: Name server configuration. $REDACTED: | Redacted value. RSYSLOG_SERVER_CONFIG: RSYSLOG server configuration. clustermgmt.v4.2.config.SnmpConfig: description: SNMP information. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: isEnabled: type: boolean description: SNMP status. example: false users: maxItems: 1024 minItems: 0 type: array description: SNMP user information. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpUser' transports: maxItems: 1024 minItems: 0 type: array description: SNMP transport details. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTransport' traps: maxItems: 1024 minItems: 0 type: array description: SNMP trap details. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrap' additionalProperties: false description: SNMP information. clustermgmt.v4.2.config.RsyslogServer: description: RSYSLOG Server. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - ipAddress - networkProtocol - port - serverName type: object properties: serverName: maxLength: 64 type: string description: RSYSLOG server name. example: testServer1 ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' port: type: integer description: RSYSLOG server port. format: int32 example: 13 networkProtocol: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogNetworkProtocol' modules: maxItems: 1024 minItems: 0 type: array description: List of modules registered to RSYSLOG server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogModuleItem' additionalProperties: false description: RSYSLOG Server. clustermgmt.v4.2.config.SnmpUser: description: SNMP user information. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - authKey - authType - username type: object properties: username: maxLength: 64 type: string description: "SNMP username. For SNMP trap v3 version, SNMP username is\ \ required parameter." example: Test UserName authType: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpAuthType' authKey: pattern: "^[^']+$" type: string description: SNMP user authentication key. example: Test_SNMP_user_authentication_key. privType: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpPrivType' privKey: pattern: "^[^']+$" type: string description: SNMP user encryption key. example: Test_SNMP_user_encryption_key. additionalProperties: false clustermgmt.v4.2.config.SnmpTransport: required: - port - protocol type: object properties: protocol: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpProtocol' port: type: integer description: SNMP port. format: int32 example: 83 additionalProperties: false description: SNMP transport details. clustermgmt.v4.2.config.SnmpTrap: description: SNMP trap details. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - address - version type: object properties: address: $ref: '#/components/schemas/common.v1.0.config.IPAddress' username: maxLength: 64 type: string description: "SNMP username. For SNMP trap v3 version, SNMP username is\ \ required parameter." example: Test UserName protocol: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpProtocol' port: type: integer description: SNMP port. format: int32 example: 73 shouldInform: type: boolean description: SNMP information status. example: false engineId: pattern: "^(?:0[xX])?[0-9a-fA-F]+$" type: string description: SNMP engine Id. example: Test snmp engine Id version: $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrapVersion' recieverName: maxLength: 64 type: string description: SNMP receiver name. example: Test Receiver Name communityString: type: string description: Community string(plaintext) for SNMP version 2.0. example: snmp-server community public RO 192.168.1.0 255.255.255.0 additionalProperties: false description: SNMP trap details. clustermgmt.v4.2.config.SnmpAuthType: type: string description: SNMP user authentication type. enum: - MD5 - SHA - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. SHA: SHA SNMP authentication. $REDACTED: | Redacted value. MD5: MD5 SNMP authentication. clustermgmt.v4.2.config.SnmpPrivType: type: string description: SNMP user encryption type. enum: - DES - AES - $UNKNOWN - $REDACTED x-enumDescriptions: DES: DES SNMP key. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. AES: AES SNMP key. clustermgmt.v4.2.config.SnmpProtocol: type: string description: SNMP protocol type. enum: - UDP - UDP6 - TCP - TCP6 - $UNKNOWN - $REDACTED x-enumDescriptions: UDP: UDP protocol. TCP: TCP protocol. UDP6: UDP6 protocol. TCP6: TCP6 protocol. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.SnmpTrapVersion: type: string description: SNMP version. enum: - V2 - V3 - $UNKNOWN - $REDACTED x-enumDescriptions: V2: V2 SNMP version. $UNKNOWN: | Unknown value. V3: V3 SNMP version. $REDACTED: | Redacted value. clustermgmt.v4.2.config.RsyslogNetworkProtocol: type: string description: RSYSLOG server protocol type. enum: - UDP - TCP - RELP - $UNKNOWN - $REDACTED x-enumDescriptions: UDP: UDP protocol. TCP: TCP protocol. RELP: RELP protocol. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.RsyslogModuleItem: required: - logSeverityLevel - name type: object properties: name: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogModuleName' logSeverityLevel: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogModuleLogSeverityLevel' shouldLogMonitorFiles: type: boolean description: "Option to log, monitor/output files of a module." default: true additionalProperties: false description: RSYSLOG Module information. clustermgmt.v4.2.config.RsyslogModuleName: type: string description: RSYSLOG module name. enum: - CASSANDRA - CEREBRO - CURATOR - GENESIS - PRISM - STARGATE - SYSLOG_MODULE - ZOOKEEPER - UHARA - LAZAN - API_AUDIT - AUDIT - CALM - EPSILON - ACROPOLIS - MINERVA_CVM - FLOW - FLOW_SERVICE_LOGS - LCM - APLOS - NCM_AIOPS - $UNKNOWN - $REDACTED x-enumDescriptions: AUDIT: Audit module. CALM: Calm module. MINERVA_CVM: Minerva module. STARGATE: Stargate Module FLOW_SERVICE_LOGS: Flow service module. SYSLOG_MODULE: Syslog module. CEREBRO: Cerebro module. API_AUDIT: API audit module. GENESIS: Genesis module. PRISM: Prism module. ZOOKEEPER: Zookeeper module. FLOW: Flow module. $REDACTED: | Redacted value. EPSILON: Epsilon module. ACROPOLIS: Acropolis module. UHARA: Uhara module. LCM: LCM module. APLOS: Aplos module. NCM_AIOPS: Ncm aiops module. CURATOR: Curator module. $UNKNOWN: | Unknown value. CASSANDRA: Cassandra module. LAZAN: Lazan module. clustermgmt.v4.2.config.RsyslogModuleLogSeverityLevel: type: string description: RSYSLOG module log severity level. enum: - EMERGENCY - ALERT - CRITICAL - ERROR - WARNING - NOTICE - INFO - DEBUG - $UNKNOWN - $REDACTED x-enumDescriptions: EMERGENCY: Emergency level. NOTICE: Notice level. ERROR: Error level. ALERT: Alert level. INFO: Info level. $UNKNOWN: | Unknown value. WARNING: Warning level. DEBUG: Debug level. CRITICAL: Critical level. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ListClustersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cluster' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters Get operation clustermgmt.v4.2.config.CreateClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/clusters Post operation clustermgmt.v4.2.config.GetSnmpConfigByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.SnmpConfig oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpConfig' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp\ \ Get operation" clustermgmt.v4.2.config.SnmpStatusParam: required: - isEnabled type: object properties: isEnabled: type: boolean description: SNMP user information. example: true additionalProperties: false description: SNMP status. clustermgmt.v4.2.config.UpdateSnmpStatusApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/update-status\ \ Post operation" clustermgmt.v4.2.config.AddSnmpTransportsApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/add-transports\ \ Post operation" clustermgmt.v4.2.config.RemoveSnmpTransportsApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/$actions/remove-transports\ \ Post operation" clustermgmt.v4.2.config.CreateSnmpUserApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users\ \ Post operation" clustermgmt.v4.2.config.GetSnmpUserApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.SnmpUser oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpUser' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Get operation" clustermgmt.v4.2.config.UpdateSnmpUserApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteSnmpUserApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/users/{extId}\ \ Delete operation" clustermgmt.v4.2.config.CreateSnmpTrapApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps\ \ Post operation" clustermgmt.v4.2.config.GetSnmpTrapApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.SnmpTrap oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.SnmpTrap' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Get operation" clustermgmt.v4.2.config.UpdateSnmpTrapApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteSnmpTrapApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/snmp/traps/{extId}\ \ Delete operation" clustermgmt.v4.2.config.ListRsyslogServersByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 10 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ Get operation" clustermgmt.v4.2.config.CreateRsyslogServerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers\ \ Post operation" clustermgmt.v4.2.config.GetRsyslogServerApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.RsyslogServer oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.RsyslogServer' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Get operation" clustermgmt.v4.2.config.UpdateRsyslogServerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteRsyslogServerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rsyslog-servers/{extId}\ \ Delete operation" clustermgmt.v4.2.config.ListRackableUnitsByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 10 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnit' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units\ \ Get operation" clustermgmt.v4.2.config.RackableUnit: description: Rackable Unit configuration. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: id: type: integer description: Rackable unit Id. format: int64 example: 22 serial: type: string description: Rackable unit serial name. example: 19FM6F160446 model: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnitModel' modelName: maxLength: 64 type: string description: Rackable unit model name. example: NX-3060-G5 nodes: maxItems: 1024 minItems: 0 type: array description: List of node information registered to the block. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnitNode' rack: $ref: '#/components/schemas/clustermgmt.v4.2.config.RackReference' additionalProperties: false clustermgmt.v4.2.config.RackableUnitModel: type: string description: Rackable unit model type. enum: - DESKTOP - NX2000 - NX3000 - NX3050 - NX6050 - NX6070 - NX1050 - NX3060 - NX6060 - NX6080 - NX6020 - NX7110 - NX1020 - NX9040 - USELAYOUT - NULLVALUE - $UNKNOWN - $REDACTED x-enumDescriptions: NX2000: NX2000 model. DESKTOP: Desktop model. USELAYOUT: Use layout model. NX3060: NX3060 model. NX7110: NX7110 model. NULLVALUE: Undefined model. NX6020: NX6020 model. NX3050: NX3050 model. NX1050: NX1050 model. NX3000: NX3000 model. NX1020: NX1020 model. $REDACTED: | Redacted value. NX9040: NX9040 model. NX6050: NX6050 model. NX6060: NX6060 model. NX6070: NX6070 model. NX6080: NX6080 model. $UNKNOWN: | Unknown value. clustermgmt.v4.2.config.RackableUnitNode: type: object properties: uuid: 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 host. example: 7d685862-1871-4e3b-92ea-47c21f923809 svmId: type: integer description: Controller VM Id. format: int64 example: 97 position: type: integer description: Position of a node in a rackable unit. format: int32 example: 84 additionalProperties: false description: Node information registered to this rackable unit. clustermgmt.v4.2.config.RackReference: type: object properties: uuid: 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: Rack UUID. example: 98614bba-3d8e-44fa-85d9-1e369ce7c2ad id: type: integer description: Rack Id. format: int64 example: 35 additionalProperties: false description: Rack reference for the block. clustermgmt.v4.2.config.GetRackableUnitApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.RackableUnit oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.RackableUnit' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/rackable-units/{extId}\ \ Get operation" clustermgmt.v4.2.config.MultiDomainFaultToleranceStatus: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: multiDomainFaultToleranceStatus: maxItems: 6 minItems: 1 type: array description: Domain fault tolerance configuration for all domain types items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DomainFaultTolerance' additionalProperties: false description: "Fetches the domain fault tolerance status of the cluster identified\ \ by {extId}." clustermgmt.v4.2.config.DomainFaultTolerance: type: object properties: type: $ref: '#/components/schemas/clustermgmt.v4.2.config.DomainType' componentStatus: maxItems: 8 minItems: 0 type: array description: List of components in a domain. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ComponentFaultTolerance' additionalProperties: false description: "Fetches the domain fault tolerance status of the cluster identified\ \ by {extId}." clustermgmt.v4.2.config.DomainType: type: string description: Type of domain enum: - CUSTOM - DISK - NODE - RACKABLE_UNIT - RACK - CLUSTER - $UNKNOWN - $REDACTED x-enumDescriptions: RACK: Rack domain type. NODE: Node domain type. CUSTOM: Custom domain type. RACKABLE_UNIT: Block domain type. CLUSTER: Cluster domain type. $UNKNOWN: | Unknown value. DISK: Disk domain type. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ComponentFaultTolerance: type: object properties: type: $ref: '#/components/schemas/clustermgmt.v4.2.config.ComponentType' maxFaultsTolerated: type: integer description: Maximum fault tolerance. format: int32 example: 16 lastUpdatedTime: type: string description: Time of last update. format: date-time example: 2009-09-23T14:30:00-07:00 isUnderComputation: type: boolean description: Indicates whether the tolerance computation is in progress or not. example: false detailMessage: $ref: '#/components/schemas/clustermgmt.v4.2.config.ToleranceMessage' additionalProperties: false description: Fault tolerance information of a component. clustermgmt.v4.2.config.ComponentType: type: string description: Type of component. enum: - EXTENT_GROUP_REPLICAS - OPLOG_EPISODES - CASSANDRA_RING - ZOOKEPER_INSTANCES - FREE_SPACE - STATIC_CONFIG - ERASURE_CODE_STRIP_SIZE - STARGATE_HEALTH - $UNKNOWN - $REDACTED x-enumDescriptions: FREE_SPACE: Free space component type. ERASURE_CODE_STRIP_SIZE: Erasure component type. OPLOG_EPISODES: Oplog component type. STATIC_CONFIG: Static configuration component type. EXTENT_GROUP_REPLICAS: Extent group replica component type. ZOOKEPER_INSTANCES: Zookeeper component type. STARGATE_HEALTH: Stargate health component type. $UNKNOWN: | Unknown value. CASSANDRA_RING: Cassandra ring component type. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ToleranceMessage: type: object properties: id: type: string description: Message Id. example: test Message ID attributeList: maxItems: 1024 minItems: 0 type: array description: List of tolerance message attributes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.AttributeItem' additionalProperties: false description: Message contains the component domain fault tolerance text details. clustermgmt.v4.2.config.AttributeItem: type: object properties: attribute: type: string description: Tolerance message attribute key. example: Test attribute name value: type: string description: Tolerance message attribute value. example: Test attribute Value additionalProperties: false description: Attribute item information. clustermgmt.v4.2.config.GetHostApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.Host oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{extId}\ \ Get operation" clustermgmt.v4.2.config.Host: description: Host entity with its attributes. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: hostName: maxLength: 63 type: string description: Name of the host. example: Test Host Name mostly IPV4 address hostType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostTypeEnum' hypervisor: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorReference' cluster: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterReference' controllerVm: $ref: '#/components/schemas/clustermgmt.v4.2.config.ControllerVmReference' disk: maxItems: 1024 minItems: 0 type: array description: Disks attached to host. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DiskReference' isDegraded: type: boolean description: Node degraded status. example: false isSecureBooted: type: boolean description: Secure boot status. example: false isHardwareVirtualized: type: boolean description: Indicates whether the hardware is virtualized or not. example: true hasCsr: type: boolean description: Certificate signing request status. example: true keyManagementDeviceToCertStatus: maxItems: 1024 minItems: 0 type: array description: Mapping of key management device to certificate status list. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.KeyManagementDeviceToCertStatusInfo' numberOfCpuCores: type: integer description: Number of CPU cores. format: int64 example: 95 numberOfCpuThreads: type: integer description: Number of CPU threads. format: int64 example: 1 numberOfCpuSockets: type: integer description: Number of CPU sockets. format: int64 example: 61 cpuCapacityHz: type: integer description: CPU capacity in Hz. format: int64 example: 20 cpuFrequencyHz: type: integer description: CPU frequency in Hz. format: int64 example: 85 cpuModel: type: string description: CPU model name. example: Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz gpuDriverVersion: type: string description: GPU driver version. example: 00061837-4b34-720c-6a02-043201338600 gpuList: maxItems: 1024 minItems: 0 type: array description: GPU attached list. items: type: string example: " gpu name: Nvidia_GRID_T4-1B" defaultVhdLocation: type: string description: Default VHD location. example: "Test path of Default VHD location, default value is null" defaultVhdContainerUuid: 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: Default VHD container UUID. example: b9dec220-d9d4-43a2-ab40-d760e2d9a26e defaultVmLocation: type: string description: Default VM location. example: "Test path of Default VHD location, default value is null" defaultVmContainerUuid: 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: Default VM container UUID. example: a1ac6433-f0d3-480a-baa1-aa38a39a2521 isRebootPending: type: boolean description: Reboot pending status. example: true failoverClusterFqdn: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: Failover cluster FQDN. example: string failoverClusterNodeStatus: type: string description: Failover cluster node status. example: "Up,Down" bootTimeUsecs: type: integer description: Boot time in secs. format: int64 example: 13 memorySizeBytes: type: integer description: Memory size in bytes. format: int64 example: 79 nodeSerial: type: string description: Node Serial Number Description example: ZM184S035672 blockSerial: type: string description: Rackable unit serial name. example: 19FM6F160445 blockModel: type: string description: Rackable unit model name. example: NX-3060-G5 maintenanceState: type: string description: Host Maintenance State. example: normal/in_maintenanace/entering_maintenance/exiting_maintenance nodeStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeStatus' ipmi: $ref: '#/components/schemas/clustermgmt.v4.2.config.IpmiReference' rackableUnitUuid: 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: Rackable unit UUID. example: 9fd863ce-f20c-4b05-9eae-363d98fbace7 additionalProperties: false clustermgmt.v4.2.config.HostTypeEnum: type: string description: Type of the host. enum: - HYPER_CONVERGED - COMPUTE_ONLY - STORAGE_ONLY - $UNKNOWN - $REDACTED x-enumDescriptions: HYPER_CONVERGED: Hyper-converged node. COMPUTE_ONLY: Compute only node. $UNKNOWN: | Unknown value. STORAGE_ONLY: Storage only node. $REDACTED: | Redacted value. clustermgmt.v4.2.config.HypervisorReference: type: object properties: externalAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' userName: maxLength: 64 type: string description: Hypervisor user name. example: Test UserName fullName: maxLength: 64 type: string description: Hypervisor full name. example: AHV 10.0 type: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' numberOfVms: type: integer description: Number of VMs. format: int64 example: 60 state: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorState' acropolisConnectionState: $ref: '#/components/schemas/clustermgmt.v4.2.config.AcropolisConnectionState' additionalProperties: false description: Hypervisor details. clustermgmt.v4.2.config.ClusterReference: type: object properties: uuid: 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 cluster. example: a596ed35-8647-4ea0-b6f2-994fe2459f22 name: maxLength: 64 type: string description: Cluster name. This is part of payload for both cluster create & update operations. readOnly: true example: Test Cluster Name additionalProperties: false description: Cluster reference for an entity. clustermgmt.v4.2.config.ControllerVmReference: type: object properties: externalAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' backplaneAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' rdmaBackplaneAddress: maxItems: 1024 minItems: 0 type: array description: RDMA backplane address. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' natIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' natPort: type: integer description: NAT port. example: 70 isInMaintenanceMode: type: boolean description: Maintenance mode status. example: false additionalProperties: false description: Host entity with its attributes. clustermgmt.v4.2.config.DiskReference: type: object properties: uuid: 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: Disk UUID. example: 9095a1ef-3194-404d-baeb-9a2f52124491 mountPath: type: string description: Disk mount path. example: /home/nutanix/data/stargate-storage/disks/W461VFBT sizeInBytes: type: integer description: Disk size. format: int64 example: 46 serialId: type: string description: Disk serial Id. example: W461VFBT storageTier: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageTierReference' additionalProperties: false description: Disk details attached to a host. clustermgmt.v4.2.config.KeyManagementDeviceToCertStatusInfo: type: object properties: keyManagementServerName: maxLength: 64 type: string description: Key management server name. example: Test KeyManagementDevice Name isCertificatePresent: type: boolean description: Certificate status. example: true additionalProperties: false description: Mapping of key management device to certificate status list. clustermgmt.v4.2.config.NodeStatus: type: string description: Node status. enum: - NORMAL - TO_BE_REMOVED - OK_TO_BE_REMOVED - NEW_NODE - TO_BE_PREPROTECTED - PREPROTECTED - $UNKNOWN - $REDACTED x-enumDescriptions: TO_BE_PREPROTECTED: Node to be preprotected. TO_BE_REMOVED: Node to be removed. PREPROTECTED: Node is preprotected. $UNKNOWN: | Unknown value. OK_TO_BE_REMOVED: Indicates whether removing the node from the cluster is adequate. NORMAL: Normal node. $REDACTED: | Redacted value. NEW_NODE: New node. clustermgmt.v4.2.config.IpmiReference: type: object properties: ip: $ref: '#/components/schemas/common.v1.0.config.IPAddress' username: maxLength: 64 type: string description: IPMI username. example: Test UserName additionalProperties: false description: IPMI reference. clustermgmt.v4.2.config.HypervisorState: type: string description: Hypervisor state. enum: - ACROPOLIS_NORMAL - ENTERING_MAINTENANCE_MODE - ENTERED_MAINTENANCE_MODE - RESERVED_FOR_HA_FAILOVER - ENTERING_MAINTENANCE_MODE_FROM_HA_FAILOVER - RESERVING_FOR_HA_FAILOVER - HA_FAILOVER_SOURCE - HA_FAILOVER_TARGET - HA_HEALING_SOURCE - HA_HEALING_TARGET - $UNKNOWN - $REDACTED x-enumDescriptions: HA_HEALING_TARGET: Hypervisor in HA healing target state. ENTERING_MAINTENANCE_MODE: Hypervisor entering maintenance mode. RESERVED_FOR_HA_FAILOVER: Hypervisor reserved for HA failover. HA_HEALING_SOURCE: Hypervisor in HA healing source state. RESERVING_FOR_HA_FAILOVER: Hypervisor that is planned to be reserved for HA failover. HA_FAILOVER_SOURCE: Hypervisor in HA failover source state. $UNKNOWN: | Unknown value. ACROPOLIS_NORMAL: Hypervisor in Acropolis normal state. ENTERED_MAINTENANCE_MODE: Hypervisor entered maintenance mode. ENTERING_MAINTENANCE_MODE_FROM_HA_FAILOVER: Hypervisor entering maintenance mode from HA failover. HA_FAILOVER_TARGET: Hypervisor in HA failover target state. $REDACTED: | Redacted value. clustermgmt.v4.2.config.AcropolisConnectionState: type: string description: Status of Acropolis connection to hypervisor. enum: - CONNECTED - DISCONNECTED - $UNKNOWN - $REDACTED x-enumDescriptions: DISCONNECTED: Acropolis disconnected. CONNECTED: Acropolis connected. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.StorageTierReference: type: string description: Disk storage Tier type. enum: - PCIE_SSD - SATA_SSD - HDD - $UNKNOWN - $REDACTED x-enumDescriptions: HDD: HDD storage tier. $UNKNOWN: | Unknown value. PCIE_SSD: PCIE SSD storage tier. SATA_SSD: SATA SSD storage tier. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ListHostsByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts\ \ Get operation" clustermgmt.v4.2.config.HostNameParam: required: - name type: object properties: name: maxLength: 63 type: string description: Name of the host. example: Test Host Name additionalProperties: false description: Host rename parameters. clustermgmt.v4.2.config.HostGpu: description: Host GPU details. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: nodeUuid: 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 host. example: 941d8f04-0212-4d2e-8107-909f9f8d9893 nodeId: type: string description: Controller VM Id. example: "Test node Id, ex: e75073a9-8c1a-44da-84a4-d960f1f9978c" cluster: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterReference' numberOfVgpusAllocated: type: integer description: Number of vGPUs allocated. format: int64 example: 85 config: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualGpuConfig' additionalProperties: false clustermgmt.v4.2.config.VirtualGpuConfig: type: object properties: type: $ref: '#/components/schemas/clustermgmt.v4.2.config.GpuType' deviceId: type: integer description: Device Id. format: int64 example: 69 deviceName: maxLength: 128 minLength: 0 type: string description: Device name. example: Test Device Name vendorName: maxLength: 128 minLength: 0 type: string description: Vendor name. example: Test Vendor Name isInUse: type: boolean description: GPU in use. default: false sbdf: maxLength: 11 minLength: 0 type: string description: SBDF address. example: 0000:af:00.0 numaNode: maxLength: 2 minLength: 0 type: string description: NUMA node. example: "1" assignable: type: integer description: GPU assignable. format: int64 example: 15 fraction: type: integer description: GPU fraction. format: int64 example: 89 guestDriverVersion: maxLength: 32 minLength: 0 type: string description: Guest driver version. example: "471.68" licenses: maxItems: 1024 minItems: 0 type: array description: GPU license list. items: type: string example: Starter/Pro numberOfVirtualDisplayHeads: type: integer description: Number of virtual display heads. format: int64 example: 70 frameBufferSizeBytes: type: integer description: Frame buffer size in bytes. format: int64 example: 16 maxResolution: maxLength: 16 minLength: 0 type: string description: Maximum resolution per display heads. example: 4096x2160 maxInstancesPerVm: type: integer description: Maximum instances allowed per VM. format: int64 example: 91 additionalProperties: false description: Virtual GPU configuration details. clustermgmt.v4.2.config.GpuType: type: string description: GPU type. enum: - PASSTHROUGH_GRAPHICS - PASSTHROUGH_COMPUTE - VIRTUAL - $UNKNOWN - $REDACTED x-enumDescriptions: PASSTHROUGH_GRAPHICS: Pass through graphics GPU type. PASSTHROUGH_COMPUTE: Pass through compute GPU type. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. VIRTUAL: Virtual GPU type. clustermgmt.v4.2.config.NodeDiscoveryParams: type: object properties: addressType: $ref: '#/components/schemas/clustermgmt.v4.2.config.AddressType' ipFilterList: maxItems: 1024 minItems: 0 type: array description: IP addresses of the unconfigured nodes. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' uuidFilterList: maxItems: 1024 minItems: 0 type: array description: Unconfigured node UUIDs. 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: 86b6b23e-7e14-41f9-864a-7515bb9c40fd timeout: type: integer description: Timeout for the workflow in seconds. format: int64 example: 32 interfaceFilterList: maxItems: 1024 minItems: 0 type: array description: Interface name that is used for packet broadcasting. items: type: string example: Test Interface name isManualDiscovery: type: boolean description: Indicates if the discovery is manual or not. example: true additionalProperties: false description: Discover unconfigured node details. clustermgmt.v4.2.config.DiscoverUnconfiguredNodesApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes\ \ Post operation" clustermgmt.v4.2.config.AddressType: type: string description: Indicates whether the address type is IPV4/IPV6. enum: - IPV4 - IPV6 - $UNKNOWN - $REDACTED x-enumDescriptions: IPV6: IPv6 address type. IPV4: IPv4 address type. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.NodeDetails: required: - nodeList type: object properties: nodeList: maxItems: 1024 minItems: 0 type: array description: Node specific details required to fetch node networking information. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeListNetworkingDetails' requestType: type: string description: "Type of request, either it can be expand_cluster or npe." example: expand_cluster/npe additionalProperties: false description: Request type and networking details for nodes. clustermgmt.v4.2.config.FetchNodeNetworkingDetailsApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details\ \ Post operation" clustermgmt.v4.2.config.NodeListNetworkingDetails: type: object properties: nodeUuid: 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 host. example: dbf11b90-d96c-4ca5-acc7-7e32d42b1977 blockId: type: string description: Rackable unit Id in which node resides. example: Test Block ID nodePosition: type: string description: Position of a node in a rackable unit. example: A/B cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipmiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' digitalCertificateMapList: maxItems: 1024 minItems: 0 type: array description: List of objects containing digital_certificate_base64 and key_management_server_uuid fields for key management server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DigitalCertificateMapReference' model: type: string description: Rackable unit model name. example: NX-1065-G8 isComputeOnly: type: boolean description: Indicates whether the node is compute only or not. example: true isLightCompute: type: boolean description: Indicates whether the node is light compute or not. example: true hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' hypervisorVersion: type: string description: Host version of the node. example: Nutanix 20220304.480 nosVersion: type: string description: NOS software version of a node. example: "7.0" currentNetworkInterface: type: string description: Current network interface of a node. example: eth0/eth1 isRoboMixedHypervisor: type: boolean description: Indicates whether the hypervisor is robo mixed or not. example: false additionalProperties: false description: Node specific details required to fetch node networking information. clustermgmt.v4.2.config.DigitalCertificateMapReference: type: object properties: key: type: string description: Field containing digital_certificate_base64 and key_management_server_uuid for key management server. example: Test Digital certificate Key Name value: type: string description: Value for the fields digital_certificate_base64 and key_management_server_uuid for key management server. example: 'Test Digital certificate Key Value ' additionalProperties: false description: Object containing digital_certificate_base64 and key_management_server_uuid fields for key management server. clustermgmt.v4.2.config.ExpandClusterParams: required: - nodeParams type: object properties: nodeParams: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeParam' configParams: $ref: '#/components/schemas/clustermgmt.v4.2.config.ConfigParams' shouldSkipAddNode: type: boolean description: Indicates if node addition can be skipped. example: false shouldSkipPreExpandChecks: type: boolean description: Indicates if pre-expand checks can be skipped for node addition. example: false additionalProperties: false description: Property of the node to be added. clustermgmt.v4.2.config.ExpandClusterApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/expand-cluster\ \ Post operation" clustermgmt.v4.2.config.NodeParam: type: object properties: blockList: maxItems: 1024 minItems: 0 type: array description: Block list of a cluster. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.BlockItem' nodeList: maxItems: 1024 minItems: 0 type: array description: List of nodes in a cluster. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeItem' computeNodeList: maxItems: 1024 minItems: 0 type: array description: List of compute only nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ComputeNodeItem' hypervisorIsos: maxItems: 1024 minItems: 0 type: array description: Hypervisor type to md5sum map. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorIsoMap' hypervSku: type: string description: Hyperv SKU. example: datacenter_gui bundleInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.BundleInfo' shouldSkipHostNetworking: type: boolean description: Indicates if the host networking needs to be skipped or not. example: false additionalProperties: false description: Parameters of the node to be added. clustermgmt.v4.2.config.ConfigParams: type: object properties: shouldSkipDiscovery: type: boolean description: Indicates if node discovery need to be skipped or not. example: false shouldSkipImaging: type: boolean description: Indicates if node imaging needs to be skipped or not. example: true shouldValidateRackAwareness: type: boolean description: Indicates if rack awareness needs to be validated or not. example: false isNosCompatible: type: boolean description: Indicates if node is compatible or not. example: true isComputeOnly: type: boolean description: Indicates whether the node is compute only or not. example: false isNeverScheduleable: type: boolean description: Indicates whether the node is marked to be never schedulable or not. example: true targetHypervisor: type: string description: Target hypervisor. example: kvm hyperv: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervCredentials' additionalProperties: false description: Config parameters. clustermgmt.v4.2.config.BlockItem: type: object properties: blockId: type: string description: Rackable unit serial name. example: 8F3K144 rackName: maxLength: 64 type: string description: Rack name. example: syd47-f01c64-au421 additionalProperties: false description: Block item containing block serial and rack name. clustermgmt.v4.2.config.NodeItem: type: object properties: nodeUuid: 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 host. example: f8a162b8-9cb5-4af2-be7d-08902af1a3b9 blockId: type: string description: Rackable unit serial name. example: 9F3K144 nodePosition: type: string description: Position of a node in a rackable unit. example: B hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' isRoboMixedHypervisor: type: boolean description: Indicates whether the hypervisor is robo mixed or not. example: false hypervisorHostname: maxLength: 63 pattern: "^(?!.*\\.\\.)(?!.*\\.\\-)(?!.*\\-\\.)(?!^\\d+$)[a-zA-Z\\d]([a-zA-Z\\\ d.-]*[a-zA-Z\\d])?$" type: string description: Name of the host. example: hestia03-2 hypervisorVersion: type: string description: Host version of the node. example: Nutanix 20220304.480 nosVersion: type: string description: NOS software version of a node. example: "7.0" isLightCompute: type: boolean description: Indicates whether the node is light compute or not. example: true ipmiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' digitalCertificateMapList: maxItems: 1024 minItems: 0 type: array description: List of objects containing digital_certificate_base64 and key_management_server_uuid fields for key management server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DigitalCertificateMapReference' cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' model: type: string description: Rackable unit model name. example: NX-1065-G8 currentNetworkInterface: type: string description: Current network interface of a node. example: eth0/eth1/Network adapter 1 networks: maxItems: 1024 minItems: 0 type: array description: Active and standby uplink information of the target nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinkNetworkItem' luksStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeLuksStatus' additionalProperties: false description: Node item containing attributes of node. clustermgmt.v4.2.config.ComputeNodeItem: type: object properties: nodeUuid: 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 host. example: 416e2707-39fd-4f91-8c2f-a6bfd167fa69 blockId: type: string description: Rackable unit Id in which node resides. example: RU-987654321 nodePosition: type: string description: Position of a node in a rackable unit. example: B hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipmiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' digitalCertificateMapList: maxItems: 1024 minItems: 0 type: array description: List of objects containing digital_certificate_base64 and key_management_server_uuid fields for key management server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DigitalCertificateMapReference' hypervisorHostname: maxLength: 64 type: string description: Name of the host. example: hv-cluster-01 model: type: string description: Rackable unit model type. example: NX-5000 additionalProperties: false description: Compute node details. clustermgmt.v4.2.config.HypervisorIsoMap: type: object properties: type: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' md5Sum: pattern: "^[a-fA-F0-9]{32}$" type: string description: Md5sum of ISO. example: For empty string ==> d41d8cd98f00b204e9800998ecf8427e additionalProperties: false description: Map containing key as hypervisor type and value as md5sum of ISO. clustermgmt.v4.2.config.BundleInfo: type: object properties: name: maxLength: 64 type: string description: Name of the hypervisor bundle. example: Test Bundle Name additionalProperties: false description: Hypervisor bundle information. clustermgmt.v4.2.config.UplinkNetworkItem: type: object properties: name: maxLength: 64 type: string description: Name of the uplink. example: string networks: maxItems: 1024 minItems: 0 type: array description: List of network types. items: type: string example: string uplinks: $ref: '#/components/schemas/clustermgmt.v4.2.config.Uplinks' vswitchExtId: 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: External ID of the vswitch. example: 123e4567-e89b-12d3-a456-426614174000 additionalProperties: false description: Active and standby uplink information of the target nodes. clustermgmt.v4.2.config.NodeLuksStatus: type: string description: Indicates the LUKS status for a node enum: - NON_LUKS - LUKS - PARTIAL_LUKS - UNKNOWN_LUKS - $UNKNOWN - $REDACTED x-enumDescriptions: LUKS: Indicates that the node is LUKS encrypted NON_LUKS: Indicates that the node is not LUKS encrypted PARTIAL_LUKS: Indicates that the node is partially LUKS encrypted $UNKNOWN: | Unknown value. UNKNOWN_LUKS: Indicates that the LUKS status for this node is not known $REDACTED: | Redacted value. clustermgmt.v4.2.config.Uplinks: type: object properties: active: maxItems: 1024 minItems: 0 type: array description: Active uplink information. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinksField' standby: maxItems: 1024 minItems: 0 type: array description: Standby uplink information. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinksField' additionalProperties: false description: Active and standby uplink information of the target nodes. clustermgmt.v4.2.config.UplinksField: type: object properties: mac: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Mac address. example: 01:2B:3C:4D:5E:6F name: maxLength: 64 type: string description: Interface name. example: Main-Uplink value: type: string description: Interface value. example: 10.0.0.1 additionalProperties: false description: Properties of active and standby uplink. clustermgmt.v4.2.config.HypervCredentials: type: object properties: domainDetails: $ref: '#/components/schemas/clustermgmt.v4.2.config.UserInfo' failoverClusterDetails: $ref: '#/components/schemas/clustermgmt.v4.2.config.UserInfo' additionalProperties: false description: HyperV Credentials. clustermgmt.v4.2.config.UserInfo: type: object properties: userName: maxLength: 64 type: string description: Username. example: Test UserName password: type: string description: Password. example: Test User Password clusterName: maxLength: 75 type: string description: Cluster name. This is part of payload for both cluster create & update operations. example: Test ClusterName additionalProperties: false description: UserName and Password model. clustermgmt.v4.2.config.HypervisorUploadParam: required: - nodeList type: object properties: nodeList: maxItems: 1024 minItems: 0 type: array description: List of node details for checking whether hypervisor ISO upload is required or not. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorUploadNodeListItem' additionalProperties: false description: Parameters to get information on whether hypervisor ISO upload is required or not. clustermgmt.v4.2.config.CheckHypervisorRequirementsApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements\ \ Post operation" clustermgmt.v4.2.config.HypervisorUploadNodeListItem: type: object properties: nodeUuid: 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 host. example: 1e522506-062b-4e0e-bfd5-f064d97b06c5 hypervisorVersion: type: string description: Host version of the node. example: Nutanix 20220304.480 nosVersion: type: string description: NOS software version of a node. example: "7.0" model: type: string description: Rackable unit model type. example: NX-8155-G blockId: type: string description: Rackable unit Id in which node resides. example: 8F3K144 isLightCompute: type: boolean description: Indicates whether the node is light compute or not. example: true hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' isRoboMixedHypervisor: type: boolean description: Indicates whether the hypervisor is robo mixed or not. example: false isMinimumComputeNode: type: boolean description: Indicates if node is minimum compute or not. example: true luksStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeLuksStatus' additionalProperties: false description: Individual node item details for checking whether hypervisor ISO upload is required or not. clustermgmt.v4.2.config.ValidateNodeParam: required: - spec type: object properties: spec: description: ValidateNodeParam specs. It can be OneOf between hypervisor bundle and node uplinks. oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.BundleParam' - maxItems: 1024 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinkNode' additionalProperties: false description: Request body for node validation. It can be OneOf between hypervisor bundle and node uplinks. clustermgmt.v4.2.config.ValidateNodeApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/validate-node\ \ Post operation" clustermgmt.v4.2.config.BundleParam: required: - bundleInfo - nodeList type: object properties: bundleInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.BundleInfo' nodeList: maxItems: 1024 minItems: 0 type: array description: List of node attributes for validating bundle compatibility. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeInfo' additionalProperties: false description: ISO attributes to validate compatibility. clustermgmt.v4.2.config.UplinkNode: required: - cvmIp - networks type: object properties: cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' networks: maxItems: 1024 minItems: 0 type: array description: Active and standby uplink information of the target nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinkNetworkItem' additionalProperties: false description: Uplink information of the target nodes. clustermgmt.v4.2.config.NodeInfo: type: object properties: nodeUuid: 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 host. example: 167af182-3237-4c75-a22d-ab0a0c2320b0 blockId: type: string description: Rackable unit serial name. example: RU-123456789 nodePosition: type: string description: Position of a node in a rackable unit. example: A hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' isRoboMixedHypervisor: type: boolean description: Indicates whether the hypervisor is robo mixed or not. example: false hypervisorHostname: maxLength: 64 type: string description: Name of the host. example: string hypervisorVersion: type: string description: Host version of the node. example: Nutanix 20220304.480 nosVersion: type: string description: NOS software version of a node. example: 6.5.4 isLightCompute: type: boolean description: Indicates whether the node is light compute or not. example: true ipmiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' digitalCertificateMapList: maxItems: 1024 minItems: 0 type: array description: List of objects containing digital_certificate_base64 and key_management_server_uuid fields for key management server. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DigitalCertificateMapReference' cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' model: type: string description: Rackable unit model name. example: string currentNetworkInterface: type: string description: Current network interface of a node. example: string additionalProperties: false description: Node item containing attributes of node. clustermgmt.v4.2.config.NodeRemovalParams: required: - nodeUuids type: object properties: shouldSkipPrechecks: type: boolean description: Indicates if prechecks can be skipped for node removal. example: true shouldSkipRemove: type: boolean description: Indicates if node removal can be skipped. example: false nodeUuids: maxItems: 1024 minItems: 0 type: array description: List of node UUIDs to remove. 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: 9a7165eb-d56a-4d17-889d-0d48d4885248 extraParams: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeRemovalExtraParam' additionalProperties: false description: Parameters to remove nodes from cluster. clustermgmt.v4.2.config.RemoveNodeApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/$actions/remove-node\ \ Post operation" clustermgmt.v4.2.config.NodeRemovalExtraParam: type: object properties: shouldSkipUpgradeCheck: type: boolean description: Indicates if upgrade check needs to be skip or not. example: false shouldSkipSpaceCheck: type: boolean description: Indicates if space check needs to be skip or not. example: false shouldSkipAddCheck: type: boolean description: Indicates if add node check need to be skip or not. example: false additionalProperties: false description: Extra parameters for node addition. clustermgmt.v4.2.config.TaskResponseType: type: string description: Task Response search type. enum: - UNCONFIGURED_NODES - NETWORKING_DETAILS - HYPERVISOR_UPLOAD_INFO - VALIDATE_BUNDLE_INFO - NON_COMPATIBLE_CLUSTERS - $UNKNOWN - $REDACTED x-enumDescriptions: NETWORKING_DETAILS: Get networking details search type. HYPERVISOR_UPLOAD_INFO: Get hypervisor upload information search type. $UNKNOWN: | Unknown value. UNCONFIGURED_NODES: Get unconfigured node search type. VALIDATE_BUNDLE_INFO: Get validate bundle information search type. NON_COMPATIBLE_CLUSTERS: Get non compatible clusters for cluster profile $REDACTED: | Redacted value. clustermgmt.v4.2.config.FetchTaskApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.TaskResponse oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.TaskResponse' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/task-response/{extId}\ \ Get operation" clustermgmt.v4.2.config.TaskResponse: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: taskResponseType: $ref: '#/components/schemas/clustermgmt.v4.2.config.TaskResponseType' response: description: "Task Response which is one of node-discovery, networking-details,\ \ hypervisor-upload, validate-bundle-info, non-compatible-cluster-reference\ \ information." oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.UnconfigureNodeDetails' - $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeNetworkingDetails' - $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorUploadInfo' - $ref: '#/components/schemas/clustermgmt.v4.2.config.ValidateBundleInfo' - maxItems: 1024 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NonCompatibleClusterReference' additionalProperties: false description: "Task Response which is one of node-discovery, networking-details,\ \ hypervisor-upload, validate-bundle-info, non-compatible-cluster-reference\ \ information." clustermgmt.v4.2.config.UnconfigureNodeDetails: type: object properties: nodeList: maxItems: 1024 minItems: 0 type: array description: List of unconfigured nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UnconfiguredNodeListItem' additionalProperties: false description: List of unconfigured nodes. clustermgmt.v4.2.config.NodeNetworkingDetails: type: object properties: networkInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.NetworkInfo' uplinks: maxItems: 1024 minItems: 0 type: array description: List of uplinks information for each CVM IP. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinkInfo' warnings: maxItems: 1024 minItems: 0 type: array description: List of warning messages. items: type: string example: ' test warning messages' additionalProperties: false description: Network details of nodes. clustermgmt.v4.2.config.HypervisorUploadInfo: type: object properties: errorMessage: type: string description: Error message. example: Test error message uploadInfoNodeList: maxItems: 10 minItems: 0 type: array description: Node list containing upload information. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.UploadInfoNodeItem' additionalProperties: false description: Hypervisor upload required information. clustermgmt.v4.2.config.ValidateBundleInfo: type: object properties: md5Sum: pattern: "^[a-fA-F0-9]{32}$" type: string description: Md5sum of ISO. example: string additionalProperties: false description: Information of the bundle to verify. clustermgmt.v4.2.config.NonCompatibleClusterReference: 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: UUID of the cluster profile. readOnly: true example: 01ad144a-ab6c-4db4-9767-d0ba16c87e67 configDrifts: maxItems: 50 minItems: 0 type: array description: Cluster profile setting. readOnly: true items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ConfigType' additionalProperties: false description: Non compatible cluster reference. clustermgmt.v4.2.config.UnconfiguredNodeListItem: type: object properties: foundationVersion: type: string description: Foundation version. example: 5.10.0 rackableUnitSerial: type: string description: Rackable unit serial name. example: NX123456789 nodeUuid: 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 host. example: b71d69c8-9e9c-45ff-b278-21f36095ff66 rackableUnitMaxNodes: type: integer description: Maximum number of nodes in rackable-unit. format: int64 example: 51 currentNetworkInterface: type: string description: Current network interface of a node. example: eth0 nodePosition: type: string description: Position of a node in a rackable unit. example: A cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' currentCvmVlanTag: type: string description: Current CVM VLAN tag. example: string isSecureBooted: type: boolean description: Secure boot status. example: true isCvmExists: type: boolean description: Indicates whether a CVM exists on the node. example: true nosVersion: type: string description: NOS software version of a node. example: 4.5.2 cpuType: maxItems: 1024 minItems: 0 type: array description: CPU type. items: type: string example: AMD EPYC 7002 hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' hypervisorVersion: type: string description: Host version of the node. example: Nutanix 20220304.480 interfaceIpv6: type: string description: Interface IPV6 address. example: 2001:db8::1 clusterId: type: string description: Cluster ID. example: Test Cluster extId attributes: $ref: '#/components/schemas/clustermgmt.v4.2.config.UnconfiguredNodeAttributeMap' rackableUnitModel: type: string description: Rackable unit model type. example: NX-3060-G5 arch: type: string description: Cluster arch. example: x86_64 hypervisorIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipmiIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' hostType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostTypeEnum' luksStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.NodeLuksStatus' additionalProperties: false description: Unconfigured node details. clustermgmt.v4.2.config.UnconfiguredNodeAttributeMap: type: object properties: lcmFamily: type: string description: LCM family name. example: smc_gen_11 isModelSupported: type: boolean description: Indicates whether the model is supported or not. example: true defaultWorkload: type: string description: Default workload. example: vdi/ storage_heavy shouldWorkWith1GNic: type: boolean description: Indicates if cvm interface can work with 1 GIG NIC or not. example: true isRoboMixedHypervisor: type: boolean description: Indicates whether the hypervisor is robo mixed or not. example: true additionalProperties: false description: Map providing additional node attributes for the unconfigured node. clustermgmt.v4.2.config.NetworkInfo: type: object properties: hci: maxItems: 1024 minItems: 0 type: array description: Network information of HCI nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NameNetworkRef' so: maxItems: 1024 minItems: 0 type: array description: Network information of SO nodes. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NameNetworkRef' additionalProperties: false description: Network information of HCI and SO nodes. clustermgmt.v4.2.config.UplinkInfo: type: object properties: cvmIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' uplinkList: maxItems: 1024 minItems: 0 type: array description: Uplink details for a controller VM. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NameMacRef' additionalProperties: false description: Uplink information for controller VM. clustermgmt.v4.2.config.NameNetworkRef: type: object properties: hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' name: maxLength: 64 type: string description: Interface name. example: Test Interface name networks: maxItems: 1024 minItems: 0 type: array description: List of networks for interface. items: type: string example: Test network Names bondingMode: $ref: '#/components/schemas/clustermgmt.v4.2.config.BondingMode' vswitchName: maxLength: 64 type: string description: Name of the vswitch. example: vs1 vswitchExtId: 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: External ID of the vswitch. readOnly: true example: 123e4567-e89b-12d3-a456-426614174000 vswitchOwnerType: $ref: '#/components/schemas/clustermgmt.v4.2.config.VSwitchOwnerType' additionalProperties: false description: Name and network information. clustermgmt.v4.2.config.BondingMode: type: string description: Bonding mode of the vswitch. enum: - NO_BOND - ACTIVE_BACKUP - ACTIVE_ACTIVE - ACTIVE_ACTIVE_WITH_MAC_PINNING - $UNKNOWN - $REDACTED x-enumDescriptions: ACTIVE_ACTIVE: Active active bonding mode. ACTIVE_ACTIVE_WITH_MAC_PINNING: Active active with MAC pinning bonding mode. ACTIVE_BACKUP: Active backup bonding mode. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. NO_BOND: No bonding mode. clustermgmt.v4.2.config.VSwitchOwnerType: type: string description: Vswitch owner type enumeration. enum: - PRISM_ELEMENT - PRISM_CENTRAL - $UNKNOWN - $REDACTED x-enumDescriptions: PRISM_CENTRAL: Prism Central vswitch owner type. $UNKNOWN: | Unknown value. PRISM_ELEMENT: Prism Element vswitch owner type. $REDACTED: | Redacted value. clustermgmt.v4.2.config.NameMacRef: type: object properties: name: maxLength: 64 type: string description: Interface name. example: eth0 mac: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Mac address. example: 2c:6c:66:27:f7:da status: $ref: '#/components/schemas/clustermgmt.v4.2.config.UplinkStatus' interfaceSpeedKbps: type: integer description: Interface speed in Kbps. format: int64 example: 10000 hostNicLabel: maxLength: 1024 type: string description: Label of the host NIC. example: string lldpConfig: $ref: '#/components/schemas/clustermgmt.v4.2.config.LldpConfig' additionalProperties: false description: Interface name and mac address. clustermgmt.v4.2.config.UplinkStatus: type: string description: Uplink status of interface. enum: - UP - DOWN - $UNKNOWN - $REDACTED x-enumDescriptions: DOWN: Uplink is down. UP: Uplink is up. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.LldpConfig: type: object properties: switchMacAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Switch MAC address. example: 00:11:22:33:44:55 switchName: maxLength: 128 type: string description: Switch name. example: p6r9r07-leaf2 switchHardwarePlatformDescription: maxLength: 1024 type: string description: Switch hardware platform. example: "Cisco Nexus 9000 Series NX-OS software, Version 9.3(5)" switchManagementAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' switchPortName: maxLength: 128 type: string description: Switch port name. example: ethernet14/2 switchPortDescription: maxLength: 128 type: string description: Switch port description. example: Converged Cloud Fabric Switch Port ethernet14/2 switchPortNativeVlanId: type: integer description: Switch port native VLAN ID. format: int32 example: 80 additionalProperties: false description: LLDP configuration for the host NIC. clustermgmt.v4.2.config.UploadInfoNodeItem: type: object properties: isHypervisorUploadRequired: type: boolean description: Provides information on whether hypervisor ISO upload is required or not. This API is not supported for XEN hypervisor type. example: false isImagingMandatory: type: boolean description: Indicates if imaging is required or not. example: false nodeUuid: 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 host. example: ed5b68ff-0a1a-4a54-b572-ee387f70eae7 availableHypervisorIsoError: type: string description: "Error message if any, for available hypervisor ISO." example: success requiredHypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' isNodeCompatible: type: boolean description: Indicates if node is compatible or not. example: false md5Sum: pattern: "^[a-fA-F0-9]{32}$" type: string description: Md5sum of ISO. example: string bundleName: maxLength: 64 type: string description: Name of the hypervisor bundle. example: Test Bundle Name additionalProperties: false description: Upload information for a node. clustermgmt.v4.2.config.ComputeNonMigratableVmsSpec: required: - hosts type: object properties: hosts: maxItems: 1024 minItems: 1 type: array description: List of host UUIDs associated with the cluster. 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: d616b9f7-1154-499f-ab2d-e6e4e32dc4f5 vcenterInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterInfo' additionalProperties: false description: Property of the host used to compute non-migratable VMs. clustermgmt.v4.2.config.VcenterInfo: required: - address - credentials type: object properties: address: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' credentials: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterCredentials' additionalProperties: false description: Vcenter information for ESX. clustermgmt.v4.2.config.NonMigratableVmsResult: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: vms: maxItems: 1024 minItems: 0 type: array description: List of non-migratable VMs. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NonMigratableVmInfo' additionalProperties: false description: Details of all the non-migratable VMs. clustermgmt.v4.2.config.NonMigratableVmInfo: type: object properties: vmName: maxLength: 64 type: string description: Name of the VM. example: Test VM Name vmUuid: 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 VM. example: 9a09501d-3228-456d-888d-0a24c5f362bd nonMigratableVmReason: type: string description: Reason for a VM to be non-migratable. example: Test reason for non-migratable VM hostIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Non-migratable VM details. clustermgmt.v4.2.config.ListClusterProfilesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles Get operation clustermgmt.v4.2.config.CreateClusterProfileApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles Post operation clustermgmt.v4.2.config.GetClusterProfileApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.ClusterProfile oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterProfile' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Get operation" clustermgmt.v4.2.config.UpdateClusterProfileApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteClusterProfileApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}\ \ Delete operation" clustermgmt.v4.2.config.ClusterReferenceListSpec: required: - clusters type: object properties: clusters: maxItems: 400 minItems: 1 type: array description: Cluster reference for an entity. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ClusterReference' additionalProperties: false clustermgmt.v4.2.config.DisassociateClusterFromClusterProfileApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/disassociate-cluster\ \ Post operation" clustermgmt.v4.2.config.ApplyClusterProfileApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/cluster-profiles/{extId}/$actions/apply\ \ Post operation" clustermgmt.v4.2.config.ListCvmsByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Cvm' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms\ \ Get operation" clustermgmt.v4.2.config.Cvm: description: Reference to a CVM entity. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 64 minLength: 1 type: string description: Name of the CVM. example: NTX-hostname-CVM 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: UUID of the cluster. readOnly: true example: c6893797-f323-4813-88f0-d7428b0a318a nodeExtId: 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 host. readOnly: true example: ef132bce-c4f1-49bc-aa57-0ef056fbb2f1 ipAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' numVcpus: type: integer description: Number of vCPUs assigned to the CVM. format: int64 readOnly: true example: 4 memorySizeBytes: type: integer description: Memory for a given CVM in cluster. format: int64 readOnly: true example: 48 hypervisorType: $ref: '#/components/schemas/clustermgmt.v4.2.config.HypervisorType' backplaneIpAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Detailed description of a CVM entity. clustermgmt.v4.2.config.GetCvmApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.Cvm oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.Cvm' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/{extId}\ \ Get operation" clustermgmt.v4.2.config.CvmReconfigurationSpec: type: object properties: numVcpus: minimum: 1 type: integer description: Number of vCPUs assigned to the CVM. format: int64 example: 4 memorySizeBytes: minimum: 1 type: integer description: Memory for a given CVM in cluster. format: int64 example: 4 additionalProperties: false description: Details for reconfiguring the CVM. clustermgmt.v4.2.config.ReconfigureCvmsApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/cvms/$actions/reconfigure\ \ Post operation" clustermgmt.v4.2.config.ListVirtualGpuProfilesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualGpuProfile' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/virtual-gpu-profiles\ \ Get operation" clustermgmt.v4.2.config.VirtualGpuProfile: description: Virtual GPU Profile. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: virtualGpuConfig: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualGpuConfig' allocatedVmExtIds: maxItems: 1024 minItems: 0 type: array description: List of UUIDs of virtual machines with an allocated GPU belonging to this profile. 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: ba8e8778-5b7b-49bd-b962-2e74d8edfe0b additionalProperties: false clustermgmt.v4.2.config.ListPhysicalGpuProfilesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.PhysicalGpuProfile' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/physical-gpu-profiles\ \ Get operation" clustermgmt.v4.2.config.PhysicalGpuProfile: description: Physical GPU Profile. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: physicalGpuConfig: $ref: '#/components/schemas/clustermgmt.v4.2.config.PhysicalGpuConfig' allocatedVmExtIds: maxItems: 1024 minItems: 0 type: array description: List of UUIDs of virtual machines with an allocated GPU belonging to this profile. 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: 7425dd32-7f61-4440-8f08-4e5dbf87cb26 additionalProperties: false clustermgmt.v4.2.config.PhysicalGpuConfig: type: object properties: type: $ref: '#/components/schemas/clustermgmt.v4.2.config.GpuType' deviceId: type: integer description: Device Id. format: int64 example: 52 deviceName: maxLength: 128 minLength: 0 type: string description: Device name. example: Test Device Name vendorName: maxLength: 128 minLength: 0 type: string description: Vendor name. example: Test Vendor Name isInUse: type: boolean description: GPU in use. default: false sbdf: maxLength: 11 minLength: 0 type: string description: SBDF address. example: 0000:af:00.0 numaNode: maxLength: 2 minLength: 0 type: string description: NUMA node. example: "1" assignable: type: integer description: GPU assignable. format: int64 example: 93 mode: $ref: '#/components/schemas/clustermgmt.v4.2.config.GpuMode' frameBufferSizeBytes: type: integer description: Frame buffer size in bytes. format: int64 example: 68 additionalProperties: false description: Physical GPU configuration details. clustermgmt.v4.2.config.GpuMode: type: string description: GPU mode. enum: - UNUSED - USED_FOR_PASSTHROUGH - USED_FOR_VIRTUAL - $UNKNOWN - $REDACTED x-enumDescriptions: USED_FOR_VIRTUAL: GPU used for virtual mode. UNUSED: Unused GPU mode. $UNKNOWN: | Unknown value. USED_FOR_PASSTHROUGH: GPU used for passthrough mode. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ListHostsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Host' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/hosts Get operation clustermgmt.v4.2.config.ListHostNicsByHostIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics\ \ Get operation" clustermgmt.v4.2.config.HostNic: description: Host NIC details. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 64 type: string description: Name of the host NIC. example: Test host NIC name hostDescription: type: string description: Host description. example: Test Host Description macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Host Mac address. example: 6c:be:ff:41:80:b7 ipv4Addresses: maxItems: 1024 minItems: 0 type: array description: List of IPv4 addresses associated with the NIC entity for the network connection. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipv6Addresses: maxItems: 1024 minItems: 0 type: array description: List of IPv6 addresses associated with the NIC entity for the network connection. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' interfaceStatus: type: string description: Operational status of the interface to the port associated with the NIC entity. example: "Up,Down" isDhcpEnabled: type: boolean description: Status of DHCP protocol. example: false linkSpeedInKbps: type: integer description: Link current speed in Kbps. format: int64 example: 97 mtuInBytes: type: integer description: Maximum transmission unit in bytes. format: int64 example: 71 nodeUuid: 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 host. example: ad5d0010-1639-4355-afe3-844c63f49511 discoveryProtocol: type: string description: Network discovery protocol (either LLDP or None). example: "NDP,LLDP" switchDeviceId: type: string description: Switch device Id learned through the discovery protocol. example: p4r6r08-leaf2 switchPortId: type: string description: Switch port Id learned through the discovery protocol. example: ethernet5:3 switchVendorInfo: type: string description: Switch vendor information learned through the discovery protocol. example: 5c:16:c7:00:00:01 switchVlanId: type: string description: Switch VLAN Id learned through the discovery protocol. example: "4095" switchManagementIp: $ref: '#/components/schemas/common.v1.0.config.IPAddress' switchMacAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Switch Mac address example: a4:08:c4:ee:a2:cd attachedSwitchInterfaceList: maxItems: 1024 minItems: 0 type: array description: List of network switch interfaces attached to the host NIC. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.NetworkSwitchInterface' rxRingSizeInBytes: type: integer description: "Size of configured buffer (in bytes) to the port associated\ \ with NIC, storing the network packets received through the port." format: int64 example: 54 txRingSizeInBytes: type: integer description: "Size of configured buffer (in bytes) to the port associated\ \ with NIC, storing the network packets that would be transmitted through\ \ the port." format: int64 example: 29 linkCapacityInMbps: type: integer description: Link max speed that can be configured in Mbps. format: int64 example: 36 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: UUID of the cluster to which the host NIC belongs. example: e281eade-28d1-41dc-a836-62f571f95a19 nicProfileExtId: 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: NIC profile ID to which the host NIC is attached. example: 96153bf4-9f43-4ecc-b695-9969db76c67b supportedCapabilities: maxItems: 256 minItems: 0 type: array description: List of supported capabilities of the host NIC. items: type: string example: "SRIOV,DPOFFLOAD" driverVersion: type: string description: Driver version of the host NIC. example: i40e:2.26.8 firmwareVersion: type: string description: Firmware version of the host NIC. example: 8.50 0x8000be22 1.3082.0 virtualNicExtIds: maxItems: 1024 minItems: 0 type: array description: List of virtual NICs UUIDs associated with the host NIC. 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: 6f210805-5e44-4543-9b35-c1ef486d5f9c pciModelId: type: string description: PCI model ID of the host NIC. example: 15b3:a2d6 virtualSwitchExtId: 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 Virtual Switch to which host NIC is attached. example: 84487385-6ab9-491c-af45-6400d64c8f85 additionalProperties: false clustermgmt.v4.2.config.NetworkSwitchInterface: description: Network switch interface details. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: port: type: integer description: Network switch interface port number. format: int64 example: 61 switchInterfaceName: maxLength: 64 type: string description: Network switch interface name. example: string switchInterfaceDescription: type: string description: Network switch interface description. example: Hyper-V Virtual Ethernet Adapter switchInterfaceType: type: string description: Network switch interface type. example: Test Switch Interface Type index: type: integer description: Network switch interface index. format: int64 example: 82 speedInKbps: type: integer description: Network switch interface link speed in Kbps. format: int64 example: 80 mtuInBytes: type: integer description: Maximum transmission unit in bytes. format: int64 example: 22 macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Host Mac address. example: 86:fe:39:58:af:4d lastChangeTime: type: string description: Timestamp when the interface state was last changed or modified. format: date-time example: 2009-09-23T14:30:00-07:00 switchManagementAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' attachedHostUuid: 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 host connected to the interface. example: 3eb5065b-5aed-42f5-82c2-f78a0a4988a0 attachedHostNicUuids: maxItems: 1024 minItems: 0 type: array description: List of host NIC UUIDs connected to this interface. 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: 1659ef1f-2f91-4d62-ba28-025f74f691ed switchUuid: 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 switch. example: 0f153932-d6ee-473e-be11-bcb08531e3ff additionalProperties: false clustermgmt.v4.2.config.ListHostNicsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/host-nics Get operation clustermgmt.v4.2.config.GetHostNicApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.HostNic oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.HostNic' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{extId}\ \ Get operation" clustermgmt.v4.2.config.ListVirtualNicsByHostIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualNic' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics\ \ Get operation" clustermgmt.v4.2.config.VirtualNic: description: Virtual NIC details. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 64 type: string description: Virtual NIC name. example: Test Virtual Nic Name hostDescription: type: string description: Host description. example: Test Host Description macAddress: pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" type: string description: Host Mac address. example: cb:8f:bb:91:0c:db ipv4Addresses: maxItems: 1024 minItems: 0 type: array description: List of IPv4 addresses associated with the NIC entity for the network connection. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' ipv6Addresses: maxItems: 1024 minItems: 0 type: array description: List of IPv6 addresses associated with the NIC entity for the network connection. items: $ref: '#/components/schemas/common.v1.0.config.IPAddress' interfaceStatus: type: string description: Operational status of the interface to the port associated with the NIC entity. example: "Up,Down" isDhcpEnabled: type: boolean description: Status of DHCP protocol. example: true linkSpeedInKbps: type: integer description: Link current speed in Kbps. format: int64 example: 24 mtuInBytes: type: integer description: Maximum transmission unit in bytes. format: int64 example: 22 nodeUuid: 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 host. example: 40a1df1d-59bf-4bd9-83ba-51c8f0e7785f vlanId: type: integer description: VLAN Id. format: int64 example: 30 hostNicsUuids: maxItems: 1024 minItems: 0 type: array description: List of host NIC UUID associated with the host virtual NIC. 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: e15d1a0b-2cb6-412d-80d0-8b0b7b6edd2a additionalProperties: false clustermgmt.v4.2.config.GetVirtualNicApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.VirtualNic oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.VirtualNic' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{extId}\ \ Get operation" clustermgmt.v4.2.config.NsIpPoolType: type: string description: "Type of IP Pool, whether the IP Pool was created on PC or PE." enum: - PE_IP_POOL - $UNKNOWN - $REDACTED x-enumDescriptions: PE_IP_POOL: IP pool which was created on PE. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.NsServiceEnum: type: string description: Name of service using the network segment. enum: - DR - VOLUMES - BACKPLANE - RDMA - ISER - $UNKNOWN - $REDACTED x-enumDescriptions: RDMA: RDMA VOLUMES: Volumes ISER: iSER $UNKNOWN: | Unknown value. BACKPLANE: Backplane DR: DR $REDACTED: | Redacted value. clustermgmt.v4.2.config.NsServiceStateEnum: type: string description: States in which a service can be while hosting the VIP. enum: - INIT - CONFIGURED - FAILED - $UNKNOWN - $REDACTED x-enumDescriptions: INIT: Initial state FAILED: Hosting of VIP failed CONFIGURED: Hosting of VIP succeeded $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.NsBackingType: type: string description: Hypervisor Network backing type of network segment. enum: - ESX_VSS - ESX_DVS - AHV_VS - AHV_BRIDGE - $UNKNOWN - $REDACTED x-enumDescriptions: ESX_VSS: ESX Standard Virtual Switch AHV_BRIDGE: AHV OVS Bridge AHV_VS: AHV Virtual Switch ESX_DVS: ESX Distributed Virtual Switch $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ListSystemUserPasswordsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.SystemUserPassword' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords Get operation clustermgmt.v4.2.config.SystemUserPassword: title: Password information for system user. description: Contains information about system user password. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: username: maxLength: 199 type: string description: Username. example: admin hostIp: $ref: '#/components/schemas/common.v1.0.config.IPv4Address' 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: UUID of the cluster to which the host NIC belongs. readOnly: true example: dcc66574-63ed-41b1-b4b0-eb60621c1738 lastUpdateTime: type: string description: Timestamp of last password change. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 expiryTime: type: string description: Expiry of a new password. format: date-time example: 2009-09-23T14:30:00-07:00 status: $ref: '#/components/schemas/clustermgmt.v4.2.config.PasswordStatus' systemType: $ref: '#/components/schemas/clustermgmt.v4.2.config.SystemType' hasHspInUse: type: boolean description: Indicates whether the high-strength password is in use or not. example: true additionalProperties: false clustermgmt.v4.2.config.PasswordStatus: title: Password status types. type: string description: Contains possible values of password status. enum: - DEFAULT - SECURE - NOPASSWD - MULTIPLE_ISSUES - $UNKNOWN - $REDACTED x-enumDescriptions: MULTIPLE_ISSUES: Some user accounts have default password or no password set. SECURE: Secure password is set. NOPASSWD: No password is set. $UNKNOWN: | Unknown value. DEFAULT: Default password is set. $REDACTED: | Redacted value. clustermgmt.v4.2.config.SystemType: title: System product type type: string description: Contains supported variants of the system products. enum: - PC - AOS - AHV - IPMI - $UNKNOWN - $REDACTED x-enumDescriptions: IPMI: The product is of IPMI type. PC: The product is of Prism Central type. AOS: The product is of AOS type. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. AHV: The product is of AHV type. clustermgmt.v4.2.config.ChangePasswordSpec: title: Change password specifications. required: - newPassword type: object properties: currentPassword: maxLength: 199 minLength: 8 type: string description: Existing password of a user account. format: password example: '***************' newPassword: maxLength: 199 minLength: 8 type: string description: New password for a user account. format: password example: '********' additionalProperties: false description: Contains the required specifications for a password update operation. clustermgmt.v4.2.config.ChangeSystemUserPasswordApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/system-user-passwords/{extId}/$actions/change-password\ \ Post operation" clustermgmt.v4.2.config.GetSSLCertificateApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.SSLCertificate oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.SSLCertificate' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ Get operation" clustermgmt.v4.2.config.SSLCertificate: title: Title for SSL certificate. required: - privateKeyAlgorithm type: object properties: passphrase: maxLength: 1000 minLength: 1 type: string description: Passphrase used to decrypt private keys. example: password privateKey: maxLength: 2000000 minLength: 1 type: string description: Information about the private key in SSL. example: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI1ekNDQVk2Z0F3SLS0tCg== publicCertificate: maxLength: 2000000 minLength: 1 type: string description: Details about the public SSL certificate. example: LS0tLS1CRUdJTiBDRVJUSUZJJUSURS0tLS0tCk1JSUUZJQ0FURS0tLS0tCg== caChain: maxLength: 2000000 minLength: 1 type: string description: Description of the certificate authority (CA) chain. example: LS0tLS1CRUdJTiBFQyBQUkURS0tLS0tCk1JSUlVkFURSBLRVktLS0tLQo= privateKeyAlgorithm: $ref: '#/components/schemas/clustermgmt.v4.2.config.PrivateKeyAlgorithm' additionalProperties: false description: Detailed description of SSL certificate properties. clustermgmt.v4.2.config.UpdateSSLCertificateApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/ssl-certificate\ \ Put operation" clustermgmt.v4.2.config.PrivateKeyAlgorithm: title: Private Key Algorithm type: string description: Private Key Algorithm used for SSL certificate. enum: - JKS - PKCS12 - RSA_2048 - RSA_4096 - RSA_PUBLIC - KRB_KEYTAB - ECDSA_256 - ECDSA_384 - ECDSA_521 - $UNKNOWN - $REDACTED x-enumDescriptions: ECDSA_256: Elliptic Curve Digital Signature Algorithm (256-bit) description. JKS: Java KeyStore (JKS) format description. RSA_2048: Description for RSA 2048-bit encryption. ECDSA_521: ECDSA (521-bit) description. KRB_KEYTAB: Kerberos Keytab format description. PKCS12: PKCS#12 format description for certificate storage. RSA_4096: Description for RSA 4096-bit encryption. RSA_PUBLIC: Public RSA key format description. $UNKNOWN: | Unknown value. ECDSA_384: ECDSA (384-bit) description. $REDACTED: | Redacted value. clustermgmt.v4.2.operations.RollingRebootParams: type: object properties: nodeExtIdList: maxItems: 48 minItems: 1 uniqueItems: true type: array description: List of Node UUIDs which are to be rebooted. This includes either Controller VM UUIDs or Host UUIDs. 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: 19d752bf-b9c6-4557-85d8-8766ae5fab96 rebootType: $ref: '#/components/schemas/clustermgmt.v4.2.operations.RebootType' rebootDescription: maxLength: 64 pattern: "^[A-Za-z0-9._-]+$" type: string description: The description of the reboot operation to be performed. example: string targetRebootDomain: $ref: '#/components/schemas/clustermgmt.v4.2.operations.TargetRebootDomain' additionalProperties: false description: The payload to perform a rolling reboot operation. clustermgmt.v4.2.operations.RebootType: type: string description: "The type of the reboot operation to be performed. Possible values\ \ are: CONTROLLER_VM, HOST" enum: - CONTROLLER_VM - HOST - $UNKNOWN - $REDACTED x-enumDescriptions: CONTROLLER_VM: Reboot of the Controller VM HOST: Reboot of the Host $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.operations.TargetRebootDomain: type: object properties: domainType: $ref: '#/components/schemas/clustermgmt.v4.2.config.DomainType' maxConcurrentDomainRebootsTolerated: type: integer description: The maximum number of concurrent reboots of the specified domain which can be tolerated at a time. format: int32 example: 38 additionalProperties: false description: "The Fault Domain in which reboot is to be performed. Possible\ \ values are NODE, RACK, BLOCK." clustermgmt.v4.2.operations.EnterHostMaintenanceSpec: description: Property of the host to be put into maintenance mode. allOf: - $ref: '#/components/schemas/clustermgmt.v4.2.operations.HostMaintenanceCommonSpec' - type: object properties: shouldRollbackOnFailure: type: boolean description: A boolean value to indicate if the current workflow must initiate rollback workflow in case of failure. default: true shouldShutdownNonMigratableUvms: type: boolean description: A boolean value to indicate if all non-migratable uvms must be shutdown. default: false additionalProperties: false clustermgmt.v4.2.operations.EnterHostMaintenanceApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance\ \ Post operation" clustermgmt.v4.2.operations.HostMaintenanceCommonSpec: type: object properties: vcenterInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterInfo' timeoutSeconds: minimum: 1 type: integer description: Timeout for the workflow in seconds. format: int64 example: 6 additionalProperties: false description: Common properties for host maintenance mode entry/exit. clustermgmt.v4.2.operations.ExitHostMaintenanceApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance\ \ Post operation" clustermgmt.v4.2.stats.ClusterStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.stats.ClusterStats oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.stats.ClusterStats' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{extId}\ \ Get operation" clustermgmt.v4.2.stats.ClusterStats: description: Cluster entity statistic attributes. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: controllerAvgIoLatencyUsecs: type: array description: Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecs: type: array description: Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecs: type: array description: Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIops: type: array description: Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIopsUpperBuf: type: array description: Upper Buf value of Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIopsLowerBuf: type: array description: Lower Buf value of Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpm: type: array description: Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpmUpperBuf: type: array description: Upper Buf value of Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpmLowerBuf: type: array description: Lower Buf value of Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpm: type: array description: Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpmUpperBuf: type: array description: Upper Buf value of Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpmLowerBuf: type: array description: Lower Buf value of Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIops: type: array description: Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIopsUpperBuf: type: array description: Upper Buf value of Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIopsLowerBuf: type: array description: Lower Buf value of Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIops: type: array description: Number of controller write IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIopsUpperBuf: type: array description: Upper Buf value of Number of controller write IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIopsLowerBuf: type: array description: Lower Buf value of Number of controller write IoPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbps: type: array description: Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbps: type: array description: Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbps: type: array description: Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' storageUsageBytes: type: array description: Storage usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' storageCapacityBytes: type: array description: Storage capacity(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' freePhysicalStorageBytes: type: array description: Free physical space(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' logicalStorageUsageBytes: type: array description: Logical storage usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallMemoryUsageBytes: type: array description: Overall memory usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' healthCheckScore: type: array description: "NCC check score indicating the health of the entity. The\ \ value to health mapping is as follows: Good: 100, Info: 98, Warning:\ \ 74, Critical: 24, Error: 13, Unknown: -1." items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' recycleBinUsageBytes: type: array description: Recycle bin usage (bytes) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' snapshotCapacityBytes: type: array description: Snapshot capacity (bytes) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallSavingsBytes: type: array description: Overall savings (bytes) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallSavingsRatio: type: array description: Overall saving ratio items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' cpuCapacityHz: type: array description: CPU capacity in Hz. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' cpuUsageHz: type: array description: CPU usage (Hz) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' memoryCapacityBytes: type: array description: Size of memory(in bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' powerConsumptionInstantWatt: type: array description: Power instant consumption (watt) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overcommittedVmsReclaimableMemoryBytes: type: array description: Maximum amount of physical memory reclaimable from Overcommit enabled VMs items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' additionalProperties: false description: Cluster entity statistic attributes. clustermgmt.v4.2.stats.TimeValuePair: type: object properties: timestamp: type: string description: Timestamp for given stat attribute(in ISO-8601 format). format: date-time example: 2009-09-23T14:30:00-07:00 value: type: integer description: Value of stat at given timestamp. format: int64 example: 83 additionalProperties: false description: Time - Value pair for time-series stat attributes. clustermgmt.v4.2.stats.HostStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.stats.HostStats oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.stats.HostStats' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/clusters/{clusterExtId}/hosts/{extId}\ \ Get operation" clustermgmt.v4.2.stats.HostStats: description: Host entity statistic attributes. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: controllerAvgIoLatencyUsecs: type: array description: Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecs: type: array description: Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgReadIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average Read IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecs: type: array description: Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecsUpperBuf: type: array description: Upper Buf value of Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerAvgWriteIoLatencyUsecsLowerBuf: type: array description: Lower Buf value of Controller Average Write IO Latency(usecs). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIops: type: array description: Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIopsUpperBuf: type: array description: Upper Buf value of Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumIopsLowerBuf: type: array description: Lower Buf value of Controller IOPS Number. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpm: type: array description: Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpmUpperBuf: type: array description: Upper Buf value of Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' hypervisorCpuUsagePpmLowerBuf: type: array description: Lower Buf value of Hypervisor CPU Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpm: type: array description: Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpmUpperBuf: type: array description: Upper Buf value of Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' aggregateHypervisorMemoryUsagePpmLowerBuf: type: array description: Lower Buf value of Aggregate Hypervisor Memory Usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIops: type: array description: Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIopsUpperBuf: type: array description: Upper Buf value of Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumReadIopsLowerBuf: type: array description: Lower Buf value of Number of controller read IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIops: type: array description: Number of controller write IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIopsUpperBuf: type: array description: Upper Buf value of Number of controller write IOPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerNumWriteIopsLowerBuf: type: array description: Lower Buf value of Number of controller write IoPS. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbps: type: array description: Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' ioBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbps: type: array description: Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerReadIoBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller Read IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbpsUpperBuf: type: array description: Upper Buf value of Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbpsLowerBuf: type: array description: Lower Buf value of Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' controllerWriteIoBandwidthKbps: type: array description: Controller Write IO Bandwidth(kBps). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' storageUsageBytes: type: array description: Storage usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' storageCapacityBytes: type: array description: Storage capacity(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' freePhysicalStorageBytes: type: array description: Free physical space(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' memoryCapacityBytes: type: array description: Size of memory(in bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' cpuCapacityHz: type: array description: CPU capacity in Hz. items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallMemoryUsagePpm: type: array description: Overall memory usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallMemoryUsagePpmUpperBuf: type: array description: Upper Buf value of overall memory usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallMemoryUsagePpmLowerBuf: type: array description: Lower Buf value of overall memory usage(ppm). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' healthCheckScore: type: array description: "NCC check score indicating the health of the entity. The\ \ value to health mapping is as follows: Good: 100, Info: 98, Warning:\ \ 74, Critical: 24, Error: 13, Unknown: -1." items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' logicalStorageUsageBytes: type: array description: Logical storage usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' cpuUsageHz: type: array description: CPU usage (Hz) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overallMemoryUsageBytes: type: array description: Overall memory usage(bytes). items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' powerConsumptionInstantWatt: type: array description: Power instant consumption (watt) items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' overcommittedVmsReclaimableMemoryBytes: type: array description: Maximum amount of physical memory reclaimable from Overcommit enabled VMs items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' memoryOvercommitPoolSizePpm: type: array description: Physical memory available to Overcommit enabled VMs in the Host items: $ref: '#/components/schemas/clustermgmt.v4.2.stats.TimeValuePair' additionalProperties: false description: Host entity statistic attributes. 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.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. clustermgmt.v4.2.config.VcenterCredentials: required: - password - username type: object properties: username: maxLength: 256 type: string description: Username for vCenter Server extension registration/unregistration. example: test_user password: type: string description: Password for vCenter Server extension registration/unregistration. example: test_password port: type: integer description: vCenter port to connect for registering/unregistering extension. default: 443 additionalProperties: false description: Credentials for registering/unregistering vCenter Server extension for Nutanix to manage VMs of the cluster. clustermgmt.v4.2.config.ClusterConfig: type: object properties: shouldEnableLockdownMode: type: boolean description: A boolean value indicating whether to enable lockdown mode for a cluster. example: false buildInfo: $ref: '#/components/schemas/clustermgmt.v4.2.config.BuildInfo' additionalProperties: false description: Cluster Configuration required for a cluster to function properly. clustermgmt.v4.2.config.BuildInfo: type: object properties: version: type: string description: Software version. example: string additionalProperties: false description: Currently representing the build information to be used for the cluster creation. clustermgmt.v4.2.config.AuthorizedPublicKey: type: object properties: name: maxLength: 1024 type: string description: "Authorized public key's required for cluster users like admin,nutanix\ \ etc." example: string key: type: string description: "Authorized public key's required for cluster users like admin,nutanix\ \ etc." example: string additionalProperties: false description: "Authorized public key's required for cluster users like admin,nutanix\ \ etc." clustermgmt.v4.2.config.ClusterNetwork: type: object properties: externalAddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' nameServers: maxItems: 1024 minItems: 0 uniqueItems: true type: array description: "List of name servers on a cluster. This is a part of payload\ \ for both clusters create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' ntpServers: maxItems: 1024 minItems: 0 uniqueItems: true type: array description: "List of NTP servers on a cluster. This is a part of payload\ \ for both cluster create and update operations. Currently, only IPv4\ \ address and FQDN (fully qualified domain name) values are supported\ \ for the create operation." items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' fqdn: pattern: "^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$" type: string description: Cluster fully qualified domain name. This is part of payload for cluster update operation only. readOnly: true example: string httpProxyConfig: maxItems: 10 minItems: 0 type: array description: List of HTTP Proxy server configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyConfig' httpProxyWhiteListConfig: maxItems: 10 minItems: 0 type: array description: Targets HTTP traffic to which is exempted from going through the configured HTTP Proxy. items: $ref: '#/components/schemas/clustermgmt.v4.2.config.HttpProxyWhiteListConfig' additionalProperties: false description: Network details of a cluster. clustermgmt.v4.2.config.NodeResourceConfig: type: object properties: numVcpus: type: integer description: Number of VCPUs for a given node in cluster. format: int32 example: 93 memorySizeBytes: type: integer description: Memory for a given CVM in cluster. format: int64 example: 78 dataDiskSizeBytes: type: integer description: Data disk size for a given node in cluster. format: int64 example: 27 containerExtId: 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: ExtId for the container on which Node storage has to be hosted on. example: f00528c8-74cf-4d51-93c6-69680d034f88 additionalProperties: false description: Node resource configuration. clustermgmt.v4.2.config.NodeNetworkConfig: type: object properties: ipaddress: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: Individual Node of the cluster network configuration like ip address etc. clustermgmt.v4.2.config.ProtectionInfo: title: Cluster protection status 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: UUID for a cluster example: 6debca81-1a05-4101-b615-6f2dc3fe9ac3 targetProtectionState: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectionState' protectionState: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectionState' protectionTarget: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectionTarget' protectionRpoMinutes: maximum: 360 minimum: 60 type: integer description: Recovery point objective for protecting a cluster. The value determines the frequency of snapshots. format: int32 example: 65 protectedEntities: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectedEntity' failureReason: $ref: '#/components/schemas/clustermgmt.v4.2.error.AppMessage' additionalProperties: false description: Protection details for a cluster. clustermgmt.v4.2.config.ProtectionState: title: Protection state enumeration value. type: string description: Cluster protection state. enum: - FAULTED - PROTECTED - UNPROTECTED - RECOVERED - PROTECTION_IN_PROGRESS - UNPROTECTION_IN_PROGRESS - RECOVERY_IN_PROGRESS - RECOVERY_PLAN_CREATED - $UNKNOWN - $REDACTED x-enumDescriptions: FAULTED: Cluster protection faulted RECOVERY_IN_PROGRESS: Cluster recovery in progress UNPROTECTION_IN_PROGRESS: Cluster unprotection in progress RECOVERY_PLAN_CREATED: Cluster recovery plan created UNPROTECTED: Cluster unprotected PROTECTION_IN_PROGRESS: Cluster protection in progress RECOVERED: Cluster recovered PROTECTED: Cluster protected $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ProtectionTarget: title: Protection target enumeration value. type: string description: Cluster protection target can be LTSS or LOCAL. enum: - LOCAL - LTSS - $UNKNOWN - $REDACTED x-enumDescriptions: LOCAL: Only allowed in test environment LTSS: Multi-cloud Snapshot Technology (MST) $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. clustermgmt.v4.2.config.ProtectedEntity: title: Protected entity object. type: object properties: entityType: type: string description: Protected entity type. example: string protectedCount: minimum: 0 type: integer description: Number of entities that are protected. format: int32 example: 42 unprotectedCount: minimum: 0 type: integer description: Number of entities that are not protected. format: int32 example: 49 additionalProperties: false description: Protected entity counts. clustermgmt.v4.2.config.ProtectionSpec: title: Cluster protection specifications. type: object properties: localSnapshotRetentionPolicy: maximum: 4 minimum: 2 type: integer description: Number of location snapshots that protection service should retain. format: int32 default: 2 protectionRpoMinutes: maximum: 360 minimum: 60 type: integer description: Recovery point objective for protecting a cluster. The value determines the frequency of snapshots. format: int32 default: 60 protectionTarget: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectionTarget' additionalProperties: false description: Parameters that control the cluster protection. clustermgmt.v4.2.config.RecoverySpec: title: Specifications for recovering the cluster. type: object properties: destinationClusterExtId: 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 destination cluster UUID to recover the faulted cluster. example: a6cdf2c0-f062-490d-97e1-52ef58c9c522 additionalProperties: false description: Details for recovering a faulted cluster. clustermgmt.v4.2.config.RecoveryInfo: title: Recovery information for a cluster. type: object properties: recoveryStatus: $ref: '#/components/schemas/clustermgmt.v4.2.config.RecoveryStatus' subnets: type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.Subnet' additionalProperties: false description: Recovery information for a cluster. Includes subnet information as users need to recreate subnets that may be destroyed by Cloud AZ failure. clustermgmt.v4.2.config.RecoveryStatus: title: Specifications for recovering the cluster. type: object properties: destinationClusterExtId: 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 destination cluster UUID to recover the faulted cluster. example: 5f2331ba-3ac7-474b-b3e3-dd1de6d4bd6e sourceClusterExtId: 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 destination cluster UUID to recover the faulted cluster. example: 970404fc-3f5f-4992-bd59-55a9923a89b4 recoveryState: $ref: '#/components/schemas/clustermgmt.v4.2.config.ProtectionState' additionalProperties: false description: Details for recovering a faulted cluster. clustermgmt.v4.2.config.Subnet: title: Subnet object. description: Subnet details for a cluster. allOf: - $ref: '#/components/schemas/networking.v4.2.aws.config.AwsSubnet' - type: object properties: name: type: string description: Subnet name. example: string type: type: string description: Subnet type. example: string ipPoolRanges: type: array description: IP address range items: $ref: '#/components/schemas/common.v1.0.config.IpRange' additionalProperties: false networking.v4.2.aws.config.AwsSubnet: title: NC2A subnet model. description: NC2A Subnet in the given VPC. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - availabilityZone - cidr - cloudType - gatewayIp - subnetId - vpcId type: object properties: vpcId: type: string description: ' AWS VPC ID where cluster is deployed.' example: vpc-123abc678 annotation: type: string description: Annotation string for cloud resources. example: string subnetId: type: string description: Cloud subnet Id. example: subnet-123abc678 cidr: 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]?)(?:\\\ /[0-2]?[0-9]|3[0-2])$" type: string description: Cloud subnet mask. example: 10.192.0.0/24 gatewayIp: 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: Cloud subnet gateway IP. example: 10.192.0.1 cloudType: $ref: '#/components/schemas/networking.v4.2.aws.config.CloudType' availabilityZone: type: string description: Availability Zone in which resource is situated. example: us-west-2a additionalProperties: false common.v1.0.config.IpRange: type: object properties: begin: $ref: '#/components/schemas/common.v1.0.config.IPAddress' end: $ref: '#/components/schemas/common.v1.0.config.IPAddress' additionalProperties: false description: | Range of consecutive IP addresses that can be assigned to a specific Subnet.The size of the IP range is determined by the subnet mask. networking.v4.2.aws.config.CloudType: type: string description: Enum defining different cloud platforms. enum: - AWS - AZURE - $UNKNOWN - $REDACTED x-enumDescriptions: AZURE: Enum for cloud platform Azure $UNKNOWN: | Unknown value. AWS: Enum for cloud platform AWS $REDACTED: | Redacted value. clustermgmt.v4.2.config.ListVcenterExtensionsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterExtension' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions Get operation clustermgmt.v4.2.config.VcenterExtension: description: vCenter Server extension information of the cluster. Nutanix Prism requires registering vCenter Server extension keys to be able to perform VM Management and other operations. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - 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: The globally unique identifier of cluster instance. It should be of type UUID. readOnly: true example: a57bfd97-013f-43d3-b59a-424c1f49cec3 ipAddress: 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: IP Address of vCenter. readOnly: true example: 87.240.101.179 isRegistered: type: boolean description: Indicates whether the vCenter Server extension is registered for the cluster. readOnly: true example: false additionalProperties: false clustermgmt.v4.2.config.GetVcenterExtensionApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.VcenterExtension oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.VcenterExtension' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}\ \ Get operation" clustermgmt.v4.2.config.RegisterVcenterExtensionApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/register\ \ Post operation" clustermgmt.v4.2.config.UnregisterVcenterExtensionApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/vcenter-extensions/{extId}/$actions/unregister\ \ Post operation" clustermgmt.v4.2.config.ListStorageContainersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers Get operation clustermgmt.v4.2.config.StorageContainer: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - name type: object properties: containerExtId: 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 Storage Container. example: be13a630-b7a7-408d-85f7-1017b73ca108 ownerExtId: 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 owner. example: 46e14011-0962-4569-a3f2-d4fbdb23828c name: maxLength: 75 type: string description: Name of the Storage Container. Note that the name of Storage Container should be unique in every cluster. example: string 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: The external identifier of the cluster owning the Storage Container. readOnly: true example: e75f6a35-dd46-4ac2-9e06-14184a342f34 storagePoolExtId: 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 Storage Pool owning the Storage Container instance. readOnly: true example: aa4434d8-e9c6-4c54-8cc8-537ec59a3993 isMarkedForRemoval: type: boolean description: Indicates whether the Storage Container is marked for removal. This field is set when the Storage Container is about to be destroyed. readOnly: true example: true maxCapacityBytes: type: integer description: Maximum physical capacity of the Storage Container in bytes. format: int64 readOnly: true example: 42 logicalExplicitReservedCapacityBytes: type: integer description: Total reserved size (in bytes) of the Storage Container (set by Admin). This also includes the replication factor of the Storage Container. The actual reserved capacity of the Storage Container will be the maximum of explicitReservedCapacity and implicitReservedCapacity. format: int64 example: 73 logicalImplicitReservedCapacityBytes: type: integer description: This is the sum of the of reservations provisioned on all vDisks in the Storage Container. The actual reserved capacity of the Storage Container will be the maximum of explicitReservedCapacity and implicitReservedCapacity. format: int64 readOnly: true example: 10 logicalAdvertisedCapacityBytes: type: integer description: Maximum capacity of the Storage Container as defined by the user. format: int64 example: 39 replicationFactor: type: integer description: Replication factor of the Storage Container. format: int32 example: 51 nfsWhitelistAddress: maxItems: 100 minItems: 0 type: array description: List of NFS addresses that need to be whitelisted. items: $ref: '#/components/schemas/common.v1.0.config.IPAddressOrFQDN' isNfsWhitelistInherited: type: boolean description: Indicates whether the NFS whitelist is inherited from the global configuration. readOnly: true example: false erasureCode: $ref: '#/components/schemas/clustermgmt.v4.2.config.ErasureCodeStatus' isInlineEcEnabled: type: boolean description: Indicates whether data written to this Storage Container should be inline erasure-coded or not. This field is only considered if ErasureCoding is enabled. example: true hasHigherEcFaultDomainPreference: type: boolean description: Indicates whether to prefer a higher Erasure Code fault domain. example: false erasureCodeDelaySecs: type: integer description: Delay in performing Erasure Code for the current Storage Container instance. format: int32 example: 62 cacheDeduplication: $ref: '#/components/schemas/clustermgmt.v4.2.config.CacheDeduplication' onDiskDedup: $ref: '#/components/schemas/clustermgmt.v4.2.config.OnDiskDedup' isCompressionEnabled: type: boolean description: Indicates whether the compression is enabled for the Storage Container. example: true compressionDelaySecs: type: integer description: The compression delay in seconds. format: int32 example: 59 isInternal: type: boolean description: Indicates whether the Storage Container is internal and is managed by Nutanix. example: false isSoftwareEncryptionEnabled: type: boolean description: Indicates whether the Storage Container instance has software encryption enabled. nullable: true example: false isEncrypted: type: boolean description: Indicates whether the Storage Container is encrypted or not. readOnly: true example: true affinityHostExtId: 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: Affinity host external identifier for RF-1 Storage Container. example: fe131beb-2f8d-4f29-a449-5444740dbd5e clusterName: maxLength: 256 type: string description: The corresponding name of the cluster owning the Storage Container instance. readOnly: true example: string isShared: type: boolean description: "Indicates whether the Storage Container is shared. When\ \ shared, all PEs registered under the same PC can access and utilize\ \ its storage. Once the field is set during the creation, it is immutable\ \ except in the case of SelfServiceContainer. Even for SelfServiceContainer\ \ only FALSE to TRUE is allowed." example: false externalStorageExtId: 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 external storage where this storage container is hosted. readOnly: true example: 951bbd7b-b22c-4c64-9276-e0ecd5772632 additionalProperties: false clustermgmt.v4.2.config.CreateStorageContainerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers Post operation clustermgmt.v4.2.config.ErasureCodeStatus: type: string description: Indicates the current status value of Erasure Coding for the Storage Container. enum: - NONE - "OFF" - "ON" - $UNKNOWN - $REDACTED x-enumDescriptions: NONE: Option to ignore this option while creating the Storage Container. $UNKNOWN: | Unknown value. "OFF": Erasure coding is disabled for the Storage Container instance. $REDACTED: | Redacted value. "ON": Erasure coding is enabled for the Storage Container instance. clustermgmt.v4.2.config.CacheDeduplication: type: string description: Indicates the current status of Cache Deduplication for the Storage Container. enum: - NONE - "OFF" - "ON" - $UNKNOWN - $REDACTED x-enumDescriptions: NONE: Option to ignore this option while creating the Storage Container. $UNKNOWN: | Unknown value. "OFF": Cache deduplication is disabled for the Storage Container instance. $REDACTED: | Redacted value. "ON": Cache deduplication is enabled for the Storage Container instance. clustermgmt.v4.2.config.OnDiskDedup: type: string description: Indicates the current status of Disk deduplication for the Storage Container. enum: - NONE - "OFF" - POST_PROCESS - $UNKNOWN - $REDACTED x-enumDescriptions: POST_PROCESS: Deduplication is enabled for the Storage Container instance. NONE: Option to ignore this option while creating the Storage Container. $UNKNOWN: | Unknown value. "OFF": Deduplication is disabled for the Storage Container instance. $REDACTED: | Redacted value. clustermgmt.v4.2.config.GetStorageContainerApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.config.StorageContainer oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.config.StorageContainer' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Get operation" clustermgmt.v4.2.config.UpdateStorageContainerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Put operation" clustermgmt.v4.2.config.DeleteStorageContainerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}\ \ Delete operation" clustermgmt.v4.2.config.DataStoreMount: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - title: Mount Storage Container. required: - containerName type: object properties: datastoreName: maxLength: 255 type: string description: Name of the datastore. example: string containerName: maxLength: 75 type: string description: Name of the Storage Container. Note that the name of Storage Container should be unique in every cluster. example: string nodeExtIds: maxItems: 50 minItems: 0 type: array description: The UUIDs of the nodes where the NFS datastore has to be created. 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: 72ea3a6d-1765-4ea8-9f38-08a5d25e7e2e isReadOnly: type: boolean description: Indicates weather the host system has read-only access to the NFS share. example: false targetPath: type: string description: The target path on which to mount the NFS datastore. example: string additionalProperties: false description: Create NFS datastores on the ESX hosts. clustermgmt.v4.2.config.MountStorageContainerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/mount\ \ Post operation" clustermgmt.v4.2.config.DataStoreUnmount: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - title: Mount Storage Container. required: - datastoreName type: object properties: datastoreName: maxLength: 255 type: string description: Name of the datastore. example: string nodeExtIds: maxItems: 50 minItems: 0 type: array description: The UUIDs of the nodes where the NFS datastore has to be created. 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: 9e6746b7-f024-4edc-807d-1fc0d93aafae additionalProperties: false description: Create NFS datastores on the ESX hosts. clustermgmt.v4.2.config.UnmountStorageContainerApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/unmount\ \ Post operation" clustermgmt.v4.2.config.ListDataStoresByClusterIdApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - maxItems: 300 minItems: 0 type: array items: $ref: '#/components/schemas/clustermgmt.v4.2.config.DataStore' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/clusters/{clusterExtId}/storage-containers/datastores\ \ Get operation" clustermgmt.v4.2.config.DataStore: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - title: datastore entity. type: object properties: datastoreName: maxLength: 255 type: string description: Name of the datastore. example: string containerExtId: 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 Storage Container. example: c9645d28-f97c-4b03-b46f-e2923987af6a containerName: maxLength: 75 type: string description: Name of the Storage Container. Note that the name of Storage Container should be unique in every cluster. example: string hostExtId: 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 host for the datastore. example: 29f83439-295b-4be3-aa1a-cc38035d10c2 hostIpAddress: pattern: '#/components/schemas/common.v1.r0.config.IPAddressOrFQDN' type: string description: Host IP for datastore. example: string capacityBytes: type: integer description: Maximum physical capacity of the Storage Container in bytes. format: int64 example: 66 freeSpaceBytes: type: integer description: The free space in the datastore. format: int64 example: 30 vmNames: maxItems: 5000 minItems: 0 type: array description: List of VM names in the datastore. items: type: string example: string additionalProperties: false description: Entity describing all the attributes related to a datastore instance. clustermgmt.v4.2.config.ClearThickProvisionedSpaceApiResponse: 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/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/config/storage-containers/{extId}/$actions/clear-thick-provisioned-space\ \ Post operation" clustermgmt.v4.2.stats.GetStorageContainerStatsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: clustermgmt.v4.stats.StorageContainerStats oneOf: - $ref: '#/components/schemas/clustermgmt.v4.2.stats.StorageContainerStats' - $ref: '#/components/schemas/clustermgmt.v4.2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /clustermgmt/v4.2/stats/storage-containers/{extId}\ \ Get operation" clustermgmt.v4.2.stats.StorageContainerStats: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: controllerNumIops: maxItems: 3000 minItems: 0 type: array description: Number of I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerIoBandwidthkBps: maxItems: 3000 minItems: 0 type: array description: Total I/O bandwidth - kB per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerAvgIoLatencyuSecs: maxItems: 3000 minItems: 0 type: array description: Average I/O latency in micro secs. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerNumReadIops: maxItems: 3000 minItems: 0 type: array description: Number of read I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerNumWriteIops: maxItems: 3000 minItems: 0 type: array description: Number of write I/O per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerReadIoBandwidthkBps: maxItems: 3000 minItems: 0 type: array description: Read I/O bandwidth kB per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerWriteIoBandwidthkBps: maxItems: 3000 minItems: 0 type: array description: Write I/O bandwidth kB per second. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerAvgReadIoLatencyuSecs: maxItems: 3000 minItems: 0 type: array description: Average read I/O latency in microseconds. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerAvgWriteIoLatencyuSecs: maxItems: 3000 minItems: 0 type: array description: Average read I/O latency in microseconds. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageReservedCapacityBytes: maxItems: 3000 minItems: 0 type: array description: Implicit physical reserved capacity (aggregated at the vDisk level due to thick provisioning) in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageActualPhysicalUsageBytes: maxItems: 3000 minItems: 0 type: array description: Actual physical disk usage of the Storage Container without considering for the reservation. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: "Saving ratio in PPM as a result of deduplication, compression\ \ and erasure coding." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionTotalSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: "Saving ratio in PPM consisting of deduplication, compression,\ \ erasure coding, cloning, and thin provisioning." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageFreeBytes: maxItems: 3000 minItems: 0 type: array description: Free storage in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageCapacityBytes: maxItems: 3000 minItems: 0 type: array description: Storage capacity in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionSavedBytes: maxItems: 3000 minItems: 0 type: array description: "Storage saving in bytes as a result of deduplication, compression,\ \ erasure coding technique." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionOverallPreReductionBytes: maxItems: 3000 minItems: 0 type: array description: "Usage in bytes before reduction of deduplication, compression,\ \ erasure coding, cloning, and thin provisioning." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionOverallPostReductionBytes: maxItems: 3000 minItems: 0 type: array description: "Usage in bytes after reduction of ceduplication, compression,\ \ erasure coding, cloning, and thin provisioning." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionCompressionSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of the compression technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionDedupSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of the deduplication technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionErasureCodingSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of the erasure coding technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionThinProvisionSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of the thin provisioning technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionCloneSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of the cloning technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionSnapshotSavingRatioPpm: maxItems: 3000 minItems: 0 type: array description: Saving ratio in PPM as a result of snapshot technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionZeroWriteSavingsBytes: maxItems: 3000 minItems: 0 type: array description: Total amount of savings in bytes as a result of zero writes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerReadIoRatioPpm: maxItems: 3000 minItems: 0 type: array description: Ratio of read I/O to total I/O in PPM. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' controllerWriteIoRatioPpm: maxItems: 3000 minItems: 0 type: array description: Ratio of read I/O to total I/O in PPM. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageReplicationFactor: maxItems: 3000 minItems: 0 type: array description: Replication factor of Storage Container. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageUsageBytes: maxItems: 3000 minItems: 0 type: array description: Used storage in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageTierDasSataUsageBytes: maxItems: 3000 minItems: 0 type: array description: Total usage on HDD tier for the Storage Container in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageTierSsdUsageBytes: maxItems: 3000 minItems: 0 type: array description: Total usage on SDD tier for the Storage Container in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageReservedUsageBytes: maxItems: 3000 minItems: 0 type: array description: The physical usage of the implicit reserved capacity(aggregated on vDisk level due to thick provisioning) in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageReservedFreeBytes: maxItems: 3000 minItems: 0 type: array description: The remaining unused space of the implicit reserved capacity(aggregated on vDisk level due to thick provisioning) in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageUnreservedUsageBytes: maxItems: 3000 minItems: 0 type: array description: The physical usage from unreserved vDisks(aggregated on thin provisioning vDisks) in bytes. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageOtherContainersReservedCapacity: maxItems: 3000 minItems: 0 type: array description: The total explicit reserved physical capacity of other Storage Containers in the same Storage Pool. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageOtherContainersUnreservedCapacity: maxItems: 3000 minItems: 0 type: array description: The physical usage outside of the explicitly reserved capacity of other Storage Containers in the same Storage Pool. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' storageSnapshotReclaimable: maxItems: 3000 minItems: 0 type: array description: The space that will be reclaimed if all the snapshots in the cluster is deleted. This is the physical snapshot usage with replication factor and data reduction savings taken into account. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionThinProvisionSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of thin Provisioning technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionSnapshotSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of the snapshot technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionCloneSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of the cloning technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionErasureCodingSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of erasure coding technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionDedupSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of deduplication technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionOverallSavedBytes: maxItems: 3000 minItems: 0 type: array description: "Storage saving in bytes as a result of deduplication, compression,\ \ erasure coding, cloning and thin provisioning technique." readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' dataReductionCompressionSavedBytes: maxItems: 3000 minItems: 0 type: array description: Storage saving in bytes as a result of compression technique. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' health: maxItems: 3000 minItems: 0 type: array description: Health of the Storage Container is represented by an integer value in the range 0-100. A higher value indicates better health. readOnly: true items: $ref: '#/components/schemas/common.v1.0.stats.TimeIntValuePair' containerExtId: 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 Storage Container. example: 580f9500-ab7d-4e9f-a40b-1afb60cbc076 additionalProperties: false securitySchemes: basicAuthScheme: type: http scheme: basic apiKeyAuthScheme: type: apiKey name: X-ntnx-api-key in: header