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
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 interfaceEnvironmentVariableis a property of the Container property.static interfaceHealthCheckConfigis a property of the PublicEndpoint property.static interfacePortInfois a property of the Container property.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnContainer(Construct scope, String id, CfnContainerProps props) Create a newAWS::Lightsail::Container.protectedCfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnContainer(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.comandwww.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.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.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.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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin 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
ValueofTagsis 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.comandwww.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.comandwww.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.comandwww.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.
-