Assume role
bycloud iam assume-role --role_id <role_id> [flags]Assume an IAM role and receive temporary credentials. The caller must be allowed by the role's trust policy. Can be used by service accounts to get temporary credentials for a specific role.
Options
--output
(-o)
stringoptionalOutput format: text, json, or yaml
Values: "text", "json", "yaml"
Default: "text"
Body Options
--role_id
stringrequired--duration_seconds
integeroptionalCredential validity duration (15 min to 12 hours)
Default: 3600
Command
bycloud iam assume-role \--role_id "abc-123"
Output
ACCESS_KEY_ID AKIA...SECRET_ACCESS_KEY wJalrXUtnFEMI...SESSION_TOKEN FwoGZXIvYXdzE...EXPIRATION 2024-01-15T10:30:00Z