start_session
async
¶
start_session(
work_group: WorkGroupName,
engine_configuration: EngineConfiguration,
*,
config_overrides: Optional[AsyncAthenaClientConfig] = None,
description: Optional[DescriptionString] = None,
execution_role: Optional[RoleArn] = None,
monitoring_configuration: Optional[MonitoringConfiguration] = None,
notebook_version: Optional[NameString] = None,
session_idle_timeout_in_minutes: Optional[SessionIdleTimeoutInMinutes] = None,
client_request_token: Optional[IdempotencyToken] = None,
tags: Optional[TagList] = None,
copy_work_group_tags: Optional[BoxedBoolean] = None,
) -> StartSessionResponse
Creates a session for running calculations within a workgroup. The session is ready when it reaches an IDLE state.
Parameters:
-
description(Optional[DescriptionString], default:None) –The session description.
-
work_group(WorkGroupName) –The workgroup to which the session belongs.
-
engine_configuration(EngineConfiguration) –Contains engine data processing unit (DPU) configuration settings and parameter mappings.
-
execution_role(Optional[RoleArn], default:None) –The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
-
monitoring_configuration(Optional[MonitoringConfiguration], default:None) –Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon CloudWatch log groups etc.
-
notebook_version(Optional[NameString], default:None) –The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is
Athena notebook version 1. If you specify a value forNotebookVersion, you must also specify a value forNotebookId. See EngineConfiguration$AdditionalConfigs. -
session_idle_timeout_in_minutes(Optional[SessionIdleTimeoutInMinutes], default:None) –The idle timeout in minutes for the session.
-
client_request_token(Optional[IdempotencyToken], default:None) –A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another
StartSessionRequestis received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
-
tags(Optional[TagList], default:None) –A list of comma separated tags to add to the session that is created.
-
copy_work_group_tags(Optional[BoxedBoolean], default:None) –Copies the tags from the Workgroup to the Session when.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
ResourceNotFoundException–A resource, such as a workgroup, was not found.
-
SessionAlreadyExistsException–The specified session already exists.
-
TooManyRequestsException–Indicates that the request was throttled.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/async_athena.py
3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 | |