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
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:25:00.864Z")
@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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnContainer
.static interface
Container
is a property of the ContainerServiceDeployment property.static interface
ContainerServiceDeployment
is a property of the AWS::Lightsail::Container resource.static interface
Describes the IAM role that you can use to grant a Lightsail container service access to Amazon ECR private repositories.static interface
EnvironmentVariable
is a property of the Container property.static interface
HealthCheckConfig
is a property of the PublicEndpoint property.static interface
PortInfo
is a property of the Container property.static interface
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.static interface
PublicDomainName
is a property of the AWS::Lightsail::Container resource.static interface
PublicEndpoint
is a property of the ContainerServiceDeployment property.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnContainer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnContainer
(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.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.com
andwww.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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
An object that describes the current container deployment of the container service.void
An object that describes the current container deployment of the container service.void
setIsDisabled
(Boolean value) A Boolean value indicating whether the container service is disabled.void
setIsDisabled
(IResolvable value) A Boolean value indicating whether the container service is disabled.void
The power specification of the container service.void
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.void
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.void
setPublicDomainNames
(List<Object> value) The public domain name of the container service, such asexample.com
andwww.example.com
.void
setPublicDomainNames
(IResolvable value) The public domain name of the container service, such asexample.com
andwww.example.com
.void
The scale specification of the container service.void
setServiceName
(String value) The name of the container service.void
setTagsRaw
(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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
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.com
andwww.example.com
. -
setPublicDomainNames
The public domain name of the container service, such asexample.com
andwww.example.com
. -
setPublicDomainNames
The public domain name of the container service, such asexample.com
andwww.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.
-