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
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 4253 4254 4255 4256 4257 4258 4259 4260 4261 | |