Create IAM Role
Body Required
-
IAM Role name
Minimum length is
1
, maximum length is191
. -
description string
IAM Role description
Minimum length is
1
, maximum length is255
. -
permissions array[string]
IAM Role permissions
Value is
bypass-governance-retention
. -
editable boolean
Sets if the IAM Role Policy is editable or not (default: true). This setting cannot be changed after creation
-
labels object
Resource labels
-
policy object
IAM Role Policy
Additional properties are allowed.
POST /iam-role
curl \
-X POST https://api-ch-gva-2.exoscale.com/v2/iam-role \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","permissions":["bypass-governance-retention"],"editable":true,"labels":{"additionalProperty1":"string","additionalProperty2":"string"},"policy":{"default-service-strategy":"allow","services":{"additionalProperty1":{"type":"rules","rules":[{"action":"allow","expression":"string","resources":["string"]}]},"additionalProperty2":{"type":"rules","rules":[{"action":"allow","expression":"string","resources":["string"]}]}}}}'
Request examples
{
"name": "string",
"description": "string",
"permissions": [
"bypass-governance-retention"
],
"editable": true,
"labels": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"policy": {
"default-service-strategy": "allow",
"services": {
"additionalProperty1": {
"type": "rules",
"rules": [
{
"action": "allow",
"expression": "string",
"resources": [
"string"
]
}
]
},
"additionalProperty2": {
"type": "rules",
"rules": [
{
"action": "allow",
"expression": "string",
"resources": [
"string"
]
}
]
}
}
}
}
Response examples (200)
{
"id": "string",
"reason": "incorrect",
"reference": {
"id": "string",
"link": "string",
"command": "string"
},
"message": "string",
"state": "failure"
}