Skip to content

EMRClient#

Index > EMR > EMRClient

Auto-generated documentation for EMR type annotations stubs module mypy-boto3-emr.

EMRClient#

Type annotations and code completion for boto3.client("emr"). boto3 documentation

# EMRClient usage example

from boto3.session import Session
from mypy_boto3_emr.client import EMRClient

def get_emr_client() -> EMRClient:
    return Session().client("emr")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("emr").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("emr")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InternalServerError,
    client.exceptions.InternalServerException,
    client.exceptions.InvalidRequestException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_emr.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

add_instance_fleet#

Adds an instance fleet to a running cluster.

Type annotations and code completion for boto3.client("emr").add_instance_fleet method. boto3 documentation

# add_instance_fleet method definition

def add_instance_fleet(
    self,
    *,
    ClusterId: str,
    InstanceFleet: InstanceFleetConfigTypeDef,  # (1)
) -> AddInstanceFleetOutputTypeDef:  # (2)
    ...
  1. See InstanceFleetConfigTypeDef
  2. See AddInstanceFleetOutputTypeDef
# add_instance_fleet method usage example with argument unpacking

kwargs: AddInstanceFleetInputRequestTypeDef = {  # (1)
    "ClusterId": ...,
    "InstanceFleet": ...,
}

parent.add_instance_fleet(**kwargs)
  1. See AddInstanceFleetInputRequestTypeDef

add_instance_groups#

Adds one or more instance groups to a running cluster.

Type annotations and code completion for boto3.client("emr").add_instance_groups method. boto3 documentation

# add_instance_groups method definition

def add_instance_groups(
    self,
    *,
    InstanceGroups: Sequence[InstanceGroupConfigTypeDef],  # (1)
    JobFlowId: str,
) -> AddInstanceGroupsOutputTypeDef:  # (2)
    ...
  1. See InstanceGroupConfigTypeDef
  2. See AddInstanceGroupsOutputTypeDef
# add_instance_groups method usage example with argument unpacking

kwargs: AddInstanceGroupsInputRequestTypeDef = {  # (1)
    "InstanceGroups": ...,
    "JobFlowId": ...,
}

parent.add_instance_groups(**kwargs)
  1. See AddInstanceGroupsInputRequestTypeDef

add_job_flow_steps#

AddJobFlowSteps adds new steps to a running cluster.

Type annotations and code completion for boto3.client("emr").add_job_flow_steps method. boto3 documentation

# add_job_flow_steps method definition

def add_job_flow_steps(
    self,
    *,
    JobFlowId: str,
    Steps: Sequence[Union[StepConfigTypeDef, StepConfigOutputTypeDef]],  # (1)
    ExecutionRoleArn: str = ...,
) -> AddJobFlowStepsOutputTypeDef:  # (2)
    ...
  1. See StepConfigTypeDef StepConfigOutputTypeDef
  2. See AddJobFlowStepsOutputTypeDef
# add_job_flow_steps method usage example with argument unpacking

kwargs: AddJobFlowStepsInputRequestTypeDef = {  # (1)
    "JobFlowId": ...,
    "Steps": ...,
}

parent.add_job_flow_steps(**kwargs)
  1. See AddJobFlowStepsInputRequestTypeDef

add_tags#

Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio.

Type annotations and code completion for boto3.client("emr").add_tags method. boto3 documentation

# add_tags method definition

def add_tags(
    self,
    *,
    ResourceId: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# add_tags method usage example with argument unpacking

kwargs: AddTagsInputRequestTypeDef = {  # (1)
    "ResourceId": ...,
    "Tags": ...,
}

parent.add_tags(**kwargs)
  1. See AddTagsInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("emr").can_paginate method.