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
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 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 | |