Emr class

Amazon EMR is a web service that makes it easier to process large amounts of data efficiently. Amazon EMR uses Hadoop processing combined with several Amazon Web Services services to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific simulation, and data warehouse management.

Constructors

Emr({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInstanceFleet({required String clusterId, required InstanceFleetConfig instanceFleet}) Future<AddInstanceFleetOutput>
Adds an instance fleet to a running cluster.
addInstanceGroups({required List<InstanceGroupConfig> instanceGroups, required String jobFlowId}) Future<AddInstanceGroupsOutput>
Adds one or more instance groups to a running cluster.
addJobFlowSteps({required String jobFlowId, required List<StepConfig> steps, String? executionRoleArn}) Future<AddJobFlowStepsOutput>
AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed in each job flow.
addTags({required String resourceId, required List<Tag> tags, String? clusterId}) Future<void>
Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.
cancelSteps({required String clusterId, required List<String> stepIds, StepCancellationOption? stepCancellationOption}) Future<CancelStepsOutput>
Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee that a step will be canceled, even if the request is successfully submitted. When you use Amazon EMR releases 5.28.0 and later, you can cancel steps that are in a PENDING or RUNNING state. In earlier versions of Amazon EMR, you can only cancel steps that are in a PENDING state.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createPersistentAppUI({required String targetResourceArn, EMRContainersConfig? eMRContainersConfig, ProfilerType? profilerType, List<Tag>? tags, String? xReferer}) Future<CreatePersistentAppUIOutput>
Creates a persistent application user interface.
createSecurityConfiguration({required String name, required String securityConfiguration}) Future<CreateSecurityConfigurationOutput>
Creates a security configuration, which is stored in the service and can be specified when a cluster is created.
createStudio({required AuthMode authMode, required String defaultS3Location, required String engineSecurityGroupId, required String name, required String serviceRole, required List<String> subnetIds, required String vpcId, required String workspaceSecurityGroupId, String? description, String? encryptionKeyArn, String? idcInstanceArn, IdcUserAssignment? idcUserAssignment, String? idpAuthUrl, String? idpRelayStateParameterName, List<Tag>? tags, bool? trustedIdentityPropagationEnabled, String? userRole}) Future<CreateStudioOutput>
Creates a new Amazon EMR Studio.
createStudioSessionMapping({required IdentityType identityType, required String sessionPolicyArn, required String studioId, String? identityId, String? identityName}) Future<void>
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. Use CreateStudioSessionMapping to assign users to a Studio when you use IAM Identity Center authentication. For instructions on how to assign users to a Studio when you use IAM authentication, see Assign a user or group to your EMR Studio.
deleteSecurityConfiguration({required String name}) Future<void>
Deletes a security configuration.
deleteStudio({required String studioId}) Future<void>
Removes an Amazon EMR Studio from the Studio metadata store.
deleteStudioSessionMapping({required IdentityType identityType, required String studioId, String? identityId, String? identityName}) Future<void>
Removes a user or group from an Amazon EMR Studio.
describeCluster({required String clusterId}) Future<DescribeClusterOutput>
Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.
describeJobFlows({DateTime? createdAfter, DateTime? createdBefore, List<String>? jobFlowIds, List<JobFlowExecutionState>? jobFlowStates}) Future<DescribeJobFlowsOutput>
This API is no longer supported and will eventually be removed. We recommend you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.
describeNotebookExecution({required String notebookExecutionId}) Future<DescribeNotebookExecutionOutput>
Provides details of a notebook execution.
describePersistentAppUI({required String persistentAppUIId}) Future<DescribePersistentAppUIOutput>
Describes a persistent application user interface.
describeReleaseLabel({int? maxResults, String? nextToken, String? releaseLabel}) Future<DescribeReleaseLabelOutput>
Provides Amazon EMR release label details, such as the releases available the Region where the API request is run, and the available applications for a specific Amazon EMR release label. Can also list Amazon EMR releases that support a specified version of Spark.
describeSecurityConfiguration({required String name}) Future<DescribeSecurityConfigurationOutput>
Provides the details of a security configuration by returning the configuration JSON.
describeStep({required String clusterId, required String stepId}) Future<DescribeStepOutput>
Provides more detail about the cluster step.
describeStudio({required String studioId}) Future<DescribeStudioOutput>
Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.
getAutoTerminationPolicy({required String clusterId}) Future<GetAutoTerminationPolicyOutput>
Returns the auto-termination policy for an Amazon EMR cluster.
getBlockPublicAccessConfiguration() Future<GetBlockPublicAccessConfigurationOutput>
Returns the Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.
getClusterSessionCredentials({required String clusterId, String? executionRoleArn}) Future<GetClusterSessionCredentialsOutput>
Provides temporary, HTTP basic credentials that are associated with a given runtime IAM role and used by a cluster with fine-grained access control activated. You can use these credentials to connect to cluster endpoints that support username and password authentication.
getManagedScalingPolicy({required String clusterId}) Future<GetManagedScalingPolicyOutput>
Fetches the attached managed scaling policy for an Amazon EMR cluster.
getOnClusterAppUIPresignedURL({required String clusterId, String? applicationId, bool? dryRun, String? executionRoleArn, OnClusterAppUIType? onClusterAppUIType}) Future<GetOnClusterAppUIPresignedURLOutput>
The presigned URL properties for the cluster's application user interface.
getPersistentAppUIPresignedURL({required String persistentAppUIId, String? applicationId, bool? authProxyCall, String? executionRoleArn, PersistentAppUIType? persistentAppUIType}) Future<GetPersistentAppUIPresignedURLOutput>
The presigned URL properties for the cluster's application user interface.
getSession({required String clusterId, required String sessionId}) Future<GetSessionOutput>
Returns detailed information about a session.
getSessionEndpoint({required String clusterId, required String sessionId}) Future<GetSessionEndpointOutput>
Returns the Spark Connect endpoint URL and a time-limited authentication token for the specified session. Use the endpoint and token to connect a PySpark client to the session. Call this operation again when the token expires to obtain a new one.
getStudioSessionMapping({required IdentityType identityType, required String studioId, String? identityId, String? identityName}) Future<GetStudioSessionMappingOutput>
Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).
listBootstrapActions({required String clusterId, String? marker}) Future<ListBootstrapActionsOutput>
Provides information about the bootstrap actions associated with a cluster.
listClusters({List<ClusterState>? clusterStates, DateTime? createdAfter, DateTime? createdBefore, String? marker}) Future<ListClustersOutput>
Provides the status of all clusters visible to this Amazon Web Services account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters in unsorted order per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.
listInstanceFleets({required String clusterId, String? marker}) Future<ListInstanceFleetsOutput>
Lists all available details about the instance fleets in a cluster.
listInstanceGroups({required String clusterId, String? marker}) Future<ListInstanceGroupsOutput>
Provides all available details about the instance groups in a cluster.
listInstances({required String clusterId, String? instanceFleetId, InstanceFleetType? instanceFleetType, String? instanceGroupId, List<InstanceGroupType>? instanceGroupTypes, List<InstanceState>? instanceStates, String? marker}) Future<ListInstancesOutput>
Provides information for all active Amazon EC2 instances and Amazon EC2 instances terminated in the last 30 days, up to a maximum of 2,000. Amazon EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.
listNotebookExecutions({String? editorId, String? executionEngineId, DateTime? from, String? marker, NotebookExecutionStatus? status, DateTime? to}) Future<ListNotebookExecutionsOutput>
Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple ListNotebookExecutions calls.
listReleaseLabels({ReleaseLabelFilter? filters, int? maxResults, String? nextToken}) Future<ListReleaseLabelsOutput>
Retrieves release labels of Amazon EMR services in the Region where the API is called.
listSecurityConfigurations({String? marker}) Future<ListSecurityConfigurationsOutput>
Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.
listSessions({required String clusterId, int? maxResults, String? nextToken, List<SessionState>? sessionStates}) Future<ListSessionsOutput>
Lists the sessions on a cluster. You can filter the results by session state. Newer sessions are returned first.
listSteps({required String clusterId, String? marker, List<String>? stepIds, List<StepState>? stepStates}) Future<ListStepsOutput>
Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request or filter by StepStates. You can specify a maximum of 10 stepIDs. The CLI automatically paginates results to return a list greater than 50 steps. To return more than 50 steps using the CLI, specify a Marker, which is a pagination token that indicates the next set of steps to retrieve.
listStudios({String? marker}) Future<ListStudiosOutput>
Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.
listStudioSessionMappings({IdentityType? identityType, String? marker, String? studioId}) Future<ListStudioSessionMappingsOutput>
Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.
listSupportedInstanceTypes({required String releaseLabel, String? marker}) Future<ListSupportedInstanceTypesOutput>
A list of the instance types that Amazon EMR supports. You can filter the list by Amazon Web Services Region and Amazon EMR release.
modifyCluster({required String clusterId, bool? extendedSupport, int? stepConcurrencyLevel}) Future<ModifyClusterOutput>
Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.
modifyInstanceFleet({required String clusterId, required InstanceFleetModifyConfig instanceFleet}) Future<void>
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.
modifyInstanceGroups({String? clusterId, List<InstanceGroupModifyConfig>? instanceGroups}) Future<void>
ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putAutoScalingPolicy({required AutoScalingPolicy autoScalingPolicy, required String clusterId, required String instanceGroupId}) Future<PutAutoScalingPolicyOutput>
Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in response to the value of a CloudWatch metric.
putAutoTerminationPolicy({required String clusterId, AutoTerminationPolicy? autoTerminationPolicy}) Future<void>
Control cluster termination
putBlockPublicAccessConfiguration({required BlockPublicAccessConfiguration blockPublicAccessConfiguration}) Future<void>
Creates or updates an Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.
putManagedScalingPolicy({required String clusterId, required ManagedScalingPolicy managedScalingPolicy}) Future<void>
Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
removeAutoScalingPolicy({required String clusterId, required String instanceGroupId}) Future<void>
Removes an automatic scaling policy from a specified instance group within an Amazon EMR cluster.
removeAutoTerminationPolicy({required String clusterId}) Future<void>
Removes an auto-termination policy from an Amazon EMR cluster.
removeManagedScalingPolicy({required String clusterId}) Future<void>
Removes a managed scaling policy from a specified Amazon EMR cluster.
removeTags({required String resourceId, required List<String> tagKeys, String? clusterId}) Future<void>
Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.
runJobFlow({required JobFlowInstancesConfig instances, required String name, String? additionalInfo, String? amiVersion, List<Application>? applications, String? autoScalingRole, AutoTerminationPolicy? autoTerminationPolicy, List<BootstrapActionConfig>? bootstrapActions, List<Configuration>? configurations, String? customAmiId, int? ebsRootVolumeIops, int? ebsRootVolumeSize, int? ebsRootVolumeThroughput, bool? extendedSupport, String? jobFlowRole, KerberosAttributes? kerberosAttributes, String? logEncryptionKmsKeyId, String? logUri, ManagedScalingPolicy? managedScalingPolicy, MonitoringConfiguration? monitoringConfiguration, List<SupportedProductConfig>? newSupportedProducts, String? oSReleaseLabel, List<PlacementGroupConfig>? placementGroupConfigs, String? releaseLabel, RepoUpgradeOnBoot? repoUpgradeOnBoot, ScaleDownBehavior? scaleDownBehavior, String? securityConfiguration, String? serviceRole, bool? sessionEnabled, int? stepConcurrencyLevel, String? stepExecutionRoleArn, List<StepConfig>? steps, List<String>? supportedProducts, List<Tag>? tags, bool? visibleToAllUsers}) Future<RunJobFlowOutput>
RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter is set to TRUE, the cluster transitions to the WAITING state rather than shutting down after the steps have completed.
setKeepJobFlowAliveWhenNoSteps({required List<String> jobFlowIds, required bool keepJobFlowAliveWhenNoSteps}) Future<void>
You can use the SetKeepJobFlowAliveWhenNoSteps to configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. If you want a transient cluster that shuts down after the last of the current executing steps are completed, you can configure SetKeepJobFlowAliveWhenNoSteps to false. If you want a long running cluster, configure SetKeepJobFlowAliveWhenNoSteps to true.
setTerminationProtection({required List<String> jobFlowIds, required bool terminationProtected}) Future<void>
SetTerminationProtection locks a cluster (job flow) so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all Amazon EC2 instances in a cluster.
setUnhealthyNodeReplacement({required List<String> jobFlowIds, required bool unhealthyNodeReplacement}) Future<void>
Specify whether to enable unhealthy node replacement, which lets Amazon EMR gracefully replace core nodes on a cluster if any nodes become unhealthy. For example, a node becomes unhealthy if disk usage is above 90%. If unhealthy node replacement is on and TerminationProtected are off, Amazon EMR immediately terminates the unhealthy core nodes. To use unhealthy node replacement and retain unhealthy core nodes, use to turn on termination protection. In such cases, Amazon EMR adds the unhealthy nodes to a denylist, reducing job interruptions and failures.
setVisibleToAllUsers({required List<String> jobFlowIds, required bool visibleToAllUsers}) Future<void>
Cluster$VisibleToAllUsers
startNotebookExecution({required ExecutionEngineConfig executionEngine, required String serviceRole, String? editorId, Map<String, String>? environmentVariables, String? notebookExecutionName, String? notebookInstanceSecurityGroupId, String? notebookParams, NotebookS3LocationFromInput? notebookS3Location, OutputNotebookFormat? outputNotebookFormat, OutputNotebookS3LocationFromInput? outputNotebookS3Location, String? relativePath, List<Tag>? tags}) Future<StartNotebookExecutionOutput>
Starts a notebook execution.
startSession({required String clusterId, String? clientRequestToken, List<Configuration>? engineConfigurations, String? executionRoleArn, SessionMonitoringConfiguration? monitoringConfiguration, String? name, int? sessionIdleTimeoutInMinutes, List<Tag>? tags}) Future<StartSessionOutput>
Creates and starts a new Spark Connect session on the specified cluster. The cluster must be in the RUNNING or WAITING state and have sessions enabled. This operation is supported in Amazon EMR Spark 8.0.0 and later.
stopNotebookExecution({required String notebookExecutionId}) Future<void>
Stops a notebook execution.
terminateJobFlows({required List<String> jobFlowIds}) Future<void>
TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the Amazon EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.
terminateSession({required String clusterId, required String sessionId}) Future<TerminateSessionOutput>
Terminates an active session. After you call this operation, the session enters the TERMINATING state and then transitions to TERMINATED.
toString() String
A string representation of this object.
inherited
updateStudio({required String studioId, String? defaultS3Location, String? description, String? encryptionKeyArn, String? name, List<String>? subnetIds}) Future<void>
Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.
updateStudioSessionMapping({required IdentityType identityType, required String sessionPolicyArn, required String studioId, String? identityId, String? identityName}) Future<void>
Updates the session policy attached to the user or group for the specified Amazon EMR Studio.

Operators

operator ==(Object other) bool
The equality operator.
inherited