bin/commands/admin_auth_policy.rb
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'AdminAuthPolicy methods.'
command 'admin_auth_policy' do |g|
g.desc 'Assign entities to a particular authentication policy.'
g.long_desc %( Assign entities to a particular authentication policy. )
g.command 'assignEntities' do |c|
c.flag 'entity_ids', desc: 'Array of IDs to assign to the policy.'
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
c.flag 'policy_name', desc: 'The name of the authentication policy to assign the entities to. Currently, email_password is the only policy that may be used with this method.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_auth_policy_assignEntities(options))
end
end
g.desc 'Fetch all the entities assigned to a particular authentication policy by name.'
g.long_desc %( Fetch all the entities assigned to a particular authentication policy by name. )
g.command 'getEntities' do |c|
c.flag 'policy_name', desc: 'The name of the policy to fetch entities for. Currently, email_password is the only policy that may be used with this method.'
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 and 1000, both inclusive.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_auth_policy_getEntities(options))
end
end
g.desc 'Remove specified entities from a specified authentication policy.'
g.long_desc %( Remove specified entities from a specified authentication policy. )
g.command 'removeEntities' do |c|
c.flag 'entity_ids', desc: "Encoded IDs of the entities you'd like to remove from the policy."
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
c.flag 'policy_name', desc: 'The name of the policy to remove entities from. Currently, email_password is the only policy that may be used with this method.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_auth_policy_removeEntities(options))
end
end
end
end
end
end