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
4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 | |