CfnContainer

class aws_cdk.aws_lightsail.CfnContainer(scope, id, *, power, scale, service_name, container_service_deployment=None, is_disabled=None, private_registry_access=None, public_domain_names=None, tags=None)

Bases: CfnResource

The AWS::Lightsail::Container resource specifies a container service.

A Lightsail container service is a compute resource to which you can deploy containers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-container.html

CloudformationResource:

AWS::Lightsail::Container

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 import aws_lightsail as lightsail

cfn_container = lightsail.CfnContainer(self, "MyCfnContainer",
    power="power",
    scale=123,
    service_name="serviceName",

    # the properties below are optional
    container_service_deployment=lightsail.CfnContainer.ContainerServiceDeploymentProperty(
        containers=[lightsail.CfnContainer.ContainerProperty(
            command=["command"],
            container_name="containerName",
            environment=[lightsail.CfnContainer.EnvironmentVariableProperty(
                value="value",
                variable="variable"
            )],
            image="image",
            ports=[lightsail.CfnContainer.PortInfoProperty(
                port="port",
                protocol="protocol"
            )]
        )],
        public_endpoint=lightsail.CfnContainer.PublicEndpointProperty(
            container_name="containerName",
            container_port=123,
            health_check_config=lightsail.CfnContainer.HealthCheckConfigProperty(
                healthy_threshold=123,
                interval_seconds=123,
                path="path",
                success_codes="successCodes",
                timeout_seconds=123,
                unhealthy_threshold=123
            )
        )
    ),
    is_disabled=False,
    private_registry_access=lightsail.CfnContainer.PrivateRegistryAccessProperty(
        ecr_image_puller_role=lightsail.CfnContainer.EcrImagePullerRoleProperty(
            is_active=False,
            principal_arn="principalArn"
        )
    ),
    public_domain_names=[lightsail.CfnContainer.PublicDomainNameProperty(
        certificate_name="certificateName",
        domain_names=["domainNames"]
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • power (str) – The power specification of the container service. The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.

  • scale (Union[int, float]) – The scale specification of the container service. The scale specifies the allocated compute nodes of the container service.

  • service_name (str) – The name of the container service.

  • container_service_deployment (Union[IResolvable, ContainerServiceDeploymentProperty, Dict[str, Any], None]) – An object that describes the current container deployment of the container service.

  • is_disabled (Union[bool, IResolvable, None]) – A Boolean value indicating whether the container service is disabled.

  • private_registry_access (Union[IResolvable, PrivateRegistryAccessProperty, Dict[str, Any], None]) – An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry ( Amazon ECR ) private repositories. For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide .

  • public_domain_names (Union[IResolvable, Sequence[Union[IResolvable, PublicDomainNameProperty, Dict[str, Any]]], None]) – The public domain name of the container service, such as example.com and www.example.com . You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container that is configured as the public endpoint of your container service. If you don’t specify public domain names, then you can use the default domain of the container service. .. epigraph:: You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the AWS::Lightsail::Certificate resource to create a certificate for the public domain names that you want to use with your container service.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:: The Value of Tags is optional for Lightsail resources.

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

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

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.

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 intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

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.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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::Lightsail::Container'
attr_container_arn

The Amazon Resource Name (ARN) of the container.

CloudformationAttribute:

ContainerArn

attr_principal_arn

The principle Amazon Resource Name (ARN) of the role.

CloudformationAttribute:

PrincipalArn

attr_private_registry_access_ecr_image_puller_role_principal_arn

The principle Amazon Resource Name (ARN) of the role.

CloudformationAttribute:

PrivateRegistryAccess.EcrImagePullerRole.PrincipalArn

attr_url

The publicly accessible URL of the container service.

If no public endpoint is specified in the current deployment, this URL returns a 404 response.

CloudformationAttribute:

Url

cfn_options

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

cfn_resource_type

AWS resource type.

container_service_deployment

An object that describes the current container deployment of the container service.

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.

is_disabled

A Boolean value indicating whether the container service is disabled.

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

Returns:

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

node

The tree node.

power

The power specification of the container service.

private_registry_access

An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry ( Amazon ECR ) private repositories.

public_domain_names

The public domain name of the container service, such as example.com and www.example.com .

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

scale

The scale specification of the container service.

service_name

The name of the container service.

stack

The stack in which this element is defined.

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

tags

Tag Manager which manages the tags for this resource.

tags_raw

An array of key-value pairs to apply to this resource.

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

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

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:

x (Any) – Any object.

Return type:

bool

Returns:

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

ContainerProperty

class CfnContainer.ContainerProperty(*, command=None, container_name=None, environment=None, image=None, ports=None)

Bases: object

Container is a property of the ContainerServiceDeployment property. It describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.

Parameters:
  • command (Optional[Sequence[str]]) – The launch command for the container.

  • container_name (Optional[str]) – The name of the container.

  • environment (Union[IResolvable, Sequence[Union[IResolvable, EnvironmentVariableProperty, Dict[str, Any]]], None]) – The environment variables of the container.

  • image (Optional[str]) – The name of the image used for the container. Container images that are sourced from (registered and stored on) your container service start with a colon ( : ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third version ( 3 ) of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Your container service will automatically use the highest numbered version of the registered container image. Container images that are sourced from a public registry like Docker Hub don’t start with a colon. For example, nginx:latest or nginx .

  • ports (Union[IResolvable, Sequence[Union[IResolvable, PortInfoProperty, Dict[str, Any]]], None]) – An object that describes the open firewall ports and protocols of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.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 import aws_lightsail as lightsail

container_property = lightsail.CfnContainer.ContainerProperty(
    command=["command"],
    container_name="containerName",
    environment=[lightsail.CfnContainer.EnvironmentVariableProperty(
        value="value",
        variable="variable"
    )],
    image="image",
    ports=[lightsail.CfnContainer.PortInfoProperty(
        port="port",
        protocol="protocol"
    )]
)

Attributes

command

The launch command for the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html#cfn-lightsail-container-container-command

container_name

The name of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html#cfn-lightsail-container-container-containername

environment

The environment variables of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html#cfn-lightsail-container-container-environment

image

The name of the image used for the container.

Container images that are sourced from (registered and stored on) your container service start with a colon ( : ). For example, if your container service name is container-service-1 , the container image label is mystaticsite , and you want to use the third version ( 3 ) of the registered container image, then you should specify :container-service-1.mystaticsite.3 . To use the latest version of a container image, specify latest instead of a version number (for example, :container-service-1.mystaticsite.latest ). Your container service will automatically use the highest numbered version of the registered container image.

Container images that are sourced from a public registry like Docker Hub don’t start with a colon. For example, nginx:latest or nginx .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html#cfn-lightsail-container-container-image

ports

An object that describes the open firewall ports and protocols of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html#cfn-lightsail-container-container-ports

ContainerServiceDeploymentProperty

class CfnContainer.ContainerServiceDeploymentProperty(*, containers=None, public_endpoint=None)

Bases: object

ContainerServiceDeployment is a property of the AWS::Lightsail::Container resource. It describes a container deployment configuration of a container service.

A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.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 import aws_lightsail as lightsail

container_service_deployment_property = lightsail.CfnContainer.ContainerServiceDeploymentProperty(
    containers=[lightsail.CfnContainer.ContainerProperty(
        command=["command"],
        container_name="containerName",
        environment=[lightsail.CfnContainer.EnvironmentVariableProperty(
            value="value",
            variable="variable"
        )],
        image="image",
        ports=[lightsail.CfnContainer.PortInfoProperty(
            port="port",
            protocol="protocol"
        )]
    )],
    public_endpoint=lightsail.CfnContainer.PublicEndpointProperty(
        container_name="containerName",
        container_port=123,
        health_check_config=lightsail.CfnContainer.HealthCheckConfigProperty(
            healthy_threshold=123,
            interval_seconds=123,
            path="path",
            success_codes="successCodes",
            timeout_seconds=123,
            unhealthy_threshold=123
        )
    )
)

Attributes

containers

An object that describes the configuration for the containers of the deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html#cfn-lightsail-container-containerservicedeployment-containers

public_endpoint

An object that describes the endpoint of the deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html#cfn-lightsail-container-containerservicedeployment-publicendpoint

EcrImagePullerRoleProperty

class CfnContainer.EcrImagePullerRoleProperty(*, is_active=None, principal_arn=None)

Bases: object

Describes the IAM role that you can use to grant a Lightsail container service access to Amazon ECR private repositories.

Parameters:
  • is_active (Union[bool, IResolvable, None]) – A boolean value that indicates whether the ECRImagePullerRole is active.

  • principal_arn (Optional[str]) – The principle Amazon Resource Name (ARN) of the role. This property is read-only.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.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 import aws_lightsail as lightsail

ecr_image_puller_role_property = lightsail.CfnContainer.EcrImagePullerRoleProperty(
    is_active=False,
    principal_arn="principalArn"
)

Attributes

is_active

A boolean value that indicates whether the ECRImagePullerRole is active.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.html#cfn-lightsail-container-ecrimagepullerrole-isactive

principal_arn

The principle Amazon Resource Name (ARN) of the role.

This property is read-only.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-ecrimagepullerrole.html#cfn-lightsail-container-ecrimagepullerrole-principalarn

EnvironmentVariableProperty

class CfnContainer.EnvironmentVariableProperty(*, value=None, variable=None)

Bases: object

EnvironmentVariable is a property of the Container property. It describes the environment variables of a container on a container service which are key-value parameters that provide dynamic configuration of the application or script run by the container.

Parameters:
  • value (Optional[str]) – The environment variable value.

  • variable (Optional[str]) – The environment variable key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-environmentvariable.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 import aws_lightsail as lightsail

environment_variable_property = lightsail.CfnContainer.EnvironmentVariableProperty(
    value="value",
    variable="variable"
)

Attributes

value

The environment variable value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-environmentvariable.html#cfn-lightsail-container-environmentvariable-value

variable

The environment variable key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-environmentvariable.html#cfn-lightsail-container-environmentvariable-variable

HealthCheckConfigProperty

class CfnContainer.HealthCheckConfigProperty(*, healthy_threshold=None, interval_seconds=None, path=None, success_codes=None, timeout_seconds=None, unhealthy_threshold=None)

Bases: object

HealthCheckConfig is a property of the PublicEndpoint property. It describes the healthcheck configuration of a container deployment on a container service.

Parameters:
  • healthy_threshold (Union[int, float, None]) – The number of consecutive health check successes required before moving the container to the Healthy state. The default value is 2 .

  • interval_seconds (Union[int, float, None]) – The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5 .

  • path (Optional[str]) – The path on the container on which to perform the health check. The default value is / .

  • success_codes (Optional[str]) – The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).

  • timeout_seconds (Union[int, float, None]) – The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2 .

  • unhealthy_threshold (Union[int, float, None]) – The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-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.
from aws_cdk import aws_lightsail as lightsail

health_check_config_property = lightsail.CfnContainer.HealthCheckConfigProperty(
    healthy_threshold=123,
    interval_seconds=123,
    path="path",
    success_codes="successCodes",
    timeout_seconds=123,
    unhealthy_threshold=123
)

Attributes

healthy_threshold

The number of consecutive health check successes required before moving the container to the Healthy state.

The default value is 2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-healthythreshold

interval_seconds

The approximate interval, in seconds, between health checks of an individual container.

You can specify between 5 and 300 seconds. The default value is 5 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-intervalseconds

path

The path on the container on which to perform the health check.

The default value is / .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-path

success_codes

The HTTP codes to use when checking for a successful response from a container.

You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-successcodes

timeout_seconds

The amount of time, in seconds, during which no response means a failed health check.

You can specify between 2 and 60 seconds. The default value is 2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-timeoutseconds

unhealthy_threshold

The number of consecutive health check failures required before moving the container to the Unhealthy state.

The default value is 2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-healthcheckconfig.html#cfn-lightsail-container-healthcheckconfig-unhealthythreshold

PortInfoProperty

class CfnContainer.PortInfoProperty(*, port=None, protocol=None)

Bases: object

PortInfo is a property of the Container property. It describes the ports to open and the protocols to use for a container on a Amazon Lightsail container service.

Parameters:
  • port (Optional[str]) – The open firewall ports of the container.

  • protocol (Optional[str]) – The protocol name for the open ports. Allowed values : HTTP | HTTPS | TCP | UDP

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.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 import aws_lightsail as lightsail

port_info_property = lightsail.CfnContainer.PortInfoProperty(
    port="port",
    protocol="protocol"
)

Attributes

port

The open firewall ports of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.html#cfn-lightsail-container-portinfo-port

protocol

The protocol name for the open ports.

Allowed values : HTTP | HTTPS | TCP | UDP

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.html#cfn-lightsail-container-portinfo-protocol

PrivateRegistryAccessProperty

class CfnContainer.PrivateRegistryAccessProperty(*, ecr_image_puller_role=None)

Bases: object

Describes the configuration for an Amazon Lightsail container service to access private container image repositories, such as Amazon Elastic Container Registry ( Amazon ECR ) private repositories.

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide .

Parameters:

ecr_image_puller_role (Union[IResolvable, EcrImagePullerRoleProperty, Dict[str, Any], None]) – An object that describes the activation status of the role that you can use to grant a Lightsail container service access to Amazon ECR private repositories. If the role is activated, the Amazon Resource Name (ARN) of the role is also listed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-privateregistryaccess.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 import aws_lightsail as lightsail

private_registry_access_property = lightsail.CfnContainer.PrivateRegistryAccessProperty(
    ecr_image_puller_role=lightsail.CfnContainer.EcrImagePullerRoleProperty(
        is_active=False,
        principal_arn="principalArn"
    )
)

Attributes

ecr_image_puller_role

An object that describes the activation status of the role that you can use to grant a Lightsail container service access to Amazon ECR private repositories.

If the role is activated, the Amazon Resource Name (ARN) of the role is also listed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-privateregistryaccess.html#cfn-lightsail-container-privateregistryaccess-ecrimagepullerrole

PublicDomainNameProperty

class CfnContainer.PublicDomainNameProperty(*, certificate_name=None, domain_names=None)

Bases: object

PublicDomainName is a property of the AWS::Lightsail::Container resource. It describes the public domain names to use with a container service, such as example.com and www.example.com . It also describes the certificates to use with a container service.

Parameters:
  • certificate_name (Optional[str]) – The name of the certificate for the public domains.

  • domain_names (Optional[Sequence[str]]) – The public domain names to use with the container service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.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 import aws_lightsail as lightsail

public_domain_name_property = lightsail.CfnContainer.PublicDomainNameProperty(
    certificate_name="certificateName",
    domain_names=["domainNames"]
)

Attributes

certificate_name

The name of the certificate for the public domains.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.html#cfn-lightsail-container-publicdomainname-certificatename

domain_names

The public domain names to use with the container service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.html#cfn-lightsail-container-publicdomainname-domainnames

PublicEndpointProperty

class CfnContainer.PublicEndpointProperty(*, container_name=None, container_port=None, health_check_config=None)

Bases: object

PublicEndpoint is a property of the ContainerServiceDeployment property. It describes describes the settings of the public endpoint of a container on a container service.

Parameters:
  • container_name (Optional[str]) – The name of the container entry of the deployment that the endpoint configuration applies to.

  • container_port (Union[int, float, None]) – The port of the specified container to which traffic is forwarded to.

  • health_check_config (Union[IResolvable, HealthCheckConfigProperty, Dict[str, Any], None]) – An object that describes the health check configuration of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.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 import aws_lightsail as lightsail

public_endpoint_property = lightsail.CfnContainer.PublicEndpointProperty(
    container_name="containerName",
    container_port=123,
    health_check_config=lightsail.CfnContainer.HealthCheckConfigProperty(
        healthy_threshold=123,
        interval_seconds=123,
        path="path",
        success_codes="successCodes",
        timeout_seconds=123,
        unhealthy_threshold=123
    )
)

Attributes

container_name

The name of the container entry of the deployment that the endpoint configuration applies to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.html#cfn-lightsail-container-publicendpoint-containername

container_port

The port of the specified container to which traffic is forwarded to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.html#cfn-lightsail-container-publicendpoint-containerport

health_check_config

An object that describes the health check configuration of the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.html#cfn-lightsail-container-publicendpoint-healthcheckconfig