Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

CredentialsService

Functions
create @classmethod
save_credentials : SaveCredentialsDTO
Return type : Credentials
delete @classmethod
credentials_id : str
find_by_name @classmethod
name : str
Return type : gws_core.credentials.credentials.Credentials | None
find_by_name_and_check @classmethod
name : str
type_ : CredentialsType
Return type : Credentials
get_all @classmethod
page : int - 0
number_of_items_per_page : int - 20
Return type : Paginator
get_by_id_and_check @classmethod
credentials_id : str
Return type : Credentials
get_credentials_data @classmethod

Read the credentials details, need user credentials to double check

credentials_id : str
user_credentials : UserCredentialsDTO
Return type : dict
get_credentials_data_specs @classmethod

Return the specs of all credentials data types

Return type : CredentialsDataSpecsDTO
get_lab_credentials_data_by_api_key @classmethod

Return the lab credentials that match the api key

api_key : str
Return type : gws_core.credentials.credentials_type.CredentialsDataLab | None
get_or_create_basic_credential @classmethod

Get or create a BASIC credential. If the credential exists, check that it's BASIC type and return it. Otherwise create a new BASIC credential.

name : str
Name of the credential
username : str
Username for the credential
password : str | None
Password for the credential. If not provided, a random 30-character password will be generated
url : str | None
Optional URL for the credential
description : str | None
Optional description for the credential
Return type : Credentials
get_s3_credentials_data_by_access_key @classmethod

Return the S3 credentials that match the access key id

access_key_id : str
Return type : gws_core.credentials.credentials_type.CredentialsDataS3 | gws_core.credentials.credentials_type.CredentialsDataS3LabServer | None
update @classmethod
id_ : str
save_credentials : SaveCredentialsDTO
Return type : Credentials
update_basic_credential @classmethod

Update an existing BASIC credential. If the credential does not exist or is not of type BASIC, an exception is raised.

credentials_name : str
Name of the credential to update
credentials_data : CredentialsDataBasic
description : str | None
New optional description for the credential
Return type : Credentials
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.