ByCloud Docs
GuidesCLIAPISDK

Create API key

bycloud iam service-accounts-keys --service_account_id <service_account_id> --name <name> [flags]

Create a new API key for a service account. The secret access key is only returned once at creation time.

Options

--service_account_id

stringrequired

Service Account ID

--output

(-o)

stringoptional

Output format: text, json, or yaml

Values: "text", "json", "yaml"

Default: "text"

Body Options

--name

stringrequired

--expires_at

stringoptional

Optional expiration date

Command

bycloud iam service-accounts-keys \
--service_account_id "abc-123" \
--name "my-resource"

Output

API_KEY
ID 550e8400-e29b-41d4-a716-446655440000
CRN crn::iam:api-key:550e8400-e29b-41d4-a716-446655440000
NAME production-key
ACCESS_KEY_ID AKIA550E8400E29B41D4
LAST_USED_AT 2024-01-15T10:30:00Z
EXPIRES_AT 2024-01-15T10:30:00Z
CREATED_AT 2024-01-15T10:30:00Z
SECRET_ACCESS_KEY wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY