boto3.session.
Session
(aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, region_name=None, botocore_session=None, profile_name=None)[source]¶A session stores configuration state and allows you to create service clients and resources.
available_profiles
¶The profiles available to the session credentials
client
(service_name, region_name=None, api_version=None, use_ssl=True, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, config=None)[source]¶Create a low-level service client by name.
get_available_services()
.Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values:
use_ssl
is ignored.Service client instance
events
¶The event emitter for a session
get_available_partitions
()[source]¶Lists the available partitions
get_available_regions
(service_name, partition_name='aws', allow_non_regional=False)[source]¶Lists the region and endpoint names of a particular partition.
The list of regions returned by this method are regions that are explicitly known by the client to exist and is not comprehensive. A region not returned in this list may still be available for the provided service.
Returns a list of endpoint names (e.g., ["us-east-1"]).
get_available_resources
()[source]¶Get a list of available services that can be loaded as resource
clients via Session.resource()
.
get_available_services
()[source]¶Get a list of available services that can be loaded as low-level
clients via Session.client()
.
get_credentials
()[source]¶Return the botocore.credentials.Credentials
object
associated with this session. If the credentials have not
yet been loaded, this will attempt to load them. If they
have already been loaded, this will return the cached
credentials.
get_partition_for_region
(region_name)[source]¶Lists the partition name of a particular region.
profile_name
¶The read-only profile name.
region_name
¶The read-only region name.
resource
(service_name, region_name=None, api_version=None, use_ssl=True, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, config=None)[source]¶Create a resource service client by name.
get_available_resources()
.Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values:
use_ssl
is ignored.Advanced client configuration options. If region_name is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a region_name value passed explicitly to the method. If user_agent_extra is specified in the client config, it overrides the default user_agent_extra provided by the resource API. See botocore config documentation for more details.
Subclass of ServiceResource