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

Pyjo.AWS.Credentials.Provider, Pyjo.AWS.Credentials.

Classes

class Pyjo.AWS.Credentials.Static.Pyjo_AWS_Credentials_Static(value: Pyjo_AWS_Credentials, **kwargs: Any)[source]

Pyjo.AWS.Credentials.Static inherits all attributes and methods from Pyjo.AWS.Credentials.Provider and 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.Static object, with the options of Pyjo.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 value comes 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.