Class CfnExpressGatewayService
- All Implemented Interfaces:
IInspectable,IExpressGatewayServiceRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnExpressGatewayService.static interfaceDefines the configuration for the primary container in an Express service.static interfaceThe repository credentials for private registry authentication to pass to the container.static interfaceDefines the auto-scaling configuration for an Express service.static interfaceSpecifies the Amazon CloudWatch Logs configuration for the Express service container.static interfaceRepresents a specific configuration revision of an Express service, containing all the settings and parameters for that revision.static interfaceThe network configuration for an Express service.static interfaceAn object that defines the status of Express service creation and information about the status of the service.static interfaceThe entry point into an Express service.static interfaceA key-value pair object.static interfaceAn object representing the secret to expose to your container.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.ecs.IExpressGatewayServiceRef
IExpressGatewayServiceRef.Jsii$Default, IExpressGatewayServiceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnExpressGatewayService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnExpressGatewayService(software.amazon.jsii.JsiiObjectRef objRef) CfnExpressGatewayService(software.constructs.Construct scope, String id, CfnExpressGatewayServiceProps props) Create a newAWS::ECS::ExpressGatewayService. -
Method Summary
Modifier and TypeMethodDescriptionThe list of active service configurations for the Express service.The Unix timestamp for when the Express service was created.The ARN that identifies the Express service.The Unix timestamp for when the Express service was last updated.Tag Manager which manages the tags for this resource.The short name or full ARN of the cluster that hosts the Express service.getCpu()The CPU allocation for tasks in this service revision.The ARN of the task execution role for the service revision.A reference to a ExpressGatewayService resource.The health check path for this service revision.The ARN of the infrastructure role that manages AWS resources for the Express service.The memory allocation for tasks in this service revision.The network configuration for tasks in this service revision.The primary container configuration for this service revision.The auto-scaling configuration for this service revision.The name of the Express service.getTags()The metadata applied to the Express service.The ARN of the task role for the service revision.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnExpressGatewayService.renderProperties(Map<String, Object> props) voidsetCluster(String value) The short name or full ARN of the cluster that hosts the Express service.voidThe CPU allocation for tasks in this service revision.voidsetExecutionRoleArn(String value) The ARN of the task execution role for the service revision.voidsetHealthCheckPath(String value) The health check path for this service revision.voidsetInfrastructureRoleArn(String value) The ARN of the infrastructure role that manages AWS resources for the Express service.voidThe memory allocation for tasks in this service revision.voidThe network configuration for tasks in this service revision.voidsetNetworkConfiguration(CfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationProperty value) The network configuration for tasks in this service revision.voidsetPrimaryContainer(IResolvable value) The primary container configuration for this service revision.voidThe primary container configuration for this service revision.voidsetScalingTarget(IResolvable value) The auto-scaling configuration for this service revision.voidThe auto-scaling configuration for this service revision.voidsetServiceName(String value) The name of the Express service.voidThe metadata applied to the Express service.voidsetTaskRoleArn(String value) The ARN of the task role for the service revision.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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
-
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 newAWS::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
Checks whether the given object is a CfnExpressGatewayService.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrActiveConfigurations
The list of active service configurations for the Express service. -
getAttrCreatedAt
The Unix timestamp for when the Express service was created. -
getAttrServiceArn
The ARN that identifies the Express service. -
getAttrStatus
-
getAttrUpdatedAt
The Unix timestamp for when the Express service was last updated. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getExpressGatewayServiceRef
A reference to a ExpressGatewayService resource.- Specified by:
getExpressGatewayServiceRefin interfaceIExpressGatewayServiceRef
-
getExecutionRoleArn
The ARN of the task execution role for the service revision. -
setExecutionRoleArn
The ARN of the task execution role for the service revision. -
getInfrastructureRoleArn
The ARN of the infrastructure role that manages AWS resources for the Express service. -
setInfrastructureRoleArn
The ARN of the infrastructure role that manages AWS resources for the Express service. -
getPrimaryContainer
The primary container configuration for this service revision.Returns union: either
IResolvableorCfnExpressGatewayService.ExpressGatewayContainerProperty -
setPrimaryContainer
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
The short name or full ARN of the cluster that hosts the Express service. -
setCluster
The short name or full ARN of the cluster that hosts the Express service. -
getCpu
The CPU allocation for tasks in this service revision. -
setCpu
The CPU allocation for tasks in this service revision. -
getHealthCheckPath
The health check path for this service revision. -
setHealthCheckPath
The health check path for this service revision. -
getMemory
The memory allocation for tasks in this service revision. -
setMemory
The memory allocation for tasks in this service revision. -
getNetworkConfiguration
The network configuration for tasks in this service revision.Returns union: either
IResolvableorCfnExpressGatewayService.ExpressGatewayServiceNetworkConfigurationProperty -
setNetworkConfiguration
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
The auto-scaling configuration for this service revision.Returns union: either
IResolvableorCfnExpressGatewayService.ExpressGatewayScalingTargetProperty -
setScalingTarget
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
The name of the Express service. -
setServiceName
The name of the Express service. -
getTags
The metadata applied to the Express service. -
setTags
The metadata applied to the Express service. -
getTaskRoleArn
The ARN of the task role for the service revision. -
setTaskRoleArn
The ARN of the task role for the service revision.
-