Adds an instance fleet to a running cluster.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.
Parameters:
Raises:
Source code in docs_src/capo_emr/_services/emr.py
| def add_instance_fleet(
self,
*,
config_overrides: Optional[EMRClientConfig] = None,
cluster_id: Optional[
"capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
] = None,
instance_fleet: Optional[
"capo_emr.types.instance_fleet_config.InstanceFleetConfig"
] = None,
) -> "capo_emr.types.add_instance_fleet_output.AddInstanceFleetOutput":
"""<p>Adds an instance fleet to a running cluster.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.</p> </note>
Args:
cluster_id: <p>The unique identifier of the cluster.</p>
instance_fleet: <p>Specifies the configuration of the instance fleet.</p>
Raises:
capo_emr.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon EMR service.</p>
capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_emr.types.add_instance_fleet_input.AddInstanceFleetInput]",
) -> OperationResponse[
"capo_emr.types.add_instance_fleet_output.AddInstanceFleetOutput"
]:
import capo_emr._operations.elastic_map_reduce.add_instance_fleet
output, http_response = (
capo_emr._operations.elastic_map_reduce.add_instance_fleet.add_instance_fleet(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddInstanceFleet")
)
input_: capo_emr.types.add_instance_fleet_input.AddInstanceFleetInput = {}
if cluster_id is not None:
input_["cluster_id"] = cluster_id
if instance_fleet is not None:
input_["instance_fleet"] = instance_fleet
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|