Provides all available details about the instance groups in a cluster.
Parameters:
-
cluster_id
(Optional[ClusterId], default:
None
)
–
The identifier of the cluster for which to list the instance groups.
-
marker
(Optional[Marker], default:
None
)
–
The pagination token that indicates the next set of results to retrieve.
Raises:
Source code in docs_src/capo_emr/_services/emr.py
| def list_instance_groups(
self,
*,
config_overrides: Optional[EMRClientConfig] = None,
cluster_id: Optional["capo_emr.types.cluster_id.ClusterId"] = None,
marker: Optional["capo_emr.types.marker.Marker"] = None,
) -> "capo_emr.types.list_instance_groups_output.ListInstanceGroupsOutput":
"""<p>Provides all available details about the instance groups in a cluster.</p>
Args:
cluster_id: <p>The identifier of the cluster for which to list the instance groups.</p>
marker: <p>The pagination token that indicates the next set of results to retrieve.</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.list_instance_groups_input.ListInstanceGroupsInput]",
) -> OperationResponse[
"capo_emr.types.list_instance_groups_output.ListInstanceGroupsOutput"
]:
import capo_emr._operations.elastic_map_reduce.list_instance_groups
output, http_response = (
capo_emr._operations.elastic_map_reduce.list_instance_groups.list_instance_groups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListInstanceGroups")
)
input_: capo_emr.types.list_instance_groups_input.ListInstanceGroupsInput = {}
if cluster_id is not None:
input_["cluster_id"] = cluster_id
if marker is not None:
input_["marker"] = marker
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|