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. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_steps#

Cancels a pending step or steps in a running cluster.

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

# cancel_steps method definition

def cancel_steps(
    self,
    *,
    ClusterId: str,
    StepIds: Sequence[str],
    StepCancellationOption: StepCancellationOptionType = ...,  # (1)
) -> CancelStepsOutputTypeDef:  # (2)
    ...
  1. See StepCancellationOptionType
  2. See CancelStepsOutputTypeDef
# cancel_steps method usage example with argument unpacking

kwargs: CancelStepsInputRequestTypeDef = {  # (1)
    "ClusterId": ...,
    "StepIds": ...,
}

parent.cancel_steps(**kwargs)
  1. See CancelStepsInputRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

def close(
    self,
) -> None:
    ...

create_security_configuration#

Creates a security configuration, which is stored in the service and can be specified when a cluster is created.

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

# create_security_configuration method definition

def create_security_configuration(
    self,
    *,
    Name: str,
    SecurityConfiguration: str,
) -> CreateSecurityConfigurationOutputTypeDef:  # (1)
    ...
  1. See CreateSecurityConfigurationOutputTypeDef
# create_security_configuration method usage example with argument unpacking

kwargs: CreateSecurityConfigurationInputRequestTypeDef = {  # (1)
    "Name": ...,
    "SecurityConfiguration": ...,
}

parent.create_security_configuration(**kwargs)
  1. See CreateSecurityConfigurationInputRequestTypeDef

create_studio#

Creates a new Amazon EMR Studio.

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

# create_studio method definition

def create_studio(
    self,
    *,
    Name: str,
    AuthMode: AuthModeType,  # (1)
    VpcId: str,
    SubnetIds: Sequence[str],
    ServiceRole: str,
    WorkspaceSecurityGroupId: str,
    EngineSecurityGroupId: str,
    DefaultS3Location: str,
    Description: str = ...,
    UserRole: str = ...,
    IdpAuthUrl: str = ...,
    IdpRelayStateParameterName: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    TrustedIdentityPropagationEnabled: bool = ...,
    IdcUserAssignment: IdcUserAssignmentType = ...,  # (3)
    IdcInstanceArn: str = ...,
    EncryptionKeyArn: str = ...,
) -> CreateStudioOutputTypeDef:  # (4)
    ...
  1. See AuthModeType
  2. See TagTypeDef
  3. See IdcUserAssignmentType
  4. See CreateStudioOutputTypeDef
# create_studio method usage example with argument unpacking

kwargs: CreateStudioInputRequestTypeDef = {  # (1)
    "Name": ...,
    "AuthMode": ...,
    "VpcId": ...,
    "SubnetIds": ...,
    "ServiceRole": ...,
    "WorkspaceSecurityGroupId": ...,
    "EngineSecurityGroupId": ...,
    "DefaultS3Location": ...,
}

parent.create_studio(**kwargs)
  1. See CreateStudioInputRequestTypeDef

create_studio_session_mapping#

Maps a user or group to the Amazon EMR Studio specified by StudioId, and applies a session policy to refine Studio permissions for that user or group.

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