aws_encryption_sdk.keyrings.aws_kms.client_suppliers¶
AWS KMS client suppliers for use with AWS KMS keyring.
New in version 1.5.0.
Classes
AllowRegionsClientSupplier(allowed_regions) |
AWS KMS client supplier that only supplies clients for the specified regions. |
ClientSupplier |
Base class for client suppliers. |
DefaultClientSupplier([botocore_session, …]) |
The default AWS KMS client supplier. |
DenyRegionsClientSupplier(denied_regions[, …]) |
AWS KMS client supplier that supplies clients for any region except for the specified regions. |
-
class
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.ClientSupplier¶ Bases:
objectBase class for client suppliers.
New in version 1.5.0.
-
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.ClientSupplierType¶ alias of
typing.Callable
-
class
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.DefaultClientSupplier(botocore_session=NOTHING, client_config=NOTHING)¶ Bases:
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.ClientSupplierThe default AWS KMS client supplier. Creates and caches clients for any region.
New in version 1.5.0.
If you want clients to have special credentials or other configuration, you can provide those with custom
botocoreSession and/or Config instances.from aws_encryption_sdk.keyrings.aws_kms.client_supplier import DefaultClientSupplier from botocore.session import Session from botocore.config import Config my_client_supplier = DefaultClientSupplier( botocore_session=Session(**_get_custom_credentials()), client_config=Config(connect_timeout=10), )
Parameters: - botocore_session (botocore.session.Session) – Botocore session to use when creating clients (optional)
- client_config (botocore.config.Config) – Config to use when creating client (optional)
-
class
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.AllowRegionsClientSupplier(allowed_regions, client_supplier=NOTHING)¶ Bases:
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.ClientSupplierAWS KMS client supplier that only supplies clients for the specified regions.
New in version 1.5.0.
Parameters: - allowed_regions (List[str]) – Regions to allow
- client_supplier (ClientSupplier) – Client supplier to wrap (optional)
-
class
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.DenyRegionsClientSupplier(denied_regions, client_supplier=NOTHING)¶ Bases:
aws_encryption_sdk.keyrings.aws_kms.client_suppliers.ClientSupplierAWS KMS client supplier that supplies clients for any region except for the specified regions.
New in version 1.5.0.
Parameters: - denied_regions (List[str]) – Regions to deny
- client_supplier (ClientSupplier) – Client supplier to wrap (optional)