start_session
async
¶
start_session(
*,
config_overrides: Optional[AsyncEMRClientConfig] = None,
name: Optional[XmlStringMaxLen256] = None,
cluster_id: Optional[ClusterId] = None,
execution_role_arn: Optional[IAMRoleArn] = None,
engine_configurations: Optional[ConfigurationList] = None,
monitoring_configuration: Optional[SessionMonitoringConfiguration] = None,
session_idle_timeout_in_minutes: Optional[Long] = None,
client_request_token: Optional[ClientRequestToken] = None,
tags: Optional[TagList] = None,
) -> StartSessionOutput
Creates and starts a new Spark Connect session on the specified cluster. The cluster must be in the RUNNING or WAITING state and have sessions enabled. This operation is supported in Amazon EMR Spark 8.0.0 and later.
Parameters:
-
name(Optional[XmlStringMaxLen256], default:None) –An optional name for the session.
-
cluster_id(Optional[ClusterId], default:None) –The ID of the cluster on which to start the session.
-
execution_role_arn(Optional[IAMRoleArn], default:None) –The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.
-
engine_configurations(Optional[ConfigurationList], default:None) –The configuration overrides for the session. Only runtime configuration overrides are supported.
-
monitoring_configuration(Optional[SessionMonitoringConfiguration], default:None) –The monitoring configuration that controls where session logs are published, such as Amazon S3, CloudWatch, or managed logging.
-
session_idle_timeout_in_minutes(Optional[Long], default:None) –The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR EC2 automatically terminates it.
-
client_request_token(Optional[ClientRequestToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client request token, the service returns the original response without performing the operation again.
-
tags(Optional[TagList], default:None) –The tags to assign to the session.
Raises:
-
InternalServerException–This exception occurs when there is an internal failure in the Amazon EMR service.
-
InvalidRequestException–This exception occurs when there is something wrong with user input.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_emr/_services/async_emr.py
4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 | |