@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.634Z") @Stability(value=Stable) public class CfnContainer extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnContainer.Builder
A fluent builder for
CfnContainer. |
static interface |
CfnContainer.ContainerProperty
`Container` is a property of the [ContainerServiceDeployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html) property.
|
static interface |
CfnContainer.ContainerServiceDeploymentProperty
`ContainerServiceDeployment` is a property of the [AWS::Lightsail::Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-container.html) resource.
|
static interface |
CfnContainer.EnvironmentVariableProperty
`EnvironmentVariable` is a property of the [Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html) property.
|
static interface |
CfnContainer.HealthCheckConfigProperty
`HealthCheckConfig` is a property of the [PublicEndpoint](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.html) property.
|
static interface |
CfnContainer.PortInfoProperty
`PortInfo` is a property of the [Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html) property.
|
static interface |
CfnContainer.PublicDomainNameProperty
`PublicDomainName` is a property of the [AWS::Lightsail::Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-container.html) resource.
|
static interface |
CfnContainer.PublicEndpointProperty
`PublicEndpoint` is a property of the [ContainerServiceDeployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html) property.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnContainer(software.constructs.Construct scope,
String id,
CfnContainerProps props)
Create a new `AWS::Lightsail::Container`.
|
protected |
CfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnContainer(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrContainerArn()
The Amazon Resource Name (ARN) of the container.
|
String |
getAttrUrl()
The publicly accessible URL of the container service.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getContainerServiceDeployment()
An object that describes the current container deployment of the container service.
|
Object |
getIsDisabled()
A Boolean value indicating whether the container service is disabled.
|
String |
getPower()
The power specification of the container service.
|
Object |
getPublicDomainNames()
The public domain name of the container service, such as `example.com` and `www.example.com` .
|
Number |
getScale()
The scale specification of the container service.
|
String |
getServiceName()
The name of the container service.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setContainerServiceDeployment(CfnContainer.ContainerServiceDeploymentProperty value)
An object that describes the current container deployment of the container service.
|
void |
setContainerServiceDeployment(IResolvable value)
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 |
setPower(String value)
The power specification of the container service.
|
void |
setPublicDomainNames(IResolvable value)
The public domain name of the container service, such as `example.com` and `www.example.com` .
|
void |
setPublicDomainNames(List<Object> value)
The public domain name of the container service, such as `example.com` and `www.example.com` .
|
void |
setScale(Number value)
The scale specification of the container service.
|
void |
setServiceName(String value)
The name of the container service.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnContainer(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnContainer(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnContainerProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrContainerArn()
@Stability(value=Stable) @NotNull public String getAttrUrl()
If no public endpoint is specified in the current deployment, this URL returns a 404 response.
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
@Stability(value=Stable) @NotNull public String getPower()
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
@Stability(value=Stable)
public void setPower(@NotNull
String value)
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.
@Stability(value=Stable) @NotNull public Number getScale()
The scale specifies the allocated compute nodes of the container service.
@Stability(value=Stable)
public void setScale(@NotNull
Number value)
The scale specifies the allocated compute nodes of the container service.
@Stability(value=Stable) @NotNull public String getServiceName()
@Stability(value=Stable)
public void setServiceName(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getContainerServiceDeployment()
@Stability(value=Stable)
public void setContainerServiceDeployment(@Nullable
CfnContainer.ContainerServiceDeploymentProperty value)
@Stability(value=Stable)
public void setContainerServiceDeployment(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getIsDisabled()
@Stability(value=Stable)
public void setIsDisabled(@Nullable
Boolean value)
@Stability(value=Stable)
public void setIsDisabled(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getPublicDomainNames()
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.
@Stability(value=Stable)
public void setPublicDomainNames(@Nullable
IResolvable value)
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.
@Stability(value=Stable)
public void setPublicDomainNames(@Nullable
List<Object> value)
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.
Copyright © 2022. All rights reserved.