Class CfnContainer
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Lightsail::Container
.
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) .publicDomainNames(List.of(PublicDomainNameProperty.builder() .certificateName("certificateName") .domainNames(List.of("domainNames")) .build())) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
-
Nested Class Summary
Modifier 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
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
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnContainer
(Construct scope, String id, CfnContainerProps props) Create a newAWS::Lightsail::Container
.protected
CfnContainer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnContainer
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the container.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.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()
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
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.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
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 Construct scope, @NotNull String id, @NotNull CfnContainerProps props) Create a newAWS::Lightsail::Container
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
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. -
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
An array of key-value pairs to apply to this resource.For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources. -
getPower
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.
-
setPower
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.
-
getScale
The scale specification of the container service.The scale specifies the allocated compute nodes of the container service.
-
setScale
The scale specification of the container service.The scale specifies the allocated compute nodes 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. -
getPublicDomainNames
The public domain name of the container service, such asexample.com
andwww.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.
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.
-
setPublicDomainNames
The public domain name of the container service, such asexample.com
andwww.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.
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.
-
setPublicDomainNames
The public domain name of the container service, such asexample.com
andwww.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.
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.
-