aws_session_recorder.lib package

Submodules

aws_session_recorder.lib.helpers module

class aws_session_recorder.lib.helpers.AlwaysDoNothing[source]

Bases: object

aws_session_recorder.lib.session module

Main module.

class aws_session_recorder.lib.session.Session(connection_string: str = 'sqlite:////home/docs/checkouts/readthedocs.org/user_builds/aws-session-recorder/checkouts/latest/docs/sqlite.db', *args, **kwargs)[source]

Bases: boto3.session.Session

Base: sqlalchemy.ext.declarative.api.DeclarativeMeta
client(*args, **kwargs)[source]

Create a low-level service client by name.

Parameters
  • service_name (string) – The name of a service, e.g. ‘s3’ or ‘ec2’. You can get a list of available services via get_available_services().

  • region_name (string) – The name of the region associated with the client. A client is associated with a single region.

  • api_version (string) – The API version to use. By default, botocore will use the latest API version when creating a client. You only need to specify this parameter if you want to use a previous API version of the client.

  • use_ssl (boolean) – Whether or not to use SSL. By default, SSL is used. Note that not all services support non-ssl connections.

  • verify (boolean/string) –

    Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values:

    • False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified.

    • path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore.

  • endpoint_url (string) – The complete URL to use for the constructed client. Normally, botocore will automatically construct the appropriate URL to use when communicating with a service. You can specify a complete URL (including the “http/https” scheme) to override this behavior. If this value is provided, then use_ssl is ignored.

  • aws_access_key_id (string) – The access key to use when creating the client. This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. You only need to provide this argument if you want to override the credentials used for this specific client.

  • aws_secret_access_key (string) – The secret key to use when creating the client. Same semantics as aws_access_key_id above.

  • aws_session_token (string) – The session token to use when creating the client. Same semantics as aws_access_key_id above.

  • config (botocore.client.Config) – 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. See botocore config documentation for more details.

Returns

Service client instance

db: sqlalchemy.orm.session.Session
record_request(params: dict, model: botocore.model.OperationModel, context: dict, event_name: str, *args, **kwargs)[source]
record_response(http_response: botocore.awsrequest.AWSResponse, parsed: dict, model: botocore.model.OperationModel, context: dict, event_name: str, *args, **kwargs)[source]
setup(connection_string: str)[source]

Module contents