Create IAM Role

POST /iam-role
application/json

Body Required

  • name string Required

    IAM Role name

    Minimum length is 1, maximum length is 191.

  • IAM Role description

    Minimum length is 1, maximum length is 255.

  • 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

    Hide labels attribute Show labels attribute object
    • * string Additional properties
  • policy object

    IAM Role Policy

    Additional properties are allowed.

    Hide policy attributes Show policy attributes object
    • IAM default service strategy

      Values are allow or deny.

    • services object Required

      IAM services

      Hide services attribute Show services attribute object
      • * object Additional properties

        Additional properties are allowed.

        Hide * attributes Show * attributes object

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      Additional properties are allowed.

      Hide reference attributes Show reference attributes object
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

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"
}