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
4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 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 | |