CfnHealthCheck

class aws_cdk.aws_route53.CfnHealthCheck(scope, id, *, health_check_config, health_check_tags=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::Route53::HealthCheck.

The AWS::Route53::HealthCheck resource is a Route 53 resource type that contains settings for a Route 53 health check.

For information about associating health checks with records, see HealthCheckId in ChangeResourceRecordSets . .. epigraph:

You can't create a health check with simple routing.

ELB Load Balancers

If you’re registering EC2 instances with an Elastic Load Balancing (ELB) load balancer, do not create Amazon Route 53 health checks for the EC2 instances. When you register an EC2 instance with a load balancer, you configure settings for an ELB health check, which performs a similar function to a Route 53 health check.

Private Hosted Zones

You can associate health checks with failover records in a private hosted zone. Note the following:

  • Route 53 health checkers are outside the VPC. To check the health of an endpoint within a VPC by IP address, you must assign a public IP address to the instance in the VPC.

  • You can configure a health checker to check the health of an external resource that the instance relies on, such as a database server.

  • You can create a CloudWatch metric, associate an alarm with the metric, and then create a health check that is based on the state of the alarm. For example, you might create a CloudWatch metric that checks the status of the Amazon EC2 StatusCheckFailed metric, add an alarm to the metric, and then create a health check that is based on the state of the alarm. For information about creating CloudWatch metrics and alarms by using the CloudWatch console, see the Amazon CloudWatch User Guide .

CloudformationResource

AWS::Route53::HealthCheck

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_route53 as route53

cfn_health_check = route53.CfnHealthCheck(self, "MyCfnHealthCheck",
    health_check_config=route53.CfnHealthCheck.HealthCheckConfigProperty(
        type="type",

        # the properties below are optional
        alarm_identifier=route53.CfnHealthCheck.AlarmIdentifierProperty(
            name="name",
            region="region"
        ),
        child_health_checks=["childHealthChecks"],
        enable_sni=False,
        failure_threshold=123,
        fully_qualified_domain_name="fullyQualifiedDomainName",
        health_threshold=123,
        insufficient_data_health_status="insufficientDataHealthStatus",
        inverted=False,
        ip_address="ipAddress",
        measure_latency=False,
        port=123,
        regions=["regions"],
        request_interval=123,
        resource_path="resourcePath",
        routing_control_arn="routingControlArn",
        search_string="searchString"
    ),

    # the properties below are optional
    health_check_tags=[route53.CfnHealthCheck.HealthCheckTagProperty(
        key="key",
        value="value"
    )]
)

Create a new AWS::Route53::HealthCheck.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • health_check_config (Union[IResolvable, HealthCheckConfigProperty, Dict[str, Any]]) – A complex type that contains detailed information about one health check. For the values to enter for HealthCheckConfig , see HealthCheckConfig

  • health_check_tags (Union[IResolvable, Sequence[Union[IResolvable, HealthCheckTagProperty, Dict[str, Any]]], None]) – The HealthCheckTags property describes key-value pairs that are associated with an AWS::Route53::HealthCheck resource.

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(target)

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

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

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).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

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.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • 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: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

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

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

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 type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Route53::HealthCheck'
attr_health_check_id

The identifier that Amazon Route 53 assigned to the health check when you created it.

When you add or update a resource record set, you use this value to specify which health check to use. The value can be up to 64 characters long.

CloudformationAttribute

HealthCheckId

Return type

str

cfn_options

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

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

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.

Return type

List[str]

health_check_config

A complex type that contains detailed information about one health check.

For the values to enter for HealthCheckConfig , see HealthCheckConfig

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html#cfn-route53-healthcheck-healthcheckconfig

Return type

Union[IResolvable, HealthCheckConfigProperty]

health_check_tags

The HealthCheckTags property describes key-value pairs that are associated with an AWS::Route53::HealthCheck resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-healthcheck.html#cfn-route53-healthcheck-healthchecktags

Return type

Union[IResolvable, List[Union[IResolvable, HealthCheckTagProperty]], None]

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 type

str

Returns

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

node

The construct tree node associated with this construct.

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

stack

The stack in which this element is defined.

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

Return type

Stack

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 type

bool

