All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| DeleteBucketEndpoint | Delete /object-storage/buckets/{bucket_name} | Delete a bucket |
| ListBucketsEndpoint | Get /object-storage/buckets | List buckets |
| RetrieveBucketEndpoint | Get /object-storage/buckets/{bucket_name} | Retrieve a bucket |
ObjectStorageDeleteResponse DeleteBucketEndpoint(ctx, bucketName).Region(region).Execute()
Delete a bucket
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
bucketName := "bucketName_example" // string |
region := "region_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketsAPI.DeleteBucketEndpoint(context.Background(), bucketName).Region(region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketsAPI.DeleteBucketEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteBucketEndpoint`: ObjectStorageDeleteResponse
fmt.Fprintf(os.Stdout, "Response from `BucketsAPI.DeleteBucketEndpoint`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| bucketName | string |
Other parameters are passed through a pointer to a apiDeleteBucketEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
region | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectStorageBucketListResponse ListBucketsEndpoint(ctx).Search(search).Execute()
List buckets
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
search := "search_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketsAPI.ListBucketsEndpoint(context.Background()).Search(search).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketsAPI.ListBucketsEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListBucketsEndpoint`: ObjectStorageBucketListResponse
fmt.Fprintf(os.Stdout, "Response from `BucketsAPI.ListBucketsEndpoint`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListBucketsEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| search | string |
ObjectStorageBucketListResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectStorageBucketResponse RetrieveBucketEndpoint(ctx, bucketName).Region(region).Execute()
Retrieve a bucket
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
bucketName := "bucketName_example" // string |
region := "region_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BucketsAPI.RetrieveBucketEndpoint(context.Background(), bucketName).Region(region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BucketsAPI.RetrieveBucketEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveBucketEndpoint`: ObjectStorageBucketResponse
fmt.Fprintf(os.Stdout, "Response from `BucketsAPI.RetrieveBucketEndpoint`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| bucketName | string |
Other parameters are passed through a pointer to a apiRetrieveBucketEndpointRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
region | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]