Class: PEClient::Resource::RBACV2::Groups

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/rbac.v2/groups.rb

Overview

User groups allow you to quickly assign one or more roles to a set of users by placing all relevant users in the group. This is more efficient than assigning roles to each user individually. The v2 #create has additional optional parameters you can use when creating groups.

Constant Summary collapse

BASE_PATH =

The base path for RBAC API v2 Groups endpoints.

"#{RBACV2::BASE_PATH}/groups".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#create(login:, role_ids:, display_name: nil, identity_provider_id: nil, validate: nil) ⇒ Hash{String => String}

Create a new remote directory user group.

Parameters:

  • login (String)

    Defines the group for an external IdP. This could be an LDAP login or a SAML identifier for the group.

  • role_ids (Array<String>)

    An array of role IDs defining the roles that you want to assign to users in this group. An empty array might be valid, but users can’t do anything in PE if they are not assigned to any roles.

  • display_name (String) (defaults to: nil)

    Specify a name for the group as you want it to appear in the PE console. If the group you’re creating originates from an LDAP group, the LDAP group’s Display name setting overrides this parameter.

  • identity_provider_id (String) (defaults to: nil)

    Specify the UUID of an identity provider (SAML or LDAP) to bind to the group.

  • validate (Boolean) (defaults to: nil)

    Specifying whether you want to validate if the group exists on the LDAP server prior to creating it. The default is true. Set this to false if you don’t want to validate the group’s existence in LDAP.

Returns:

  • (Hash{String => String})


47
48
49
50
# File 'lib/pe_client/resources/rbac.v2/groups.rb', line 47

def create(login:, role_ids:, display_name: nil, identity_provider_id: nil, validate: nil)
  PEClient.deprecated "create", "RBACV1::Groups#create"
  @client.post BASE_PATH, body: {login:, role_ids:, display_name:, identity_provider_id:, validate:}.compact
end