Class CfnContainer

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:13.456Z") @Stability(Stable) public class CfnContainer extends CfnResource implements IInspectable, ITaggable
The AWS::Lightsail::Container resource specifies a container service.

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

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lightsail.*;
 CfnContainer cfnContainer = CfnContainer.Builder.create(this, "MyCfnContainer")
         .power("power")
         .scale(123)
         .serviceName("serviceName")
         // the properties below are optional
         .containerServiceDeployment(ContainerServiceDeploymentProperty.builder()
                 .containers(List.of(ContainerProperty.builder()
                         .command(List.of("command"))
                         .containerName("containerName")
                         .environment(List.of(EnvironmentVariableProperty.builder()
                                 .value("value")
                                 .variable("variable")
                                 .build()))
                         .image("image")
                         .ports(List.of(PortInfoProperty.builder()
                                 .port("port")
                                 .protocol("protocol")
                                 .build()))
                         .build()))
                 .publicEndpoint(PublicEndpointProperty.builder()
                         .containerName("containerName")
                         .containerPort(123)
                         .healthCheckConfig(HealthCheckConfigProperty.builder()
                                 .healthyThreshold(123)
                                 .intervalSeconds(123)
                                 .path("path")
                                 .successCodes("successCodes")
                                 .timeoutSeconds(123)
                                 .unhealthyThreshold(123)
                                 .build())
                         .build())
                 .build())
         .isDisabled(false)
         .privateRegistryAccess(PrivateRegistryAccessProperty.builder()
                 .ecrImagePullerRole(EcrImagePullerRoleProperty.builder()
                         .isActive(false)
                         .principalArn("principalArn")
                         .build())
                 .build())
         .publicDomainNames(List.of(PublicDomainNameProperty.builder()
                 .certificateName("certificateName")
                 .domainNames(List.of("domainNames"))
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnContainer

      protected CfnContainer(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnContainer

      protected CfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnContainer

      @Stability(Stable) public CfnContainer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrContainerArn

      @Stability(Stable) @NotNull public String getAttrContainerArn()
      The Amazon Resource Name (ARN) of the container.
    • getAttrPrincipalArn

      @Stability(Stable) @NotNull public String getAttrPrincipalArn()
      The principle Amazon Resource Name (ARN) of the role.
    • getAttrPrivateRegistryAccessEcrImagePullerRolePrincipalArn

      @Stability(Stable) @NotNull public String getAttrPrivateRegistryAccessEcrImagePullerRolePrincipalArn()
      The principle Amazon Resource Name (ARN) of the role.
    • getAttrUrl

      @Stability(Stable) @NotNull public String getAttrUrl()
      The publicly accessible URL of the container service.

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

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getPower

      @Stability(Stable) @NotNull public String getPower()
      The power specification of the container service.
    • setPower

      @Stability(Stable) public void setPower(@NotNull String value)
      The power specification of the container service.
    • getScale

      @Stability(Stable) @NotNull public Number getScale()
      The scale specification of the container service.
    • setScale

      @Stability(Stable) public void setScale(@NotNull Number value)
      The scale specification of the container service.
    • getServiceName

      @Stability(Stable) @NotNull public String getServiceName()
      The name of the container service.
    • setServiceName

      @Stability(Stable) public void setServiceName(@NotNull String value)
      The name of the container service.
    • getContainerServiceDeployment

      @Stability(Stable) @Nullable public Object getContainerServiceDeployment()
      An object that describes the current container deployment of the container service.
    • setContainerServiceDeployment

      @Stability(Stable) public void setContainerServiceDeployment(@Nullable IResolvable value)
      An object that describes the current container deployment of the container service.
    • setContainerServiceDeployment

      @Stability(Stable) public void setContainerServiceDeployment(@Nullable CfnContainer.ContainerServiceDeploymentProperty value)
      An object that describes the current container deployment of the container service.
    • getIsDisabled

      @Stability(Stable) @Nullable public Object getIsDisabled()
      A Boolean value indicating whether the container service is disabled.
    • setIsDisabled

      @Stability(Stable) public void setIsDisabled(@Nullable Boolean value)
      A Boolean value indicating whether the container service is disabled.
    • setIsDisabled

      @Stability(Stable) public void setIsDisabled(@Nullable IResolvable value)
      A Boolean value indicating whether the container service is disabled.
    • getPrivateRegistryAccess

      @Stability(Stable) @Nullable public Object getPrivateRegistryAccess()
      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.
    • setPrivateRegistryAccess

      @Stability(Stable) public void setPrivateRegistryAccess(@Nullable IResolvable value)
      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.
    • setPrivateRegistryAccess

      @Stability(Stable) public void setPrivateRegistryAccess(@Nullable CfnContainer.PrivateRegistryAccessProperty value)
      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.
    • getPublicDomainNames

      @Stability(Stable) @Nullable public Object getPublicDomainNames()
      The public domain name of the container service, such as example.com and www.example.com .
    • setPublicDomainNames

      @Stability(Stable) public void setPublicDomainNames(@Nullable IResolvable value)
      The public domain name of the container service, such as example.com and www.example.com .
    • setPublicDomainNames

      @Stability(Stable) public void setPublicDomainNames(@Nullable List<Object> value)
      The public domain name of the container service, such as example.com and www.example.com .
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.