Returns

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

AlarmIdentifierProperty

class CfnHealthCheck.AlarmIdentifierProperty(*, name, region)

Bases: object

Parameters
  • name (str) – CfnHealthCheck.AlarmIdentifierProperty.Name.

  • region (str) – CfnHealthCheck.AlarmIdentifierProperty.Region.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_route53 as route53

alarm_identifier_property = route53.CfnHealthCheck.AlarmIdentifierProperty(
    name="name",
    region="region"
)

Attributes

name

CfnHealthCheck.AlarmIdentifierProperty.Name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-name

Return type

str

region

CfnHealthCheck.AlarmIdentifierProperty.Region.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-alarmidentifier.html#cfn-route53-healthcheck-alarmidentifier-region

Return type

str

HealthCheckConfigProperty

class CfnHealthCheck.HealthCheckConfigProperty(*, type, alarm_identifier=None, child_health_checks=None, enable_sni=None, failure_threshold=None, fully_qualified_domain_name=None, health_threshold=None, insufficient_data_health_status=None, inverted=None, ip_address=None, measure_latency=None, port=None, regions=None, request_interval=None, resource_path=None, routing_control_arn=None, search_string=None)

Bases: object

Parameters
  • type (str) – CfnHealthCheck.HealthCheckConfigProperty.Type.

  • alarm_identifier (Union[IResolvable, AlarmIdentifierProperty, Dict[str, Any], None]) – CfnHealthCheck.HealthCheckConfigProperty.AlarmIdentifier.

  • child_health_checks (Optional[Sequence[str]]) – CfnHealthCheck.HealthCheckConfigProperty.ChildHealthChecks.

  • enable_sni (Union[bool, IResolvable, None]) – CfnHealthCheck.HealthCheckConfigProperty.EnableSNI.

  • failure_threshold (Union[int, float, None]) – CfnHealthCheck.HealthCheckConfigProperty.FailureThreshold.

  • fully_qualified_domain_name (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.FullyQualifiedDomainName.

  • health_threshold (Union[int, float, None]) – CfnHealthCheck.HealthCheckConfigProperty.HealthThreshold.

  • insufficient_data_health_status (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.InsufficientDataHealthStatus.

  • inverted (Union[bool, IResolvable, None]) – CfnHealthCheck.HealthCheckConfigProperty.Inverted.

  • ip_address (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.IPAddress.

  • measure_latency (Union[bool, IResolvable, None]) – CfnHealthCheck.HealthCheckConfigProperty.MeasureLatency.

  • port (Union[int, float, None]) – CfnHealthCheck.HealthCheckConfigProperty.Port.

  • regions (Optional[Sequence[str]]) – CfnHealthCheck.HealthCheckConfigProperty.Regions.

  • request_interval (Union[int, float, None]) – CfnHealthCheck.HealthCheckConfigProperty.RequestInterval.

  • resource_path (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.ResourcePath.

  • routing_control_arn (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.RoutingControlArn.

  • search_string (Optional[str]) – CfnHealthCheck.HealthCheckConfigProperty.SearchString.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_route53 as route53

health_check_config_property = route53.CfnHealthCheck.HealthCheckConfigProperty(
    type="type",

    # the properties below are optional
    alarm_identifier=route53.CfnHealthCheck.AlarmIdentifierProperty(
        name="name",
        region="region"
    ),
    child_health_checks=["childHealthChecks"],
    enable_sni=False,
    failure_threshold=123,
    fully_qualified_domain_name="fullyQualifiedDomainName",
    health_threshold=123,
    insufficient_data_health_status="insufficientDataHealthStatus",
    inverted=False,
    ip_address="ipAddress",
    measure_latency=False,
    port=123,
    regions=["regions"],
    request_interval=123,
    resource_path="resourcePath",
    routing_control_arn="routingControlArn",
    search_string="searchString"
)

Attributes

alarm_identifier

CfnHealthCheck.HealthCheckConfigProperty.AlarmIdentifier.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-alarmidentifier

Return type

Union[IResolvable, AlarmIdentifierProperty, None]

child_health_checks

CfnHealthCheck.HealthCheckConfigProperty.ChildHealthChecks.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-childhealthchecks

Return type

Optional[List[str]]

enable_sni

CfnHealthCheck.HealthCheckConfigProperty.EnableSNI.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-enablesni

Return type

Union[bool, IResolvable, None]

failure_threshold

CfnHealthCheck.HealthCheckConfigProperty.FailureThreshold.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-failurethreshold

Return type

Union[int, float, None]

fully_qualified_domain_name

CfnHealthCheck.HealthCheckConfigProperty.FullyQualifiedDomainName.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-fullyqualifieddomainname

Return type

Optional[str]

health_threshold

CfnHealthCheck.HealthCheckConfigProperty.HealthThreshold.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-healththreshold

Return type

Union[int, float, None]

insufficient_data_health_status

CfnHealthCheck.HealthCheckConfigProperty.InsufficientDataHealthStatus.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-insufficientdatahealthstatus

Return type

Optional[str]

inverted

CfnHealthCheck.HealthCheckConfigProperty.Inverted.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-inverted

Return type

Union[bool, IResolvable, None]

ip_address

CfnHealthCheck.HealthCheckConfigProperty.IPAddress.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-ipaddress

Return type

Optional[str]

measure_latency

CfnHealthCheck.HealthCheckConfigProperty.MeasureLatency.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-measurelatency

Return type

Union[bool, IResolvable, None]

port

CfnHealthCheck.HealthCheckConfigProperty.Port.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-port

Return type

Union[int, float, None]

regions

CfnHealthCheck.HealthCheckConfigProperty.Regions.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-regions

Return type

Optional[List[str]]

request_interval

CfnHealthCheck.HealthCheckConfigProperty.RequestInterval.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-requestinterval

Return type

Union[int, float, None]

resource_path

CfnHealthCheck.HealthCheckConfigProperty.ResourcePath.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-resourcepath

Return type

Optional[str]

routing_control_arn

CfnHealthCheck.HealthCheckConfigProperty.RoutingControlArn.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-routingcontrolarn

Return type

Optional[str]

search_string

CfnHealthCheck.HealthCheckConfigProperty.SearchString.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-searchstring

Return type

Optional[str]

type

CfnHealthCheck.HealthCheckConfigProperty.Type.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthcheckconfig.html#cfn-route53-healthcheck-healthcheckconfig-type

Return type

str

HealthCheckTagProperty

class CfnHealthCheck.HealthCheckTagProperty(*, key, value)

Bases: object

The HealthCheckTag property describes one key-value pair that is associated with an AWS::Route53::HealthCheck resource.

Parameters
  • key (str) – The value of Key depends on the operation that you want to perform:. - Add a tag to a health check or hosted zone : Key is the name that you want to give the new tag. - Edit a tag : Key is the name of the tag that you want to change the Value for. - Delete a key : Key is the name of the tag you want to remove. - Give a name to a health check : Edit the default Name tag. In the Amazon Route 53 console, the list of your health checks includes a Name column that lets you see the name that you’ve given to each health check.

  • value (str) – The value of Value depends on the operation that you want to perform:. - Add a tag to a health check or hosted zone : Value is the value that you want to give the new tag. - Edit a tag : Value is the new value that you want to assign the tag.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthchecktag.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_route53 as route53

health_check_tag_property = route53.CfnHealthCheck.HealthCheckTagProperty(
    key="key",
    value="value"
)

Attributes

key

.

  • Add a tag to a health check or hosted zone : Key is the name that you want to give the new tag.

  • Edit a tag : Key is the name of the tag that you want to change the Value for.

  • Delete a key : Key is the name of the tag you want to remove.

  • Give a name to a health check : Edit the default Name tag. In the Amazon Route 53 console, the list of your health checks includes a Name column that lets you see the name that you’ve given to each health check.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthchecktag.html#cfn-route53-healthcheck-healthchecktag-key

Type

The value of Key depends on the operation that you want to perform

Return type

str

value

.

  • Add a tag to a health check or hosted zone : Value is the value that you want to give the new tag.

  • Edit a tag : Value is the new value that you want to assign the tag.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthchecktag.html#cfn-route53-healthcheck-healthchecktag-value

Type

The value of Value depends on the operation that you want to perform

Return type

str