Pyjo.AWS.Credentials.Static - Credentials that do not change¶
from Pyjo.AWS.Credentials import Credentials
from Pyjo.AWS.Credentials.Static import Static
provider = Static(Credentials(access_key_id='AKIDEXAMPLE', secret_access_key='secret'))
# Or import the module, as in Google Python Style Guide
import Pyjo.AWS.Client
import Pyjo.AWS.Credentials
import Pyjo.AWS.Credentials.Static
credentials = Pyjo.AWS.Credentials.new(access_key_id='AKIDEXAMPLE', secret_access_key='secret')
sts = Pyjo.AWS.Client.new(service='sts', credentials=Pyjo.AWS.Credentials.Static.new(credentials))
Pyjo.AWS.Credentials.Static is the provider of credentials that it
is given, as those of a program of its own, or the keys of a profile that
are the source of its role.
See also¶
Classes¶
- class Pyjo.AWS.Credentials.Static.Pyjo_AWS_Credentials_Static(value: Pyjo_AWS_Credentials, **kwargs: Any)[source]¶
Pyjo.AWS.Credentials.Staticinherits all attributes and methods fromPyjo.AWS.Credentials.Providerand implements the following new ones.- __init__(value: Pyjo_AWS_Credentials, **kwargs: Any) None[source]¶
provider = Pyjo.AWS.Credentials.Static.new(credentials)
Construct a new
Pyjo.AWS.Credentials.Staticobject, with the options ofPyjo.AWS.Credentials.Provider.
- async fetch() Pyjo_AWS_Credentials | None[source]¶
credentials = await provider.fetch()
The credentials of
value.
- is_fresh() bool[source]¶
boolean = provider.is_fresh()
Always false, so that a change of
valuecomes at once, as getting them costs nothing.
- value¶
credentials = provider.value provider.value = Pyjo.AWS.Credentials.new(access_key_id='AKIDEXAMPLE', secret_access_key='secret')
The credentials of the provider.