All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateAccessKeyEndpoint | Post /object-storage/access-keys | Generate a new access key |
| DeleteAccessKeyEndpoint | Delete /object-storage/access-keys/{access_key_id} | Remove an existing access key |
| ListAccessKeysEndpoint | Get /object-storage/access-keys | List access keys |
ObjectStorageAccessKeyCreateResponse CreateAccessKeyEndpoint(ctx).Body(body).Execute()
Generate a new access key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
body := *openapiclient.NewObjectStorageAccessKeyCreateRequest(openapiclient.object_storage__RegionsEnum("CANADA-1")) // ObjectStorageAccessKeyCreateRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccessKeysAPI.CreateAccessKeyEndpoint(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeysAPI.CreateAccessKeyEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAccessKeyEndpoint`: ObjectStorageAccessKeyCreateResponse
fmt.Fprintf(os.Stdout, "Response from `AccessKeysAPI.CreateAccessKeyEndpoint`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateAccessKeyEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | ObjectStorageAccessKeyCreateRequest |
ObjectStorageAccessKeyCreateResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectStorageDeleteResponse DeleteAccessKeyEndpoint(ctx, accessKeyId).Execute()
Remove an existing access key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
accessKeyId := "accessKeyId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccessKeysAPI.DeleteAccessKeyEndpoint(context.Background(), accessKeyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeysAPI.DeleteAccessKeyEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAccessKeyEndpoint`: ObjectStorageDeleteResponse
fmt.Fprintf(os.Stdout, "Response from `AccessKeysAPI.DeleteAccessKeyEndpoint`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| accessKeyId | string |
Other parameters are passed through a pointer to a apiDeleteAccessKeyEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectStorageAccessKeyListResponse ListAccessKeysEndpoint(ctx).Search(search).Page(page).PageSize(pageSize).Execute()
List access keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
search := "search_example" // string | (optional)
page := "page_example" // string | (optional)
pageSize := "pageSize_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccessKeysAPI.ListAccessKeysEndpoint(context.Background()).Search(search).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeysAPI.ListAccessKeysEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAccessKeysEndpoint`: ObjectStorageAccessKeyListResponse
fmt.Fprintf(os.Stdout, "Response from `AccessKeysAPI.ListAccessKeysEndpoint`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListAccessKeysEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| search | string | ||
| page | string | ||
| pageSize | string |
ObjectStorageAccessKeyListResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]