slackline/api/admin/auth

This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.

Admin auth: assign users to authentication policies.

Types

Identifies admin.auth.policy.assignEntities in the slackline.Call that policy_assign_entities returns.

pub type PolicyAssignEntities

An entity assigned to an authentication policy.

pub type PolicyEntity {
  PolicyEntity(
    entity_type: option.Option(PolicyEntityType),
    entity_id: String,
    date_added: option.Option(Int),
  )
}

Constructors

  • PolicyEntity(
      entity_type: option.Option(PolicyEntityType),
      entity_id: String,
      date_added: option.Option(Int),
    )

    Arguments

    entity_type

    The type of entity, such as USER.

    entity_id

    The ID of the entity.

    date_added

    When the entity was added to the policy (Unix time).

A kind of entity that can be assigned to an authentication policy.

pub type PolicyEntityType {
  PolicyEntityUser
  UnknownPolicyEntityType(String)
}

Constructors

  • PolicyEntityUser

    USER

  • UnknownPolicyEntityType(String)

    A value that this version of slackline does not know.

Identifies admin.auth.policy.getEntities in the slackline.Call that policy_get_entities returns.

pub type PolicyGetEntities

A successful response from admin.auth.policy.getEntities.

pub type PolicyGetEntitiesResponse {
  PolicyGetEntitiesResponse(
    entities: option.Option(List(PolicyEntity)),
    entity_total_count: option.Option(Int),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

Identifies admin.auth.policy.removeEntities in the slackline.Call that policy_remove_entities returns.

pub type PolicyRemoveEntities

Values

pub fn policy_assign_entities(
  policy_name policy_name: String,
  entity_type entity_type: String,
  entity_ids entity_ids: List(String),
) -> slackline.Call(PolicyAssignEntities, Nil)

admin.auth.policy.assignEntities: Assign entities to a particular authentication policy.

auth.PolicyAssignEntities identifies this method in slackline.Call.

User token scopes: admin.users:write.

Rate limit tier: t4.

Documented errors: admin_unauthorized, entity_not_found, feature_not_enabled, not_an_admin, over_max_entity_limit, policy_not_found, unknown_method.

pub fn policy_entity_decoder() -> decode.Decoder(PolicyEntity)

Decodes PolicyEntity from json.

pub fn policy_entity_to_json(it: PolicyEntity) -> json.Json

Encodes PolicyEntity as json.

pub fn policy_entity_type_decoder() -> decode.Decoder(
  PolicyEntityType,
)

Decodes PolicyEntityType from a json string.

pub fn policy_entity_type_from_string(
  string: String,
) -> PolicyEntityType

Parses PolicyEntityType from its json string.

pub fn policy_entity_type_to_json(
  it: PolicyEntityType,
) -> json.Json

Encodes PolicyEntityType as a json string.

pub fn policy_entity_type_to_string(
  it: PolicyEntityType,
) -> String

The json string of PolicyEntityType.

pub fn policy_get_entities(
  policy_name policy_name: String,
) -> slackline.Call(PolicyGetEntities, PolicyGetEntitiesResponse)

admin.auth.policy.getEntities: Fetch all the entities assigned to a particular authentication policy by name.

auth.PolicyGetEntities identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/admin/auth/policy_get_entities.

User token scopes: admin.users:read.

Rate limit tier: t4.

Documented errors: feature_not_enabled, invalid_cursor, not_an_admin, policy_not_found.

pub fn policy_get_entities_response_decoder() -> decode.Decoder(
  PolicyGetEntitiesResponse,
)

Decodes the response from admin.auth.policy.getEntities.

pub fn policy_remove_entities(
  policy_name policy_name: String,
  entity_type entity_type: String,
  entity_ids entity_ids: List(String),
) -> slackline.Call(PolicyRemoveEntities, Nil)

admin.auth.policy.removeEntities: Remove specified entities from a specified authentication policy.

auth.PolicyRemoveEntities identifies this method in slackline.Call.

User token scopes: admin.users:write.

Rate limit tier: t4.

Documented errors: entity_not_found, feature_not_enabled, not_an_admin, policy_not_found.

✨ Search Document