iam_create_api_key
Create an IAM API key for an application or user. The secret key is returned only once and the credentials persist beyond the session.
Instructions
Create an IAM API key for an application or a user.
Sensitive and persistent: this mints long-lived credentials that outlive the
session and are not removed by disabling deletes. The secret key is returned
only once in the response. Only expose the iam product to trusted agents.
Exactly one of application_id or user_id identifies the bearer.
API keys carry no tags, so delete_api_key requires
SCW_ALLOW_DELETE_UNTAGGED=true to remove them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | ID of the owning user (mutually exclusive with ``application_id``). | |
| description | Yes | Description of the API key (max 200 characters). | |
| application_id | No | ID of the owning application (mutually exclusive with ``user_id``). | |
| default_project_id | No | Default project ID to use with Object Storage. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||