Method: OpenapiClient::ResourceRolesApi#add_parent_resource_role

Defined in:
lib/openapi_client/api/resource_roles_api.rb

#add_parent_resource_role(proj_id, env_id, resource_id, role_id, parent_role_id, opts = {}) ⇒ ResourceRoleRead

Add Parent Role This endpoint is part of the role hierarchy feature. Makes role with id role_id extend the role with id parent_role_id. In other words, role_id will automatically be assigned any permissions that are granted to parent_role_id. We can say the role_id extends parent_role_id or inherits from parent_role_id. If role_id is already an ancestor of parent_role_id, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. Both roles must be defined on the same resource, identified by id resource_id.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

  • resource_id (String)

    Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").

  • role_id (String)

    Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug").

  • parent_role_id (String)

    Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the "slug").

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



31
32
33
34
# File 'lib/openapi_client/api/resource_roles_api.rb', line 31

def add_parent_resource_role(proj_id, env_id, resource_id, role_id, parent_role_id, opts = {})
  data, _status_code, _headers = add_parent_resource_role_with_http_info(proj_id, env_id, resource_id, role_id, parent_role_id, opts)
  data
end