Update role

edit

Update a role.

Request

edit

PUT /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}

Path parameters

edit
Name Type Required Description

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

Query parameters

edit
Name Type Required Description

version

integer

N

When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Request body

edit

(Role) (required) The role update data.

Responses

edit
200

(RoleAggregate) The role was successfully updated.

400

(BasicFailedReply) The role is currently running container sets. (code: roles.in_use)

Headers

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

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

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

(BasicFailedReply) Your request failed because the specified version does not match the persisted version. (code: roles.version_conflict)

Headers

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

Request example

edit
curl -XPUT https://{{hostname}}/api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id} \
-H "Authorization: ApiKey $ECE_API_KEY" \
-d '
{
   "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"
}
'