Organization¶
Org¶
Secrets¶
- class organization.api.secrets.SecretsAPI(api_client)¶
- create(
- secret_name: str,
- description: str,
- key_value_list: List[str],
- org: str | None = None,
Create a secret.
The secret name must match the required pattern: ^[a-zA-Z\d_\.-]{1,63}$
The key_value_list argument is a list of strings formatted as <key:value>. The key and value pair must match the required pattern: ^[a-zA-Z\d_\.-]{1,63}:.*
Examples
["a_key:a_value", "another_key:another_value"]
["key_1:value_2", "12345:12345"]
- delete(
- secret_name: str,
- key_names: List[str],
- org: str | None = None,
Delete a secret.
- info(
- secret_name: str,
- key_names: List[str] | None = None,
- org: str | None = None,
Get info on a secret. All keys are filtered, except for keys included in key_names arg.
- list(org: str | None = None)¶
Get the list of available secrets for user.
- update(
- secret_name: str,
- description: str,
- disable: bool | None = False,
- enable: bool | None = False,
- key_value_list: List[str] | None = None,
- org: str | None = None,
Update a secret description and/or key-value pairs.
The key_value_list argument is a list of strings formatted as <key:value>. The key and value pair must match the required pattern: ^[a-zA-Z\d_\.-]{1,63}:.*
Examples
["a_key:a_value", "another_key:another_value"]
["key_1:value_2", "12345:12345"]
Storage¶
Team¶
- class organization.api.teams.TeamAPI(api_client)¶
- create(name: str, description: str, org: str | None = None)¶
Creates a team in an organization.
- info(name: str, org: str | None = None)¶
Get details of a given team name.
- list(org: str | None = None)¶
Get list of teams from an org.
- remove(name: str, org: str | None = None)¶
Removes a team from an organization.
- update(name: str, description: str, org: str | None = None)¶
Updates team information in an organization.
User¶
- class organization.api.users.UsersAPI(api_client)¶
- add_to_team(
- user_id: int,
- roles: List[str],
- org: str | None = None,
- team: str | None = None,
Adds a confirmed user to the specified team.
- create(
- email: str,
- name: str,
- roles: List[str],
- org: str | None = None,
- team: str | None = None,
Creates user in an organization. Or, if team_name specific, creates user in org/team.
- info(
- user_id: str,
- org: str | None = None,
- team: str | None = None,
Get details of a user.
- invitation_info(
- invitation_identifier: str,
- org: str | None = None,
- team: str | None = None,
Get details about a specific user invitation based using their unique Invitation ID or Invitation Email. By default, looks for specified-user's invitation in current org's invitations. If team_name specified, searches for specified-user's invitation in org/team invitations. User ID and Invitation ID are mutually exclusive. So if the user_id that is passed is a unique User ID, this method will return None. Only add-user commands for both org and team modules use the email argument. This is because the email is the only attribute of an invitation known to use when initially adding/inviting the user. Multiple invitations may be returned, as one email can have multiple invitations. When using the Invitation ID, there will only be one invitation returned. This is because an Invitation ID is either for an Organization or Team invitation.
- list(
- org: str | None = None,
- team: str | None = None,
- email_filter: str | None = None,
Get list of users from an org. If team name is provided filters on basis of it.
- list_invitations(
- org: str | None = None,
- team: str | None = None,
- email_filter: str | None = None,
Get list of UserInvitations for an org_name, or org/team if team is specified.
- remove(
- user_id: int,
- org: str | None = None,
- team: str | None = None,
Removes user from an organization. Or, if team_name specified, removes user from org/team.
- update(name: str)¶
Updates current user's information.
- who(org: str | None = None)¶
Returns information about the currently-configured user. The org parameter is a filter used for searching for information about the currently-configured user in that org.
If that org is invalid, an error is raised.
If org is not specified, the org from the current configuration is used.
If the org is valid, the response is basic meta data of the user, as well as user info from that org, user info from every team in that org, and the user's roles in that org and those teams.