Skip to content
v2.278.0

EmrCreateCluster ​

A Step Functions Task to create an EMR Cluster.

The ClusterConfiguration is defined as Parameters in the state machine definition.

OUTPUT: the ClusterId.

Example ​

ts
new tasks.EmrCreateCluster(this, 'PrioritizedAllocation', {
  instances: {
    instanceFleets: [{
      instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.CORE,
      instanceTypeConfigs: [{
        instanceType: 'm5.large',
        priority: 0, // Highest priority
      }, {
        instanceType: 'm5.xlarge',
        priority: 1, // Lower priority
      }],
      launchSpecifications: {
        onDemandSpecification: {
          allocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy.PRIORITIZED,
        },
      },
      targetOnDemandCapacity: 2,
    }],
  },
  name: 'PrioritizedCluster',
  integrationPattern: sfn.IntegrationPattern.RUN_JOB,
});
python
tasks.EmrCreateCluster(self, "PrioritizedAllocation",
    instances=tasks.EmrCreateCluster.InstancesConfigProperty(
        instance_fleets=[tasks.EmrCreateCluster.InstanceFleetConfigProperty(
            instance_fleet_type=tasks.EmrCreateCluster.InstanceRoleType.CORE,
            instance_type_configs=[tasks.EmrCreateCluster.InstanceTypeConfigProperty(
                instance_type="m5.large",
                priority=0
            ), tasks.EmrCreateCluster.InstanceTypeConfigProperty(
                instance_type="m5.xlarge",
                priority=1
            )],
            launch_specifications=tasks.EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty(
                on_demand_specification=tasks.EmrCreateCluster.OnDemandProvisioningSpecificationProperty(
                    allocation_strategy=tasks.EmrCreateCluster.OnDemandAllocationStrategy.PRIORITIZED
                )
            ),
            target_on_demand_capacity=2
        )]
    ),
    name="PrioritizedCluster",
    integration_pattern=sfn.IntegrationPattern.RUN_JOB
)
java
EmrCreateCluster.Builder.create(this, "PrioritizedAllocation")
        .instances(InstancesConfigProperty.builder()
                .instanceFleets(List.of(InstanceFleetConfigProperty.builder()
                        .instanceFleetType(EmrCreateCluster.getInstanceRoleType().CORE)
                        .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                                .instanceType("m5.large")
                                .priority(0)
                                .build(), InstanceTypeConfigProperty.builder()
                                .instanceType("m5.xlarge")
                                .priority(1)
                                .build()))
                        .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                                .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                        .allocationStrategy(EmrCreateCluster.getOnDemandAllocationStrategy().PRIORITIZED)
                                        .build())
                                .build())
                        .targetOnDemandCapacity(2)
                        .build()))
                .build())
        .name("PrioritizedCluster")
        .integrationPattern(IntegrationPattern.RUN_JOB)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new EmrCreateCluster(this, "PrioritizedAllocation", new EmrCreateClusterProps {
    Instances = new InstancesConfigProperty {
        InstanceFleets = new [] { new InstanceFleetConfigProperty {
            InstanceFleetType = EmrCreateCluster.InstanceRoleType.CORE,
            InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
                InstanceType = "m5.large",
                Priority = 0
            }, new InstanceTypeConfigProperty {
                InstanceType = "m5.xlarge",
                Priority = 1
            } },
            LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
                OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
                    AllocationStrategy = EmrCreateCluster.OnDemandAllocationStrategy.PRIORITIZED
                }
            },
            TargetOnDemandCapacity = 2
        } }
    },
    Name = "PrioritizedCluster",
    IntegrationPattern = IntegrationPattern.RUN_JOB
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
tasks.NewEmrCreateCluster(this, jsii.String("PrioritizedAllocation"), &EmrCreateClusterProps{
	Instances: &InstancesConfigProperty{
		InstanceFleets: []InstanceFleetConfigProperty{
			&InstanceFleetConfigProperty{
				InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_CORE,
				InstanceTypeConfigs: []InstanceTypeConfigProperty{
					&InstanceTypeConfigProperty{
						InstanceType: jsii.String("m5.large"),
						Priority: jsii.Number(0),
					},
					&InstanceTypeConfigProperty{
						InstanceType: jsii.String("m5.xlarge"),
						Priority: jsii.Number(1),
					},
				},
				LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
					OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{
						AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_PRIORITIZED,
					},
				},
				TargetOnDemandCapacity: jsii.Number(2),
			},
		},
	},
	Name: jsii.String("PrioritizedCluster"),
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

Initializer ​

ts
new EmrCreateCluster(scope: Construct, id: string, props: EmrCreateClusterProps)
python
EmrCreateCluster(scope: Construct, id: str, props: EmrCreateClusterProps)
java
new EmrCreateCluster(Construct scope, String id, EmrCreateClusterProps props)
csharp
new EmrCreateCluster(Construct scope, string id, EmrCreateClusterProps props)
go
NewEmrCreateCluster(Scope Construct, Id *string, Props EmrCreateClusterProps)

Construct Props ​

additionalInfooptionalstringadditional_infooptionalstradditionalInfooptionalStringAdditionalInfooptionalstringAdditionalInfooptional*string = None #
A JSON string for selecting additional features.
applicationsoptionalEmrCreateCluster.ApplicationConfigProperty[]applicationsoptionaltyping.List[ApplicationConfigProperty]applicationsoptionalList<ApplicationConfigProperty>ApplicationsoptionalApplicationConfigProperty[]Applicationsoptional*[]ApplicationConfigProperty #
A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.

Default: EMR selected default

assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{} #
Workflow variables to store in this step.

Default: Not assign variables

Using workflow variables, you can store data in a step and retrieve that data in future steps.

autoScalingRoleoptionalIRoleauto_scaling_roleoptionalIRoleautoScalingRoleoptionalIRoleAutoScalingRoleoptionalIRoleAutoScalingRoleoptionalIRole #
An IAM role for automatic scaling policies.

Default: A role will be created.

autoTerminationPolicyIdleTimeoutoptionalDurationauto_termination_policy_idle_timeoutoptionalDurationautoTerminationPolicyIdleTimeoutoptionalDurationAutoTerminationPolicyIdleTimeoutoptionalDurationAutoTerminationPolicyIdleTimeoutoptionalDuration #
The amount of idle time after which the cluster automatically terminates.

Default: No timeout

You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

bootstrapActionsoptionalEmrCreateCluster.BootstrapActionConfigProperty[]bootstrap_actionsoptionaltyping.List[BootstrapActionConfigProperty]bootstrapActionsoptionalList<BootstrapActionConfigProperty>BootstrapActionsoptionalBootstrapActionConfigProperty[]BootstrapActionsoptional*[]BootstrapActionConfigProperty = None #
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
clusterRoleoptionalIRolecluster_roleoptionalIRoleclusterRoleoptionalIRoleClusterRoleoptionalIRoleClusterRoleoptionalIRole #
Also called instance profile and EC2 role.

Default: * A Role will be created

An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role.

This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters.

commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string #
A comment describing this state.

Default: No comment

configurationsoptionalEmrCreateCluster.ConfigurationProperty[]configurationsoptionaltyping.List[ConfigurationProperty]configurationsoptionalList<ConfigurationProperty>ConfigurationsoptionalConfigurationProperty[]Configurationsoptional*[]ConfigurationProperty = None #
The list of configurations supplied for the EMR cluster you are creating.
credentialsoptionalCredentialscredentialsoptionalCredentialscredentialsoptionalCredentialsCredentialsoptionalCredentialsCredentialsoptionalCredentials #
Credentials for an IAM Role that the State Machine assumes for executing the task.

Default: None (Task is executed using the State Machine's execution role)

This enables cross-account resource invocations.

customAmiIdoptionalstringcustom_ami_idoptionalstrcustomAmiIdoptionalStringCustomAmiIdoptionalstringCustomAmiIdoptional*string = None #
The ID of a custom Amazon EBS-backed Linux AMI.
ebsRootVolumeIopsoptionalnumberebs_root_volume_iopsoptionalint | floatebsRootVolumeIopsoptionalNumberEbsRootVolumeIopsoptionaldoubleEbsRootVolumeIopsoptional*float64 #
The IOPS of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

Requires EMR release label 6.15.0 or above. Must be in range [3000, 16000].

ebsRootVolumeSizeoptionalSizeebs_root_volume_sizeoptionalSizeebsRootVolumeSizeoptionalSizeEbsRootVolumeSizeoptionalSizeEbsRootVolumeSizeoptionalSize #
The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

ebsRootVolumeThroughputoptionalnumberebs_root_volume_throughputoptionalint | floatebsRootVolumeThroughputoptionalNumberEbsRootVolumeThroughputoptionaldoubleEbsRootVolumeThroughputoptional*float64 #
The throughput, in MiB/s, of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

Requires EMR release label 6.15.0 or above. Must be in range [125, 1000].

heartbeatoptionalDurationheartbeatoptionalDurationheartbeatoptionalDurationHeartbeatoptionalDurationHeartbeatoptionalDuration = None deprecated #
use `heartbeatTimeout`
heartbeatTimeoutoptionalTimeoutheartbeat_timeoutoptionalTimeoutheartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeout = None #
Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string = $ #
JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.

A specification of the number and type of Amazon EC2 instances.
integrationPatternoptionalIntegrationPatternintegration_patternoptionalIntegrationPatternintegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPattern #
AWS Step Functions integrates with services directly in the Amazon States Language.

Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.

kerberosAttributesoptionalEmrCreateCluster.KerberosAttributesPropertykerberos_attributesoptionalKerberosAttributesPropertykerberosAttributesoptionalKerberosAttributesPropertyKerberosAttributesoptionalKerberosAttributesPropertyKerberosAttributesoptionalKerberosAttributesProperty = None #
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
logUrioptionalstringlog_urioptionalstrlogUrioptionalStringLogUrioptionalstringLogUrioptional*string = None #
The location in Amazon S3 to write the log files of the job flow.
managedScalingPolicyoptionalEmrCreateCluster.ManagedScalingPolicyPropertymanaged_scaling_policyoptionalManagedScalingPolicyPropertymanagedScalingPolicyoptionalManagedScalingPolicyPropertyManagedScalingPolicyoptionalManagedScalingPolicyPropertyManagedScalingPolicyoptionalManagedScalingPolicyProperty = None #
The specified managed scaling policy for an Amazon EMR cluster.
namestringnamestrnameStringNamestringName*string required #
The Name of the Cluster.
outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string = $ #
JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{} #
Used to specify and transform output from the state.

Default: $states.result or $states.errorOutput

notes

When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage = JSONPath #
The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

releaseLabeloptionalstringrelease_labeloptionalstrreleaseLabeloptionalStringReleaseLabeloptionalstringReleaseLabeloptional*string #
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.

Default: EMR selected default

resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string = $ #
JSONPath expression to indicate where to inject the state's output.

May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.

resultSelectoroptional{ [key: string]: any }result_selectoroptionaltyping.Mapping[str, Any]resultSelectoroptionalMap<String, Object>ResultSelectoroptionalIDictionary<string, object>ResultSelectoroptional*map[string]interface{} = None #
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.

scaleDownBehavioroptionalEmrCreateCluster.EmrClusterScaleDownBehaviorscale_down_behavioroptionalEmrClusterScaleDownBehaviorscaleDownBehavioroptionalEmrClusterScaleDownBehaviorScaleDownBehavioroptionalEmrClusterScaleDownBehaviorScaleDownBehavioroptionalEmrClusterScaleDownBehavior #
Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

Default: EMR selected default

securityConfigurationoptionalstringsecurity_configurationoptionalstrsecurityConfigurationoptionalStringSecurityConfigurationoptionalstringSecurityConfigurationoptional*string = None #
The name of a security configuration to apply to the cluster.
serviceRoleoptionalIRoleservice_roleoptionalIRoleserviceRoleoptionalIRoleServiceRoleoptionalIRoleServiceRoleoptionalIRole #
The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

Default: A role will be created that Amazon EMR service can assume.

stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string #
Optional name for this state.

Default: The construct ID will be used as state name

stepConcurrencyLeveloptionalnumberstep_concurrency_leveloptionalint | floatstepConcurrencyLeveloptionalNumberStepConcurrencyLeveloptionaldoubleStepConcurrencyLeveloptional*float64 #
Specifies the step concurrency level to allow multiple steps to run in parallel.

Default: 1 - no step concurrency allowed

Requires EMR release label 5.28.0 or above. Must be in range [1, 256].

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string = None #
A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
taskTimeoutoptionalTimeouttask_timeoutoptionalTimeouttaskTimeoutoptionalTimeoutTaskTimeoutoptionalTimeoutTaskTimeoutoptionalTimeout = None #
Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

timeoutoptionalDurationtimeoutoptionalDurationtimeoutoptionalDurationTimeoutoptionalDurationTimeoutoptionalDuration = None deprecated #
use `taskTimeout`
visibleToAllUsersoptionalbooleanvisible_to_all_usersoptionalboolvisibleToAllUsersoptionalBooleanVisibleToAllUsersoptionalboolVisibleToAllUsersoptional*bool = true #
A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions.

Properties ​

autoScalingRoleIRoleauto_scaling_roleIRoleautoScalingRoleIRoleAutoScalingRoleIRoleAutoScalingRoleIRole #
The autoscaling role for the EMR Cluster.

Only available after task has been added to a state machine.

clusterRoleIRolecluster_roleIRoleclusterRoleIRoleClusterRoleIRoleClusterRoleIRole #
The instance role for the EMR Cluster.

Only available after task has been added to a state machine.

endStatesINextable[]end_statestyping.List[INextable]endStatesList<INextable>EndStatesINextable[]EndStates*[]INextable #
Continuable states of this Chainable.
idstringidstridStringIdstringId*string #
Descriptive identifier for this chainable.
nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
serviceRoleIRoleservice_roleIRoleserviceRoleIRoleServiceRoleIRoleServiceRoleIRole #
The service role for the EMR Cluster.

Only available after task has been added to a state machine.

startStateStatestart_stateStatestartStateStateStartStateStateStartStateState #
First state of this Chainable.
stateIdstringstate_idstrstateIdStringStateIdstringStateId*string #
Tokenized string that evaluates to the state's ID.

Methods ​

addCatch(handler: IChainable, props?: CatchProps): TaskStateBasedef add_catch(self, handler: IChainable, props: typing.Optional[CatchProps] = None) -> TaskStateBasepublic TaskStateBase addCatch(IChainable handler, CatchProps props)public TaskStateBase AddCatch(IChainable handler, CatchProps? props = null)func AddCatch(Handler IChainable, Props CatchProps) TaskStateBase #
Add a recovery handler for this state.

When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

addPrefix(x: string): voiddef add_prefix(self, x: str) -> Nonepublic void addPrefix(String x)public void AddPrefix(string x)func AddPrefix(X *string) #
Add a prefix to the stateId of this state.
addRetry(props?: RetryProps): TaskStateBasedef add_retry(self, props: typing.Optional[RetryProps] = None) -> TaskStateBasepublic TaskStateBase addRetry(RetryProps props)public TaskStateBase AddRetry(RetryProps? props = null)func AddRetry(Props RetryProps) TaskStateBase #
Add retry configuration for this state.

This controls if and how the execution will be retried if a particular error occurs.

bindToGraph(graph: StateGraph): voiddef bind_to_graph(self, graph: StateGraph) -> Nonepublic void bindToGraph(StateGraph graph)public void BindToGraph(StateGraph graph)func BindToGraph(Graph StateGraph) #
Register this state as part of the given graph.

Don't call this. It will be called automatically when you work with states normally.

filterNextables(states: State[]): INextable[]@staticmethod def filter_nextables(states: typing.List[State]) -> typing.List[INextable]public static List<INextable> filterNextables(List<State> states)public static INextable[] FilterNextables(State[] states)func FilterNextables(States *[]State) *[]INextable static #
Return only the states that allow chaining from an array of states.
findReachableEndStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_end_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableEndStates(State start, FindStateOptions options)public static State[] FindReachableEndStates(State start, FindStateOptions? options = null)func FindReachableEndStates(Start State, Options FindStateOptions) *[]State static #
Find the set of end states states reachable through transitions from the given start state.
findReachableStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableStates(State start, FindStateOptions options)public static State[] FindReachableStates(State start, FindStateOptions? options = null)func FindReachableStates(Start State, Options FindStateOptions) *[]State static #
Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

jsonata(scope: Construct, id: string, props: EmrCreateClusterJsonataProps): EmrCreateCluster // chainable@staticmethod def jsonata(scope: Construct, id: str, props: EmrCreateClusterJsonataProps) -> EmrCreateClusterpublic static EmrCreateCluster jsonata(Construct scope, String id, EmrCreateClusterJsonataProps props)public static EmrCreateCluster Jsonata(Construct scope, string id, EmrCreateClusterJsonataProps props)func Jsonata(Scope Construct, Id *string, Props EmrCreateClusterJsonataProps) EmrCreateCluster static #
A Step Functions task using JSONata to create an EMR Cluster.

This task creates a Lambda function to call cross-region AWS API and invokes it.

jsonPath(scope: Construct, id: string, props: EmrCreateClusterJsonPathProps): EmrCreateCluster // chainable@staticmethod def json_path(scope: Construct, id: str, props: EmrCreateClusterJsonPathProps) -> EmrCreateClusterpublic static EmrCreateCluster jsonPath(Construct scope, String id, EmrCreateClusterJsonPathProps props)public static EmrCreateCluster JsonPath(Construct scope, string id, EmrCreateClusterJsonPathProps props)func JsonPath(Scope Construct, Id *string, Props EmrCreateClusterJsonPathProps) EmrCreateCluster static #
A Step Functions task using JSONPath to create an EMR Cluster.

This task creates a Lambda function to call cross-region AWS API and invokes it.

metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric #
Return the given named metric for this Task.
metricFailed(props?: MetricOptions): Metricdef metric_failed(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFailed(MetricOptions props)public Metric MetricFailed(MetricOptions? props = null)func MetricFailed(Props MetricOptions) Metric #
Metric for the number of times this activity fails.
metricHeartbeatTimedOut(props?: MetricOptions): Metricdef metric_heartbeat_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHeartbeatTimedOut(MetricOptions props)public Metric MetricHeartbeatTimedOut(MetricOptions? props = null)func MetricHeartbeatTimedOut(Props MetricOptions) Metric #
Metric for the number of times the heartbeat times out for this activity.
metricRunTime(props?: MetricOptions): Metricdef metric_run_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRunTime(MetricOptions props)public Metric MetricRunTime(MetricOptions? props = null)func MetricRunTime(Props MetricOptions) Metric #
The interval, in milliseconds, between the time the Task starts and the time it closes.
metricScheduled(props?: MetricOptions): Metricdef metric_scheduled(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduled(MetricOptions props)public Metric MetricScheduled(MetricOptions? props = null)func MetricScheduled(Props MetricOptions) Metric #
Metric for the number of times this activity is scheduled.
metricScheduleTime(props?: MetricOptions): Metricdef metric_schedule_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduleTime(MetricOptions props)public Metric MetricScheduleTime(MetricOptions? props = null)func MetricScheduleTime(Props MetricOptions) Metric #
The interval, in milliseconds, for which the activity stays in the schedule state.
metricStarted(props?: MetricOptions): Metricdef metric_started(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricStarted(MetricOptions props)public Metric MetricStarted(MetricOptions? props = null)func MetricStarted(Props MetricOptions) Metric #
Metric for the number of times this activity is started.
metricSucceeded(props?: MetricOptions): Metricdef metric_succeeded(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSucceeded(MetricOptions props)public Metric MetricSucceeded(MetricOptions? props = null)func MetricSucceeded(Props MetricOptions) Metric #
Metric for the number of times this activity succeeds.
metricTime(props?: MetricOptions): Metricdef metric_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTime(MetricOptions props)public Metric MetricTime(MetricOptions? props = null)func MetricTime(Props MetricOptions) Metric #
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
metricTimedOut(props?: MetricOptions): Metricdef metric_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTimedOut(MetricOptions props)public Metric MetricTimedOut(MetricOptions? props = null)func MetricTimedOut(Props MetricOptions) Metric #
Metric for the number of times this activity times out.
prefixStates(root: IConstruct, prefix: string): void@staticmethod def prefix_states(root: IConstruct, prefix: str) -> Nonepublic static void prefixStates(IConstruct root, String prefix)public static void PrefixStates(IConstruct root, string prefix)func PrefixStates(Root IConstruct, Prefix *string) static #
Add a prefix to the stateId of all States found in a construct tree.
toStateJson(topLevelQueryLanguage?: QueryLanguage): jsondef to_state_json(self, top_level_query_language: typing.Optional[QueryLanguage] = None) -> Anypublic Object toStateJson(QueryLanguage topLevelQueryLanguage)public object ToStateJson(QueryLanguage? topLevelQueryLanguage = null)func ToStateJson(TopLevelQueryLanguage QueryLanguage) interface{} #
Return the Amazon States Language object for this state.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining