iam.access-keys.createCreate an access key and return its secret once
The secret is in the response and nowhere else. The key signs Deutsche Cloud API calls (`Authorization: EWS-ACCESS-KEY id:secret`) and S3 requests (SigV4: id as the access key id, secret as the secret access key). Every key expires: `expiresAt` is in the response. What it may do is its account’s policies: give a script its own service account with exactly the policy it needs. For a credential narrower than an account, use temporary credentials.
Request syntax
POST /iam/api/access-keys
{
"iamUserId": "string",
"expiresInDays": "number",
"description": "string",
"scopePolicy": "string",
"actAsMember": "boolean"
}Request body
iamUserIdOptionalstring
The ID of the IAM user the key signs in as; omitted: yourself
Constraints: uuid
expiresInDaysOptionalnumber
Days until the key expires; default the organization’s default (90), at most its maximum (365)
Constraints: integer, 1-3650
descriptionOptionalstring
What the key is for
Constraints: max 256 chars
scopePolicyOptionalstring
Deprecated: a limit on the key (JSON policy document) that only narrows what the account may do and grants nothing. Still enforced when given. Instead: temporary credentials (s3 buckets temporary-key) for a narrower credential, or a service account with exactly the policy it needs (s3 buckets create-access-key)
Constraints: max 10240 chars
actAsMemberOptionalboolean
Must be true when iamUserId is another person’s own IAM user: everything done with the key is recorded as that person, and the audit entry names both
Response
201 with the key: id, orgId, iamUserId, accessKeyId, status, createdAt, lastUsedAt, expiresAt, description, scopePolicy, s3, reach and secretKey, which is shown only in this response. With the deprecated scopePolicy: reach { status: works | partial | none, missing, checked } and deprecation, a sentence saying what to use instead.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow iam:CreateAccessKey on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud iam access-keys createcurl -X POST "https://console.platform.deutschecloud.app/iam/api/access-keys" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_iam_access-keys_create.