/v1/iam/workload-credentialsGet workload credentials
Get temporary credentials for a workload (instance, function, container, etc.). Called by infrastructure services (metadata service, function runtime, container orchestrator) to provide credentials to workloads. The principal is identified by a CRN (Cloud Resource Name) in the format: `crn:<region>:<service>:<resource>:<identifier>` Examples: - `crn:spo1:compute:instance:i-550e8400` - `crn:spo1:lambda:function:my-function` - `crn:spo1:container:task:task-abc123`
Request Body
requiredContent-Type: application/json
principal
stringrequiredCRN of the workload requesting credentials. Format: crn:<region>:<service>:<resource>:<identifier>
role_name
stringoptionalSpecific role to assume (uses workload's default role if omitted)
Responses
Temporary credentials
Content-Type: application/json
access_key_id
stringoptionalsecret_access_key
stringoptionalsession_token
stringoptionalexpiration
string<date-time>optionalrole_name
stringoptionalInvalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredWorkload is not allowed to assume any role
Content-Type: application/json
error
objectrequiredResource not found
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/iam/workload-credentials" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"principal": "crn:spo1:compute:instance:i-550e8400","role_name": "string"}'