start_session
¶
start_session(
work_group: WorkGroupName,
engine_configuration: EngineConfiguration,
*,
config_overrides: Optional[AthenaClientConfig] = 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/athena.py
3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 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 | |