antikythera_aws v0.1.4 AntikytheraAws.Auth.Credentials View Source

Link to this section Summary

Functions

Type-aware getter for access_key_id.

Type-aware setter for access_key_id.

Creates a new instance of AntikytheraAws.Auth.Credentials by using the given dict.

A variant of new/1 which returns t or raise if validation fails.

Type-aware getter for secret_access_key.

Type-aware setter for secret_access_key.

Type-aware getter for security_token.

Type-aware setter for security_token.

Type-aware getter for source_type.

Type-aware setter for source_type.

Updates an existing instance of AntikytheraAws.Auth.Credentials with the given dict. The values in the dict are validated by each field's valid?/1 function. Returns {:ok, valid_struct} or {:error, reason}.

A variant of update/2 which returns t or raise if validation fails. In other words, update/2 followed by Croma.Result.get!/1.

Checks if the given value belongs to t/0 or not.

Link to this section Types

Link to this type

t()

View Source
t() :: %AntikytheraAws.Auth.Credentials{
  access_key_id: Croma.String.t(),
  secret_access_key: Croma.String.t(),
  security_token: Croma.TypeGen.Nilable.Croma.String.t(),
  source_type: AntikytheraAws.Auth.SourceType.t()
}

Link to this section Functions

Link to this function

access_key_id(credentials)

View Source
access_key_id(t()) :: Croma.String.t()

Type-aware getter for access_key_id.

Link to this function

access_key_id(s, field)

View Source
access_key_id(t(), Croma.String.t()) :: t()

Type-aware setter for access_key_id.

Creates a new instance of AntikytheraAws.Auth.Credentials by using the given dict.

Returns {:ok, valid_struct} or {:error, reason}.

The values in the dict are validated by each field's valid?/1 function. If the value was invalid, it will be passed to new/1 of the field

For missing fields, followings will be tried:

  • default/0 of each field type
  • new/1 of each field type, with empty map as input

A variant of new/1 which returns t or raise if validation fails.

In other words, new/1 followed by Croma.Result.get!/1.

Link to this function

secret_access_key(credentials)

View Source
secret_access_key(t()) :: Croma.String.t()

Type-aware getter for secret_access_key.

Link to this function

secret_access_key(s, field)

View Source
secret_access_key(t(), Croma.String.t()) :: t()

Type-aware setter for secret_access_key.

Link to this function

security_token(credentials)

View Source
security_token(t()) :: Croma.TypeGen.Nilable.Croma.String.t()

Type-aware getter for security_token.

Link to this function

security_token(s, field)

View Source
security_token(t(), Croma.TypeGen.Nilable.Croma.String.t()) :: t()

Type-aware setter for security_token.

Link to this function

source_type(credentials)

View Source
source_type(t()) :: AntikytheraAws.Auth.SourceType.t()

Type-aware getter for source_type.

Link to this function

source_type(s, field)

View Source
source_type(t(), AntikytheraAws.Auth.SourceType.t()) :: t()

Type-aware setter for source_type.

Updates an existing instance of AntikytheraAws.Auth.Credentials with the given dict. The values in the dict are validated by each field's valid?/1 function. Returns {:ok, valid_struct} or {:error, reason}.

Link to this function

update!(s, dict)

View Source
update!(t(), Dict.t()) :: t()

A variant of update/2 which returns t or raise if validation fails. In other words, update/2 followed by Croma.Result.get!/1.

Checks if the given value belongs to t/0 or not.