Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
Parameters:
Raises:
Source code in docs_src/capo_emr/_services/async_emr.py
| async def modify_instance_fleet(
self,
*,
config_overrides: Optional[AsyncEMRClientConfig] = None,
cluster_id: Optional["capo_emr.types.cluster_id.ClusterId"] = None,
instance_fleet: Optional[
"capo_emr.types.instance_fleet_modify_config.InstanceFleetModifyConfig"
] = None,
) -> None:
"""<p>Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p> </note>
Args:
cluster_id: <p>The unique identifier of the cluster.</p>
instance_fleet: <p>The configuration parameters 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_emr.types.modify_instance_fleet_input.ModifyInstanceFleetInput]",
) -> AsyncOperationResponse[None]:
import capo_emr._operations.elastic_map_reduce.modify_instance_fleet
(
output,
http_response,
) = await capo_emr._operations.elastic_map_reduce.modify_instance_fleet.async_modify_instance_fleet(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ModifyInstanceFleet")
)
input_: capo_emr.types.modify_instance_fleet_input.ModifyInstanceFleetInput = {}
if cluster_id is not None:
input_["cluster_id"] = cluster_id
if instance_fleet is not None:
input_["instance_fleet"] = instance_fleet
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|