CfnCluster

class aws_cdk.aws_emr.CfnCluster(scope, id, *, instances, job_flow_role, name, service_role, additional_info=None, applications=None, auto_scaling_role=None, bootstrap_actions=None, configurations=None, custom_ami_id=None, ebs_root_volume_size=None, kerberos_attributes=None, log_uri=None, release_label=None, scale_down_behavior=None, security_configuration=None, steps=None, tags=None, visible_to_all_users=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::EMR::Cluster.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html cloudformationResource: :cloudformationResource:: AWS::EMR::Cluster

__init__(scope, id, *, instances, job_flow_role, name, service_role, additional_info=None, applications=None, auto_scaling_role=None, bootstrap_actions=None, configurations=None, custom_ami_id=None, ebs_root_volume_size=None, kerberos_attributes=None, log_uri=None, release_label=None, scale_down_behavior=None, security_configuration=None, steps=None, tags=None, visible_to_all_users=None)

Create a new AWS::EMR::Cluster.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • props

    • resource properties.

  • instances (Union[Forwardref, IResolvable]) – AWS::EMR::Cluster.Instances.

  • job_flow_role (str) – AWS::EMR::Cluster.JobFlowRole.

  • name (str) – AWS::EMR::Cluster.Name.

  • service_role (str) – AWS::EMR::Cluster.ServiceRole.

  • additional_info (Any) – AWS::EMR::Cluster.AdditionalInfo.

  • applications (Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]) – AWS::EMR::Cluster.Applications.

  • auto_scaling_role (Optional[str]) – AWS::EMR::Cluster.AutoScalingRole.

  • bootstrap_actions (Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]) – AWS::EMR::Cluster.BootstrapActions.

  • configurations (Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]) – AWS::EMR::Cluster.Configurations.

  • custom_ami_id (Optional[str]) – AWS::EMR::Cluster.CustomAmiId.

  • ebs_root_volume_size (Union[int, float, None]) – AWS::EMR::Cluster.EbsRootVolumeSize.

  • kerberos_attributes (Union[IResolvable, None, Forwardref]) – AWS::EMR::Cluster.KerberosAttributes.

  • log_uri (Optional[str]) – AWS::EMR::Cluster.LogUri.

  • release_label (Optional[str]) – AWS::EMR::Cluster.ReleaseLabel.

  • scale_down_behavior (Optional[str]) – AWS::EMR::Cluster.ScaleDownBehavior.

  • security_configuration (Optional[str]) – AWS::EMR::Cluster.SecurityConfiguration.

  • steps (Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]) – AWS::EMR::Cluster.Steps.

  • tags (Optional[List[CfnTag]]) – AWS::EMR::Cluster.Tags.

  • visible_to_all_users (Union[bool, None, IResolvable]) – AWS::EMR::Cluster.VisibleToAllUsers.

Return type

None

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(resource)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters

resource (CfnResource) –

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

Parameters
  • path (str) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) – The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

Parameters
  • policy (Optional[RemovalPolicy]) –

  • options

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: RemovalPolicy.Retain

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource. Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

return :rtype: str :return: a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::EMR::Cluster'
additional_info

AWS::EMR::Cluster.AdditionalInfo.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-additionalinfo

Return type

Any

applications

AWS::EMR::Cluster.Applications.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-applications

Return type

Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]

attr_master_public_dns

cloudformationAttribute: :cloudformationAttribute:: MasterPublicDNS

Return type

str

auto_scaling_role

AWS::EMR::Cluster.AutoScalingRole.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-autoscalingrole

Return type

Optional[str]

bootstrap_actions

AWS::EMR::Cluster.BootstrapActions.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-bootstrapactions

Return type

Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

configurations

AWS::EMR::Cluster.Configurations.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-configurations

Return type

Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]

creation_stack

return :rtype: List[str] :return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

custom_ami_id

AWS::EMR::Cluster.CustomAmiId.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-customamiid

Return type

Optional[str]

ebs_root_volume_size

AWS::EMR::Cluster.EbsRootVolumeSize.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-ebsrootvolumesize

Return type

Union[int, float, None]

instances

AWS::EMR::Cluster.Instances.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-instances

Return type

Union[Forwardref, IResolvable]

job_flow_role

AWS::EMR::Cluster.JobFlowRole.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-jobflowrole

Return type

str

kerberos_attributes

AWS::EMR::Cluster.KerberosAttributes.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-kerberosattributes

Return type

Union[IResolvable, None, Forwardref]

log_uri

AWS::EMR::Cluster.LogUri.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-loguri

Return type

Optional[str]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

return :rtype: str :return:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

AWS::EMR::Cluster.Name.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-name

Return type

str

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

release_label

AWS::EMR::Cluster.ReleaseLabel.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-releaselabel

Return type

Optional[str]

scale_down_behavior

AWS::EMR::Cluster.ScaleDownBehavior.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-scaledownbehavior

Return type

Optional[str]

security_configuration

AWS::EMR::Cluster.SecurityConfiguration.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-securityconfiguration

Return type

Optional[str]

service_role

AWS::EMR::Cluster.ServiceRole.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-servicerole

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

steps

AWS::EMR::Cluster.Steps.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-steps

Return type

Union[IResolvable, None, List[Union[IResolvable, Forwardref]]]

tags

AWS::EMR::Cluster.Tags.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-tags

Return type

TagManager

visible_to_all_users

AWS::EMR::Cluster.VisibleToAllUsers.

see :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-visibletoallusers

Return type

Union[bool, None, IResolvable]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

return :rtype: bool :return: The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool