All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| GetContractGPUAllocationGraph | Get /pricebook/contracts/{contract_id}/gpu_allocation_graph | Retrieve GPU Allocation Graph for Contract |
| ListCustomerContracts | Get /pricebook/contracts | List Contracts |
| RetrieveContract | Get /pricebook/contracts/{contract_id} | Retrieve Contract Details |
ContractGPUAllocationGraphResponse GetContractGPUAllocationGraph(ctx, contractId).StartDate(startDate).EndDate(endDate).Execute()
Retrieve GPU Allocation Graph for Contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
contractId := int32(56) // int32 |
startDate := "startDate_example" // string | Date should be formatted in YYYY-MM-DDTHH:MM:SS (optional)
endDate := "endDate_example" // string | Date should be formatted in YYYY-MM-DDTHH:MM:SS (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerContractAPI.GetContractGPUAllocationGraph(context.Background(), contractId).StartDate(startDate).EndDate(endDate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerContractAPI.GetContractGPUAllocationGraph``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContractGPUAllocationGraph`: ContractGPUAllocationGraphResponse
fmt.Fprintf(os.Stdout, "Response from `CustomerContractAPI.GetContractGPUAllocationGraph`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| contractId | int32 |
Other parameters are passed through a pointer to a apiGetContractGPUAllocationGraphRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
startDate | string | Date should be formatted in YYYY-MM-DDTHH:MM:SS | endDate | string | Date should be formatted in YYYY-MM-DDTHH:MM:SS |
ContractGPUAllocationGraphResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCustomerContractsListResponseModel ListCustomerContracts(ctx).Page(page).PerPage(perPage).Execute()
List Contracts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
page := int32(56) // int32 | (optional)
perPage := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerContractAPI.ListCustomerContracts(context.Background()).Page(page).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerContractAPI.ListCustomerContracts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomerContracts`: GetCustomerContractsListResponseModel
fmt.Fprintf(os.Stdout, "Response from `CustomerContractAPI.ListCustomerContracts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListCustomerContractsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | ||
| perPage | int32 |
GetCustomerContractsListResponseModel
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerContractDetailResponseModel RetrieveContract(ctx, contractId).Execute()
Retrieve Contract Details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
contractId := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerContractAPI.RetrieveContract(context.Background(), contractId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerContractAPI.RetrieveContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveContract`: CustomerContractDetailResponseModel
fmt.Fprintf(os.Stdout, "Response from `CustomerContractAPI.RetrieveContract`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| contractId | int32 |
Other parameters are passed through a pointer to a apiRetrieveContractRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
CustomerContractDetailResponseModel
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]