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. Experimental.
func NewApplicationLoadBalancedFargateService_Override ¶
func NewApplicationLoadBalancedFargateService_Override(a ApplicationLoadBalancedFargateService, scope constructs.Construct, id *string, props *ApplicationLoadBalancedFargateServiceProps)
Constructs a new instance of the ApplicationLoadBalancedFargateService class. Experimental.
func NewApplicationLoadBalancedServiceBase_Override ¶
func NewApplicationLoadBalancedServiceBase_Override(a ApplicationLoadBalancedServiceBase, scope constructs.Construct, id *string, props *ApplicationLoadBalancedServiceBaseProps)
Constructs a new instance of the ApplicationLoadBalancedServiceBase class. Experimental.
func NewApplicationMultipleTargetGroupsEc2Service_Override ¶
func NewApplicationMultipleTargetGroupsEc2Service_Override(a ApplicationMultipleTargetGroupsEc2Service, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsEc2ServiceProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class. Experimental.
func NewApplicationMultipleTargetGroupsFargateService_Override ¶
func NewApplicationMultipleTargetGroupsFargateService_Override(a ApplicationMultipleTargetGroupsFargateService, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsFargateServiceProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService class. Experimental.
func NewApplicationMultipleTargetGroupsServiceBase_Override ¶
func NewApplicationMultipleTargetGroupsServiceBase_Override(a ApplicationMultipleTargetGroupsServiceBase, scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsServiceBaseProps)
Constructs a new instance of the ApplicationMultipleTargetGroupsServiceBase class. Experimental.
func NewNetworkLoadBalancedEc2Service_Override ¶
func NewNetworkLoadBalancedEc2Service_Override(n NetworkLoadBalancedEc2Service, scope constructs.Construct, id *string, props *NetworkLoadBalancedEc2ServiceProps)
Constructs a new instance of the NetworkLoadBalancedEc2Service class. Experimental.
func NewNetworkLoadBalancedFargateService_Override ¶
func NewNetworkLoadBalancedFargateService_Override(n NetworkLoadBalancedFargateService, scope constructs.Construct, id *string, props *NetworkLoadBalancedFargateServiceProps)
Constructs a new instance of the NetworkLoadBalancedFargateService class. Experimental.
func NewNetworkLoadBalancedServiceBase_Override ¶
func NewNetworkLoadBalancedServiceBase_Override(n NetworkLoadBalancedServiceBase, scope constructs.Construct, id *string, props *NetworkLoadBalancedServiceBaseProps)
Constructs a new instance of the NetworkLoadBalancedServiceBase class. Experimental.
func NewNetworkMultipleTargetGroupsEc2Service_Override ¶
func NewNetworkMultipleTargetGroupsEc2Service_Override(n NetworkMultipleTargetGroupsEc2Service, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsEc2ServiceProps)
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class. Experimental.
func NewNetworkMultipleTargetGroupsFargateService_Override ¶
func NewNetworkMultipleTargetGroupsFargateService_Override(n NetworkMultipleTargetGroupsFargateService, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsFargateServiceProps)
Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class. Experimental.
func NewNetworkMultipleTargetGroupsServiceBase_Override ¶
func NewNetworkMultipleTargetGroupsServiceBase_Override(n NetworkMultipleTargetGroupsServiceBase, scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsServiceBaseProps)
Constructs a new instance of the NetworkMultipleTargetGroupsServiceBase class. Experimental.
func NewQueueProcessingEc2Service_Override ¶
func NewQueueProcessingEc2Service_Override(q QueueProcessingEc2Service, scope constructs.Construct, id *string, props *QueueProcessingEc2ServiceProps)
Constructs a new instance of the QueueProcessingEc2Service class. Experimental.
func NewQueueProcessingFargateService_Override ¶
func NewQueueProcessingFargateService_Override(q QueueProcessingFargateService, scope constructs.Construct, id *string, props *QueueProcessingFargateServiceProps)
Constructs a new instance of the QueueProcessingFargateService class. Experimental.
func NewQueueProcessingServiceBase_Override ¶
func NewQueueProcessingServiceBase_Override(q QueueProcessingServiceBase, scope constructs.Construct, id *string, props *QueueProcessingServiceBaseProps)
Constructs a new instance of the QueueProcessingServiceBase class. Experimental.
func NewScheduledEc2Task_Override ¶
func NewScheduledEc2Task_Override(s ScheduledEc2Task, scope constructs.Construct, id *string, props *ScheduledEc2TaskProps)
Constructs a new instance of the ScheduledEc2Task class. Experimental.
func NewScheduledFargateTask_Override ¶
func NewScheduledFargateTask_Override(s ScheduledFargateTask, scope constructs.Construct, id *string, props *ScheduledFargateTaskProps)
Constructs a new instance of the ScheduledFargateTask class. Experimental.
func NewScheduledTaskBase_Override ¶
func NewScheduledTaskBase_Override(s ScheduledTaskBase, scope constructs.Construct, id *string, props *ScheduledTaskBaseProps)
Constructs a new instance of the ScheduledTaskBase class. Experimental.
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 { // Name of the listener. // Experimental. Name *string `json:"name"` // Certificate Manager certificate to associate with the load balancer. // // Setting this option will set the load balancer protocol to HTTPS. // Experimental. Certificate awscertificatemanager.ICertificate `json:"certificate"` // The port on which the listener listens for requests. // Experimental. 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. // Experimental. Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"` }
Properties to define an application listener. Experimental.
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. Experimental.
func NewApplicationLoadBalancedEc2Service ¶
func NewApplicationLoadBalancedEc2Service(scope constructs.Construct, id *string, props *ApplicationLoadBalancedEc2ServiceProps) ApplicationLoadBalancedEc2Service
Constructs a new instance of the ApplicationLoadBalancedEc2Service class. Experimental.
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. // Experimental. Certificate awscertificatemanager.ICertificate `json:"certificate"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the application load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"` // Name of the load balancer. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"` // The protocol version to use. // Experimental. ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. 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. // Experimental. RedirectHTTP *bool `json:"redirectHTTP"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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). // Experimental. TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"` // The properties required to create a new task definition. // // TaskDefinition or TaskImageOptions must be specified, but not both. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"` }
The properties for the ApplicationLoadBalancedEc2Service service. Experimental.
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. Experimental.
func NewApplicationLoadBalancedFargateService ¶
func NewApplicationLoadBalancedFargateService(scope constructs.Construct, id *string, props *ApplicationLoadBalancedFargateServiceProps) ApplicationLoadBalancedFargateService
Constructs a new instance of the ApplicationLoadBalancedFargateService class. Experimental.
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. // Experimental. Certificate awscertificatemanager.ICertificate `json:"certificate"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the application load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"` // Name of the load balancer. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"` // The protocol version to use. // Experimental. ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. 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. // Experimental. RedirectHTTP *bool `json:"redirectHTTP"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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). // Experimental. TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"` // The properties required to create a new task definition. // // TaskDefinition or TaskImageOptions must be specified, but not both. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` // Determines whether the service will be assigned a public IP address. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"` // The security groups to associate with the service. // // If you do not specify a security group, the default security group for the VPC is used. // Experimental. 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] // Experimental. TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"` // The subnets to associate with the service. // Experimental. TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"` }
The properties for the ApplicationLoadBalancedFargateService service. Experimental.
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. Experimental.
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. // Experimental. Certificate awscertificatemanager.ICertificate `json:"certificate"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the application load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. LoadBalancer awselasticloadbalancingv2.IApplicationLoadBalancer `json:"loadBalancer"` // Name of the load balancer. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. Protocol awselasticloadbalancingv2.ApplicationProtocol `json:"protocol"` // The protocol version to use. // Experimental. ProtocolVersion awselasticloadbalancingv2.ApplicationProtocolVersion `json:"protocolVersion"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. 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. // Experimental. RedirectHTTP *bool `json:"redirectHTTP"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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). // Experimental. TargetProtocol awselasticloadbalancingv2.ApplicationProtocol `json:"targetProtocol"` // The properties required to create a new task definition. // // TaskDefinition or TaskImageOptions must be specified, but not both. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService service. Experimental.
type ApplicationLoadBalancedServiceRecordType ¶
type ApplicationLoadBalancedServiceRecordType string
Describes the type of DNS record the service should create. Experimental.
const ( ApplicationLoadBalancedServiceRecordType_ALIAS ApplicationLoadBalancedServiceRecordType = "ALIAS" ApplicationLoadBalancedServiceRecordType_CNAME ApplicationLoadBalancedServiceRecordType = "CNAME" ApplicationLoadBalancedServiceRecordType_NONE ApplicationLoadBalancedServiceRecordType = "NONE" )
type ApplicationLoadBalancedTaskImageOptions ¶
type ApplicationLoadBalancedTaskImageOptions struct { // The image used to start a container. // // Image or taskDefinition must be specified, not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // The container name value to be specified in the task definition. // Experimental. 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). // Experimental. ContainerPort *float64 `json:"containerPort"` // A key/value map of labels to add to the container. // Experimental. DockerLabels *map[string]*string `json:"dockerLabels"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // Experimental. 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. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secret to expose to the container as an environment variable. // Experimental. 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. // Experimental. TaskRole awsiam.IRole `json:"taskRole"` }
Experimental.
type ApplicationLoadBalancedTaskImageProps ¶
type ApplicationLoadBalancedTaskImageProps struct { // The image used to start a container. // // Image or taskDefinition must be specified, not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // The container name value to be specified in the task definition. // Experimental. 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). // Experimental. ContainerPorts *[]*float64 `json:"containerPorts"` // A key/value map of labels to add to the container. // Experimental. DockerLabels *map[string]*string `json:"dockerLabels"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // Experimental. 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. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secrets to expose to the container as an environment variable. // Experimental. 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. // Experimental. TaskRole awsiam.IRole `json:"taskRole"` }
Options for configuring a new container. Experimental.
type ApplicationLoadBalancerProps ¶
type ApplicationLoadBalancerProps struct { // Listeners (at least one listener) attached to this load balancer. // Experimental. Listeners *[]*ApplicationListenerProps `json:"listeners"` // Name of the load balancer. // Experimental. Name *string `json:"name"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. DomainZone awsroute53.IHostedZone `json:"domainZone"` // Determines whether the Load Balancer will be internet-facing. // Experimental. PublicLoadBalancer *bool `json:"publicLoadBalancer"` }
Properties to define an application load balancer. Experimental.
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. Experimental.
func NewApplicationMultipleTargetGroupsEc2Service ¶
func NewApplicationMultipleTargetGroupsEc2Service(scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsEc2ServiceProps) ApplicationMultipleTargetGroupsEc2Service
Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class. Experimental.
type ApplicationMultipleTargetGroupsEc2ServiceProps ¶
type ApplicationMultipleTargetGroupsEc2ServiceProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The application load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify ALB target groups. // Experimental. TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. 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: // Experimental. 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. // Experimental. 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 // Experimental. 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] // Experimental. TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"` }
The properties for the ApplicationMultipleTargetGroupsEc2Service service. Experimental.
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. Experimental.
func NewApplicationMultipleTargetGroupsFargateService ¶
func NewApplicationMultipleTargetGroupsFargateService(scope constructs.Construct, id *string, props *ApplicationMultipleTargetGroupsFargateServiceProps) ApplicationMultipleTargetGroupsFargateService
Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService class. Experimental.
type ApplicationMultipleTargetGroupsFargateServiceProps ¶
type ApplicationMultipleTargetGroupsFargateServiceProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The application load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify ALB target groups. // Experimental. TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` // Determines whether the service will be assigned a public IP address. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"` }
The properties for the ApplicationMultipleTargetGroupsFargateService service. Experimental.
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. Experimental.
type ApplicationMultipleTargetGroupsServiceBaseProps ¶
type ApplicationMultipleTargetGroupsServiceBaseProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The application load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify ALB target groups. // Experimental. TargetGroups *[]*ApplicationTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base ApplicationMultipleTargetGroupsEc2Service or ApplicationMultipleTargetGroupsFargateService service. Experimental.
type ApplicationTargetProps ¶
type ApplicationTargetProps struct { // The port number of the container. // // Only applicable when using application/network load balancers. // Experimental. 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 // // Experimental. HostHeader *string `json:"hostHeader"` // Name of the listener the target group attached to. // Experimental. 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 // // Experimental. 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. // Experimental. Priority *float64 `json:"priority"` // The protocol used for the port mapping. // // Only applicable when using application load balancers. // Experimental. Protocol awsecs.Protocol `json:"protocol"` }
Properties to define an application target group. Experimental.
type NetworkListenerProps ¶
type NetworkListenerProps struct { // Name of the listener. // Experimental. Name *string `json:"name"` // The port on which the listener listens for requests. // Experimental. Port *float64 `json:"port"` }
Properties to define an network listener. Experimental.
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. Experimental.
func NewNetworkLoadBalancedEc2Service ¶
func NewNetworkLoadBalancedEc2Service(scope constructs.Construct, id *string, props *NetworkLoadBalancedEc2ServiceProps) NetworkLoadBalancedEc2Service
Constructs a new instance of the NetworkLoadBalancedEc2Service class. Experimental.
type NetworkLoadBalancedEc2ServiceProps ¶
type NetworkLoadBalancedEc2ServiceProps struct { // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the network load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // The properties required to create a new task definition. // // One of taskImageOptions or taskDefinition must be specified. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"` }
The properties for the NetworkLoadBalancedEc2Service service. Experimental.
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. Experimental.
func NewNetworkLoadBalancedFargateService ¶
func NewNetworkLoadBalancedFargateService(scope constructs.Construct, id *string, props *NetworkLoadBalancedFargateServiceProps) NetworkLoadBalancedFargateService
Constructs a new instance of the NetworkLoadBalancedFargateService class. Experimental.
type NetworkLoadBalancedFargateServiceProps ¶
type NetworkLoadBalancedFargateServiceProps struct { // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the network load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // The properties required to create a new task definition. // // One of taskImageOptions or taskDefinition must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` // Determines whether the service will be assigned a public IP address. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"` // The subnets to associate with the service. // Experimental. TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"` }
The properties for the NetworkLoadBalancedFargateService service. Experimental.
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. Experimental.
type NetworkLoadBalancedServiceBaseProps ¶
type NetworkLoadBalancedServiceBaseProps struct { // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. CircuitBreaker *awsecs.DeploymentCircuitBreaker `json:"circuitBreaker"` // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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) // Experimental. 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 // Experimental. DesiredCount *float64 `json:"desiredCount"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // Listener port of the network load balancer that will serve traffic to the service. // Experimental. 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] // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Determines whether the Load Balancer will be internet-facing. // Experimental. 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. // Experimental. RecordType NetworkLoadBalancedServiceRecordType `json:"recordType"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // The properties required to create a new task definition. // // One of taskImageOptions or taskDefinition must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base NetworkLoadBalancedEc2Service or NetworkLoadBalancedFargateService service. Experimental.
type NetworkLoadBalancedServiceRecordType ¶
type NetworkLoadBalancedServiceRecordType string
Describes the type of DNS record the service should create. Experimental.
const ( NetworkLoadBalancedServiceRecordType_ALIAS NetworkLoadBalancedServiceRecordType = "ALIAS" NetworkLoadBalancedServiceRecordType_CNAME NetworkLoadBalancedServiceRecordType = "CNAME" NetworkLoadBalancedServiceRecordType_NONE NetworkLoadBalancedServiceRecordType = "NONE" )
type NetworkLoadBalancedTaskImageOptions ¶
type NetworkLoadBalancedTaskImageOptions struct { // The image used to start a container. // // Image or taskDefinition must be specified, but not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // The container name value to be specified in the task definition. // Experimental. 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). // Experimental. ContainerPort *float64 `json:"containerPort"` // A key/value map of labels to add to the container. // Experimental. DockerLabels *map[string]*string `json:"dockerLabels"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // Experimental. 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. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secret to expose to the container as an environment variable. // Experimental. 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. // Experimental. TaskRole awsiam.IRole `json:"taskRole"` }
Experimental.
type NetworkLoadBalancedTaskImageProps ¶
type NetworkLoadBalancedTaskImageProps struct { // The image used to start a container. // // Image or taskDefinition must be specified, but not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // The container name value to be specified in the task definition. // Experimental. 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). // Experimental. ContainerPorts *[]*float64 `json:"containerPorts"` // A key/value map of labels to add to the container. // Experimental. DockerLabels *map[string]*string `json:"dockerLabels"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // Experimental. 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. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secrets to expose to the container as an environment variable. // Experimental. 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. // Experimental. TaskRole awsiam.IRole `json:"taskRole"` }
Options for configuring a new container. Experimental.
type NetworkLoadBalancerProps ¶
type NetworkLoadBalancerProps struct { // Listeners (at least one listener) attached to this load balancer. // Experimental. Listeners *[]*NetworkListenerProps `json:"listeners"` // Name of the load balancer. // Experimental. Name *string `json:"name"` // The domain name for the service, e.g. "api.example.com.". // Experimental. DomainName *string `json:"domainName"` // The Route53 hosted zone for the domain, e.g. "example.com.". // Experimental. DomainZone awsroute53.IHostedZone `json:"domainZone"` // Determines whether the Load Balancer will be internet-facing. // Experimental. PublicLoadBalancer *bool `json:"publicLoadBalancer"` }
Properties to define an network load balancer. Experimental.
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. Experimental.
func NewNetworkMultipleTargetGroupsEc2Service ¶
func NewNetworkMultipleTargetGroupsEc2Service(scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsEc2ServiceProps) NetworkMultipleTargetGroupsEc2Service
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class. Experimental.
type NetworkMultipleTargetGroupsEc2ServiceProps ¶
type NetworkMultipleTargetGroupsEc2ServiceProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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 // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The network load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify NLB target groups. // Experimental. TargetGroups *[]*NetworkTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. 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: // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"` }
The properties for the NetworkMultipleTargetGroupsEc2Service service. Experimental.
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. Experimental.
func NewNetworkMultipleTargetGroupsFargateService ¶
func NewNetworkMultipleTargetGroupsFargateService(scope constructs.Construct, id *string, props *NetworkMultipleTargetGroupsFargateServiceProps) NetworkMultipleTargetGroupsFargateService
Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class. Experimental.
type NetworkMultipleTargetGroupsFargateServiceProps ¶
type NetworkMultipleTargetGroupsFargateServiceProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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 // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The network load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify NLB target groups. // Experimental. TargetGroups *[]*NetworkTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` // Determines whether the service will be assigned a public IP address. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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] // Experimental. TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"` }
The properties for the NetworkMultipleTargetGroupsFargateService service. Experimental.
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. Experimental.
type NetworkMultipleTargetGroupsServiceBaseProps ¶
type NetworkMultipleTargetGroupsServiceBaseProps struct { // The options for configuring an Amazon ECS service to use service discovery. // Experimental. 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. // Experimental. 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 // Experimental. 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) // Experimental. 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. // Experimental. HealthCheckGracePeriod awscdk.Duration `json:"healthCheckGracePeriod"` // The network load balancer that will serve traffic to the service. // Experimental. 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. // Experimental. PropagateTags awsecs.PropagatedTagSource `json:"propagateTags"` // Name of the service. // Experimental. ServiceName *string `json:"serviceName"` // Properties to specify NLB target groups. // Experimental. TargetGroups *[]*NetworkTargetProps `json:"targetGroups"` // The properties required to create a new task definition. // // Only one of TaskDefinition or TaskImageOptions must be specified. // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base NetworkMultipleTargetGroupsEc2Service or NetworkMultipleTargetGroupsFargateService service. Experimental.
type NetworkTargetProps ¶
type NetworkTargetProps struct { // The port number of the container. // // Only applicable when using application/network load balancers. // Experimental. ContainerPort *float64 `json:"containerPort"` // Name of the listener the target group attached to. // Experimental. Listener *string `json:"listener"` }
Properties to define a network load balancer target group. Experimental.
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. Experimental.
func NewQueueProcessingEc2Service ¶
func NewQueueProcessingEc2Service(scope constructs.Construct, id *string, props *QueueProcessingEc2ServiceProps) QueueProcessingEc2Service
Constructs a new instance of the QueueProcessingEc2Service class. Experimental.
type QueueProcessingEc2ServiceProps ¶
type QueueProcessingEc2ServiceProps struct { // The image used to start a container. // Experimental. Image awsecs.ContainerImage `json:"image"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. 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. // Experimental. 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. // Experimental. 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) // Experimental. 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) // Experimental. EnableECSManagedTags *bool `json:"enableECSManagedTags"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // // The variable `QUEUE_NAME` with value `queue.queueName` will // always be passed. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. 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. // Experimental. 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. // Experimental. MaxReceiveCount *float64 `json:"maxReceiveCount"` // Maximum capacity to scale to. // Experimental. 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. // Experimental. MinHealthyPercent *float64 `json:"minHealthyPercent"` // Minimum capacity to scale to. // Experimental. 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. // Experimental. 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) // Experimental. Queue awssqs.IQueue `json:"queue"` // The number of seconds that Dead Letter Queue retains a message. // Experimental. 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) // Experimental. ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"` // The secret to expose to the container as an environment variable. // Experimental. Secrets *map[string]awsecs.Secret `json:"secrets"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` // Optional name for the container added. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. MemoryReservationMiB *float64 `json:"memoryReservationMiB"` }
The properties for the QueueProcessingEc2Service service. Experimental.
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. Experimental.
func NewQueueProcessingFargateService ¶
func NewQueueProcessingFargateService(scope constructs.Construct, id *string, props *QueueProcessingFargateServiceProps) QueueProcessingFargateService
Constructs a new instance of the QueueProcessingFargateService class. Experimental.
type QueueProcessingFargateServiceProps ¶
type QueueProcessingFargateServiceProps struct { // The image used to start a container. // Experimental. Image awsecs.ContainerImage `json:"image"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. 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. // Experimental. 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. // Experimental. 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) // Experimental. 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) // Experimental. EnableECSManagedTags *bool `json:"enableECSManagedTags"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // // The variable `QUEUE_NAME` with value `queue.queueName` will // always be passed. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. 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. // Experimental. 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. // Experimental. MaxReceiveCount *float64 `json:"maxReceiveCount"` // Maximum capacity to scale to. // Experimental. 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. // Experimental. MinHealthyPercent *float64 `json:"minHealthyPercent"` // Minimum capacity to scale to. // Experimental. 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. // Experimental. 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) // Experimental. Queue awssqs.IQueue `json:"queue"` // The number of seconds that Dead Letter Queue retains a message. // Experimental. 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) // Experimental. ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"` // The secret to expose to the container as an environment variable. // Experimental. Secrets *map[string]awsecs.Secret `json:"secrets"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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. // Experimental. 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. // Experimental. AssignPublicIp *bool `json:"assignPublicIp"` // Optional name for the container added. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion"` // The security groups to associate with the service. // // If you do not specify a security group, the default security group for the VPC is used. // Experimental. SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"` // The subnets to associate with the service. // Experimental. TaskSubnets *awsec2.SubnetSelection `json:"taskSubnets"` }
The properties for the QueueProcessingFargateService service. Experimental.
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. Experimental.
type QueueProcessingServiceBaseProps ¶
type QueueProcessingServiceBaseProps struct { // The image used to start a container. // Experimental. Image awsecs.ContainerImage `json:"image"` // Whether to enable the deployment circuit breaker. // // If this property is defined, circuit breaker will be implicitly // enabled. // Experimental. 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. // Experimental. 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. // Experimental. 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) // Experimental. 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) // Experimental. EnableECSManagedTags *bool `json:"enableECSManagedTags"` // Flag to indicate whether to enable logging. // Experimental. EnableLogging *bool `json:"enableLogging"` // The environment variables to pass to the container. // // The variable `QUEUE_NAME` with value `queue.queueName` will // always be passed. // Experimental. 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. // Experimental. Family *string `json:"family"` // The log driver to use. // Experimental. 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. // Experimental. 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. // Experimental. MaxReceiveCount *float64 `json:"maxReceiveCount"` // Maximum capacity to scale to. // Experimental. 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. // Experimental. MinHealthyPercent *float64 `json:"minHealthyPercent"` // Minimum capacity to scale to. // Experimental. 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. // Experimental. 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) // Experimental. Queue awssqs.IQueue `json:"queue"` // The number of seconds that Dead Letter Queue retains a message. // Experimental. 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) // Experimental. ScalingSteps *[]*awsapplicationautoscaling.ScalingInterval `json:"scalingSteps"` // The secret to expose to the container as an environment variable. // Experimental. Secrets *map[string]awsecs.Secret `json:"secrets"` // The name of the service. // Experimental. ServiceName *string `json:"serviceName"` // 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base QueueProcessingEc2Service or QueueProcessingFargateService service. Experimental.
type ScheduledEc2Task ¶
type ScheduledEc2Task interface { ScheduledTaskBase Cluster() awsecs.ICluster DesiredTaskCount() *float64 EventRule() awsevents.Rule Node() constructs.Node SubnetSelection() *awsec2.SubnetSelection 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. Experimental.
func NewScheduledEc2Task ¶
func NewScheduledEc2Task(scope constructs.Construct, id *string, props *ScheduledEc2TaskProps) ScheduledEc2Task
Constructs a new instance of the ScheduledEc2Task class. Experimental.
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] // Experimental. TaskDefinition awsecs.Ec2TaskDefinition `json:"taskDefinition"` }
The properties for the ScheduledEc2Task using a task definition. Experimental.
type ScheduledEc2TaskImageOptions ¶
type ScheduledEc2TaskImageOptions struct { // The image used to start a container. // // Image or taskDefinition must be specified, but not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // 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. // Experimental. Command *[]*string `json:"command"` // The environment variables to pass to the container. // Experimental. Environment *map[string]*string `json:"environment"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secret to expose to the container as an environment variable. // Experimental. Secrets *map[string]awsecs.Secret `json:"secrets"` // The minimum number of CPU units to reserve for the container. // Experimental. 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. // Experimental. 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. // Experimental. MemoryReservationMiB *float64 `json:"memoryReservationMiB"` }
The properties for the ScheduledEc2Task using an image. Experimental.
type ScheduledEc2TaskProps ¶
type ScheduledEc2TaskProps struct { // 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. // Experimental. Schedule awsapplicationautoscaling.Schedule `json:"schedule"` // 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. DesiredTaskCount *float64 `json:"desiredTaskCount"` // Indicates whether the rule is enabled. // Experimental. Enabled *bool `json:"enabled"` // A name for the rule. // Experimental. RuleName *string `json:"ruleName"` // In what subnets to place the task's ENIs. // // (Only applicable in case the TaskDefinition is configured for AwsVpc networking) // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. ScheduledEc2TaskImageOptions *ScheduledEc2TaskImageOptions `json:"scheduledEc2TaskImageOptions"` }
The properties for the ScheduledEc2Task task. Experimental.
type ScheduledFargateTask ¶
type ScheduledFargateTask interface { ScheduledTaskBase Cluster() awsecs.ICluster DesiredTaskCount() *float64 EventRule() awsevents.Rule Node() constructs.Node SubnetSelection() *awsec2.SubnetSelection 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. Experimental.
func NewScheduledFargateTask ¶
func NewScheduledFargateTask(scope constructs.Construct, id *string, props *ScheduledFargateTaskProps) ScheduledFargateTask
Constructs a new instance of the ScheduledFargateTask class. Experimental.
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] // Experimental. TaskDefinition awsecs.FargateTaskDefinition `json:"taskDefinition"` }
The properties for the ScheduledFargateTask using a task definition. Experimental.
type ScheduledFargateTaskImageOptions ¶
type ScheduledFargateTaskImageOptions struct { // The image used to start a container. // // Image or taskDefinition must be specified, but not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // 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. // Experimental. Command *[]*string `json:"command"` // The environment variables to pass to the container. // Experimental. Environment *map[string]*string `json:"environment"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secret to expose to the container as an environment variable. // Experimental. 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. // Experimental. 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. // Experimental. MemoryLimitMiB *float64 `json:"memoryLimitMiB"` }
The properties for the ScheduledFargateTask using an image. Experimental.
type ScheduledFargateTaskProps ¶
type ScheduledFargateTaskProps struct { // 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. // Experimental. Schedule awsapplicationautoscaling.Schedule `json:"schedule"` // 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. DesiredTaskCount *float64 `json:"desiredTaskCount"` // Indicates whether the rule is enabled. // Experimental. Enabled *bool `json:"enabled"` // A name for the rule. // Experimental. RuleName *string `json:"ruleName"` // In what subnets to place the task's ENIs. // // (Only applicable in case the TaskDefinition is configured for AwsVpc networking) // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. 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. // Experimental. ScheduledFargateTaskImageOptions *ScheduledFargateTaskImageOptions `json:"scheduledFargateTaskImageOptions"` }
The properties for the ScheduledFargateTask task. Experimental.
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. Experimental.
type ScheduledTaskBaseProps ¶
type ScheduledTaskBaseProps struct { // 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. // Experimental. Schedule awsapplicationautoscaling.Schedule `json:"schedule"` // 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. // Experimental. Cluster awsecs.ICluster `json:"cluster"` // The desired number of instantiations of the task definition to keep running on the service. // Experimental. DesiredTaskCount *float64 `json:"desiredTaskCount"` // Indicates whether the rule is enabled. // Experimental. Enabled *bool `json:"enabled"` // A name for the rule. // Experimental. RuleName *string `json:"ruleName"` // In what subnets to place the task's ENIs. // // (Only applicable in case the TaskDefinition is configured for AwsVpc networking) // Experimental. 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. // Experimental. Vpc awsec2.IVpc `json:"vpc"` }
The properties for the base ScheduledEc2Task or ScheduledFargateTask task. Experimental.
type ScheduledTaskImageProps ¶
type ScheduledTaskImageProps struct { // The image used to start a container. // // Image or taskDefinition must be specified, but not both. // Experimental. Image awsecs.ContainerImage `json:"image"` // 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. // Experimental. Command *[]*string `json:"command"` // The environment variables to pass to the container. // Experimental. Environment *map[string]*string `json:"environment"` // The log driver to use. // Experimental. LogDriver awsecs.LogDriver `json:"logDriver"` // The secret to expose to the container as an environment variable. // Experimental. Secrets *map[string]awsecs.Secret `json:"secrets"` }
Experimental.