Class CfnExpressGatewayService

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IExpressGatewayServiceRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-12-01T16:02:19.828Z") @Stability(Stable) public class CfnExpressGatewayService extends CfnResource implements IInspectable, IExpressGatewayServiceRef, ITaggableV2
Creates an Express service that simplifies deploying containerized web applications on Amazon ECS with managed AWS infrastructure.

This operation provisions and configures Application Load Balancers, target groups, security groups, and auto-scaling policies automatically.

Specify a primary container configuration with your application image and basic settings. Amazon ECS creates the necessary AWS resources for traffic distribution, health monitoring, network access control, and capacity management.

Provide an execution role for task operations and an infrastructure role for managing AWS resources on your behalf.

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.ecs.*;
 CfnExpressGatewayService cfnExpressGatewayService = CfnExpressGatewayService.Builder.create(this, "MyCfnExpressGatewayService")
         .executionRoleArn("executionRoleArn")
         .infrastructureRoleArn("infrastructureRoleArn")
         .primaryContainer(ExpressGatewayContainerProperty.builder()
                 .image("image")
                 // the properties below are optional
                 .awsLogsConfiguration(ExpressGatewayServiceAwsLogsConfigurationProperty.builder()
                         .logGroup("logGroup")
                         .logStreamPrefix("logStreamPrefix")
                         .build())
                 .command(List.of("command"))
                 .containerPort(123)
                 .environment(List.of(KeyValuePairProperty.builder()
                         .name("name")
                         .value("value")
                         .build()))
                 .repositoryCredentials(ExpressGatewayRepositoryCredentialsProperty.builder()
                         .credentialsParameter("credentialsParameter")
                         .build())
                 .secrets(List.of(SecretProperty.builder()
                         .name("name")
                         .valueFrom("valueFrom")
                         .build()))
                 .build())
         // the properties below are optional
         .cluster("cluster")
         .cpu("cpu")
         .healthCheckPath("healthCheckPath")
         .memory("memory")
         .networkConfiguration(ExpressGatewayServiceNetworkConfigurationProperty.builder()
                 .securityGroups(List.of("securityGroups"))
                 .subnets(List.of("subnets"))
                 .build())
         .scalingTarget(ExpressGatewayScalingTargetProperty.builder()
                 .autoScalingMetric("autoScalingMetric")
                 .autoScalingTargetValue(123)
                 .maxTaskCount(123)
                 .minTaskCount(123)
                 .build())
         .serviceName("serviceName")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .taskRoleArn("taskRoleArn")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnExpressGatewayService

      protected CfnExpressGatewayService(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnExpressGatewayService

      protected CfnExpressGatewayService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnExpressGatewayService

      @Stability(Stable) public CfnExpressGatewayService(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnExpressGatewayServiceProps props)
      Create a new AWS::ECS::ExpressGatewayService.

      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

    • isCfnExpressGatewayService

      @Stability(Stable) @NotNull public static Boolean isCfnExpressGatewayService(@NotNull Object x)
      Checks whether the given object is a CfnExpressGatewayService.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrActiveConfigurations

      @Stability(Stable) @NotNull public IResolvable getAttrActiveConfigurations()
      The list of active service configurations for the Express service.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The Unix timestamp for when the Express service was created.
    • getAttrServiceArn

      @Stability(Stable) @NotNull public String getAttrServiceArn()
      The ARN that identifies the Express service.
    • getAttrStatus

      @Stability(Stable) @NotNull public IResolvable getAttrStatus()
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The Unix timestamp for when the Express service was last updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getExpressGatewayServiceRef

      @Stability(Stable) @NotNull public ExpressGatewayServiceReference getExpressGatewayServiceRef()
      A reference to a ExpressGatewayService resource.
      Specified by:
      getExpressGatewayServiceRef in interface IExpressGatewayServiceRef
    • getExecutionRoleArn

      @Stability(Stable) @NotNull public String getExecutionRoleArn()
      The ARN of the task execution role for the service revision.
    • setExecutionRoleArn

      @Stability(Stable) public void setExecutionRoleArn(@NotNull String value)
      The ARN of the task execution role for the service revision.
    • getInfrastructureRoleArn

      @Stability(Stable) @NotNull public String getInfrastructureRoleArn()
      The ARN of the infrastructure role that manages AWS resources for the Express service.
    • setInfrastructureRoleArn

      @Stability(Stable) public void setInfrastructureRoleArn(@NotNull String value)
      The ARN of the infrastructure role that manages AWS resources for the Express service.
    • getPrimaryContainer

      @Stability(Stable) @NotNull public Object getPrimaryContainer()
      The primary container configuration for this service revision.

      Returns union: either IResolvable or CfnExpressGatewayService.ExpressGatewayContainerProperty

    • setPrimaryContainer

      @Stability(Stable) public void setPrimaryContainer(@NotNull IResolvable value)
      The primary container configuration for this service revision.
    • setPrimaryContainer

      @Stability(Stable) public void setPrimaryContainer(@NotNull CfnExpressGatewayService.ExpressGatewayContainerProperty value)
      The primary container configuration for this service revision.
    • getCluster

      @Stability(Stable) @Nullable public String getCluster()
      The short name or full ARN of the cluster that hosts the Express service.
    • setCluster

      @Stability(Stable) public void setCluster(@Nullable String value)
      The short name or full ARN of the cluster that hosts the Express service.
    • getCpu

      @Stability(Stable) @Nullable public String getCpu()
      The CPU allocation for tasks in this service revision.
    • setCpu

      @Stability(Stable) public void setCpu(@Nullable String value)
      The CPU allocation for tasks in this service revision.
    • getHealthCheckPath

      @Stability(Stable) @Nullable public String getHealthCheckPath()
      The health check path for this service revision.
    • setHealthCheckPath

      @Stability(Stable) public void setHealthCheckPath(@Nullable String value)
      The health check path for this service revision.
    • getMemory

      @Stability(Stable) @Nullable public String getMemory()
      The memory allocation for tasks in this service revision.
    • setMemory

      @Stability(Stable) public void setMemory(@Nullable String value)
      The memory allocation for tasks in this service revision.
    • getNetworkConfiguration

      @Stability(Stable) @Nullable public Object getNetworkConfiguration()
      The network configuration for tasks in this service revision.

      Returns union: either IResolvable or CfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationProperty

    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@Nullable IResolvable value)
      The network configuration for tasks in this service revision.
    • setNetworkConfiguration

      @Stability(Stable) public void setNetworkConfiguration(@Nullable CfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationProperty value)
      The network configuration for tasks in this service revision.
    • getScalingTarget

      @Stability(Stable) @Nullable public Object getScalingTarget()
      The auto-scaling configuration for this service revision.

      Returns union: either IResolvable or CfnExpressGatewayService.ExpressGatewayScalingTargetProperty

    • setScalingTarget

      @Stability(Stable) public void setScalingTarget(@Nullable IResolvable value)
      The auto-scaling configuration for this service revision.
    • setScalingTarget

      @Stability(Stable) public void setScalingTarget(@Nullable CfnExpressGatewayService.ExpressGatewayScalingTargetProperty value)
      The auto-scaling configuration for this service revision.
    • getServiceName

      @Stability(Stable) @Nullable public String getServiceName()
      The name of the Express service.
    • setServiceName

      @Stability(Stable) public void setServiceName(@Nullable String value)
      The name of the Express service.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The metadata applied to the Express service.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The metadata applied to the Express service.
    • getTaskRoleArn

      @Stability(Stable) @Nullable public String getTaskRoleArn()
      The ARN of the task role for the service revision.
    • setTaskRoleArn

      @Stability(Stable) public void setTaskRoleArn(@Nullable String value)
      The ARN of the task role for the service revision.