CfnStepPropsMixin

class aws_cdk.mixins_preview.aws_emr.mixins.CfnStepPropsMixin(props, *, strategy=None)

Bases: Mixin

Use Step to specify a cluster (job flow) step, which runs only on the master node.

Steps are used to submit data processing jobs to a cluster.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-step.html

CloudformationResource:

AWS::EMR::Step

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

cfn_step_props_mixin = emr_mixins.CfnStepPropsMixin(emr_mixins.CfnStepMixinProps(
    action_on_failure="actionOnFailure",
    hadoop_jar_step=emr_mixins.CfnStepPropsMixin.HadoopJarStepConfigProperty(
        args=["args"],
        jar="jar",
        main_class="mainClass",
        step_properties=[emr_mixins.CfnStepPropsMixin.KeyValueProperty(
            key="key",
            value="value"
        )]
    ),
    job_flow_id="jobFlowId",
    name="name"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::EMR::Step.

Parameters:
  • props (Union[CfnStepMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['actionOnFailure', 'hadoopJarStep', 'jobFlowId', 'name']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

HadoopJarStepConfigProperty

class CfnStepPropsMixin.HadoopJarStepConfigProperty(*, args=None, jar=None, main_class=None, step_properties=None)

Bases: object

A job flow step consisting of a JAR file whose main function will be executed.

The main function submits a job for Hadoop to execute and waits for the job to finish or fail.

Parameters:
  • args (Optional[Sequence[str]]) – A list of command line arguments passed to the JAR file’s main function when executed.

  • jar (Optional[str]) – A path to a JAR file run during the step.

  • main_class (Optional[str]) – The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

  • step_properties (Union[IResolvable, Sequence[Union[IResolvable, KeyValueProperty, Dict[str, Any]]], None]) – A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-hadoopjarstepconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

hadoop_jar_step_config_property = emr_mixins.CfnStepPropsMixin.HadoopJarStepConfigProperty(
    args=["args"],
    jar="jar",
    main_class="mainClass",
    step_properties=[emr_mixins.CfnStepPropsMixin.KeyValueProperty(
        key="key",
        value="value"
    )]
)

Attributes

args

A list of command line arguments passed to the JAR file’s main function when executed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-hadoopjarstepconfig.html#cfn-emr-step-hadoopjarstepconfig-args

jar

A path to a JAR file run during the step.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-hadoopjarstepconfig.html#cfn-emr-step-hadoopjarstepconfig-jar

main_class

The name of the main class in the specified Java file.

If not specified, the JAR file should specify a Main-Class in its manifest file.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-hadoopjarstepconfig.html#cfn-emr-step-hadoopjarstepconfig-mainclass

step_properties

A list of Java properties that are set when the step runs.

You can use these properties to pass key value pairs to your main function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-hadoopjarstepconfig.html#cfn-emr-step-hadoopjarstepconfig-stepproperties

KeyValueProperty

class CfnStepPropsMixin.KeyValueProperty(*, key=None, value=None)

Bases: object

KeyValue is a subproperty of the HadoopJarStepConfig property type.

KeyValue is used to pass parameters to a step.

Parameters:
  • key (Optional[str]) – The unique identifier of a key-value pair.

  • value (Optional[str]) – The value part of the identified key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-keyvalue.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

key_value_property = emr_mixins.CfnStepPropsMixin.KeyValueProperty(
    key="key",
    value="value"
)

Attributes

key

The unique identifier of a key-value pair.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-keyvalue.html#cfn-emr-step-keyvalue-key

value

The value part of the identified key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-step-keyvalue.html#cfn-emr-step-keyvalue-value