start_session
¶
start_session(
*,
config_overrides: Optional[EMRClientConfig] = 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/emr.py
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 | |