Skip to content
v2.278.0

CfnExpressGatewayServiceProps Struct ​

Properties for defining a CfnExpressGatewayService.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const cfnExpressGatewayServiceProps: ecs.CfnExpressGatewayServiceProps = {
  infrastructureRoleArn: 'infrastructureRoleArn',

  // the properties below are optional
  cluster: 'cluster',
  cpu: 'cpu',
  executionRoleArn: 'executionRoleArn',
  healthCheckPath: 'healthCheckPath',
  memory: 'memory',
  networkConfiguration: {
    securityGroups: ['securityGroups'],
    subnets: ['subnets'],
  },
  primaryContainer: {
    image: 'image',

    // the properties below are optional
    awsLogsConfiguration: {
      logGroup: 'logGroup',
      logStreamPrefix: 'logStreamPrefix',
    },
    command: ['command'],
    containerPort: 123,
    environment: [{
      name: 'name',
      value: 'value',
    }],
    repositoryCredentials: {
      credentialsParameter: 'credentialsParameter',
    },
    secrets: [{
      name: 'name',
      valueFrom: 'valueFrom',
    }],
  },
  scalingTarget: {
    autoScalingMetric: 'autoScalingMetric',
    autoScalingTargetValue: 123,
    maxTaskCount: 123,
    minTaskCount: 123,
  },
  serviceName: 'serviceName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  taskDefinitionArn: 'taskDefinitionArn',
  taskRoleArn: 'taskRoleArn',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

cfn_express_gateway_service_props = ecs.CfnExpressGatewayServiceProps(
    infrastructure_role_arn="infrastructureRoleArn",

    # the properties below are optional
    cluster="cluster",
    cpu="cpu",
    execution_role_arn="executionRoleArn",
    health_check_path="healthCheckPath",
    memory="memory",
    network_configuration=ecs.CfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationProperty(
        security_groups=["securityGroups"],
        subnets=["subnets"]
    ),
    primary_container=ecs.CfnExpressGatewayService.ExpressGatewayContainerProperty(
        image="image",

        # the properties below are optional
        aws_logs_configuration=ecs.CfnExpressGatewayService.ExpressGatewayServiceAwsLogsConfigurationProperty(
            log_group="logGroup",
            log_stream_prefix="logStreamPrefix"
        ),
        command=["command"],
        container_port=123,
        environment=[ecs.CfnExpressGatewayService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        repository_credentials=ecs.CfnExpressGatewayService.ExpressGatewayRepositoryCredentialsProperty(
            credentials_parameter="credentialsParameter"
        ),
        secrets=[ecs.CfnExpressGatewayService.SecretProperty(
            name="name",
            value_from="valueFrom"
        )]
    ),
    scaling_target=ecs.CfnExpressGatewayService.ExpressGatewayScalingTargetProperty(
        auto_scaling_metric="autoScalingMetric",
        auto_scaling_target_value=123,
        max_task_count=123,
        min_task_count=123
    ),
    service_name="serviceName",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    task_definition_arn="taskDefinitionArn",
    task_role_arn="taskRoleArn"
)
java
// 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.*;

CfnExpressGatewayServiceProps cfnExpressGatewayServiceProps = CfnExpressGatewayServiceProps.builder()
        .infrastructureRoleArn("infrastructureRoleArn")

        // the properties below are optional
        .cluster("cluster")
        .cpu("cpu")
        .executionRoleArn("executionRoleArn")
        .healthCheckPath("healthCheckPath")
        .memory("memory")
        .networkConfiguration(ExpressGatewayServiceNetworkConfigurationProperty.builder()
                .securityGroups(List.of("securityGroups"))
                .subnets(List.of("subnets"))
                .build())
        .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())
        .scalingTarget(ExpressGatewayScalingTargetProperty.builder()
                .autoScalingMetric("autoScalingMetric")
                .autoScalingTargetValue(123)
                .maxTaskCount(123)
                .minTaskCount(123)
                .build())
        .serviceName("serviceName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .taskDefinitionArn("taskDefinitionArn")
        .taskRoleArn("taskRoleArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var cfnExpressGatewayServiceProps = new CfnExpressGatewayServiceProps {
    InfrastructureRoleArn = "infrastructureRoleArn",

    // the properties below are optional
    Cluster = "cluster",
    Cpu = "cpu",
    ExecutionRoleArn = "executionRoleArn",
    HealthCheckPath = "healthCheckPath",
    Memory = "memory",
    NetworkConfiguration = new ExpressGatewayServiceNetworkConfigurationProperty {
        SecurityGroups = new [] { "securityGroups" },
        Subnets = new [] { "subnets" }
    },
    PrimaryContainer = new ExpressGatewayContainerProperty {
        Image = "image",

        // the properties below are optional
        AwsLogsConfiguration = new ExpressGatewayServiceAwsLogsConfigurationProperty {
            LogGroup = "logGroup",
            LogStreamPrefix = "logStreamPrefix"
        },
        Command = new [] { "command" },
        ContainerPort = 123,
        Environment = new [] { new KeyValuePairProperty {
            Name = "name",
            Value = "value"
        } },
        RepositoryCredentials = new ExpressGatewayRepositoryCredentialsProperty {
            CredentialsParameter = "credentialsParameter"
        },
        Secrets = new [] { new SecretProperty {
            Name = "name",
            ValueFrom = "valueFrom"
        } }
    },
    ScalingTarget = new ExpressGatewayScalingTargetProperty {
        AutoScalingMetric = "autoScalingMetric",
        AutoScalingTargetValue = 123,
        MaxTaskCount = 123,
        MinTaskCount = 123
    },
    ServiceName = "serviceName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TaskDefinitionArn = "taskDefinitionArn",
    TaskRoleArn = "taskRoleArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnExpressGatewayServiceProps := &CfnExpressGatewayServiceProps{
	InfrastructureRoleArn: jsii.String("infrastructureRoleArn"),

	// the properties below are optional
	Cluster: jsii.String("cluster"),
	Cpu: jsii.String("cpu"),
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	HealthCheckPath: jsii.String("healthCheckPath"),
	Memory: jsii.String("memory"),
	NetworkConfiguration: &ExpressGatewayServiceNetworkConfigurationProperty{
		SecurityGroups: []*string{
			jsii.String("securityGroups"),
		},
		Subnets: []*string{
			jsii.String("subnets"),
		},
	},
	PrimaryContainer: &ExpressGatewayContainerProperty{
		Image: jsii.String("image"),

		// the properties below are optional
		AwsLogsConfiguration: &ExpressGatewayServiceAwsLogsConfigurationProperty{
			LogGroup: jsii.String("logGroup"),
			LogStreamPrefix: jsii.String("logStreamPrefix"),
		},
		Command: []*string{
			jsii.String("command"),
		},
		ContainerPort: jsii.Number(123),
		Environment: []interface{}{
			&KeyValuePairProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
		RepositoryCredentials: &ExpressGatewayRepositoryCredentialsProperty{
			CredentialsParameter: jsii.String("credentialsParameter"),
		},
		Secrets: []interface{}{
			&SecretProperty{
				Name: jsii.String("name"),
				ValueFrom: jsii.String("valueFrom"),
			},
		},
	},
	ScalingTarget: &ExpressGatewayScalingTargetProperty{
		AutoScalingMetric: jsii.String("autoScalingMetric"),
		AutoScalingTargetValue: jsii.Number(123),
		MaxTaskCount: jsii.Number(123),
		MinTaskCount: jsii.Number(123),
	},
	ServiceName: jsii.String("serviceName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TaskDefinitionArn: jsii.String("taskDefinitionArn"),
	TaskRoleArn: jsii.String("taskRoleArn"),
}

Properties ​

clusteroptionalstringclusteroptionalstrclusteroptionalStringClusteroptionalstringClusteroptional*string = "default" #
The short name or full ARN of the cluster that hosts the Express service.
cpuoptionalstringcpuoptionalstrcpuoptionalStringCpuoptionalstringCpuoptional*string = "256" #
The CPU allocation for tasks in this service revision.
executionRoleArnoptionalstringexecution_role_arnoptionalstrexecutionRoleArnoptionalStringExecutionRoleArnoptionalstringExecutionRoleArnoptional*string #
The ARN of the task execution role for the service revision.
healthCheckPathoptionalstringhealth_check_pathoptionalstrhealthCheckPathoptionalStringHealthCheckPathoptionalstringHealthCheckPathoptional*string = "HTTP:80/ping" #
The health check path for this service revision.
infrastructureRoleArnstringinfrastructure_role_arnstrinfrastructureRoleArnStringInfrastructureRoleArnstringInfrastructureRoleArn*string required #
The ARN of the infrastructure role that manages AWS resources for the Express service.
memoryoptionalstringmemoryoptionalstrmemoryoptionalStringMemoryoptionalstringMemoryoptional*string = "512" #
The memory allocation for tasks in this service revision.
networkConfigurationoptionalIResolvable | CfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationPropertynetwork_configurationoptionaltyping.Union[IResolvable, ExpressGatewayServiceNetworkConfigurationProperty]networkConfigurationoptionalIResolvableNetworkConfigurationoptionalIResolvableNetworkConfigurationoptionalinterface{} #
The network configuration for tasks in this service revision.
primaryContaineroptionalIResolvable | CfnExpressGatewayService.ExpressGatewayContainerPropertyprimary_containeroptionaltyping.Union[IResolvable, ExpressGatewayContainerProperty]primaryContaineroptionalIResolvablePrimaryContaineroptionalIResolvablePrimaryContaineroptionalinterface{} #
The primary container configuration for this service revision.
scalingTargetoptionalIResolvable | CfnExpressGatewayService.ExpressGatewayScalingTargetPropertyscaling_targetoptionaltyping.Union[IResolvable, ExpressGatewayScalingTargetProperty]scalingTargetoptionalIResolvableScalingTargetoptionalIResolvableScalingTargetoptionalinterface{} #
The auto-scaling configuration for this service revision.
serviceNameoptionalstringservice_nameoptionalstrserviceNameoptionalStringServiceNameoptionalstringServiceNameoptional*string #
The name of the Express service.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The metadata applied to the Express service.
taskDefinitionArnoptionalstringtask_definition_arnoptionalstrtaskDefinitionArnoptionalStringTaskDefinitionArnoptionalstringTaskDefinitionArnoptional*string #
taskRoleArnoptionalstringtask_role_arnoptionalstrtaskRoleArnoptionalStringTaskRoleArnoptionalstringTaskRoleArnoptional*string #
The ARN of the task role for the service revision.