Class CfnContainer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lightsail.CfnContainer
- All Implemented Interfaces:
IInspectable,ITaggable,IContainerRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:15.052Z")
@Stability(Stable)
public class CfnContainer
extends CfnResource
implements IInspectable, IContainerRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnContainer.static interfaceContaineris a property of the ContainerServiceDeployment property.static interfaceContainerServiceDeploymentis a property of the AWS::Lightsail::Container resource.static interfaceDescribes the IAM role that you can use to grant a Lightsail container service access to Amazon ECR private repositories.static interfaceEnvironmentVariableis a property of the Container property.static interfaceHealthCheckConfigis a property of the PublicEndpoint property.static interfacePortInfois a property of the Container property.static interfaceDescribes the configuration for an Amazon Lightsail container service to access private container image repositories, such as Amazon Elastic Container Registry ( Amazon ECR ) private repositories.static interfacePublicDomainNameis a property of the AWS::Lightsail::Container resource.static interfacePublicEndpointis a property of the ContainerServiceDeployment property.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.lightsail.IContainerRef
IContainerRef.Jsii$Default, IContainerRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnContainer(software.amazon.jsii.JsiiObjectRef objRef) CfnContainer(software.constructs.Construct scope, String id, CfnContainerProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the container.The principle Amazon Resource Name (ARN) of the role.The principle Amazon Resource Name (ARN) of the role.The publicly accessible URL of the container service.A reference to a Container resource.An object that describes the current container deployment of the container service.A Boolean value indicating whether the container service is disabled.getPower()The power specification of the container service.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.The public domain name of the container service, such asexample.comandwww.example.com.getScale()The scale specification of the container service.The name of the container service.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidAn object that describes the current container deployment of the container service.voidAn object that describes the current container deployment of the container service.voidsetIsDisabled(Boolean value) A Boolean value indicating whether the container service is disabled.voidsetIsDisabled(IResolvable value) A Boolean value indicating whether the container service is disabled.voidThe power specification of the container service.voidAn 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.voidAn 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.voidsetPublicDomainNames(List<Object> value) The public domain name of the container service, such asexample.comandwww.example.com.voidsetPublicDomainNames(IResolvable value) The public domain name of the container service, such asexample.comandwww.example.com.voidThe scale specification of the container service.voidsetServiceName(String value) The name of the container service.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrContainerArn
The Amazon Resource Name (ARN) of the container. -
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
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
- Overrides:
getCfnPropertiesin classCfnResource
-
getContainerRef
A reference to a Container resource.- Specified by:
getContainerRefin interfaceIContainerRef
-
getTags
Tag Manager which manages the tags for this resource. -
getPower
The power specification of the container service. -
setPower
The power specification of the container service. -
getScale
The scale specification of the container service. -
setScale
The scale specification of the container service. -
getServiceName
The name of the container service. -
setServiceName
The name of the container service. -
getContainerServiceDeployment
An object that describes the current container deployment of the container service. -
setContainerServiceDeployment
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
A Boolean value indicating whether the container service is disabled. -
setIsDisabled
A Boolean value indicating whether the container service is disabled. -
setIsDisabled
A Boolean value indicating whether the container service is disabled. -
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
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
The public domain name of the container service, such asexample.comandwww.example.com. -
setPublicDomainNames
The public domain name of the container service, such asexample.comandwww.example.com. -
setPublicDomainNames
The public domain name of the container service, such asexample.comandwww.example.com. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-