Documentation
¶
Index ¶
- func ApplicationLoadBalancedEc2Service_IsConstruct(x interface{}) *bool
- func ApplicationLoadBalancedFargateService_IsConstruct(x interface{}) *bool
- func ApplicationLoadBalancedServiceBase_IsConstruct(x interface{}) *bool
- func ApplicationMultipleTargetGroupsEc2Service_IsConstruct(x interface{}) *bool
- func ApplicationMultipleTargetGroupsFargateService_IsConstruct(x interface{}) *bool
- func ApplicationMultipleTargetGroupsServiceBase_IsConstruct(x interface{}) *bool
- func NetworkLoadBalancedEc2Service_IsConstruct(x interface{}) *bool
- func NetworkLoadBalancedFargateService_IsConstruct(x interface{}) *bool
- func NetworkLoadBalancedServiceBase_IsConstruct(x interface{}) *bool
- func NetworkMultipleTargetGroupsEc2Service_IsConstruct(x interface{}) *bool
- func NetworkMultipleTargetGroupsFargateService_IsConstruct(x interface{}) *bool
- func NetworkMultipleTargetGroupsServiceBase_IsConstruct(x interface{}) *bool
- func NewApplicationLoadBalancedEc2Service_Override(a ApplicationLoadBalancedEc2Service, scope constructs.Construct, id *string, ...)
- func NewApplicationLoadBalancedFargateService_Override(a ApplicationLoadBalancedFargateService, scope constructs.Construct, ...)
- func NewApplicationLoadBalancedServiceBase_Override(a ApplicationLoadBalancedServiceBase, scope constructs.Construct, id *string, ...)
- func NewApplicationMultipleTargetGroupsEc2Service_Override(a ApplicationMultipleTargetGroupsEc2Service, scope constructs.Construct, ...)
- func NewApplicationMultipleTargetGroupsFargateService_Override(a ApplicationMultipleTargetGroupsFargateService, scope constructs.Construct, ...)
- func NewApplicationMultipleTargetGroupsServiceBase_Override(a ApplicationMultipleTargetGroupsServiceBase, scope constructs.Construct, ...)
- func NewNetworkLoadBalancedEc2Service_Override(n NetworkLoadBalancedEc2Service, scope constructs.Construct, id *string, ...)
- func NewNetworkLoadBalancedFargateService_Override(n NetworkLoadBalancedFargateService, scope constructs.Construct, id *string, ...)
- func NewNetworkLoadBalancedServiceBase_Override(n NetworkLoadBalancedServiceBase, scope constructs.Construct, id *string, ...)
- func NewNetworkMultipleTargetGroupsEc2Service_Override(n NetworkMultipleTargetGroupsEc2Service, scope constructs.Construct, ...)
- func NewNetworkMultipleTargetGroupsFargateService_Override(n NetworkMultipleTargetGroupsFargateService, scope constructs.Construct, ...)
- func NewNetworkMultipleTargetGroupsServiceBase_Override(n NetworkMultipleTargetGroupsServiceBase, scope constructs.Construct, ...)
- func NewQueueProcessingEc2Service_Override(q QueueProcessingEc2Service, scope constructs.Construct, id *string, ...)
- func NewQueueProcessingFargateService_Override(q QueueProcessingFargateService, scope constructs.Construct, id *string, ...)
- func NewQueueProcessingServiceBase_Override(q QueueProcessingServiceBase, scope constructs.Construct, id *string, ...)
- func NewScheduledEc2Task_Override(s ScheduledEc2Task, scope constructs.Construct, id *string, ...)
- func NewScheduledFargateTask_Override(s ScheduledFargateTask, scope constructs.Construct, id *string, ...)
- func NewScheduledTaskBase_Override(s ScheduledTaskBase, scope constructs.Construct, id *string, ...)
- func QueueProcessingEc2Service_IsConstruct(x interface{}) *bool
- func QueueProcessingFargateService_IsConstruct(x interface{}) *bool
- func QueueProcessingServiceBase_IsConstruct(x interface{}) *bool
- func ScheduledEc2Task_IsConstruct(x interface{}) *bool
- func ScheduledFargateTask_IsConstruct(x interface{}) *bool
- func ScheduledTaskBase_IsConstruct(x interface{}) *bool
- type ApplicationListenerProps
- type ApplicationLoadBalancedEc2Service
- type ApplicationLoadBalancedEc2ServiceProps
- type ApplicationLoadBalancedFargateService
- type ApplicationLoadBalancedFargateServiceProps
- type ApplicationLoadBalancedServiceBase
- type ApplicationLoadBalancedServiceBaseProps
- type ApplicationLoadBalancedServiceRecordType
- type ApplicationLoadBalancedTaskImageOptions
- type ApplicationLoadBalancedTaskImageProps
- type ApplicationLoadBalancerProps
- type ApplicationMultipleTargetGroupsEc2Service
- type ApplicationMultipleTargetGroupsEc2ServiceProps
- type ApplicationMultipleTargetGroupsFargateService
- type ApplicationMultipleTargetGroupsFargateServiceProps
- type ApplicationMultipleTargetGroupsServiceBase
- type ApplicationMultipleTargetGroupsServiceBaseProps
- type ApplicationTargetProps
- type NetworkListenerProps
- type NetworkLoadBalancedEc2Service
- type NetworkLoadBalancedEc2ServiceProps
- type NetworkLoadBalancedFargateService
- type NetworkLoadBalancedFargateServiceProps
- type NetworkLoadBalancedServiceBase
- type NetworkLoadBalancedServiceBaseProps
- type NetworkLoadBalancedServiceRecordType
- type NetworkLoadBalancedTaskImageOptions
- type NetworkLoadBalancedTaskImageProps
- type NetworkLoadBalancerProps
- type NetworkMultipleTargetGroupsEc2Service
- type NetworkMultipleTargetGroupsEc2ServiceProps
- type NetworkMultipleTargetGroupsFargateService
- type NetworkMultipleTargetGroupsFargateServiceProps
- type NetworkMultipleTargetGroupsServiceBase
- type NetworkMultipleTargetGroupsServiceBaseProps
- type NetworkTargetProps
- type QueueProcessingEc2Service
- type QueueProcessingEc2ServiceProps
- type QueueProcessingFargateService
- type QueueProcessingFargateServiceProps
- type QueueProcessingServiceBase
- type QueueProcessingServiceBaseProps
- type ScheduledEc2Task
- type ScheduledEc2TaskDefinitionOptions
- type ScheduledEc2TaskImageOptions
- type ScheduledEc2TaskProps
- type ScheduledFargateTask
- type ScheduledFargateTaskDefinitionOptions
- type ScheduledFargateTaskImageOptions
- type ScheduledFargateTaskProps
- type ScheduledTaskBase
- type ScheduledTaskBaseProps
- type ScheduledTaskImageProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationLoadBalancedEc2Service_IsConstruct ¶
func ApplicationLoadBalancedEc2Service_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ApplicationLoadBalancedFargateService_IsConstruct ¶
func ApplicationLoadBalancedFargateService_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ApplicationLoadBalancedServiceBase_IsConstruct ¶
func ApplicationLoadBalancedServiceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ApplicationMultipleTargetGroupsEc2Service_IsConstruct ¶
func ApplicationMultipleTargetGroupsEc2Service_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ApplicationMultipleTargetGroupsFargateService_IsConstruct ¶
func ApplicationMultipleTargetGroupsFargateService_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ApplicationMultipleTargetGroupsServiceBase_IsConstruct ¶
func ApplicationMultipleTargetGroupsServiceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkLoadBalancedEc2Service_IsConstruct ¶
func NetworkLoadBalancedEc2Service_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkLoadBalancedFargateService_IsConstruct ¶
func NetworkLoadBalancedFargateService_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkLoadBalancedServiceBase_IsConstruct ¶
func NetworkLoadBalancedServiceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkMultipleTargetGroupsEc2Service_IsConstruct ¶
func NetworkMultipleTargetGroupsEc2Service_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkMultipleTargetGroupsFargateService_IsConstruct ¶
func NetworkMultipleTargetGroupsFargateService_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NetworkMultipleTargetGroupsServiceBase_IsConstruct ¶
func NetworkMultipleTargetGroupsServiceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NewApplicationLoadBalancedEc2Service_Override ¶
func NewApplicationLoadBalancedEc2Service_Override(a ApplicationLoadBalancedEc2Service, scope constructs.Construct, id *string, props *ApplicationLoadBalancedEc2ServiceProps)
Constructs a new instance of the ApplicationLoadBalancedEc2Service class.
func NewApplicationLoadBalancedFargateService_Override ¶
func NewApplicationLoadBalancedFargateService_Override(a ApplicationLoadBalancedFargateService, scope constructs.Construct, id *string, props *ApplicationLoadBalancedFargateServiceProps)
Constructs a new instance of the ApplicationLoadBalancedFargateService class.
func NewApplicationLoadBalancedServiceBase_Override ¶
func NewApplicationLoadBalancedServiceBase_Override(a ApplicationLoadBalancedServiceBase, scope constructs.Construct, id *string, props *ApplicationLoadBalancedServiceBaseProps)
Constructs a new instance of the ApplicationLoadBalancedServiceBase class.
func NewApplicationMultipleTargetGroupsEc2Service_Override ¶
func NewApplicationMultipleTargetGroupsEc2Service_Override(a ApplicationMultipleTargetGroupsEc2Service, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsEc2ServiceProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.
func NewApplicationMultipleTargetGroupsFargateService_Override ¶
func NewApplicationMultipleTargetGroupsFargateService_Override(a ApplicationMultipleTargetGroupsFargateService, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsFargateServiceProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService class.
func NewApplicationMultipleTargetGroupsServiceBase_Override ¶
func NewApplicationMultipleTargetGroupsServiceBase_Override(a ApplicationMultipleTargetGroupsServiceBase, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsServiceBaseProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsServiceBase class.
func NewNetworkLoadBalancedEc2Service_Override ¶
func NewNetworkLoadBalancedEc2Service_Override(n NetworkLoadBalancedEc2Service, scope constructs.Construct, id *string, props *NetworkLoadBalancedEc2ServiceProps)
Constructs a new instance of the NetworkLoadBalancedEc2Service class.
func NewNetworkLoadBalancedFargateService_Override ¶
func NewNetworkLoadBalancedFargateService_Override(n NetworkLoadBalancedFargateService, scope constructs.Construct, id *string, props *NetworkLoadBalancedFargateServiceProps)
Constructs a new instance of the NetworkLoadBalancedFargateService class.
func NewNetworkLoadBalancedServiceBase_Override ¶
func NewNetworkLoadBalancedServiceBase_Override(n NetworkLoadBalancedServiceBase, scope constructs.Construct, id *string, props *NetworkLoadBalancedServiceBaseProps)
Constructs a new instance of the NetworkLoadBalancedServiceBase class.
func NewNetworkMultipleTargetGroupsEc2Service_Override ¶
func NewNetworkMultipleTargetGroupsEc2Service_Override(n NetworkMultipleTargetGroupsEc2Service, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsEc2ServiceProps)
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
func NewNetworkMultipleTargetGroupsFargateService_Override ¶
func NewNetworkMultipleTargetGroupsFargateService_Override(n NetworkMultipleTargetGroupsFargateService, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsFargateServiceProps)
Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.
func NewNetworkMultipleTargetGroupsServiceBase_Override ¶
func NewNetworkMultipleTargetGroupsServiceBase_Override(n NetworkMultipleTargetGroupsServiceBase, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsServiceBaseProps)
Constructs a new instance of the NetworkMultipleTargetGroupsServiceBase class.
func NewQueueProcessingEc2Service_Override ¶
func NewQueueProcessingEc2Service_Override(q QueueProcessingEc2Service, scope constructs.Construct, id *string, props *QueueProcessingEc2ServiceProps)
Constructs a new instance of the QueueProcessingEc2Service class.
func NewQueueProcessingFargateService_Override ¶
func NewQueueProcessingFargateService_Override(q QueueProcessingFargateService, scope constructs.Construct, id *string, props *QueueProcessingFargateServiceProps)
Constructs a new instance of the QueueProcessingFargateService class.
func NewQueueProcessingServiceBase_Override ¶
func NewQueueProcessingServiceBase_Override(q QueueProcessingServiceBase, scope constructs.Construct, id *string, props *QueueProcessingServiceBaseProps)
Constructs a new instance of the QueueProcessingServiceBase class.
func NewScheduledEc2Task_Override ¶
func NewScheduledEc2Task_Override(s ScheduledEc2Task, scope constructs.Construct, id *string, props *ScheduledEc2TaskProps)
Constructs a new instance of the ScheduledEc2Task class.
func NewScheduledFargateTask_Override ¶
func NewScheduledFargateTask_Override(s ScheduledFargateTask, scope constructs.Construct, id *string, props *ScheduledFargateTaskProps)
Constructs a new instance of the ScheduledFargateTask class.
func NewScheduledTaskBase_Override ¶
func NewScheduledTaskBase_Override(s ScheduledTaskBase, scope constructs.Construct, id *string, props *ScheduledTaskBaseProps)
Constructs a new instance of the ScheduledTaskBase class.
func QueueProcessingEc2Service_IsConstruct ¶
func QueueProcessingEc2Service_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func QueueProcessingFargateService_IsConstruct ¶
func QueueProcessingFargateService_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func QueueProcessingServiceBase_IsConstruct ¶
func QueueProcessingServiceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ScheduledEc2Task_IsConstruct ¶
func ScheduledEc2Task_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ScheduledFargateTask_IsConstruct ¶
func ScheduledFargateTask_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func ScheduledTaskBase_IsConstruct ¶
func ScheduledTaskBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
Types ¶
type ApplicationListenerProps ¶
type ApplicationListenerProps struct {
// Certificate Manager certificate to associate with the load balancer.
//
// Setting this option will set the load balancer protocol to HTTPS.
Certificate awscertificatemanager.ICertificate `json:"certificate"`
// Name of the listener.
Name *string `json:"name"`
// The port on which the listener listens for requests.
Port *float64 `json:"port"`
// The protocol for connections from clients to the load balancer.
//
// The load balancer port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS). A domain name and zone must be also be
// specified if using HTTPS.
Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"`
// The security policy that defines which ciphers and protocols are supported by the ALB Listener.
SslPolicy awselasticloadbalancingv2.SslPolicy `json:"sslPolicy"`
}
Properties to define an application listener.
TODO: EXAMPLE
type ApplicationLoadBalancedEc2Service ¶
type ApplicationLoadBalancedEc2Service interface {
ApplicationLoadBalancedServiceBase
Certificate() awscertificatemanager.ICertificate
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
Node() constructs.Node
RedirectListener() awselasticloadbalancingv2.ApplicationListener
Service() awsecs.Ec2Service
TargetGroup() awselasticloadbalancingv2.ApplicationTargetGroup
TaskDefinition() awsecs.Ec2TaskDefinition
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
An EC2 service running on an ECS cluster fronted by an application load balancer.
TODO: EXAMPLE
func NewApplicationLoadBalancedEc2Service ¶
func NewApplicationLoadBalancedEc2Service(scope constructs.Construct, id *string, props *ApplicationLoadBalancedEc2ServiceProps) ApplicationLoadBalancedEc2Service
Constructs a new instance of the ApplicationLoadBalancedEc2Service class.
type ApplicationLoadBalancedEc2ServiceProps ¶
type ApplicationLoadBalancedEc2ServiceProps struct {
// Certificate Manager certificate to associate with the load balancer.
//
// Setting this option will set the load balancer protocol to HTTPS.
Certificate awscertificatemanager.ICertificate `json:"certificate"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the application load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The application load balancer that will serve traffic to the service.
//
// The VPC attribute of a load balancer must be specified for it to be used
// to create a new service with this pattern.
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"`
// Name of the load balancer.
LoadBalancerName *string `json:"loadBalancerName"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.
OpenListener *bool `json:"openListener"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The protocol for connections from clients to the load balancer.
//
// The load balancer port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS). A domain name and zone must be also be
// specified if using HTTPS.
Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"`
// The protocol version to use.
ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType ApplicationLoadBalancedServiceRecordType `json:"recordType"`
// Specifies whether the load balancer should redirect traffic on port 80 to port 443 to support HTTP->HTTPS redirects This is only valid if the protocol of the ALB is HTTPS.
RedirectHTTP *bool `json:"redirectHTTP"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The security policy that defines which ciphers and protocols are supported by the ALB Listener.
SslPolicy awselasticloadbalancingv2.SslPolicy `json:"sslPolicy"`
// The protocol for connections from the load balancer to the ECS tasks.
//
// The default target port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS).
TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"`
// The properties required to create a new task definition.
//
// TaskDefinition or TaskImageOptions must be specified, but not both.
TaskImageOptions *ApplicationLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under contention, Docker attempts to keep the
// container memory within the limit. If the container requires more memory,
// it can consume up to the value specified by the Memory property or all of
// the available memory on the container instance—whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
// The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both..
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"`
}
The properties for the ApplicationLoadBalancedEc2Service service.
TODO: EXAMPLE
type ApplicationLoadBalancedFargateService ¶
type ApplicationLoadBalancedFargateService interface {
ApplicationLoadBalancedServiceBase
AssignPublicIp() *bool
Certificate() awscertificatemanager.ICertificate
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
Node() constructs.Node
RedirectListener() awselasticloadbalancingv2.ApplicationListener
Service() awsecs.FargateService
TargetGroup() awselasticloadbalancingv2.ApplicationTargetGroup
TaskDefinition() awsecs.FargateTaskDefinition
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
A Fargate service running on an ECS cluster fronted by an application load balancer.
TODO: EXAMPLE
func NewApplicationLoadBalancedFargateService ¶
func NewApplicationLoadBalancedFargateService(scope constructs.Construct, id *string, props *ApplicationLoadBalancedFargateServiceProps) ApplicationLoadBalancedFargateService
Constructs a new instance of the ApplicationLoadBalancedFargateService class.
type ApplicationLoadBalancedFargateServiceProps ¶
type ApplicationLoadBalancedFargateServiceProps struct {
// Certificate Manager certificate to associate with the load balancer.
//
// Setting this option will set the load balancer protocol to HTTPS.
Certificate awscertificatemanager.ICertificate `json:"certificate"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the application load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The application load balancer that will serve traffic to the service.
//
// The VPC attribute of a load balancer must be specified for it to be used
// to create a new service with this pattern.
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"`
// Name of the load balancer.
LoadBalancerName *string `json:"loadBalancerName"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.
OpenListener *bool `json:"openListener"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The protocol for connections from clients to the load balancer.
//
// The load balancer port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS). A domain name and zone must be also be
// specified if using HTTPS.
Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"`
// The protocol version to use.
ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType ApplicationLoadBalancedServiceRecordType `json:"recordType"`
// Specifies whether the load balancer should redirect traffic on port 80 to port 443 to support HTTP->HTTPS redirects This is only valid if the protocol of the ALB is HTTPS.
RedirectHTTP *bool `json:"redirectHTTP"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The security policy that defines which ciphers and protocols are supported by the ALB Listener.
SslPolicy awselasticloadbalancingv2.SslPolicy `json:"sslPolicy"`
// The protocol for connections from the load balancer to the ECS tasks.
//
// The default target port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS).
TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"`
// The properties required to create a new task definition.
//
// TaskDefinition or TaskImageOptions must be specified, but not both.
TaskImageOptions *ApplicationLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Determines whether the service will be assigned a public IP address.
AssignPublicIp *bool `json:"assignPublicIp"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory used by the task.
//
// This field is required and you must use one of the following values, which determines your range of valid values
// for the cpu parameter:
//
// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
//
// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
//
// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
//
// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
//
// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
//
// This default is set in the underlying FargateTaskDefinition construct.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The security groups to associate with the service.
//
// If you do not specify a security group, a new security group is created.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
// The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"`
// The subnets to associate with the service.
TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"`
}
The properties for the ApplicationLoadBalancedFargateService service.
TODO: EXAMPLE
type ApplicationLoadBalancedServiceBase ¶
type ApplicationLoadBalancedServiceBase interface {
constructs.Construct
Certificate() awscertificatemanager.ICertificate
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
Node() constructs.Node
RedirectListener() awselasticloadbalancingv2.ApplicationListener
TargetGroup() awselasticloadbalancingv2.ApplicationTargetGroup
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
The base class for ApplicationLoadBalancedEc2Service and ApplicationLoadBalancedFargateService services.
type ApplicationLoadBalancedServiceBaseProps ¶
type ApplicationLoadBalancedServiceBaseProps struct {
// Certificate Manager certificate to associate with the load balancer.
//
// Setting this option will set the load balancer protocol to HTTPS.
Certificate awscertificatemanager.ICertificate `json:"certificate"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the application load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The application load balancer that will serve traffic to the service.
//
// The VPC attribute of a load balancer must be specified for it to be used
// to create a new service with this pattern.
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"`
// Name of the load balancer.
LoadBalancerName *string `json:"loadBalancerName"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.
OpenListener *bool `json:"openListener"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The protocol for connections from clients to the load balancer.
//
// The load balancer port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS). A domain name and zone must be also be
// specified if using HTTPS.
Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"`
// The protocol version to use.
ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType ApplicationLoadBalancedServiceRecordType `json:"recordType"`
// Specifies whether the load balancer should redirect traffic on port 80 to port 443 to support HTTP->HTTPS redirects This is only valid if the protocol of the ALB is HTTPS.
RedirectHTTP *bool `json:"redirectHTTP"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The security policy that defines which ciphers and protocols are supported by the ALB Listener.
SslPolicy awselasticloadbalancingv2.SslPolicy `json:"sslPolicy"`
// The protocol for connections from the load balancer to the ECS tasks.
//
// The default target port is determined from the protocol (port 80 for
// HTTP, port 443 for HTTPS).
TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"`
// The properties required to create a new task definition.
//
// TaskDefinition or TaskImageOptions must be specified, but not both.
TaskImageOptions *ApplicationLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService service.
TODO: EXAMPLE
type ApplicationLoadBalancedServiceRecordType ¶
type ApplicationLoadBalancedServiceRecordType string
Describes the type of DNS record the service should create.
const ( ApplicationLoadBalancedServiceRecordType_ALIAS ApplicationLoadBalancedServiceRecordType = "ALIAS" ApplicationLoadBalancedServiceRecordType_CNAME ApplicationLoadBalancedServiceRecordType = "CNAME" ApplicationLoadBalancedServiceRecordType_NONE ApplicationLoadBalancedServiceRecordType = "NONE" )
type ApplicationLoadBalancedTaskImageOptions ¶
type ApplicationLoadBalancedTaskImageOptions struct {
// The container name value to be specified in the task definition.
ContainerName *string `json:"containerName"`
// The port number on the container that is bound to the user-specified or automatically assigned host port.
//
// If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
// If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
// your container automatically receives a host port in the ephemeral port range.
//
// Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
//
// For more information, see
// [hostPort](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html#ECS-Type-PortMapping-hostPort).
ContainerPort *float64 `json:"containerPort"`
// A key/value map of labels to add to the container.
DockerLabels *map[string]*string `json:"dockerLabels"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
ExecutionRole awsiam.IRole `json:"executionRole"`
// The name of a family that this task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
TaskRole awsiam.IRole `json:"taskRole"`
}
TODO: EXAMPLE
type ApplicationLoadBalancedTaskImageProps ¶
type ApplicationLoadBalancedTaskImageProps struct {
// The container name value to be specified in the task definition.
ContainerName *string `json:"containerName"`
// A list of port numbers on the container that is bound to the user-specified or automatically assigned host port.
//
// If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
// If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
// your container automatically receives a host port in the ephemeral port range.
//
// Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
//
// For more information, see
// [hostPort](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html#ECS-Type-PortMapping-hostPort).
ContainerPorts *[]*float64 `json:"containerPorts"`
// A key/value map of labels to add to the container.
DockerLabels *map[string]*string `json:"dockerLabels"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
ExecutionRole awsiam.IRole `json:"executionRole"`
// The name of a family that this task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secrets to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
TaskRole awsiam.IRole `json:"taskRole"`
}
Options for configuring a new container.
TODO: EXAMPLE
type ApplicationLoadBalancerProps ¶
type ApplicationLoadBalancerProps struct {
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Listeners (at least one listener) attached to this load balancer.
Listeners *[]*ApplicationListenerProps `json:"listeners"`
// Name of the load balancer.
Name *string `json:"name"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
}
Properties to define an application load balancer.
TODO: EXAMPLE
type ApplicationMultipleTargetGroupsEc2Service ¶
type ApplicationMultipleTargetGroupsEc2Service interface {
ApplicationMultipleTargetGroupsServiceBase
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
Listeners() *[]awselasticloadbalancingv2.ApplicationListener
SetListeners(val *[]awselasticloadbalancingv2.ApplicationListener)
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
Service() awsecs.Ec2Service
TargetGroup() awselasticloadbalancingv2.ApplicationTargetGroup
TargetGroups() *[]awselasticloadbalancingv2.ApplicationTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.ApplicationTargetGroup)
TaskDefinition() awsecs.Ec2TaskDefinition
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.ApplicationListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps) awselasticloadbalancingv2.ApplicationTargetGroup
ToString() *string
}
An EC2 service running on an ECS cluster fronted by an application load balancer.
TODO: EXAMPLE
func NewApplicationMultipleTargetGroupsEc2Service ¶
func NewApplicationMultipleTargetGroupsEc2Service(scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsEc2ServiceProps) ApplicationMultipleTargetGroupsEc2Service
Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.
type ApplicationMultipleTargetGroupsEc2ServiceProps ¶
type ApplicationMultipleTargetGroupsEc2ServiceProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The application load balancer that will serve traffic to the service.
LoadBalancers *[]*ApplicationLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify ALB target groups.
TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *ApplicationLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The minimum number of CPU units to reserve for the container.
//
// Valid values, which determines your range of valid values for the memory parameter:
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under heavy contention, Docker attempts to keep the
// container memory to this soft limit. However, your container can consume more
// memory when it needs to, up to either the hard limit specified with the memory
// parameter (if applicable), or all of the available memory on the container
// instance, whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
//
// Note that this setting will be ignored if TaskImagesOptions is specified
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
// The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"`
}
The properties for the ApplicationMultipleTargetGroupsEc2Service service.
TODO: EXAMPLE
type ApplicationMultipleTargetGroupsFargateService ¶
type ApplicationMultipleTargetGroupsFargateService interface {
ApplicationMultipleTargetGroupsServiceBase
AssignPublicIp() *bool
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
Listeners() *[]awselasticloadbalancingv2.ApplicationListener
SetListeners(val *[]awselasticloadbalancingv2.ApplicationListener)
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
Service() awsecs.FargateService
TargetGroup() awselasticloadbalancingv2.ApplicationTargetGroup
TargetGroups() *[]awselasticloadbalancingv2.ApplicationTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.ApplicationTargetGroup)
TaskDefinition() awsecs.FargateTaskDefinition
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.ApplicationListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps) awselasticloadbalancingv2.ApplicationTargetGroup
ToString() *string
}
A Fargate service running on an ECS cluster fronted by an application load balancer.
TODO: EXAMPLE
func NewApplicationMultipleTargetGroupsFargateService ¶
func NewApplicationMultipleTargetGroupsFargateService(scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsFargateServiceProps) ApplicationMultipleTargetGroupsFargateService
Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService class.
type ApplicationMultipleTargetGroupsFargateServiceProps ¶
type ApplicationMultipleTargetGroupsFargateServiceProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The application load balancer that will serve traffic to the service.
LoadBalancers *[]*ApplicationLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify ALB target groups.
TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *ApplicationLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Determines whether the service will be assigned a public IP address.
AssignPublicIp *bool `json:"assignPublicIp"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory used by the task.
//
// This field is required and you must use one of the following values, which determines your range of valid values
// for the cpu parameter:
//
// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
//
// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
//
// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
//
// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
//
// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
//
// This default is set in the underlying FargateTaskDefinition construct.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"`
}
The properties for the ApplicationMultipleTargetGroupsFargateService service.
TODO: EXAMPLE
type ApplicationMultipleTargetGroupsServiceBase ¶
type ApplicationMultipleTargetGroupsServiceBase interface {
constructs.Construct
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.ApplicationListener
Listeners() *[]awselasticloadbalancingv2.ApplicationListener
SetListeners(val *[]awselasticloadbalancingv2.ApplicationListener)
LoadBalancer() awselasticloadbalancingv2.ApplicationLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
TargetGroups() *[]awselasticloadbalancingv2.ApplicationTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.ApplicationTargetGroup)
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.ApplicationListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*ApplicationTargetProps) awselasticloadbalancingv2.ApplicationTargetGroup
ToString() *string
}
The base class for ApplicationMultipleTargetGroupsEc2Service and ApplicationMultipleTargetGroupsFargateService classes.
type ApplicationMultipleTargetGroupsServiceBaseProps ¶
type ApplicationMultipleTargetGroupsServiceBaseProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The application load balancer that will serve traffic to the service.
LoadBalancers *[]*ApplicationLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify ALB target groups.
TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *ApplicationLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base ApplicationMultipleTargetGroupsEc2Service or ApplicationMultipleTargetGroupsFargateService service.
TODO: EXAMPLE
type ApplicationTargetProps ¶
type ApplicationTargetProps struct {
// The port number of the container.
//
// Only applicable when using application/network load balancers.
ContainerPort *float64 `json:"containerPort"`
// Rule applies if the requested host matches the indicated host.
//
// May contain up to three '*' wildcards.
//
// Requires that priority is set.
// See: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#host-conditions
//
HostHeader *string `json:"hostHeader"`
// Name of the listener the target group attached to.
Listener *string `json:"listener"`
// Rule applies if the requested path matches the given path pattern.
//
// May contain up to three '*' wildcards.
//
// Requires that priority is set.
// See: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions
//
PathPattern *string `json:"pathPattern"`
// Priority of this target group.
//
// The rule with the lowest priority will be used for every request.
// If priority is not given, these target groups will be added as
// defaults, and must not have conditions.
//
// Priorities must be unique.
Priority *float64 `json:"priority"`
// The protocol used for the port mapping.
//
// Only applicable when using application load balancers.
Protocol awsecs.Protocol `json:"protocol"`
}
Properties to define an application target group.
TODO: EXAMPLE
type NetworkListenerProps ¶
type NetworkListenerProps struct {
// Name of the listener.
Name *string `json:"name"`
// The port on which the listener listens for requests.
Port *float64 `json:"port"`
}
Properties to define an network listener.
TODO: EXAMPLE
type NetworkLoadBalancedEc2Service ¶
type NetworkLoadBalancedEc2Service interface {
NetworkLoadBalancedServiceBase
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
Node() constructs.Node
Service() awsecs.Ec2Service
TargetGroup() awselasticloadbalancingv2.NetworkTargetGroup
TaskDefinition() awsecs.Ec2TaskDefinition
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
An EC2 service running on an ECS cluster fronted by a network load balancer.
TODO: EXAMPLE
func NewNetworkLoadBalancedEc2Service ¶
func NewNetworkLoadBalancedEc2Service(scope constructs.Construct, id *string, props *NetworkLoadBalancedEc2ServiceProps) NetworkLoadBalancedEc2Service
Constructs a new instance of the NetworkLoadBalancedEc2Service class.
type NetworkLoadBalancedEc2ServiceProps ¶
type NetworkLoadBalancedEc2ServiceProps struct {
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the network load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The network load balancer that will serve traffic to the service.
//
// If the load balancer has been imported, the vpc attribute must be specified
// in the call to fromNetworkLoadBalancerAttributes().
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.INetworkLoadBalancer `json:"loadBalancer"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The properties required to create a new task definition.
//
// One of taskImageOptions or taskDefinition must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under contention, Docker attempts to keep the
// container memory within the limit. If the container requires more memory,
// it can consume up to the value specified by the Memory property or all of
// the available memory on the container instance—whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
// The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both..
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"`
}
The properties for the NetworkLoadBalancedEc2Service service.
TODO: EXAMPLE
type NetworkLoadBalancedFargateService ¶
type NetworkLoadBalancedFargateService interface {
NetworkLoadBalancedServiceBase
AssignPublicIp() *bool
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
Node() constructs.Node
Service() awsecs.FargateService
TargetGroup() awselasticloadbalancingv2.NetworkTargetGroup
TaskDefinition() awsecs.FargateTaskDefinition
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
A Fargate service running on an ECS cluster fronted by a network load balancer.
TODO: EXAMPLE
func NewNetworkLoadBalancedFargateService ¶
func NewNetworkLoadBalancedFargateService(scope constructs.Construct, id *string, props *NetworkLoadBalancedFargateServiceProps) NetworkLoadBalancedFargateService
Constructs a new instance of the NetworkLoadBalancedFargateService class.
type NetworkLoadBalancedFargateServiceProps ¶
type NetworkLoadBalancedFargateServiceProps struct {
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the network load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The network load balancer that will serve traffic to the service.
//
// If the load balancer has been imported, the vpc attribute must be specified
// in the call to fromNetworkLoadBalancerAttributes().
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.INetworkLoadBalancer `json:"loadBalancer"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The properties required to create a new task definition.
//
// One of taskImageOptions or taskDefinition must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Determines whether the service will be assigned a public IP address.
AssignPublicIp *bool `json:"assignPublicIp"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory used by the task.
//
// This field is required and you must use one of the following values, which determines your range of valid values
// for the cpu parameter:
//
// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
//
// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
//
// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
//
// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
//
// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
//
// This default is set in the underlying FargateTaskDefinition construct.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"`
// The subnets to associate with the service.
TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"`
}
The properties for the NetworkLoadBalancedFargateService service.
TODO: EXAMPLE
type NetworkLoadBalancedServiceBase ¶
type NetworkLoadBalancedServiceBase interface {
constructs.Construct
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
Node() constructs.Node
TargetGroup() awselasticloadbalancingv2.NetworkTargetGroup
AddServiceAsTarget(service awsecs.BaseService)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
The base class for NetworkLoadBalancedEc2Service and NetworkLoadBalancedFargateService services.
type NetworkLoadBalancedServiceBaseProps ¶
type NetworkLoadBalancedServiceBaseProps struct {
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// Listener port of the network load balancer that will serve traffic to the service.
ListenerPort *float64 `json:"listenerPort"`
// The network load balancer that will serve traffic to the service.
//
// If the load balancer has been imported, the vpc attribute must be specified
// in the call to fromNetworkLoadBalancerAttributes().
//
// [disable-awslint:ref-via-interface]
LoadBalancer awselasticloadbalancingv2.INetworkLoadBalancer `json:"loadBalancer"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
// Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
//
// This is useful if you need to work with DNS systems that do not support alias records.
RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// The properties required to create a new task definition.
//
// One of taskImageOptions or taskDefinition must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageOptions `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base NetworkLoadBalancedEc2Service or NetworkLoadBalancedFargateService service.
TODO: EXAMPLE
type NetworkLoadBalancedServiceRecordType ¶
type NetworkLoadBalancedServiceRecordType string
Describes the type of DNS record the service should create.
const ( NetworkLoadBalancedServiceRecordType_ALIAS NetworkLoadBalancedServiceRecordType = "ALIAS" NetworkLoadBalancedServiceRecordType_CNAME NetworkLoadBalancedServiceRecordType = "CNAME" NetworkLoadBalancedServiceRecordType_NONE NetworkLoadBalancedServiceRecordType = "NONE" )
type NetworkLoadBalancedTaskImageOptions ¶
type NetworkLoadBalancedTaskImageOptions struct {
// The container name value to be specified in the task definition.
ContainerName *string `json:"containerName"`
// The port number on the container that is bound to the user-specified or automatically assigned host port.
//
// If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
// If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
// your container automatically receives a host port in the ephemeral port range.
//
// Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
//
// For more information, see
// [hostPort](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html#ECS-Type-PortMapping-hostPort).
ContainerPort *float64 `json:"containerPort"`
// A key/value map of labels to add to the container.
DockerLabels *map[string]*string `json:"dockerLabels"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
ExecutionRole awsiam.IRole `json:"executionRole"`
// The name of a family that this task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, but not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
TaskRole awsiam.IRole `json:"taskRole"`
}
TODO: EXAMPLE
type NetworkLoadBalancedTaskImageProps ¶
type NetworkLoadBalancedTaskImageProps struct {
// The container name value to be specified in the task definition.
ContainerName *string `json:"containerName"`
// A list of port numbers on the container that is bound to the user-specified or automatically assigned host port.
//
// If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
// If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
// your container automatically receives a host port in the ephemeral port range.
//
// Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
//
// For more information, see
// [hostPort](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html#ECS-Type-PortMapping-hostPort).
ContainerPorts *[]*float64 `json:"containerPorts"`
// A key/value map of labels to add to the container.
DockerLabels *map[string]*string `json:"dockerLabels"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
ExecutionRole awsiam.IRole `json:"executionRole"`
// The name of a family that this task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, but not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secrets to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
TaskRole awsiam.IRole `json:"taskRole"`
}
Options for configuring a new container.
TODO: EXAMPLE
type NetworkLoadBalancerProps ¶
type NetworkLoadBalancerProps struct {
// The domain name for the service, e.g. "api.example.com.".
DomainName *string `json:"domainName"`
// The Route53 hosted zone for the domain, e.g. "example.com.".
DomainZone awsroute53.IHostedZone `json:"domainZone"`
// Listeners (at least one listener) attached to this load balancer.
Listeners *[]*NetworkListenerProps `json:"listeners"`
// Name of the load balancer.
Name *string `json:"name"`
// Determines whether the Load Balancer will be internet-facing.
PublicLoadBalancer *bool `json:"publicLoadBalancer"`
}
Properties to define an network load balancer.
TODO: EXAMPLE
type NetworkMultipleTargetGroupsEc2Service ¶
type NetworkMultipleTargetGroupsEc2Service interface {
NetworkMultipleTargetGroupsServiceBase
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
Listeners() *[]awselasticloadbalancingv2.NetworkListener
SetListeners(val *[]awselasticloadbalancingv2.NetworkListener)
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
Service() awsecs.Ec2Service
TargetGroup() awselasticloadbalancingv2.NetworkTargetGroup
TargetGroups() *[]awselasticloadbalancingv2.NetworkTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.NetworkTargetGroup)
TaskDefinition() awsecs.Ec2TaskDefinition
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.NetworkListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps) awselasticloadbalancingv2.NetworkTargetGroup
ToString() *string
}
An EC2 service running on an ECS cluster fronted by a network load balancer.
TODO: EXAMPLE
func NewNetworkMultipleTargetGroupsEc2Service ¶
func NewNetworkMultipleTargetGroupsEc2Service(scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsEc2ServiceProps) NetworkMultipleTargetGroupsEc2Service
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
type NetworkMultipleTargetGroupsEc2ServiceProps ¶
type NetworkMultipleTargetGroupsEc2ServiceProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The network load balancer that will serve traffic to the service.
LoadBalancers *[]*NetworkLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify NLB target groups.
TargetGroups *[]*NetworkTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The minimum number of CPU units to reserve for the container.
//
// Valid values, which determines your range of valid values for the memory parameter:
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under heavy contention, Docker attempts to keep the
// container memory to this soft limit. However, your container can consume more
// memory when it needs to, up to either the hard limit specified with the memory
// parameter (if applicable), or all of the available memory on the container
// instance, whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required.
//
// Note that this setting will be ignored if TaskImagesOptions is specified.
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
// The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"`
}
The properties for the NetworkMultipleTargetGroupsEc2Service service.
TODO: EXAMPLE
type NetworkMultipleTargetGroupsFargateService ¶
type NetworkMultipleTargetGroupsFargateService interface {
NetworkMultipleTargetGroupsServiceBase
AssignPublicIp() *bool
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
Listeners() *[]awselasticloadbalancingv2.NetworkListener
SetListeners(val *[]awselasticloadbalancingv2.NetworkListener)
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
Service() awsecs.FargateService
TargetGroup() awselasticloadbalancingv2.NetworkTargetGroup
TargetGroups() *[]awselasticloadbalancingv2.NetworkTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.NetworkTargetGroup)
TaskDefinition() awsecs.FargateTaskDefinition
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.NetworkListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps) awselasticloadbalancingv2.NetworkTargetGroup
ToString() *string
}
A Fargate service running on an ECS cluster fronted by a network load balancer.
TODO: EXAMPLE
func NewNetworkMultipleTargetGroupsFargateService ¶
func NewNetworkMultipleTargetGroupsFargateService(scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsFargateServiceProps) NetworkMultipleTargetGroupsFargateService
Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.
type NetworkMultipleTargetGroupsFargateServiceProps ¶
type NetworkMultipleTargetGroupsFargateServiceProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The network load balancer that will serve traffic to the service.
LoadBalancers *[]*NetworkLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify NLB target groups.
TargetGroups *[]*NetworkTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Determines whether the service will be assigned a public IP address.
AssignPublicIp *bool `json:"assignPublicIp"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory used by the task.
//
// This field is required and you must use one of the following values, which determines your range of valid values
// for the cpu parameter:
//
// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
//
// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
//
// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
//
// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
//
// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
//
// This default is set in the underlying FargateTaskDefinition construct.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"`
}
The properties for the NetworkMultipleTargetGroupsFargateService service.
TODO: EXAMPLE
type NetworkMultipleTargetGroupsServiceBase ¶
type NetworkMultipleTargetGroupsServiceBase interface {
constructs.Construct
Cluster() awsecs.ICluster
InternalDesiredCount() *float64
Listener() awselasticloadbalancingv2.NetworkListener
Listeners() *[]awselasticloadbalancingv2.NetworkListener
SetListeners(val *[]awselasticloadbalancingv2.NetworkListener)
LoadBalancer() awselasticloadbalancingv2.NetworkLoadBalancer
LogDriver() awsecs.LogDriver
SetLogDriver(val awsecs.LogDriver)
Node() constructs.Node
TargetGroups() *[]awselasticloadbalancingv2.NetworkTargetGroup
SetTargetGroups(val *[]awselasticloadbalancingv2.NetworkTargetGroup)
AddPortMappingForTargets(container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps)
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
FindListener(name *string) awselasticloadbalancingv2.NetworkListener
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
RegisterECSTargets(service awsecs.BaseService, container awsecs.ContainerDefinition, targets *[]*NetworkTargetProps) awselasticloadbalancingv2.NetworkTargetGroup
ToString() *string
}
The base class for NetworkMultipleTargetGroupsEc2Service and NetworkMultipleTargetGroupsFargateService classes.
type NetworkMultipleTargetGroupsServiceBaseProps ¶
type NetworkMultipleTargetGroupsServiceBaseProps struct {
// The options for configuring an Amazon ECS service to use service discovery.
CloudMapOptions *awsecs.CloudMapOptions `json:"cloudMapOptions"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
//
// The minimum value is 1
DesiredCount *float64 `json:"desiredCount"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"`
// The network load balancer that will serve traffic to the service.
LoadBalancers *[]*NetworkLoadBalancerProps `json:"loadBalancers"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// Name of the service.
ServiceName *string `json:"serviceName"`
// Properties to specify NLB target groups.
TargetGroups *[]*NetworkTargetProps `json:"targetGroups"`
// The properties required to create a new task definition.
//
// Only one of TaskDefinition or TaskImageOptions must be specified.
TaskImageOptions *NetworkLoadBalancedTaskImageProps `json:"taskImageOptions"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base NetworkMultipleTargetGroupsEc2Service or NetworkMultipleTargetGroupsFargateService service.
TODO: EXAMPLE
type NetworkTargetProps ¶
type NetworkTargetProps struct {
// The port number of the container.
//
// Only applicable when using application/network load balancers.
ContainerPort *float64 `json:"containerPort"`
// Name of the listener the target group attached to.
Listener *string `json:"listener"`
}
Properties to define a network load balancer target group.
TODO: EXAMPLE
type QueueProcessingEc2Service ¶
type QueueProcessingEc2Service interface {
QueueProcessingServiceBase
Cluster() awsecs.ICluster
DeadLetterQueue() awssqs.IQueue
Environment() *map[string]*string
LogDriver() awsecs.LogDriver
MaxCapacity() *float64
MinCapacity() *float64
Node() constructs.Node
ScalingSteps() *[]*awsapplicationautoscaling.ScalingInterval
Secrets() *map[string]awsecs.Secret
Service() awsecs.Ec2Service
SqsQueue() awssqs.IQueue
TaskDefinition() awsecs.Ec2TaskDefinition
ConfigureAutoscalingForService(service awsecs.BaseService)
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
GrantPermissionsToService(service awsecs.BaseService)
ToString() *string
}
Class to create a queue processing EC2 service.
TODO: EXAMPLE
func NewQueueProcessingEc2Service ¶
func NewQueueProcessingEc2Service(scope constructs.Construct, id *string, props *QueueProcessingEc2ServiceProps) QueueProcessingEc2Service
Constructs a new instance of the QueueProcessingEc2Service class.
type QueueProcessingEc2ServiceProps ¶
type QueueProcessingEc2ServiceProps struct {
// A list of Capacity Provider strategies used to place a service.
CapacityProviderStrategies *[]*awsecs.CapacityProviderStrategy `json:"capacityProviderStrategies"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
//
// The variable `QUEUE_NAME` with value `queue.queueName` will
// always be passed.
Environment *map[string]*string `json:"environment"`
// The name of a family that the task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The maximum number of times that a message can be received by consumers.
//
// When this value is exceeded for a message the message will be automatically sent to the Dead Letter Queue.
MaxReceiveCount *float64 `json:"maxReceiveCount"`
// Maximum capacity to scale to.
MaxScalingCapacity *float64 `json:"maxScalingCapacity"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Minimum capacity to scale to.
MinScalingCapacity *float64 `json:"minScalingCapacity"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// A queue for which to process items from.
//
// If specified and this is a FIFO queue, the queue name must end in the string '.fifo'. See
// [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html)
Queue awssqs.IQueue `json:"queue"`
// The number of seconds that Dead Letter Queue retains a message.
RetentionPeriod awscdk.Duration `json:"retentionPeriod"`
// The intervals for scaling based on the SQS queue's ApproximateNumberOfMessagesVisible metric.
//
// Maps a range of metric values to a particular scaling behavior. See
// [Simple and Step Scaling Policies for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html)
ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Timeout of processing a single message.
//
// After dequeuing, the processor has this much time to handle the message and delete it from the queue
// before it becomes visible again for dequeueing by another processor. Values must be between 0 and (12 hours).
VisibilityTimeout awscdk.Duration `json:"visibilityTimeout"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Optional name for the container added.
ContainerName *string `json:"containerName"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// Gpu count for container in task definition.
//
// Set this if you want to use gpu based instances.
GpuCount *float64 `json:"gpuCount"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under contention, Docker attempts to keep the
// container memory within the limit. If the container requires more memory,
// it can consume up to the value specified by the Memory property or all of
// the available memory on the container instance—whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
}
The properties for the QueueProcessingEc2Service service.
TODO: EXAMPLE
type QueueProcessingFargateService ¶
type QueueProcessingFargateService interface {
QueueProcessingServiceBase
Cluster() awsecs.ICluster
DeadLetterQueue() awssqs.IQueue
Environment() *map[string]*string
LogDriver() awsecs.LogDriver
MaxCapacity() *float64
MinCapacity() *float64
Node() constructs.Node
ScalingSteps() *[]*awsapplicationautoscaling.ScalingInterval
Secrets() *map[string]awsecs.Secret
Service() awsecs.FargateService
SqsQueue() awssqs.IQueue
TaskDefinition() awsecs.FargateTaskDefinition
ConfigureAutoscalingForService(service awsecs.BaseService)
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
GrantPermissionsToService(service awsecs.BaseService)
ToString() *string
}
Class to create a queue processing Fargate service.
TODO: EXAMPLE
func NewQueueProcessingFargateService ¶
func NewQueueProcessingFargateService(scope constructs.Construct, id *string, props *QueueProcessingFargateServiceProps) QueueProcessingFargateService
Constructs a new instance of the QueueProcessingFargateService class.
type QueueProcessingFargateServiceProps ¶
type QueueProcessingFargateServiceProps struct {
// A list of Capacity Provider strategies used to place a service.
CapacityProviderStrategies *[]*awsecs.CapacityProviderStrategy `json:"capacityProviderStrategies"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
//
// The variable `QUEUE_NAME` with value `queue.queueName` will
// always be passed.
Environment *map[string]*string `json:"environment"`
// The name of a family that the task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The maximum number of times that a message can be received by consumers.
//
// When this value is exceeded for a message the message will be automatically sent to the Dead Letter Queue.
MaxReceiveCount *float64 `json:"maxReceiveCount"`
// Maximum capacity to scale to.
MaxScalingCapacity *float64 `json:"maxScalingCapacity"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Minimum capacity to scale to.
MinScalingCapacity *float64 `json:"minScalingCapacity"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// A queue for which to process items from.
//
// If specified and this is a FIFO queue, the queue name must end in the string '.fifo'. See
// [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html)
Queue awssqs.IQueue `json:"queue"`
// The number of seconds that Dead Letter Queue retains a message.
RetentionPeriod awscdk.Duration `json:"retentionPeriod"`
// The intervals for scaling based on the SQS queue's ApproximateNumberOfMessagesVisible metric.
//
// Maps a range of metric values to a particular scaling behavior. See
// [Simple and Step Scaling Policies for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html)
ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Timeout of processing a single message.
//
// After dequeuing, the processor has this much time to handle the message and delete it from the queue
// before it becomes visible again for dequeueing by another processor. Values must be between 0 and (12 hours).
VisibilityTimeout awscdk.Duration `json:"visibilityTimeout"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// Specifies whether the task's elastic network interface receives a public IP address.
//
// If true, each task will receive a public IP address.
AssignPublicIp *bool `json:"assignPublicIp"`
// Optional name for the container added.
ContainerName *string `json:"containerName"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The amount (in MiB) of memory used by the task.
//
// This field is required and you must use one of the following values, which determines your range of valid values
// for the cpu parameter:
//
// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU)
//
// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU)
//
// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU)
//
// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU)
//
// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU)
//
// This default is set in the underlying FargateTaskDefinition construct.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The security groups to associate with the service.
//
// If you do not specify a security group, a new security group is created.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
// The subnets to associate with the service.
TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"`
}
The properties for the QueueProcessingFargateService service.
TODO: EXAMPLE
type QueueProcessingServiceBase ¶
type QueueProcessingServiceBase interface {
constructs.Construct
Cluster() awsecs.ICluster
DeadLetterQueue() awssqs.IQueue
Environment() *map[string]*string
LogDriver() awsecs.LogDriver
MaxCapacity() *float64
MinCapacity() *float64
Node() constructs.Node
ScalingSteps() *[]*awsapplicationautoscaling.ScalingInterval
Secrets() *map[string]awsecs.Secret
SqsQueue() awssqs.IQueue
ConfigureAutoscalingForService(service awsecs.BaseService)
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
GrantPermissionsToService(service awsecs.BaseService)
ToString() *string
}
The base class for QueueProcessingEc2Service and QueueProcessingFargateService services.
type QueueProcessingServiceBaseProps ¶
type QueueProcessingServiceBaseProps struct {
// A list of Capacity Provider strategies used to place a service.
CapacityProviderStrategies *[]*awsecs.CapacityProviderStrategy `json:"capacityProviderStrategies"`
// Whether to enable the deployment circuit breaker.
//
// If this property is defined, circuit breaker will be implicitly
// enabled.
CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"`
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// Specifies which deployment controller to use for the service.
//
// For more information, see
// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
DeploymentController *awsecs.DeploymentController `json:"deploymentController"`
// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
//
// For more information, see
// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
EnableECSManagedTags *bool `json:"enableECSManagedTags"`
// Flag to indicate whether to enable logging.
EnableLogging *bool `json:"enableLogging"`
// The environment variables to pass to the container.
//
// The variable `QUEUE_NAME` with value `queue.queueName` will
// always be passed.
Environment *map[string]*string `json:"environment"`
// The name of a family that the task definition is registered to.
//
// A family groups multiple versions of a task definition.
Family *string `json:"family"`
// The image used to start a container.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
MaxHealthyPercent *float64 `json:"maxHealthyPercent"`
// The maximum number of times that a message can be received by consumers.
//
// When this value is exceeded for a message the message will be automatically sent to the Dead Letter Queue.
MaxReceiveCount *float64 `json:"maxReceiveCount"`
// Maximum capacity to scale to.
MaxScalingCapacity *float64 `json:"maxScalingCapacity"`
// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
MinHealthyPercent *float64 `json:"minHealthyPercent"`
// Minimum capacity to scale to.
MinScalingCapacity *float64 `json:"minScalingCapacity"`
// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
//
// Tags can only be propagated to the tasks within the service during service creation.
PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"`
// A queue for which to process items from.
//
// If specified and this is a FIFO queue, the queue name must end in the string '.fifo'. See
// [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html)
Queue awssqs.IQueue `json:"queue"`
// The number of seconds that Dead Letter Queue retains a message.
RetentionPeriod awscdk.Duration `json:"retentionPeriod"`
// The intervals for scaling based on the SQS queue's ApproximateNumberOfMessagesVisible metric.
//
// Maps a range of metric values to a particular scaling behavior. See
// [Simple and Step Scaling Policies for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html)
ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The name of the service.
ServiceName *string `json:"serviceName"`
// Timeout of processing a single message.
//
// After dequeuing, the processor has this much time to handle the message and delete it from the queue
// before it becomes visible again for dequeueing by another processor. Values must be between 0 and (12 hours).
VisibilityTimeout awscdk.Duration `json:"visibilityTimeout"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base QueueProcessingEc2Service or QueueProcessingFargateService service.
TODO: EXAMPLE
type ScheduledEc2Task ¶
type ScheduledEc2Task interface {
ScheduledTaskBase
Cluster() awsecs.ICluster
DesiredTaskCount() *float64
EventRule() awsevents.Rule
Node() constructs.Node
SubnetSelection() *awsec2.SubnetSelection
Task() awseventstargets.EcsTask
TaskDefinition() awsecs.Ec2TaskDefinition
AddTaskAsTarget(ecsTaskTarget awseventstargets.EcsTask)
AddTaskDefinitionToEventTarget(taskDefinition awsecs.TaskDefinition) awseventstargets.EcsTask
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
A scheduled EC2 task that will be initiated off of CloudWatch Events.
TODO: EXAMPLE
func NewScheduledEc2Task ¶
func NewScheduledEc2Task(scope constructs.Construct, id *string, props *ScheduledEc2TaskProps) ScheduledEc2Task
Constructs a new instance of the ScheduledEc2Task class.
type ScheduledEc2TaskDefinitionOptions ¶
type ScheduledEc2TaskDefinitionOptions struct {
// The task definition to use for tasks in the service. One of image or taskDefinition must be specified.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"`
}
The properties for the ScheduledEc2Task using a task definition.
TODO: EXAMPLE
type ScheduledEc2TaskImageOptions ¶
type ScheduledEc2TaskImageOptions struct {
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, but not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The minimum number of CPU units to reserve for the container.
Cpu *float64 `json:"cpu"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
// The soft limit (in MiB) of memory to reserve for the container.
//
// When system memory is under contention, Docker attempts to keep the
// container memory within the limit. If the container requires more memory,
// it can consume up to the value specified by the Memory property or all of
// the available memory on the container instance—whichever comes first.
//
// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
MemoryReservationMiB *float64 `json:"memoryReservationMiB"`
}
The properties for the ScheduledEc2Task using an image.
TODO: EXAMPLE
type ScheduledEc2TaskProps ¶
type ScheduledEc2TaskProps struct {
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredTaskCount *float64 `json:"desiredTaskCount"`
// Indicates whether the rule is enabled.
Enabled *bool `json:"enabled"`
// A name for the rule.
RuleName *string `json:"ruleName"`
// The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.
//
// For more information, see
// [Schedule Expression Syntax for Rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html)
// in the Amazon CloudWatch User Guide.
Schedule awsapplicationautoscaling.Schedule `json:"schedule"`
// Existing security groups to use for your service.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
// In what subnets to place the task's ENIs.
//
// (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The properties to define if using an existing TaskDefinition in this construct.
//
// ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
ScheduledEc2TaskDefinitionOptions *ScheduledEc2TaskDefinitionOptions `json:"scheduledEc2TaskDefinitionOptions"`
// The properties to define if the construct is to create a TaskDefinition.
//
// ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
ScheduledEc2TaskImageOptions *ScheduledEc2TaskImageOptions `json:"scheduledEc2TaskImageOptions"`
}
The properties for the ScheduledEc2Task task.
TODO: EXAMPLE
type ScheduledFargateTask ¶
type ScheduledFargateTask interface {
ScheduledTaskBase
Cluster() awsecs.ICluster
DesiredTaskCount() *float64
EventRule() awsevents.Rule
Node() constructs.Node
SubnetSelection() *awsec2.SubnetSelection
Task() awseventstargets.EcsTask
TaskDefinition() awsecs.FargateTaskDefinition
AddTaskAsTarget(ecsTaskTarget awseventstargets.EcsTask)
AddTaskDefinitionToEventTarget(taskDefinition awsecs.TaskDefinition) awseventstargets.EcsTask
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
A scheduled Fargate task that will be initiated off of CloudWatch Events.
TODO: EXAMPLE
func NewScheduledFargateTask ¶
func NewScheduledFargateTask(scope constructs.Construct, id *string, props *ScheduledFargateTaskProps) ScheduledFargateTask
Constructs a new instance of the ScheduledFargateTask class.
type ScheduledFargateTaskDefinitionOptions ¶
type ScheduledFargateTaskDefinitionOptions struct {
// The task definition to use for tasks in the service. Image or taskDefinition must be specified, but not both.
//
// [disable-awslint:ref-via-interface]
TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"`
}
The properties for the ScheduledFargateTask using a task definition.
TODO: EXAMPLE
type ScheduledFargateTaskImageOptions ¶
type ScheduledFargateTaskImageOptions struct {
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, but not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
// The number of cpu units used by the task.
//
// Valid values, which determines your range of valid values for the memory parameter:
//
// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
//
// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
//
// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
//
// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
//
// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
//
// This default is set in the underlying FargateTaskDefinition construct.
Cpu *float64 `json:"cpu"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed the allocated memory, the container
// is terminated.
MemoryLimitMiB *float64 `json:"memoryLimitMiB"`
}
The properties for the ScheduledFargateTask using an image.
TODO: EXAMPLE
type ScheduledFargateTaskProps ¶
type ScheduledFargateTaskProps struct {
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredTaskCount *float64 `json:"desiredTaskCount"`
// Indicates whether the rule is enabled.
Enabled *bool `json:"enabled"`
// A name for the rule.
RuleName *string `json:"ruleName"`
// The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.
//
// For more information, see
// [Schedule Expression Syntax for Rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html)
// in the Amazon CloudWatch User Guide.
Schedule awsapplicationautoscaling.Schedule `json:"schedule"`
// Existing security groups to use for your service.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
// In what subnets to place the task's ENIs.
//
// (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
// The platform version on which to run your service.
//
// If one is not specified, the LATEST platform version is used by default. For more information, see
// [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
// in the Amazon Elastic Container Service Developer Guide.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"`
// The properties to define if using an existing TaskDefinition in this construct.
//
// ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
ScheduledFargateTaskDefinitionOptions *ScheduledFargateTaskDefinitionOptions `json:"scheduledFargateTaskDefinitionOptions"`
// The properties to define if the construct is to create a TaskDefinition.
//
// ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
ScheduledFargateTaskImageOptions *ScheduledFargateTaskImageOptions `json:"scheduledFargateTaskImageOptions"`
}
The properties for the ScheduledFargateTask task.
TODO: EXAMPLE
type ScheduledTaskBase ¶
type ScheduledTaskBase interface {
constructs.Construct
Cluster() awsecs.ICluster
DesiredTaskCount() *float64
EventRule() awsevents.Rule
Node() constructs.Node
SubnetSelection() *awsec2.SubnetSelection
AddTaskAsTarget(ecsTaskTarget awseventstargets.EcsTask)
AddTaskDefinitionToEventTarget(taskDefinition awsecs.TaskDefinition) awseventstargets.EcsTask
CreateAWSLogDriver(prefix *string) awsecs.AwsLogDriver
GetDefaultCluster(scope constructs.Construct, vpc awsec2.IVpc) awsecs.Cluster
ToString() *string
}
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
type ScheduledTaskBaseProps ¶
type ScheduledTaskBaseProps struct {
// The name of the cluster that hosts the service.
//
// If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Cluster awsecs.ICluster `json:"cluster"`
// The desired number of instantiations of the task definition to keep running on the service.
DesiredTaskCount *float64 `json:"desiredTaskCount"`
// Indicates whether the rule is enabled.
Enabled *bool `json:"enabled"`
// A name for the rule.
RuleName *string `json:"ruleName"`
// The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.
//
// For more information, see
// [Schedule Expression Syntax for Rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html)
// in the Amazon CloudWatch User Guide.
Schedule awsapplicationautoscaling.Schedule `json:"schedule"`
// Existing security groups to use for your service.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
// In what subnets to place the task's ENIs.
//
// (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
// The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
//
// If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Vpc awsec2.IVpc `json:"vpc"`
}
The properties for the base ScheduledEc2Task or ScheduledFargateTask task.
TODO: EXAMPLE
type ScheduledTaskImageProps ¶
type ScheduledTaskImageProps struct {
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
Command *[]*string `json:"command"`
// The environment variables to pass to the container.
Environment *map[string]*string `json:"environment"`
// The image used to start a container.
//
// Image or taskDefinition must be specified, but not both.
Image awsecs.ContainerImage `json:"image"`
// The log driver to use.
LogDriver awsecs.LogDriver `json:"logDriver"`
// The secret to expose to the container as an environment variable.
Secrets *map[string]awsecs.Secret `json:"secrets"`
}
TODO: EXAMPLE