All URIs are relative to https://gateway.stackpath.com
| Method | HTTP request | Description |
|---|---|---|
| DeleteCredential | Delete /storage/v1/stacks/{stack_id}/users/{user_id}/credentials/{access_key} | Delete credentials |
| GenerateCredentials | Post /storage/v1/stacks/{stack_id}/users/{user_id}/credentials/generate | Create credentials |
| GetCredentials | Get /storage/v1/stacks/{stack_id}/users/{user_id}/credentials | Get credentials |
DeleteCredential(ctx, stackId, userId, accessKey).Execute()
Delete credentials
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
userId := "userId_example" // string | A user ID
accessKey := "accessKey_example" // string | A user's access key
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserCredentialsApi.DeleteCredential(context.Background(), stackId, userId, accessKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserCredentialsApi.DeleteCredential``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| stackId | string | A stack ID or slug | |
| userId | string | A user ID | |
| accessKey | string | A user's access key |
Other parameters are passed through a pointer to a apiDeleteCredentialRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StorageGenerateCredentialsResponse GenerateCredentials(ctx, stackId, userId).Execute()
Create credentials
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
userId := "userId_example" // string | A user ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserCredentialsApi.GenerateCredentials(context.Background(), stackId, userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserCredentialsApi.GenerateCredentials``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateCredentials`: StorageGenerateCredentialsResponse
fmt.Fprintf(os.Stdout, "Response from `UserCredentialsApi.GenerateCredentials`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| stackId | string | A stack ID or slug | |
| userId | string | A user ID |
Other parameters are passed through a pointer to a apiGenerateCredentialsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
StorageGenerateCredentialsResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StorageGetCredentialsResponse GetCredentials(ctx, stackId, userId).Execute()
Get credentials
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
userId := "userId_example" // string | A user ID
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserCredentialsApi.GetCredentials(context.Background(), stackId, userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserCredentialsApi.GetCredentials``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCredentials`: StorageGetCredentialsResponse
fmt.Fprintf(os.Stdout, "Response from `UserCredentialsApi.GetCredentials`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| stackId | string | A stack ID or slug | |
| userId | string | A user ID |
Other parameters are passed through a pointer to a apiGetCredentialsRequest 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]