Create a role

edit

Create a Blueprinter role.

Request

edit

POST /api/v1/platform/infrastructure/blueprinter/roles

Request body

edit

(RoleAggregateCreateData) (required) The data you want to use for creating a role.

Responses

edit
201

(RoleAggregate) The role aggregate that was just created.

409

(BasicFailedReply) The role ID you specified is already in use. (code: roles.already_exists)

Headers

x-cloud-error-codes (string; allowed values: [roles.already_exists])
The error codes associated with the response

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

edit
curl -XPOST https://{{hostname}}/api/v1/platform/infrastructure/blueprinter/roles \
-H "Authorization: ApiKey $ECE_API_KEY" \
-d '
{
   "blessings" : {
      "runner_ids_to_blessing" : {
         "some_property" : {
            "value" : true
         }
      }
   },
   "role" : {
      "auto_blessed" : true,
      "containers" : [
         {
            "container_set_name" : "string",
            "kind" : "string",
            "name" : "string",
            "options" : {
               "acls" : [
                  {
                     "id" : "string",
                     "perms" : 0,
                     "scheme" : "string"
                  }
               ],
               "auths" : [
                  {
                     "auth" : "string",
                     "scheme" : "string"
                  }
               ],
               "container_set_secret" : "string",
               "enabled" : true,
               "enabled_by_named_feature_flag" : "string",
               "overrides" : {
                  "container_config" : {
                     "env" : [
                        "string"
                     ],
                     "host_config" : {
                        "binds" : [
                           "string"
                        ],
                        "cpu_period" : 0,
                        "extra_hosts" : [
                           "string"
                        ],
                        "network_mode" : "string",
                        "port_bindings" : {
                           "some_property" : [
                              {
                                 "host_ip" : "string",
                                 "host_port" : "string"
                              }
                           ]
                        },
                        "privileged" : true,
                        "restart_policy" : {
                           "maximum_retry_count" : 0,
                           "name" : "string"
                        }
                     }
                  }
               },
               "runners_secret" : "string"
            }
         }
      ],
      "id" : "string"
   }
}
'