Get Object Storage Key Details
client.Storage.Keys.Get(ctx, keyID) (*ObjectStorageKey, error)
GET/v1/storage/keys/{key_id}
Get details about an Object Storage Key. The secret access key is not included.
Get Object Storage Key Details
package main
import (
"context"
"fmt"
"github.com/nirvana-labs/nirvana-go"
"github.com/nirvana-labs/nirvana-go/option"
)
func main() {
client := nirvana.NewClient(
option.WithAPIKey("My API Key"),
)
objectStorageKey, err := client.Storage.Keys.Get(context.TODO(), "key_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", objectStorageKey.ID)
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"access_key": "0555B35654AD1656D804",
"created_at": "2025-01-01T00:00:00Z",
"name": "ci-uploads",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"updated_at": "2025-01-01T00:00:00Z"
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"access_key": "0555B35654AD1656D804",
"created_at": "2025-01-01T00:00:00Z",
"name": "ci-uploads",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"updated_at": "2025-01-01T00:00:00Z"
}