agent-claw: automated task changes
This commit is contained in:
13
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/.jsiirc.json
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/.jsiirc.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"targets": {
|
||||
"java": {
|
||||
"package": "software.amazon.awscdk.services.ecs.patterns"
|
||||
},
|
||||
"dotnet": {
|
||||
"namespace": "Amazon.CDK.AWS.ECS.Patterns"
|
||||
},
|
||||
"python": {
|
||||
"module": "aws_cdk.aws_ecs_patterns"
|
||||
}
|
||||
}
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/CONTRIBUTING.md
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
See: [Contributing Guide](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk-lib/aws-ecs/README.md)
|
||||
1295
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md
generated
vendored
Normal file
1295
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/index.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
404
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-load-balanced-service-base.d.ts
generated
vendored
Normal file
404
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-load-balanced-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { ICertificate } from '../../../aws-certificatemanager';
|
||||
import type { IVpc } from '../../../aws-ec2';
|
||||
import type { BaseService, CloudMapOptions, ContainerImage, DeploymentController, DeploymentCircuitBreaker, ICluster, LogDriver, PropagatedTagSource, Secret, CapacityProviderStrategy } from '../../../aws-ecs';
|
||||
import { AwsLogDriver, Cluster } from '../../../aws-ecs';
|
||||
import type { ApplicationListener, ApplicationProtocolVersion, ApplicationTargetGroup, IApplicationLoadBalancer, SslPolicy, IpAddressType } from '../../../aws-elasticloadbalancingv2';
|
||||
import { ApplicationLoadBalancer, ApplicationProtocol } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { IRole } from '../../../aws-iam';
|
||||
import type { IHostedZone } from '../../../aws-route53';
|
||||
import { Duration } from '../../../core';
|
||||
/**
|
||||
* Describes the type of DNS record the service should create
|
||||
*/
|
||||
export declare enum ApplicationLoadBalancedServiceRecordType {
|
||||
/**
|
||||
* Create Route53 A Alias record
|
||||
*/
|
||||
ALIAS = 0,
|
||||
/**
|
||||
* Create a CNAME record
|
||||
*/
|
||||
CNAME = 1,
|
||||
/**
|
||||
* Do not create any DNS records
|
||||
*/
|
||||
NONE = 2
|
||||
}
|
||||
/**
|
||||
* The properties for the base ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService service.
|
||||
*/
|
||||
export interface ApplicationLoadBalancedServiceBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* The properties required to create a new task definition. TaskDefinition or TaskImageOptions must be specified, but not both.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly taskImageOptions?: ApplicationLoadBalancedTaskImageOptions;
|
||||
/**
|
||||
* Determines whether the Load Balancer will be internet-facing.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly publicLoadBalancer?: boolean;
|
||||
/**
|
||||
* Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.
|
||||
*
|
||||
* @default true -- The security group allows ingress from all IP addresses.
|
||||
*/
|
||||
readonly openListener?: boolean;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The minimum value is 1
|
||||
*
|
||||
* @default - The default is 1 for all new services and uses the existing service's desired count
|
||||
* when updating an existing service.
|
||||
*/
|
||||
readonly desiredCount?: number;
|
||||
/**
|
||||
* Certificate Manager certificate to associate with the load balancer.
|
||||
* Setting this option will set the load balancer protocol to HTTPS.
|
||||
*
|
||||
* @default - No certificate associated with the load balancer, if using
|
||||
* the HTTP protocol. For HTTPS, a DNS-validated certificate will be
|
||||
* created for the load balancer's specified domain name if a domain name
|
||||
* and domain zone are specified.
|
||||
*/
|
||||
readonly certificate?: ICertificate;
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @default HTTP.
|
||||
*/
|
||||
readonly targetProtocol?: ApplicationProtocol;
|
||||
/**
|
||||
* 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). If HTTPS, either a certificate or domain
|
||||
* name and domain zone must also be specified.
|
||||
*
|
||||
* @default HTTP. If a certificate is specified, the protocol will be
|
||||
* set by default to HTTPS.
|
||||
*/
|
||||
readonly protocol?: ApplicationProtocol;
|
||||
/**
|
||||
* The protocol version to use
|
||||
*
|
||||
* @default ApplicationProtocolVersion.HTTP1
|
||||
*/
|
||||
readonly protocolVersion?: ApplicationProtocolVersion;
|
||||
/**
|
||||
* The domain name for the service, e.g. "api.example.com."
|
||||
*
|
||||
* @default - No domain name.
|
||||
*/
|
||||
readonly domainName?: string;
|
||||
/**
|
||||
* The Route53 hosted zone for the domain, e.g. "example.com."
|
||||
*
|
||||
* @default - No Route53 hosted domain zone.
|
||||
*/
|
||||
readonly domainZone?: IHostedZone;
|
||||
/**
|
||||
* The name of the service.
|
||||
*
|
||||
* @default - CloudFormation-generated name.
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
||||
*/
|
||||
readonly healthCheckGracePeriod?: Duration;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 100 if daemon, otherwise 200
|
||||
*/
|
||||
readonly maxHealthyPercent?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 0 if daemon, otherwise 50
|
||||
*/
|
||||
readonly minHealthyPercent?: number;
|
||||
/**
|
||||
* 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]
|
||||
*
|
||||
* @default - a new load balancer will be created.
|
||||
*/
|
||||
readonly loadBalancer?: IApplicationLoadBalancer;
|
||||
/**
|
||||
* Listener port of the application load balancer that will serve traffic to the service.
|
||||
*
|
||||
* @default - The default listener 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.
|
||||
*/
|
||||
readonly listenerPort?: number;
|
||||
/**
|
||||
* The security policy that defines which ciphers and protocols are supported by the ALB Listener.
|
||||
*
|
||||
* @default - The recommended elastic load balancing security policy
|
||||
*/
|
||||
readonly sslPolicy?: SslPolicy;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly enableECSManagedTags?: boolean;
|
||||
/**
|
||||
* The options for configuring an Amazon ECS service to use service discovery.
|
||||
*
|
||||
* @default - AWS Cloud Map service discovery is not enabled.
|
||||
*/
|
||||
readonly cloudMapOptions?: CloudMapOptions;
|
||||
/**
|
||||
* Specifies whether the load balancer should redirect traffic on port 80 to the {@link listenerPort} to support HTTP->HTTPS redirects.
|
||||
* This is only valid if the protocol of the ALB is HTTPS.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly redirectHTTP?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default ApplicationLoadBalancedServiceRecordType.ALIAS
|
||||
*/
|
||||
readonly recordType?: ApplicationLoadBalancedServiceRecordType;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default - Rolling update (ECS)
|
||||
*/
|
||||
readonly deploymentController?: DeploymentController;
|
||||
/**
|
||||
* Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly
|
||||
* enabled.
|
||||
* @default - disabled
|
||||
*/
|
||||
readonly circuitBreaker?: DeploymentCircuitBreaker;
|
||||
/**
|
||||
* A list of Capacity Provider strategies used to place a service.
|
||||
*
|
||||
* @default - undefined
|
||||
*
|
||||
*/
|
||||
readonly capacityProviderStrategies?: CapacityProviderStrategy[];
|
||||
/**
|
||||
* Name of the load balancer
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly loadBalancerName?: string;
|
||||
/**
|
||||
* Whether ECS Exec should be enabled
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
/**
|
||||
* The load balancer idle timeout, in seconds. Can be between 1 and 4000 seconds
|
||||
*
|
||||
* @default - CloudFormation sets idle timeout to 60 seconds
|
||||
*/
|
||||
readonly idleTimeout?: Duration;
|
||||
/**
|
||||
* The type of IP address to use
|
||||
*
|
||||
* @default - IpAddressType.IPV4
|
||||
*/
|
||||
readonly ipAddressType?: IpAddressType;
|
||||
}
|
||||
export interface ApplicationLoadBalancedTaskImageOptions {
|
||||
/**
|
||||
* The image used to start a container. Image or taskDefinition must be specified, not both.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly image: ContainerImage;
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* @default - No environment variables.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secret to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* Flag to indicate whether to enable logging.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enableLogging?: boolean;
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - No value
|
||||
*/
|
||||
readonly executionRole?: IRole;
|
||||
/**
|
||||
* The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - A task role is automatically created for you.
|
||||
*/
|
||||
readonly taskRole?: IRole;
|
||||
/**
|
||||
* The container name value to be specified in the task definition.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @default 80
|
||||
*/
|
||||
readonly containerPort?: number;
|
||||
/**
|
||||
* The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly family?: string;
|
||||
/**
|
||||
* A key/value map of labels to add to the container.
|
||||
*
|
||||
* @default - No labels.
|
||||
*/
|
||||
readonly dockerLabels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The entry point that's passed to the container.
|
||||
*
|
||||
* This parameter maps to `Entrypoint` in the [Create a container](https://docs.docker.com/engine/api/v1.38/#operation/ContainerCreate) section
|
||||
* of the [Docker Remote API](https://docs.docker.com/engine/api/v1.38/) and the `--entrypoint` option to
|
||||
* [docker run](https://docs.docker.com/engine/reference/commandline/run/).
|
||||
*
|
||||
* For more information about the Docker `ENTRYPOINT` parameter, see https://docs.docker.com/engine/reference/builder/#entrypoint.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly entryPoint?: string[];
|
||||
/**
|
||||
* The command that's passed to the container. If there are multiple arguments, make sure that each argument is a separated string in the array.
|
||||
*
|
||||
* This parameter maps to `Cmd` in the [Create a container](https://docs.docker.com/engine/api/v1.38/#operation/ContainerCreate) section
|
||||
* of the [Docker Remote API](https://docs.docker.com/engine/api/v1.38/) and the `COMMAND` parameter to
|
||||
* [docker run](https://docs.docker.com/engine/reference/commandline/run/).
|
||||
*
|
||||
* For more information about the Docker `CMD` parameter, see https://docs.docker.com/engine/reference/builder/#cmd.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly command?: string[];
|
||||
}
|
||||
/**
|
||||
* The base class for ApplicationLoadBalancedEc2Service and ApplicationLoadBalancedFargateService services.
|
||||
*/
|
||||
export declare abstract class ApplicationLoadBalancedServiceBase extends Construct {
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The default is 1 for all new services and uses the existing services desired count
|
||||
* when updating an existing service if one is not provided.
|
||||
*/
|
||||
readonly internalDesiredCount?: number;
|
||||
/**
|
||||
* The Application Load Balancer for the service.
|
||||
*/
|
||||
get loadBalancer(): ApplicationLoadBalancer;
|
||||
/**
|
||||
* The listener for the service.
|
||||
*/
|
||||
readonly listener: ApplicationListener;
|
||||
/**
|
||||
* The redirect listener for the service if redirectHTTP is enabled.
|
||||
*/
|
||||
readonly redirectListener?: ApplicationListener;
|
||||
/**
|
||||
* The target group for the service.
|
||||
*/
|
||||
readonly targetGroup: ApplicationTargetGroup;
|
||||
/**
|
||||
* Certificate Manager certificate to associate with the load balancer.
|
||||
*/
|
||||
readonly certificate?: ICertificate;
|
||||
/**
|
||||
* The cluster that hosts the service.
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
private readonly _applicationLoadBalancer?;
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationLoadBalancedServiceBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationLoadBalancedServiceBaseProps);
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
/**
|
||||
* Adds service as a target of the target group.
|
||||
*/
|
||||
protected addServiceAsTarget(service: BaseService): void;
|
||||
protected createAWSLogDriver(prefix: string): AwsLogDriver;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-load-balanced-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-load-balanced-service-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
377
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.d.ts
generated
vendored
Normal file
377
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,377 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { ICertificate } from '../../../aws-certificatemanager';
|
||||
import type { IVpc } from '../../../aws-ec2';
|
||||
import type { BaseService, CloudMapOptions, ContainerDefinition, ContainerImage, ICluster, LogDriver, PropagatedTagSource, Secret } from '../../../aws-ecs';
|
||||
import { AwsLogDriver, Cluster, Protocol } from '../../../aws-ecs';
|
||||
import type { ApplicationListener, ApplicationTargetGroup, SslPolicy } from '../../../aws-elasticloadbalancingv2';
|
||||
import { ApplicationLoadBalancer, ApplicationProtocol } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { IRole } from '../../../aws-iam';
|
||||
import type { IHostedZone } from '../../../aws-route53';
|
||||
import { Duration } from '../../../core';
|
||||
/**
|
||||
* The properties for the base ApplicationMultipleTargetGroupsEc2Service or ApplicationMultipleTargetGroupsFargateService service.
|
||||
*/
|
||||
export interface ApplicationMultipleTargetGroupsServiceBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* The properties required to create a new task definition. Only one of TaskDefinition or TaskImageOptions must be specified.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly taskImageOptions?: ApplicationLoadBalancedTaskImageProps;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
*
|
||||
* @default - The default is 1 for all new services and uses the existing service's desired count
|
||||
* when updating an existing service.
|
||||
*/
|
||||
readonly desiredCount?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
||||
*/
|
||||
readonly healthCheckGracePeriod?: Duration;
|
||||
/**
|
||||
* The name of the service.
|
||||
*
|
||||
* @default - CloudFormation-generated name.
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
/**
|
||||
* The application load balancer that will serve traffic to the service.
|
||||
*
|
||||
* @default - a new load balancer with a listener will be created.
|
||||
*/
|
||||
readonly loadBalancers?: ApplicationLoadBalancerProps[];
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly enableECSManagedTags?: boolean;
|
||||
/**
|
||||
* The options for configuring an Amazon ECS service to use service discovery.
|
||||
*
|
||||
* @default - AWS Cloud Map service discovery is not enabled.
|
||||
*/
|
||||
readonly cloudMapOptions?: CloudMapOptions;
|
||||
/**
|
||||
* Properties to specify ALB target groups.
|
||||
*
|
||||
* @default - default portMapping registered as target group and attached to the first defined listener
|
||||
*/
|
||||
readonly targetGroups?: ApplicationTargetProps[];
|
||||
/**
|
||||
* Whether ECS Exec should be enabled
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
}
|
||||
/**
|
||||
* Options for configuring a new container.
|
||||
*/
|
||||
export interface ApplicationLoadBalancedTaskImageProps {
|
||||
/**
|
||||
* The image used to start a container. Image or taskDefinition must be specified, not both.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly image: ContainerImage;
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* @default - No environment variables.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secrets to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* Flag to indicate whether to enable logging.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enableLogging?: boolean;
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - No value
|
||||
*/
|
||||
readonly executionRole?: IRole;
|
||||
/**
|
||||
* The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - A task role is automatically created for you.
|
||||
*/
|
||||
readonly taskRole?: IRole;
|
||||
/**
|
||||
* The container name value to be specified in the task definition.
|
||||
*
|
||||
* @default - web
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @default - [80]
|
||||
*/
|
||||
readonly containerPorts?: number[];
|
||||
/**
|
||||
* The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly family?: string;
|
||||
/**
|
||||
* A key/value map of labels to add to the container.
|
||||
*
|
||||
* @default - No labels.
|
||||
*/
|
||||
readonly dockerLabels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Properties to define an application target group.
|
||||
*/
|
||||
export interface ApplicationTargetProps {
|
||||
/**
|
||||
* The port number of the container. Only applicable when using application/network load balancers.
|
||||
*/
|
||||
readonly containerPort: number;
|
||||
/**
|
||||
* The protocol used for the port mapping. Only applicable when using application load balancers.
|
||||
*
|
||||
* @default ecs.Protocol.TCP
|
||||
*/
|
||||
readonly protocol?: Protocol;
|
||||
/**
|
||||
* Name of the listener the target group attached to.
|
||||
*
|
||||
* @default - default listener (first added listener)
|
||||
*/
|
||||
readonly listener?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default Target groups are used as defaults
|
||||
*/
|
||||
readonly priority?: number;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @default No host condition
|
||||
*/
|
||||
readonly hostHeader?: string;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @default No path condition
|
||||
*/
|
||||
readonly pathPattern?: string;
|
||||
}
|
||||
/**
|
||||
* Properties to define an application load balancer.
|
||||
*/
|
||||
export interface ApplicationLoadBalancerProps {
|
||||
/**
|
||||
* Name of the load balancer.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Listeners (at least one listener) attached to this load balancer.
|
||||
*/
|
||||
readonly listeners: ApplicationListenerProps[];
|
||||
/**
|
||||
* Determines whether the Load Balancer will be internet-facing.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly publicLoadBalancer?: boolean;
|
||||
/**
|
||||
* The domain name for the service, e.g. "api.example.com."
|
||||
*
|
||||
* @default - No domain name.
|
||||
*/
|
||||
readonly domainName?: string;
|
||||
/**
|
||||
* The Route53 hosted zone for the domain, e.g. "example.com."
|
||||
*
|
||||
* @default - No Route53 hosted domain zone.
|
||||
*/
|
||||
readonly domainZone?: IHostedZone;
|
||||
/**
|
||||
* The load balancer idle timeout, in seconds. Can be between 1 and 4000 seconds.
|
||||
*
|
||||
* @default - CloudFormation sets idle timeout to 60 seconds
|
||||
*/
|
||||
readonly idleTimeout?: Duration;
|
||||
}
|
||||
/**
|
||||
* Properties to define an application listener.
|
||||
*/
|
||||
export interface ApplicationListenerProps {
|
||||
/**
|
||||
* Name of the listener.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default ApplicationProtocol.HTTP. If a certificate is specified, the protocol will be
|
||||
* set by default to ApplicationProtocol.HTTPS.
|
||||
*/
|
||||
readonly protocol?: ApplicationProtocol;
|
||||
/**
|
||||
* The port on which the listener listens for requests.
|
||||
*
|
||||
* @default - Determined from protocol if known.
|
||||
*/
|
||||
readonly port?: number;
|
||||
/**
|
||||
* Certificate Manager certificate to associate with the load balancer.
|
||||
* Setting this option will set the load balancer protocol to HTTPS.
|
||||
*
|
||||
* @default - No certificate associated with the load balancer, if using
|
||||
* the HTTP protocol. For HTTPS, a DNS-validated certificate will be
|
||||
* created for the load balancer's specified domain name.
|
||||
*/
|
||||
readonly certificate?: ICertificate;
|
||||
/**
|
||||
* The security policy that defines which ciphers and protocols are supported by the ALB Listener.
|
||||
*
|
||||
* @default - The recommended elastic load balancing security policy
|
||||
*/
|
||||
readonly sslPolicy?: SslPolicy;
|
||||
}
|
||||
/**
|
||||
* The base class for ApplicationMultipleTargetGroupsEc2Service and ApplicationMultipleTargetGroupsFargateService classes.
|
||||
*/
|
||||
export declare abstract class ApplicationMultipleTargetGroupsServiceBase extends Construct {
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The default is 1 for all new services and uses the existing services desired count
|
||||
* when updating an existing service, if one is not provided.
|
||||
*/
|
||||
readonly internalDesiredCount?: number;
|
||||
/**
|
||||
* The default Application Load Balancer for the service (first added load balancer).
|
||||
* @deprecated - Use `loadBalancers` instead.
|
||||
*/
|
||||
readonly loadBalancer: ApplicationLoadBalancer;
|
||||
/**
|
||||
* The default listener for the service (first added listener).
|
||||
* @deprecated - Use `listeners` instead.
|
||||
*/
|
||||
readonly listener: ApplicationListener;
|
||||
/**
|
||||
* The cluster that hosts the service.
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
protected logDriver?: LogDriver;
|
||||
/**
|
||||
* The listeners of the service.
|
||||
*/
|
||||
readonly listeners: ApplicationListener[];
|
||||
/**
|
||||
* The target groups of the service.
|
||||
*/
|
||||
readonly targetGroups: ApplicationTargetGroup[];
|
||||
/**
|
||||
* The load balancers of the service.
|
||||
*/
|
||||
readonly loadBalancers: ApplicationLoadBalancer[];
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationMultipleTargetGroupsServiceBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationMultipleTargetGroupsServiceBaseProps);
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
protected createAWSLogDriver(prefix: string): AwsLogDriver;
|
||||
protected findListener(name?: string): ApplicationListener;
|
||||
protected registerECSTargets(service: BaseService, container: ContainerDefinition, targets: ApplicationTargetProps[]): ApplicationTargetGroup;
|
||||
protected addPortMappingForTargets(container: ContainerDefinition, targets: ApplicationTargetProps[]): void;
|
||||
/**
|
||||
* Create log driver if logging is enabled.
|
||||
*/
|
||||
private createLogDriver;
|
||||
private configListener;
|
||||
private validateInput;
|
||||
private validateLbProps;
|
||||
private createLoadBalancer;
|
||||
private createListenerProtocol;
|
||||
private createListenerCertificate;
|
||||
private createListener;
|
||||
private createDomainName;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
86
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/fargate-service-base.d.ts
generated
vendored
Normal file
86
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/fargate-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
import type { FargatePlatformVersion, FargateTaskDefinition, RuntimePlatform } from '../../../aws-ecs';
|
||||
export interface FargateServiceBaseProps {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both.
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition?: FargateTaskDefinition;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* 8192 (8 vCPU) - Available memory values: Between 16GB and 60GB in 4GB increments
|
||||
*
|
||||
* 16384 (16 vCPU) - Available memory values: Between 32GB and 120GB in 8GB increments
|
||||
*
|
||||
* This default is set in the underlying FargateTaskDefinition construct.
|
||||
*
|
||||
* @default 256
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU)
|
||||
*
|
||||
* Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU)
|
||||
*
|
||||
* This default is set in the underlying FargateTaskDefinition construct.
|
||||
*
|
||||
* @default 512
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* The amount (in GiB) of ephemeral storage to be allocated to the task.
|
||||
*
|
||||
* The minimum supported value is `21` GiB and the maximum supported value is `200` GiB.
|
||||
*
|
||||
* Only supported in Fargate platform version 1.4.0 or later.
|
||||
*
|
||||
* @default Undefined, in which case, the task will receive 20GiB ephemeral storage.
|
||||
*/
|
||||
readonly ephemeralStorageGiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default Latest
|
||||
*/
|
||||
readonly platformVersion?: FargatePlatformVersion;
|
||||
/**
|
||||
* The runtime platform of the task definition
|
||||
*
|
||||
* @default - If the property is undefined, `operatingSystemFamily` is LINUX and `cpuArchitecture` is X86_64
|
||||
*/
|
||||
readonly runtimePlatform?: RuntimePlatform;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/fargate-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/fargate-service-base.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
318
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-load-balanced-service-base.d.ts
generated
vendored
Normal file
318
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-load-balanced-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,318 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { IVpc } from '../../../aws-ec2';
|
||||
import type { BaseService, CloudMapOptions, ContainerImage, DeploymentController, DeploymentCircuitBreaker, ICluster, LogDriver, PropagatedTagSource, Secret, CapacityProviderStrategy } from '../../../aws-ecs';
|
||||
import { AwsLogDriver, Cluster } from '../../../aws-ecs';
|
||||
import type { IListenerCertificate, INetworkLoadBalancer, IpAddressType, NetworkListener, NetworkTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import { NetworkLoadBalancer } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { IRole } from '../../../aws-iam';
|
||||
import type { IHostedZone } from '../../../aws-route53';
|
||||
import * as cdk from '../../../core';
|
||||
/**
|
||||
* Describes the type of DNS record the service should create
|
||||
*/
|
||||
export declare enum NetworkLoadBalancedServiceRecordType {
|
||||
/**
|
||||
* Create Route53 A Alias record
|
||||
*/
|
||||
ALIAS = 0,
|
||||
/**
|
||||
* Create a CNAME record
|
||||
*/
|
||||
CNAME = 1,
|
||||
/**
|
||||
* Do not create any DNS records
|
||||
*/
|
||||
NONE = 2
|
||||
}
|
||||
/**
|
||||
* The properties for the base NetworkLoadBalancedEc2Service or NetworkLoadBalancedFargateService service.
|
||||
*/
|
||||
export interface NetworkLoadBalancedServiceBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* The properties required to create a new task definition. One of taskImageOptions or taskDefinition must be specified.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskImageOptions?: NetworkLoadBalancedTaskImageOptions;
|
||||
/**
|
||||
* Determines whether the Load Balancer will be internet-facing.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly publicLoadBalancer?: boolean;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The minimum value is 1
|
||||
*
|
||||
* @default - The default is 1 for all new services and uses the existing service's desired count
|
||||
* when updating an existing service.
|
||||
*/
|
||||
readonly desiredCount?: number;
|
||||
/**
|
||||
* The domain name for the service, e.g. "api.example.com."
|
||||
*
|
||||
* @default - No domain name.
|
||||
*/
|
||||
readonly domainName?: string;
|
||||
/**
|
||||
* The Route53 hosted zone for the domain, e.g. "example.com."
|
||||
*
|
||||
* @default - No Route53 hosted domain zone.
|
||||
*/
|
||||
readonly domainZone?: IHostedZone;
|
||||
/**
|
||||
* The name of the service.
|
||||
*
|
||||
* @default - CloudFormation-generated name.
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
||||
*/
|
||||
readonly healthCheckGracePeriod?: cdk.Duration;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 100 if daemon, otherwise 200
|
||||
*/
|
||||
readonly maxHealthyPercent?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 0 if daemon, otherwise 50
|
||||
*/
|
||||
readonly minHealthyPercent?: number;
|
||||
/**
|
||||
* 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]
|
||||
*
|
||||
* @default - a new load balancer will be created.
|
||||
*/
|
||||
readonly loadBalancer?: INetworkLoadBalancer;
|
||||
/**
|
||||
* Listener port of the network load balancer that will serve traffic to the service.
|
||||
*
|
||||
* @default 80 or 443 with listenerCertificate provided
|
||||
*/
|
||||
readonly listenerPort?: number;
|
||||
/**
|
||||
* Listener certificate list of ACM cert ARNs.
|
||||
* If you provide a certificate, the listener's protocol will be TLS.
|
||||
* If not, the listener's protocol will be TCP.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly listenerCertificate?: IListenerCertificate;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly enableECSManagedTags?: boolean;
|
||||
/**
|
||||
* The options for configuring an Amazon ECS service to use service discovery.
|
||||
*
|
||||
* @default - AWS Cloud Map service discovery is not enabled.
|
||||
*/
|
||||
readonly cloudMapOptions?: CloudMapOptions;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default NetworkLoadBalancedServiceRecordType.ALIAS
|
||||
*/
|
||||
readonly recordType?: NetworkLoadBalancedServiceRecordType;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default - Rolling update (ECS)
|
||||
*/
|
||||
readonly deploymentController?: DeploymentController;
|
||||
/**
|
||||
* Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly
|
||||
* enabled.
|
||||
* @default - disabled
|
||||
*/
|
||||
readonly circuitBreaker?: DeploymentCircuitBreaker;
|
||||
/**
|
||||
* A list of Capacity Provider strategies used to place a service.
|
||||
*
|
||||
* @default - undefined
|
||||
*
|
||||
*/
|
||||
readonly capacityProviderStrategies?: CapacityProviderStrategy[];
|
||||
/**
|
||||
* Whether ECS Exec should be enabled
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
/**
|
||||
* The type of IP addresses to use
|
||||
*
|
||||
* If you want to add a UDP or TCP_UDP listener to the load balancer,
|
||||
* you must choose IPv4.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-ip-address-type.html
|
||||
*
|
||||
* @default IpAddressType.IPV4
|
||||
*/
|
||||
readonly ipAddressType?: IpAddressType;
|
||||
}
|
||||
export interface NetworkLoadBalancedTaskImageOptions {
|
||||
/**
|
||||
* The image used to start a container. Image or taskDefinition must be specified, but not both.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly image: ContainerImage;
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* @default - No environment variables.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secret to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* Flag to indicate whether to enable logging.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enableLogging?: boolean;
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - No value
|
||||
*/
|
||||
readonly executionRole?: IRole;
|
||||
/**
|
||||
* The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - A task role is automatically created for you.
|
||||
*/
|
||||
readonly taskRole?: IRole;
|
||||
/**
|
||||
* The container name value to be specified in the task definition.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @default 80 or 443 with listenerCertificate provided
|
||||
*/
|
||||
readonly containerPort?: number;
|
||||
/**
|
||||
* The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly family?: string;
|
||||
/**
|
||||
* A key/value map of labels to add to the container.
|
||||
*
|
||||
* @default - No labels.
|
||||
*/
|
||||
readonly dockerLabels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* The base class for NetworkLoadBalancedEc2Service and NetworkLoadBalancedFargateService services.
|
||||
*/
|
||||
export declare abstract class NetworkLoadBalancedServiceBase extends Construct {
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The default is 1 for all new services and uses the existing services desired count
|
||||
* when updating an existing service, if one is not provided.
|
||||
*/
|
||||
readonly internalDesiredCount?: number;
|
||||
/**
|
||||
* The Network Load Balancer for the service.
|
||||
*/
|
||||
get loadBalancer(): NetworkLoadBalancer;
|
||||
/**
|
||||
* The listener for the service.
|
||||
*/
|
||||
readonly listener: NetworkListener;
|
||||
/**
|
||||
* The target group for the service.
|
||||
*/
|
||||
readonly targetGroup: NetworkTargetGroup;
|
||||
/**
|
||||
* The cluster that hosts the service.
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
private readonly _networkLoadBalancer?;
|
||||
/**
|
||||
* Constructs a new instance of the NetworkLoadBalancedServiceBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkLoadBalancedServiceBaseProps);
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
/**
|
||||
* Adds service as a target of the target group.
|
||||
*/
|
||||
protected addServiceAsTarget(service: BaseService): void;
|
||||
protected createAWSLogDriver(prefix: string): AwsLogDriver;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-load-balanced-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-load-balanced-service-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
300
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-multiple-target-groups-service-base.d.ts
generated
vendored
Normal file
300
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-multiple-target-groups-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { IVpc } from '../../../aws-ec2';
|
||||
import type { BaseService, CloudMapOptions, ContainerDefinition, ContainerImage, ICluster, LogDriver, PropagatedTagSource, Secret } from '../../../aws-ecs';
|
||||
import { AwsLogDriver, Cluster } from '../../../aws-ecs';
|
||||
import type { NetworkListener, NetworkTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import { NetworkLoadBalancer } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { IRole } from '../../../aws-iam';
|
||||
import type { IHostedZone } from '../../../aws-route53';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* The properties for the base NetworkMultipleTargetGroupsEc2Service or NetworkMultipleTargetGroupsFargateService service.
|
||||
*/
|
||||
export interface NetworkMultipleTargetGroupsServiceBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* The properties required to create a new task definition. Only one of TaskDefinition or TaskImageOptions must be specified.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskImageOptions?: NetworkLoadBalancedTaskImageProps;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The minimum value is 1
|
||||
*
|
||||
* @default - The default is 1 for all new services and uses the existing service's desired count
|
||||
* when updating an existing service.
|
||||
*/
|
||||
readonly desiredCount?: number;
|
||||
/**
|
||||
* Name of the service.
|
||||
*
|
||||
* @default - CloudFormation-generated name.
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
||||
*/
|
||||
readonly healthCheckGracePeriod?: Duration;
|
||||
/**
|
||||
* The network load balancer that will serve traffic to the service.
|
||||
*
|
||||
* @default - a new load balancer with a listener will be created.
|
||||
*/
|
||||
readonly loadBalancers?: NetworkLoadBalancerProps[];
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly enableECSManagedTags?: boolean;
|
||||
/**
|
||||
* The options for configuring an Amazon ECS service to use service discovery.
|
||||
*
|
||||
* @default - AWS Cloud Map service discovery is not enabled.
|
||||
*/
|
||||
readonly cloudMapOptions?: CloudMapOptions;
|
||||
/**
|
||||
* Properties to specify NLB target groups.
|
||||
*
|
||||
* @default - default portMapping registered as target group and attached to the first defined listener
|
||||
*/
|
||||
readonly targetGroups?: NetworkTargetProps[];
|
||||
/**
|
||||
* Whether ECS Exec should be enabled
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
}
|
||||
/**
|
||||
* Options for configuring a new container.
|
||||
*/
|
||||
export interface NetworkLoadBalancedTaskImageProps {
|
||||
/**
|
||||
* The image used to start a container. Image or taskDefinition must be specified, but not both.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly image: ContainerImage;
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* @default - No environment variables.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secrets to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* Flag to indicate whether to enable logging.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enableLogging?: boolean;
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - No value
|
||||
*/
|
||||
readonly executionRole?: IRole;
|
||||
/**
|
||||
* The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.
|
||||
*
|
||||
* @default - A task role is automatically created for you.
|
||||
*/
|
||||
readonly taskRole?: IRole;
|
||||
/**
|
||||
* The container name value to be specified in the task definition.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @default - [80]
|
||||
*/
|
||||
readonly containerPorts?: number[];
|
||||
/**
|
||||
* The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly family?: string;
|
||||
/**
|
||||
* A key/value map of labels to add to the container.
|
||||
*
|
||||
* @default - No labels.
|
||||
*/
|
||||
readonly dockerLabels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Properties to define an network load balancer.
|
||||
*/
|
||||
export interface NetworkLoadBalancerProps {
|
||||
/**
|
||||
* Name of the load balancer.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Listeners (at least one listener) attached to this load balancer.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly listeners: NetworkListenerProps[];
|
||||
/**
|
||||
* Determines whether the Load Balancer will be internet-facing.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly publicLoadBalancer?: boolean;
|
||||
/**
|
||||
* The domain name for the service, e.g. "api.example.com."
|
||||
*
|
||||
* @default - No domain name.
|
||||
*/
|
||||
readonly domainName?: string;
|
||||
/**
|
||||
* The Route53 hosted zone for the domain, e.g. "example.com."
|
||||
*
|
||||
* @default - No Route53 hosted domain zone.
|
||||
*/
|
||||
readonly domainZone?: IHostedZone;
|
||||
}
|
||||
/**
|
||||
* Properties to define an network listener.
|
||||
*/
|
||||
export interface NetworkListenerProps {
|
||||
/**
|
||||
* Name of the listener.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The port on which the listener listens for requests.
|
||||
*
|
||||
* @default 80
|
||||
*/
|
||||
readonly port?: number;
|
||||
}
|
||||
/**
|
||||
* Properties to define a network load balancer target group.
|
||||
*/
|
||||
export interface NetworkTargetProps {
|
||||
/**
|
||||
* The port number of the container. Only applicable when using application/network load balancers.
|
||||
*/
|
||||
readonly containerPort: number;
|
||||
/**
|
||||
* Name of the listener the target group attached to.
|
||||
*
|
||||
* @default - default listener (first added listener)
|
||||
*/
|
||||
readonly listener?: string;
|
||||
}
|
||||
/**
|
||||
* The base class for NetworkMultipleTargetGroupsEc2Service and NetworkMultipleTargetGroupsFargateService classes.
|
||||
*/
|
||||
export declare abstract class NetworkMultipleTargetGroupsServiceBase extends Construct {
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
* The default is 1 for all new services and uses the existing services desired count
|
||||
* when updating an existing service, if one is not provided.
|
||||
*/
|
||||
readonly internalDesiredCount?: number;
|
||||
/**
|
||||
* The Network Load Balancer for the service.
|
||||
* @deprecated - Use `loadBalancers` instead.
|
||||
*/
|
||||
readonly loadBalancer: NetworkLoadBalancer;
|
||||
/**
|
||||
* The listener for the service.
|
||||
* @deprecated - Use `listeners` instead.
|
||||
*/
|
||||
readonly listener: NetworkListener;
|
||||
/**
|
||||
* The cluster that hosts the service.
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
protected logDriver?: LogDriver;
|
||||
/**
|
||||
* The listeners of the service.
|
||||
*/
|
||||
readonly listeners: NetworkListener[];
|
||||
/**
|
||||
* The target groups of the service.
|
||||
*/
|
||||
readonly targetGroups: NetworkTargetGroup[];
|
||||
/**
|
||||
* The load balancers of the service.
|
||||
*/
|
||||
readonly loadBalancers: NetworkLoadBalancer[];
|
||||
/**
|
||||
* Constructs a new instance of the NetworkMultipleTargetGroupsServiceBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkMultipleTargetGroupsServiceBaseProps);
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
protected createAWSLogDriver(prefix: string): AwsLogDriver;
|
||||
protected findListener(name?: string): NetworkListener;
|
||||
protected registerECSTargets(service: BaseService, container: ContainerDefinition, targets: NetworkTargetProps[]): NetworkTargetGroup;
|
||||
protected addPortMappingForTargets(container: ContainerDefinition, targets: NetworkTargetProps[]): void;
|
||||
/**
|
||||
* Create log driver if logging is enabled.
|
||||
*/
|
||||
private createLogDriver;
|
||||
private validateInput;
|
||||
private createLoadBalancer;
|
||||
private createListener;
|
||||
private createDomainName;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-multiple-target-groups-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/network-multiple-target-groups-service-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
302
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.d.ts
generated
vendored
Normal file
302
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,302 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { ScalingInterval } from '../../../aws-applicationautoscaling';
|
||||
import type { IVpc } from '../../../aws-ec2';
|
||||
import type { BaseService, CapacityProviderStrategy, ContainerImage, DeploymentController, DeploymentCircuitBreaker, ICluster, LogDriver, PropagatedTagSource, Secret } from '../../../aws-ecs';
|
||||
import { Cluster } from '../../../aws-ecs';
|
||||
import type { IQueue } from '../../../aws-sqs';
|
||||
import { Duration } from '../../../core';
|
||||
/**
|
||||
* The properties for the base QueueProcessingEc2Service or QueueProcessingFargateService service.
|
||||
*/
|
||||
export interface QueueProcessingServiceBaseProps {
|
||||
/**
|
||||
* The name of the service.
|
||||
*
|
||||
* @default - CloudFormation-generated name.
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
/**
|
||||
* 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.
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* The image used to start a container.
|
||||
*
|
||||
* For `QueueProcessingFargateService`, either `image` or `taskDefinition` must be specified, but not both.
|
||||
* For `QueueProcessingEc2Service`, `image` is required.
|
||||
*
|
||||
* @default - the image of the task definition is used for Fargate, required otherwise
|
||||
*/
|
||||
readonly image?: ContainerImage;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - CMD value built into container image.
|
||||
*/
|
||||
readonly command?: string[];
|
||||
/**
|
||||
* Flag to indicate whether to enable logging.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enableLogging?: boolean;
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* The variable `QUEUE_NAME` with value `queue.queueName` will
|
||||
* always be passed.
|
||||
*
|
||||
* @default 'QUEUE_NAME: queue.queueName'
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secret to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default 'SQSQueue with CloudFormation-generated name'
|
||||
*/
|
||||
readonly queue?: IQueue;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* If the queue construct is specified, maxReceiveCount should be omitted.
|
||||
* @default 3
|
||||
*/
|
||||
readonly maxReceiveCount?: number;
|
||||
/**
|
||||
* Timeout of processing a single message. After dequeuing, the processor has this much time to handle the message and delete it from the queue
|
||||
* before it becomes visible again for dequeueing by another processor. Values must be between 0 and (12 hours).
|
||||
*
|
||||
* If the queue construct is specified, visibilityTimeout should be omitted.
|
||||
* @default Duration.seconds(30)
|
||||
*/
|
||||
readonly visibilityTimeout?: Duration;
|
||||
/**
|
||||
* The number of seconds that Dead Letter Queue retains a message.
|
||||
*
|
||||
* If the queue construct is specified, retentionPeriod should be omitted.
|
||||
* @default Duration.days(14)
|
||||
*/
|
||||
readonly retentionPeriod?: Duration;
|
||||
/**
|
||||
* Maximum capacity to scale to.
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
readonly maxScalingCapacity?: number;
|
||||
/**
|
||||
* Minimum capacity to scale to.
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly minScalingCapacity?: number;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default [{ upper: 0, change: -1 },{ lower: 100, change: +1 },{ lower: 500, change: +5 }]
|
||||
*/
|
||||
readonly scalingSteps?: ScalingInterval[];
|
||||
/**
|
||||
* Grace period after scaling activity in seconds.
|
||||
*
|
||||
* Subsequent scale outs during the cooldown period are squashed so that only
|
||||
* the biggest scale out happens.
|
||||
*
|
||||
* Subsequent scale ins during the cooldown period are ignored.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html
|
||||
* @default 300 seconds
|
||||
*/
|
||||
readonly cooldown?: Duration;
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly enableECSManagedTags?: boolean;
|
||||
/**
|
||||
* The name of a family that the task definition is registered to. A family groups multiple versions of a task definition.
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly family?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - default from underlying service.
|
||||
*/
|
||||
readonly maxHealthyPercent?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - default from underlying service.
|
||||
*/
|
||||
readonly minHealthyPercent?: number;
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* @default - Rolling update (ECS)
|
||||
*/
|
||||
readonly deploymentController?: DeploymentController;
|
||||
/**
|
||||
* Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly
|
||||
* enabled.
|
||||
* @default - disabled
|
||||
*/
|
||||
readonly circuitBreaker?: DeploymentCircuitBreaker;
|
||||
/**
|
||||
* A list of Capacity Provider strategies used to place a service.
|
||||
*
|
||||
* @default - undefined
|
||||
*
|
||||
*/
|
||||
readonly capacityProviderStrategies?: CapacityProviderStrategy[];
|
||||
/**
|
||||
* Whether ECS Exec should be enabled
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly enableExecuteCommand?: boolean;
|
||||
/**
|
||||
* Flag to disable CPU based auto scaling strategy on the service.
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly disableCpuBasedScaling?: boolean;
|
||||
/**
|
||||
* The target CPU utilization percentage for CPU based scaling strategy when enabled.
|
||||
*
|
||||
* @default - 50
|
||||
*/
|
||||
readonly cpuTargetUtilizationPercent?: number;
|
||||
}
|
||||
/**
|
||||
* The base class for QueueProcessingEc2Service and QueueProcessingFargateService services.
|
||||
*/
|
||||
export declare abstract class QueueProcessingServiceBase extends Construct {
|
||||
/**
|
||||
* The SQS queue that the service will process from
|
||||
*/
|
||||
readonly sqsQueue: IQueue;
|
||||
/**
|
||||
* The dead letter queue for the primary SQS queue
|
||||
*/
|
||||
readonly deadLetterQueue?: IQueue;
|
||||
/**
|
||||
* The cluster where your service will be deployed
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
/**
|
||||
* Environment variables that will include the queue name
|
||||
*/
|
||||
readonly environment: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* The maximum number of instances for autoscaling to scale up to.
|
||||
*/
|
||||
readonly maxCapacity: number;
|
||||
/**
|
||||
* The minimum number of instances for autoscaling to scale down to.
|
||||
*/
|
||||
readonly minCapacity: number;
|
||||
/**
|
||||
* The scaling interval for autoscaling based off an SQS Queue size.
|
||||
*/
|
||||
readonly scalingSteps: ScalingInterval[];
|
||||
/**
|
||||
* Grace period after scaling activity in seconds.
|
||||
* @default 300 seconds
|
||||
*/
|
||||
private readonly cooldown?;
|
||||
/**
|
||||
* The AwsLogDriver to use for logging if logging is enabled.
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
/**
|
||||
* Flag to disable CPU based auto scaling strategy on the service.
|
||||
*/
|
||||
private readonly disableCpuBasedScaling;
|
||||
/**
|
||||
* The target CPU utilization percentage for CPU based scaling strategy when enabled.
|
||||
*/
|
||||
private readonly cpuTargetUtilizationPercent;
|
||||
/**
|
||||
* Constructs a new instance of the QueueProcessingServiceBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props: QueueProcessingServiceBaseProps);
|
||||
/**
|
||||
* Configure autoscaling based off of CPU utilization as well as the number of messages visible in the SQS queue
|
||||
*
|
||||
* @param service the ECS/Fargate service for which to apply the autoscaling rules to
|
||||
*/
|
||||
protected configureAutoscalingForService(service: BaseService): void;
|
||||
/**
|
||||
* Grant SQS permissions to an ECS service.
|
||||
* @param service the ECS/Fargate service to which to grant SQS permissions
|
||||
*/
|
||||
protected grantPermissionsToService(service: BaseService): void;
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
/**
|
||||
* Create an AWS Log Driver with the provided streamPrefix
|
||||
*
|
||||
* @param prefix the Cloudwatch logging prefix
|
||||
*/
|
||||
private createAWSLogDriver;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
192
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/scheduled-task-base.d.ts
generated
vendored
Normal file
192
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/scheduled-task-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
import { Construct } from 'constructs';
|
||||
import type { Schedule } from '../../../aws-applicationautoscaling';
|
||||
import type { ISecurityGroup, IVpc, SubnetSelection } from '../../../aws-ec2';
|
||||
import type { ContainerImage, ICluster, LogDriver, PropagatedTagSource, Secret, TaskDefinition } from '../../../aws-ecs';
|
||||
import { AwsLogDriver, Cluster } from '../../../aws-ecs';
|
||||
import { Rule } from '../../../aws-events';
|
||||
import type { Tag } from '../../../aws-events-targets';
|
||||
import { EcsTask } from '../../../aws-events-targets';
|
||||
/**
|
||||
* The properties for the base ScheduledEc2Task or ScheduledFargateTask task.
|
||||
*/
|
||||
export interface ScheduledTaskBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
* @default - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
|
||||
*/
|
||||
readonly cluster?: ICluster;
|
||||
/**
|
||||
* 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.
|
||||
* @default - uses the VPC defined in the cluster or creates a new VPC.
|
||||
*/
|
||||
readonly vpc?: IVpc;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
readonly schedule: Schedule;
|
||||
/**
|
||||
* Indicates whether the rule is enabled.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enabled?: boolean;
|
||||
/**
|
||||
* A name for the rule.
|
||||
*
|
||||
* @default - AWS CloudFormation generates a unique physical ID and uses that ID
|
||||
* for the rule name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
|
||||
*/
|
||||
readonly ruleName?: string;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly desiredTaskCount?: number;
|
||||
/**
|
||||
* In what subnets to place the task's ENIs
|
||||
*
|
||||
* (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
|
||||
*
|
||||
* @default Private subnets
|
||||
*/
|
||||
readonly subnetSelection?: SubnetSelection;
|
||||
/**
|
||||
* Existing security groups to use for your service.
|
||||
*
|
||||
* @default - a new security group will be created.
|
||||
*/
|
||||
readonly securityGroups?: ISecurityGroup[];
|
||||
/**
|
||||
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated.
|
||||
*
|
||||
* @default - Tags will not be propagated
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
|
||||
*
|
||||
* @default - No tags are applied to the task
|
||||
*/
|
||||
readonly tags?: Tag[];
|
||||
}
|
||||
export interface ScheduledTaskImageProps {
|
||||
/**
|
||||
* The image used to start a container. Image or taskDefinition must be specified, but not both.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly image: ContainerImage;
|
||||
/**
|
||||
* Optional name for the container added
|
||||
*
|
||||
* @default - ScheduledContainer
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - CMD value built into container image.
|
||||
*/
|
||||
readonly command?: string[];
|
||||
/**
|
||||
* The environment variables to pass to the container.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The secret to expose to the container as an environment variable.
|
||||
*
|
||||
* @default - No secret environment variables.
|
||||
*/
|
||||
readonly secrets?: {
|
||||
[key: string]: Secret;
|
||||
};
|
||||
/**
|
||||
* The log driver to use.
|
||||
*
|
||||
* @default - AwsLogDriver if enableLogging is true
|
||||
*/
|
||||
readonly logDriver?: LogDriver;
|
||||
}
|
||||
/**
|
||||
* The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
|
||||
*/
|
||||
export declare abstract class ScheduledTaskBase extends Construct {
|
||||
/**
|
||||
* The name of the cluster that hosts the service.
|
||||
*/
|
||||
readonly cluster: ICluster;
|
||||
/**
|
||||
* The desired number of instantiations of the task definition to keep running on the service.
|
||||
*
|
||||
* The minimum value is 1
|
||||
*/
|
||||
readonly desiredTaskCount: number;
|
||||
/**
|
||||
* In what subnets to place the task's ENIs
|
||||
*
|
||||
* (Only applicable in case the TaskDefinition is configured for AwsVpc networking)
|
||||
*
|
||||
* @default Private subnets
|
||||
*/
|
||||
readonly subnetSelection: SubnetSelection;
|
||||
/**
|
||||
* The CloudWatch Events rule for the service.
|
||||
*/
|
||||
readonly eventRule: Rule;
|
||||
/**
|
||||
* The security group to use for the ECS Task.
|
||||
*/
|
||||
private readonly _securityGroups?;
|
||||
/**
|
||||
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated.
|
||||
*
|
||||
* @default - Tags will not be propagated
|
||||
*/
|
||||
readonly propagateTags?: PropagatedTagSource;
|
||||
/**
|
||||
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
|
||||
*
|
||||
* @default - No tags are applied to the task
|
||||
*/
|
||||
readonly tags?: Tag[];
|
||||
/**
|
||||
* Constructs a new instance of the ScheduledTaskBase class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props: ScheduledTaskBaseProps);
|
||||
/**
|
||||
* Create an ECS task using the task definition provided and add it to the scheduled event rule.
|
||||
*
|
||||
* @param taskDefinition the TaskDefinition to add to the event rule
|
||||
*/
|
||||
protected addTaskDefinitionToEventTarget(taskDefinition: TaskDefinition): EcsTask;
|
||||
/**
|
||||
* Adds task as a target of the scheduled event rule.
|
||||
*
|
||||
* @param ecsTaskTarget the EcsTask to add to the event rule
|
||||
*/
|
||||
protected addTaskAsTarget(ecsTaskTarget: EcsTask): void;
|
||||
/**
|
||||
* Returns the default cluster.
|
||||
*/
|
||||
protected getDefaultCluster(scope: Construct, vpc?: IVpc): Cluster;
|
||||
/**
|
||||
* Create an AWS Log Driver with the provided streamPrefix
|
||||
*
|
||||
* @param prefix the Cloudwatch logging prefix
|
||||
*/
|
||||
protected createAWSLogDriver(prefix: string): AwsLogDriver;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/scheduled-task-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/base/scheduled-task-base.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScheduledTaskBase=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},aws_ec2_1=()=>{var tmp=require("../../../aws-ec2");return aws_ec2_1=()=>tmp,tmp},aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},aws_events_1=()=>{var tmp=require("../../../aws-events");return aws_events_1=()=>tmp,tmp},aws_events_targets_1=()=>{var tmp=require("../../../aws-events-targets");return aws_events_targets_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class ScheduledTaskBase extends constructs_1().Construct{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.ScheduledTaskBase",version:"2.252.0"};cluster;desiredTaskCount;subnetSelection;eventRule;_securityGroups;propagateTags;tags;constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_ScheduledTaskBaseProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ScheduledTaskBase),error}if(this.cluster=props.cluster||this.getDefaultCluster(this,props.vpc),props.desiredTaskCount!==void 0&&props.desiredTaskCount<1)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyDesiredTaskCountGreater`,"You must specify a desiredTaskCount greater than 0",this);this.desiredTaskCount=props.desiredTaskCount||1,this.subnetSelection=props.subnetSelection||{subnetType:aws_ec2_1().SubnetType.PRIVATE_WITH_EGRESS},this._securityGroups=props.securityGroups,this.propagateTags=props.propagateTags,this.tags=props.tags,this.eventRule=new(aws_events_1()).Rule(this,"ScheduledEventRule",{schedule:props.schedule,ruleName:props.ruleName,enabled:props.enabled}),props.schedule._bind(scope)}addTaskDefinitionToEventTarget(taskDefinition){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_TaskDefinition(taskDefinition)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addTaskDefinitionToEventTarget),error}const eventRuleTarget=new(aws_events_targets_1()).EcsTask({cluster:this.cluster,taskDefinition,taskCount:this.desiredTaskCount,subnetSelection:this.subnetSelection,securityGroups:this._securityGroups,propagateTags:this.propagateTags,tags:this.tags});return this.addTaskAsTarget(eventRuleTarget),eventRuleTarget}addTaskAsTarget(ecsTaskTarget){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_events_targets_EcsTask(ecsTaskTarget)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addTaskAsTarget),error}this.eventRule.addTarget(ecsTaskTarget)}getDefaultCluster(scope,vpc){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_IVpc(vpc)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.getDefaultCluster),error}const DEFAULT_CLUSTER_ID=`EcsDefaultClusterMnL3mNNYN${vpc?vpc.node.id:""}`,stack=core_1().Stack.of(scope);return stack.node.tryFindChild(DEFAULT_CLUSTER_ID)||new(aws_ecs_1()).Cluster(stack,DEFAULT_CLUSTER_ID,{vpc})}createAWSLogDriver(prefix){return new(aws_ecs_1()).AwsLogDriver({streamPrefix:prefix})}}exports.ScheduledTaskBase=ScheduledTaskBase;
|
||||
93
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-load-balanced-ecs-service.d.ts
generated
vendored
Normal file
93
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-load-balanced-ecs-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { PlacementConstraint, PlacementStrategy } from '../../../aws-ecs';
|
||||
import { Ec2Service, Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { ApplicationLoadBalancedServiceBaseProps } from '../base/application-load-balanced-service-base';
|
||||
import { ApplicationLoadBalancedServiceBase } from '../base/application-load-balanced-service-base';
|
||||
/**
|
||||
* The properties for the ApplicationLoadBalancedEc2Service service.
|
||||
*/
|
||||
export interface ApplicationLoadBalancedEc2ServiceProps extends ApplicationLoadBalancedServiceBaseProps {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both..
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition?: Ec2TaskDefinition;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
/**
|
||||
* The placement constraints to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
|
||||
*
|
||||
* @default - No constraints.
|
||||
*/
|
||||
readonly placementConstraints?: PlacementConstraint[];
|
||||
/**
|
||||
* The placement strategies to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
|
||||
*
|
||||
* @default - No strategies.
|
||||
*/
|
||||
readonly placementStrategies?: PlacementStrategy[];
|
||||
}
|
||||
/**
|
||||
* An EC2 service running on an ECS cluster fronted by an application load balancer.
|
||||
*/
|
||||
export declare class ApplicationLoadBalancedEc2Service extends ApplicationLoadBalancedServiceBase {
|
||||
/**
|
||||
* The EC2 service in this construct.
|
||||
*/
|
||||
readonly service: Ec2Service;
|
||||
/**
|
||||
* The EC2 Task Definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationLoadBalancedEc2Service class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationLoadBalancedEc2ServiceProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-load-balanced-ecs-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-load-balanced-ecs-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApplicationLoadBalancedEc2Service=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},application_load_balanced_service_base_1=()=>{var tmp=require("../base/application-load-balanced-service-base");return application_load_balanced_service_base_1=()=>tmp,tmp};class ApplicationLoadBalancedEc2Service extends application_load_balanced_service_base_1().ApplicationLoadBalancedServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedEc2Service",version:"2.252.0"};service;taskDefinition;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_ApplicationLoadBalancedEc2ServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApplicationLoadBalancedEc2Service),error}if(props.taskDefinition&&props.taskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyTaskDefinitionTaskImage`,"You must specify either a taskDefinition or taskImageOptions, not both.",this);if(props.taskDefinition)this.taskDefinition=props.taskDefinition;else if(props.taskImageOptions){const taskImageOptions=props.taskImageOptions;this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"TaskDef",{executionRole:taskImageOptions.executionRole,taskRole:taskImageOptions.taskRole,family:taskImageOptions.family});const enableLogging=taskImageOptions.enableLogging??!0,logDriver=taskImageOptions.logDriver??(enableLogging?this.createAWSLogDriver(this.node.id):void 0),containerName=taskImageOptions.containerName??"web";this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,cpu:props.cpu,memoryLimitMiB:props.memoryLimitMiB,memoryReservationMiB:props.memoryReservationMiB,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:logDriver,dockerLabels:taskImageOptions.dockerLabels,command:taskImageOptions.command,entryPoint:taskImageOptions.entryPoint}).addPortMappings({containerPort:taskImageOptions.containerPort||80})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?this.internalDesiredCount:this.desiredCount;this.service=new(aws_ecs_1()).Ec2Service(this,"Service",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,assignPublicIp:!1,serviceName:props.serviceName,healthCheckGracePeriod:props.healthCheckGracePeriod,minHealthyPercent:props.minHealthyPercent,maxHealthyPercent:props.maxHealthyPercent,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,cloudMapOptions:props.cloudMapOptions,deploymentController:props.deploymentController,circuitBreaker:props.circuitBreaker,enableExecuteCommand:props.enableExecuteCommand,placementConstraints:props.placementConstraints,placementStrategies:props.placementStrategies,capacityProviderStrategies:props.capacityProviderStrategies}),this.addServiceAsTarget(this.service)}}exports.ApplicationLoadBalancedEc2Service=ApplicationLoadBalancedEc2Service;
|
||||
91
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.d.ts
generated
vendored
Normal file
91
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { PlacementConstraint, PlacementStrategy } from '../../../aws-ecs';
|
||||
import { Ec2Service, Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { ApplicationTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { ApplicationMultipleTargetGroupsServiceBaseProps } from '../base/application-multiple-target-groups-service-base';
|
||||
import { ApplicationMultipleTargetGroupsServiceBase } from '../base/application-multiple-target-groups-service-base';
|
||||
/**
|
||||
* The properties for the ApplicationMultipleTargetGroupsEc2Service service.
|
||||
*/
|
||||
export interface ApplicationMultipleTargetGroupsEc2ServiceProps extends ApplicationMultipleTargetGroupsServiceBaseProps {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition?: Ec2TaskDefinition;
|
||||
/**
|
||||
* The minimum number of CPU units to reserve for the container.
|
||||
*
|
||||
* Valid values, which determines your range of valid values for the memory parameter:
|
||||
*
|
||||
* @default - No minimum CPU units reserved.
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
/**
|
||||
* The placement constraints to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
|
||||
*
|
||||
* @default - No constraints.
|
||||
*/
|
||||
readonly placementConstraints?: PlacementConstraint[];
|
||||
/**
|
||||
* The placement strategies to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
|
||||
*
|
||||
* @default - No strategies.
|
||||
*/
|
||||
readonly placementStrategies?: PlacementStrategy[];
|
||||
}
|
||||
/**
|
||||
* An EC2 service running on an ECS cluster fronted by an application load balancer.
|
||||
*/
|
||||
export declare class ApplicationMultipleTargetGroupsEc2Service extends ApplicationMultipleTargetGroupsServiceBase {
|
||||
/**
|
||||
* The EC2 service in this construct.
|
||||
*/
|
||||
readonly service: Ec2Service;
|
||||
/**
|
||||
* The EC2 Task Definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* The default target group for the service.
|
||||
* @deprecated - Use `targetGroups` instead.
|
||||
*/
|
||||
readonly targetGroup: ApplicationTargetGroup;
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationMultipleTargetGroupsEc2ServiceProps);
|
||||
private createEc2Service;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApplicationMultipleTargetGroupsEc2Service=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},application_multiple_target_groups_service_base_1=()=>{var tmp=require("../base/application-multiple-target-groups-service-base");return application_multiple_target_groups_service_base_1=()=>tmp,tmp};class ApplicationMultipleTargetGroupsEc2Service extends application_multiple_target_groups_service_base_1().ApplicationMultipleTargetGroupsServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsEc2Service",version:"2.252.0"};service;taskDefinition;targetGroup;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_ApplicationMultipleTargetGroupsEc2ServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApplicationMultipleTargetGroupsEc2Service),error}if(props.taskDefinition&&props.taskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionTask`,"You must specify only one of TaskDefinition or TaskImageOptions.",this);if(props.taskDefinition)this.taskDefinition=props.taskDefinition;else if(props.taskImageOptions){const taskImageOptions=props.taskImageOptions;this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"TaskDef",{executionRole:taskImageOptions.executionRole,taskRole:taskImageOptions.taskRole});const containerName=taskImageOptions.containerName??"web",container=this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,cpu:props.cpu,memoryLimitMiB:props.memoryLimitMiB,memoryReservationMiB:props.memoryReservationMiB,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:this.logDriver,dockerLabels:taskImageOptions.dockerLabels});if(taskImageOptions.containerPorts)for(const containerPort of taskImageOptions.containerPorts)container.addPortMappings({containerPort})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);if(!this.taskDefinition.defaultContainer)throw new(core_1()).ValidationError((0,literal_string_1().lit)`LeastOneEssentialContainerSpecified`,"At least one essential container must be specified",this);this.taskDefinition.defaultContainer.portMappings.length===0&&this.taskDefinition.defaultContainer.addPortMappings({containerPort:80}),this.service=this.createEc2Service(props),props.targetGroups?(this.addPortMappingForTargets(this.taskDefinition.defaultContainer,props.targetGroups),this.targetGroup=this.registerECSTargets(this.service,this.taskDefinition.defaultContainer,props.targetGroups)):this.targetGroup=this.listener.addTargets("ECS",{targets:[this.service],port:this.taskDefinition.defaultContainer.portMappings[0].containerPort})}createEc2Service(props){const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?this.internalDesiredCount:this.desiredCount;return new(aws_ecs_1()).Ec2Service(this,"Service",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,assignPublicIp:!1,serviceName:props.serviceName,healthCheckGracePeriod:props.healthCheckGracePeriod,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,cloudMapOptions:props.cloudMapOptions,enableExecuteCommand:props.enableExecuteCommand,placementConstraints:props.placementConstraints,placementStrategies:props.placementStrategies})}}exports.ApplicationMultipleTargetGroupsEc2Service=ApplicationMultipleTargetGroupsEc2Service;
|
||||
93
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.d.ts
generated
vendored
Normal file
93
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { PlacementConstraint, PlacementStrategy } from '../../../aws-ecs';
|
||||
import { Ec2Service, Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { NetworkLoadBalancedServiceBaseProps } from '../base/network-load-balanced-service-base';
|
||||
import { NetworkLoadBalancedServiceBase } from '../base/network-load-balanced-service-base';
|
||||
/**
|
||||
* The properties for the NetworkLoadBalancedEc2Service service.
|
||||
*/
|
||||
export interface NetworkLoadBalancedEc2ServiceProps extends NetworkLoadBalancedServiceBaseProps {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both..
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition?: Ec2TaskDefinition;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
/**
|
||||
* The placement constraints to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
|
||||
*
|
||||
* @default - No constraints.
|
||||
*/
|
||||
readonly placementConstraints?: PlacementConstraint[];
|
||||
/**
|
||||
* The placement strategies to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
|
||||
*
|
||||
* @default - No strategies.
|
||||
*/
|
||||
readonly placementStrategies?: PlacementStrategy[];
|
||||
}
|
||||
/**
|
||||
* An EC2 service running on an ECS cluster fronted by a network load balancer.
|
||||
*/
|
||||
export declare class NetworkLoadBalancedEc2Service extends NetworkLoadBalancedServiceBase {
|
||||
/**
|
||||
* The ECS service in this construct.
|
||||
*/
|
||||
readonly service: Ec2Service;
|
||||
/**
|
||||
* The EC2 Task Definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the NetworkLoadBalancedEc2Service class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkLoadBalancedEc2ServiceProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NetworkLoadBalancedEc2Service=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},network_load_balanced_service_base_1=()=>{var tmp=require("../base/network-load-balanced-service-base");return network_load_balanced_service_base_1=()=>tmp,tmp};class NetworkLoadBalancedEc2Service extends network_load_balanced_service_base_1().NetworkLoadBalancedServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedEc2Service",version:"2.252.0"};service;taskDefinition;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_NetworkLoadBalancedEc2ServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,NetworkLoadBalancedEc2Service),error}if(props.taskDefinition&&props.taskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyTaskDefinitionImage`,"You must specify either a taskDefinition or an image, not both.",this);if(props.taskDefinition)this.taskDefinition=props.taskDefinition;else if(props.taskImageOptions){const taskImageOptions=props.taskImageOptions;this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"TaskDef",{executionRole:taskImageOptions.executionRole,taskRole:taskImageOptions.taskRole,family:taskImageOptions.family});const enableLogging=taskImageOptions.enableLogging??!0,logDriver=taskImageOptions.logDriver??(enableLogging?this.createAWSLogDriver(this.node.id):void 0),containerName=taskImageOptions.containerName??"web";this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,cpu:props.cpu,memoryLimitMiB:props.memoryLimitMiB,memoryReservationMiB:props.memoryReservationMiB,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:logDriver,dockerLabels:taskImageOptions.dockerLabels}).addPortMappings({containerPort:taskImageOptions.containerPort||80})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?this.internalDesiredCount:this.desiredCount;this.service=new(aws_ecs_1()).Ec2Service(this,"Service",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,assignPublicIp:!1,serviceName:props.serviceName,healthCheckGracePeriod:props.healthCheckGracePeriod,minHealthyPercent:props.minHealthyPercent,maxHealthyPercent:props.maxHealthyPercent,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,cloudMapOptions:props.cloudMapOptions,deploymentController:props.deploymentController,circuitBreaker:props.circuitBreaker,enableExecuteCommand:props.enableExecuteCommand,placementConstraints:props.placementConstraints,placementStrategies:props.placementStrategies,capacityProviderStrategies:props.capacityProviderStrategies}),this.addServiceAsTarget(this.service)}}exports.NetworkLoadBalancedEc2Service=NetworkLoadBalancedEc2Service;
|
||||
91
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-multiple-target-groups-ecs-service.d.ts
generated
vendored
Normal file
91
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-multiple-target-groups-ecs-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { PlacementConstraint, PlacementStrategy } from '../../../aws-ecs';
|
||||
import { Ec2Service, Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { NetworkTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { NetworkMultipleTargetGroupsServiceBaseProps } from '../base/network-multiple-target-groups-service-base';
|
||||
import { NetworkMultipleTargetGroupsServiceBase } from '../base/network-multiple-target-groups-service-base';
|
||||
/**
|
||||
* The properties for the NetworkMultipleTargetGroupsEc2Service service.
|
||||
*/
|
||||
export interface NetworkMultipleTargetGroupsEc2ServiceProps extends NetworkMultipleTargetGroupsServiceBaseProps {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition?: Ec2TaskDefinition;
|
||||
/**
|
||||
* The minimum number of CPU units to reserve for the container.
|
||||
*
|
||||
* Valid values, which determines your range of valid values for the memory parameter:
|
||||
*
|
||||
* @default - No minimum CPU units reserved.
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
/**
|
||||
* The placement constraints to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
|
||||
*
|
||||
* @default - No constraints.
|
||||
*/
|
||||
readonly placementConstraints?: PlacementConstraint[];
|
||||
/**
|
||||
* The placement strategies to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
|
||||
*
|
||||
* @default - No strategies.
|
||||
*/
|
||||
readonly placementStrategies?: PlacementStrategy[];
|
||||
}
|
||||
/**
|
||||
* An EC2 service running on an ECS cluster fronted by a network load balancer.
|
||||
*/
|
||||
export declare class NetworkMultipleTargetGroupsEc2Service extends NetworkMultipleTargetGroupsServiceBase {
|
||||
/**
|
||||
* The EC2 service in this construct.
|
||||
*/
|
||||
readonly service: Ec2Service;
|
||||
/**
|
||||
* The EC2 Task Definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* The default target group for the service.
|
||||
* @deprecated - Use `targetGroups` instead.
|
||||
*/
|
||||
readonly targetGroup: NetworkTargetGroup;
|
||||
/**
|
||||
* Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkMultipleTargetGroupsEc2ServiceProps);
|
||||
private createEc2Service;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-multiple-target-groups-ecs-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-multiple-target-groups-ecs-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NetworkMultipleTargetGroupsEc2Service=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},network_multiple_target_groups_service_base_1=()=>{var tmp=require("../base/network-multiple-target-groups-service-base");return network_multiple_target_groups_service_base_1=()=>tmp,tmp};class NetworkMultipleTargetGroupsEc2Service extends network_multiple_target_groups_service_base_1().NetworkMultipleTargetGroupsServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.NetworkMultipleTargetGroupsEc2Service",version:"2.252.0"};service;taskDefinition;targetGroup;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_NetworkMultipleTargetGroupsEc2ServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,NetworkMultipleTargetGroupsEc2Service),error}if(props.taskDefinition&&props.taskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionTask`,"You must specify only one of TaskDefinition or TaskImageOptions.",this);if(props.taskDefinition)this.taskDefinition=props.taskDefinition;else if(props.taskImageOptions){const taskImageOptions=props.taskImageOptions;this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"TaskDef",{executionRole:taskImageOptions.executionRole,taskRole:taskImageOptions.taskRole});const containerName=taskImageOptions.containerName??"web",container=this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,cpu:props.cpu,memoryLimitMiB:props.memoryLimitMiB,memoryReservationMiB:props.memoryReservationMiB,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:this.logDriver,dockerLabels:taskImageOptions.dockerLabels});if(taskImageOptions.containerPorts)for(const containerPort of taskImageOptions.containerPorts)container.addPortMappings({containerPort})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);if(!this.taskDefinition.defaultContainer)throw new(core_1()).ValidationError((0,literal_string_1().lit)`LeastOneEssentialContainerSpecified`,"At least one essential container must be specified",this);if(this.taskDefinition.defaultContainer.portMappings.length===0&&this.taskDefinition.defaultContainer.addPortMappings({containerPort:80}),this.service=this.createEc2Service(props),props.targetGroups)this.addPortMappingForTargets(this.taskDefinition.defaultContainer,props.targetGroups),this.targetGroup=this.registerECSTargets(this.service,this.taskDefinition.defaultContainer,props.targetGroups);else{const containerPort=this.taskDefinition.defaultContainer.portMappings[0].containerPort;if(!containerPort)throw new(core_1()).ValidationError((0,literal_string_1().lit)`FirstPortMappingAddedDefault`,"The first port mapping added to the default container must expose a single port",this);this.targetGroup=this.listener.addTargets("ECS",{targets:[this.service],port:containerPort})}}createEc2Service(props){const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?this.internalDesiredCount:this.desiredCount;return new(aws_ecs_1()).Ec2Service(this,"Service",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,assignPublicIp:!1,serviceName:props.serviceName,healthCheckGracePeriod:props.healthCheckGracePeriod,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,cloudMapOptions:props.cloudMapOptions,enableExecuteCommand:props.enableExecuteCommand,placementConstraints:props.placementConstraints,placementStrategies:props.placementStrategies})}}exports.NetworkMultipleTargetGroupsEc2Service=NetworkMultipleTargetGroupsEc2Service;
|
||||
97
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/queue-processing-ecs-service.d.ts
generated
vendored
Normal file
97
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/queue-processing-ecs-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { PlacementConstraint, PlacementStrategy } from '../../../aws-ecs';
|
||||
import { Ec2Service, Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { QueueProcessingServiceBaseProps } from '../base/queue-processing-service-base';
|
||||
import { QueueProcessingServiceBase } from '../base/queue-processing-service-base';
|
||||
/**
|
||||
* The properties for the QueueProcessingEc2Service service.
|
||||
*/
|
||||
export interface QueueProcessingEc2ServiceProps extends QueueProcessingServiceBaseProps {
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
/**
|
||||
* Gpu count for container in task definition. Set this if you want to use gpu based instances.
|
||||
*
|
||||
* @default - No GPUs assigned.
|
||||
*/
|
||||
readonly gpuCount?: number;
|
||||
/**
|
||||
* Optional name for the container added
|
||||
*
|
||||
* @default - QueueProcessingContainer
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* The placement constraints to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
|
||||
*
|
||||
* @default - No constraints.
|
||||
*/
|
||||
readonly placementConstraints?: PlacementConstraint[];
|
||||
/**
|
||||
* The placement strategies to use for tasks in the service. For more information, see
|
||||
* [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
|
||||
*
|
||||
* @default - No strategies.
|
||||
*/
|
||||
readonly placementStrategies?: PlacementStrategy[];
|
||||
}
|
||||
/**
|
||||
* Class to create a queue processing EC2 service.
|
||||
*/
|
||||
export declare class QueueProcessingEc2Service extends QueueProcessingServiceBase {
|
||||
/**
|
||||
* The EC2 service in this construct.
|
||||
*/
|
||||
readonly service: Ec2Service;
|
||||
/**
|
||||
* The EC2 task definition in this construct
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the QueueProcessingEc2Service class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: QueueProcessingEc2ServiceProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/queue-processing-ecs-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/queue-processing-ecs-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueProcessingEc2Service=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},queue_processing_service_base_1=()=>{var tmp=require("../base/queue-processing-service-base");return queue_processing_service_base_1=()=>tmp,tmp};class QueueProcessingEc2Service extends queue_processing_service_base_1().QueueProcessingServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.QueueProcessingEc2Service",version:"2.252.0"};service;taskDefinition;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_QueueProcessingEc2ServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,QueueProcessingEc2Service),error}if(!props.image)throw new(core_1()).ValidationError((0,literal_string_1().lit)`ImageSpecifiedQueueProcessingService`,"image must be specified for EC2 queue processing service",this);const containerName=props.containerName??"QueueProcessingContainer";this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"QueueProcessingTaskDef",{family:props.family}),this.taskDefinition.addContainer(containerName,{image:props.image,memoryLimitMiB:props.memoryLimitMiB,memoryReservationMiB:props.memoryReservationMiB,cpu:props.cpu,gpuCount:props.gpuCount,command:props.command,environment:this.environment,secrets:this.secrets,logging:this.logDriver});const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?void 0:this.desiredCount;this.service=new(aws_ecs_1()).Ec2Service(this,"QueueProcessingService",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,serviceName:props.serviceName,minHealthyPercent:props.minHealthyPercent,maxHealthyPercent:props.maxHealthyPercent,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,deploymentController:props.deploymentController,circuitBreaker:props.circuitBreaker,capacityProviderStrategies:props.capacityProviderStrategies,enableExecuteCommand:props.enableExecuteCommand,placementConstraints:props.placementConstraints,placementStrategies:props.placementStrategies}),this.configureAutoscalingForService(this.service),this.grantPermissionsToService(this.service)}}exports.QueueProcessingEc2Service=QueueProcessingEc2Service;
|
||||
89
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/scheduled-ecs-task.d.ts
generated
vendored
Normal file
89
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/scheduled-ecs-task.d.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import { Ec2TaskDefinition } from '../../../aws-ecs';
|
||||
import type { EcsTask } from '../../../aws-events-targets';
|
||||
import type { ScheduledTaskBaseProps, ScheduledTaskImageProps } from '../base/scheduled-task-base';
|
||||
import { ScheduledTaskBase } from '../base/scheduled-task-base';
|
||||
/**
|
||||
* The properties for the ScheduledEc2Task task.
|
||||
*/
|
||||
export interface ScheduledEc2TaskProps extends ScheduledTaskBaseProps {
|
||||
/**
|
||||
* The properties to define if using an existing TaskDefinition in this construct.
|
||||
* ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly scheduledEc2TaskDefinitionOptions?: ScheduledEc2TaskDefinitionOptions;
|
||||
/**
|
||||
* The properties to define if the construct is to create a TaskDefinition.
|
||||
* ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly scheduledEc2TaskImageOptions?: ScheduledEc2TaskImageOptions;
|
||||
}
|
||||
/**
|
||||
* The properties for the ScheduledEc2Task using an image.
|
||||
*/
|
||||
export interface ScheduledEc2TaskImageOptions extends ScheduledTaskImageProps {
|
||||
/**
|
||||
* The minimum number of CPU units to reserve for the container.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly cpu?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly memoryLimitMiB?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - No memory reserved.
|
||||
*/
|
||||
readonly memoryReservationMiB?: number;
|
||||
}
|
||||
/**
|
||||
* The properties for the ScheduledEc2Task using a task definition.
|
||||
*/
|
||||
export interface ScheduledEc2TaskDefinitionOptions {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. One of image or taskDefinition must be specified.
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
}
|
||||
/**
|
||||
* A scheduled EC2 task that will be initiated off of CloudWatch Events.
|
||||
*/
|
||||
export declare class ScheduledEc2Task extends ScheduledTaskBase {
|
||||
/**
|
||||
* The EC2 task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: Ec2TaskDefinition;
|
||||
/**
|
||||
* The ECS task in this construct.
|
||||
*/
|
||||
readonly task: EcsTask;
|
||||
/**
|
||||
* Constructs a new instance of the ScheduledEc2Task class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props: ScheduledEc2TaskProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/scheduled-ecs-task.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/ecs/scheduled-ecs-task.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScheduledEc2Task=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},scheduled_task_base_1=()=>{var tmp=require("../base/scheduled-task-base");return scheduled_task_base_1=()=>tmp,tmp};class ScheduledEc2Task extends scheduled_task_base_1().ScheduledTaskBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.ScheduledEc2Task",version:"2.252.0"};taskDefinition;task;constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_ScheduledEc2TaskProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ScheduledEc2Task),error}if(props.scheduledEc2TaskDefinitionOptions&&props.scheduledEc2TaskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyScheduledEcTaskDefinition`,"You must specify either a scheduledEc2TaskDefinitionOptions or scheduledEc2TaskOptions, not both.",this);if(props.scheduledEc2TaskDefinitionOptions)this.taskDefinition=props.scheduledEc2TaskDefinitionOptions.taskDefinition;else if(props.scheduledEc2TaskImageOptions){const taskImageOptions=props.scheduledEc2TaskImageOptions,containerName=taskImageOptions.containerName??"ScheduledContainer";this.taskDefinition=new(aws_ecs_1()).Ec2TaskDefinition(this,"ScheduledTaskDef"),this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,memoryLimitMiB:taskImageOptions.memoryLimitMiB,memoryReservationMiB:taskImageOptions.memoryReservationMiB,cpu:taskImageOptions.cpu,command:taskImageOptions.command,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:taskImageOptions.logDriver??this.createAWSLogDriver(this.node.id)})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyTaskDefinitionImage`,"You must specify a taskDefinition or image",this);this.task=this.addTaskDefinitionToEventTarget(this.taskDefinition)}}exports.ScheduledEc2Task=ScheduledEc2Task;
|
||||
82
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.d.ts
generated
vendored
Normal file
82
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { ISecurityGroup, SubnetSelection } from '../../../aws-ec2';
|
||||
import type { HealthCheck } from '../../../aws-ecs';
|
||||
import { FargateService, FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import type { ApplicationLoadBalancedServiceBaseProps } from '../base/application-load-balanced-service-base';
|
||||
import { ApplicationLoadBalancedServiceBase } from '../base/application-load-balanced-service-base';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
/**
|
||||
* The properties for the ApplicationLoadBalancedFargateService service.
|
||||
*/
|
||||
export interface ApplicationLoadBalancedFargateServiceProps extends ApplicationLoadBalancedServiceBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
/**
|
||||
* The subnets to associate with the service.
|
||||
*
|
||||
* @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
|
||||
*/
|
||||
readonly taskSubnets?: SubnetSelection;
|
||||
/**
|
||||
* The security groups to associate with the service. If you do not specify a security group, a new security group is created.
|
||||
*
|
||||
* @default - A new security group is created.
|
||||
*/
|
||||
readonly securityGroups?: ISecurityGroup[];
|
||||
/**
|
||||
* The health check command and associated configuration parameters for the container.
|
||||
*
|
||||
* @default - Health check configuration from container.
|
||||
*/
|
||||
readonly healthCheck?: HealthCheck;
|
||||
/**
|
||||
* The minimum number of CPU units to reserve for the container.
|
||||
*
|
||||
* @default - No minimum CPU units reserved.
|
||||
*/
|
||||
readonly containerCpu?: number;
|
||||
/**
|
||||
* The amount (in MiB) of memory to present to the container.
|
||||
*
|
||||
* If your container attempts to exceed the allocated memory, the container
|
||||
* is terminated.
|
||||
*
|
||||
* @default - No memory limit.
|
||||
*/
|
||||
readonly containerMemoryLimitMiB?: number;
|
||||
}
|
||||
/**
|
||||
* A Fargate service running on an ECS cluster fronted by an application load balancer.
|
||||
*/
|
||||
export declare class ApplicationLoadBalancedFargateService extends ApplicationLoadBalancedServiceBase {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*/
|
||||
readonly assignPublicIp: boolean;
|
||||
/**
|
||||
* The Fargate service in this construct.
|
||||
*/
|
||||
readonly service: FargateService;
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationLoadBalancedFargateService class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationLoadBalancedFargateServiceProps);
|
||||
/**
|
||||
* Throws an error if the specified percent is not an integer or negative.
|
||||
*/
|
||||
private validateHealthyPercentage;
|
||||
private validateContainerCpu;
|
||||
private validateContainerMemoryLimitMiB;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-load-balanced-fargate-service.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
48
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-multiple-target-groups-fargate-service.d.ts
generated
vendored
Normal file
48
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-multiple-target-groups-fargate-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import { FargateService, FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import type { ApplicationTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { ApplicationMultipleTargetGroupsServiceBaseProps } from '../base/application-multiple-target-groups-service-base';
|
||||
import { ApplicationMultipleTargetGroupsServiceBase } from '../base/application-multiple-target-groups-service-base';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
/**
|
||||
* The properties for the ApplicationMultipleTargetGroupsFargateService service.
|
||||
*/
|
||||
export interface ApplicationMultipleTargetGroupsFargateServiceProps extends ApplicationMultipleTargetGroupsServiceBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
}
|
||||
/**
|
||||
* A Fargate service running on an ECS cluster fronted by an application load balancer.
|
||||
*/
|
||||
export declare class ApplicationMultipleTargetGroupsFargateService extends ApplicationMultipleTargetGroupsServiceBase {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*/
|
||||
readonly assignPublicIp: boolean;
|
||||
/**
|
||||
* The Fargate service in this construct.
|
||||
*/
|
||||
readonly service: FargateService;
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* The default target group for the service.
|
||||
* @deprecated - Use `targetGroups` instead.
|
||||
*/
|
||||
readonly targetGroup: ApplicationTargetGroup;
|
||||
/**
|
||||
* Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: ApplicationMultipleTargetGroupsFargateServiceProps);
|
||||
private createFargateService;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-multiple-target-groups-fargate-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/application-multiple-target-groups-fargate-service.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
51
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.d.ts
generated
vendored
Normal file
51
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { ISecurityGroup, SubnetSelection } from '../../../aws-ec2';
|
||||
import { FargateService, FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
import type { NetworkLoadBalancedServiceBaseProps } from '../base/network-load-balanced-service-base';
|
||||
import { NetworkLoadBalancedServiceBase } from '../base/network-load-balanced-service-base';
|
||||
/**
|
||||
* The properties for the NetworkLoadBalancedFargateService service.
|
||||
*/
|
||||
export interface NetworkLoadBalancedFargateServiceProps extends NetworkLoadBalancedServiceBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
/**
|
||||
* The subnets to associate with the service.
|
||||
*
|
||||
* @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
|
||||
*/
|
||||
readonly taskSubnets?: SubnetSelection;
|
||||
/**
|
||||
* The security groups to associate with the service. If you do not specify a security group, a new security group is created.
|
||||
*
|
||||
* @default - A new security group is created.
|
||||
*/
|
||||
readonly securityGroups?: ISecurityGroup[];
|
||||
}
|
||||
/**
|
||||
* A Fargate service running on an ECS cluster fronted by a network load balancer.
|
||||
*/
|
||||
export declare class NetworkLoadBalancedFargateService extends NetworkLoadBalancedServiceBase {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
readonly assignPublicIp: boolean;
|
||||
/**
|
||||
* The Fargate service in this construct.
|
||||
*/
|
||||
readonly service: FargateService;
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the NetworkLoadBalancedFargateService class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkLoadBalancedFargateServiceProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-multiple-target-groups-fargate-service.d.ts
generated
vendored
Normal file
64
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-multiple-target-groups-fargate-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import { FargateService, FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import type { NetworkTargetGroup } from '../../../aws-elasticloadbalancingv2';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
import type { NetworkMultipleTargetGroupsServiceBaseProps } from '../base/network-multiple-target-groups-service-base';
|
||||
import { NetworkMultipleTargetGroupsServiceBase } from '../base/network-multiple-target-groups-service-base';
|
||||
/**
|
||||
* The properties for the NetworkMultipleTargetGroupsFargateService service.
|
||||
*/
|
||||
export interface NetworkMultipleTargetGroupsFargateServiceProps extends NetworkMultipleTargetGroupsServiceBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 50%
|
||||
*/
|
||||
readonly minHealthyPercent?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - 200%
|
||||
*/
|
||||
readonly maxHealthyPercent?: number;
|
||||
}
|
||||
/**
|
||||
* A Fargate service running on an ECS cluster fronted by a network load balancer.
|
||||
*/
|
||||
export declare class NetworkMultipleTargetGroupsFargateService extends NetworkMultipleTargetGroupsServiceBase {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Determines whether the service will be assigned a public IP address.
|
||||
*/
|
||||
readonly assignPublicIp: boolean;
|
||||
/**
|
||||
* The Fargate service in this construct.
|
||||
*/
|
||||
readonly service: FargateService;
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* The default target group for the service.
|
||||
* @deprecated - Use `targetGroups` instead.
|
||||
*/
|
||||
readonly targetGroup: NetworkTargetGroup;
|
||||
/**
|
||||
* Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: NetworkMultipleTargetGroupsFargateServiceProps);
|
||||
private createFargateService;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-multiple-target-groups-fargate-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-multiple-target-groups-fargate-service.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
70
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.d.ts
generated
vendored
Normal file
70
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.d.ts
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type * as ec2 from '../../../aws-ec2';
|
||||
import type { HealthCheck } from '../../../aws-ecs';
|
||||
import { FargateService, FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import type { Duration } from '../../../core';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
import type { QueueProcessingServiceBaseProps } from '../base/queue-processing-service-base';
|
||||
import { QueueProcessingServiceBase } from '../base/queue-processing-service-base';
|
||||
/**
|
||||
* The properties for the QueueProcessingFargateService service.
|
||||
*/
|
||||
export interface QueueProcessingFargateServiceProps extends QueueProcessingServiceBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* Optional name for the container added.
|
||||
* This name is not used when `taskDefinition` is provided.
|
||||
*
|
||||
* @default - QueueProcessingContainer
|
||||
*/
|
||||
readonly containerName?: string;
|
||||
/**
|
||||
* The health check command and associated configuration parameters for the container.
|
||||
*
|
||||
* @default - Health check configuration from container.
|
||||
*/
|
||||
readonly healthCheck?: HealthCheck;
|
||||
/**
|
||||
* The subnets to associate with the service.
|
||||
*
|
||||
* @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
|
||||
*/
|
||||
readonly taskSubnets?: ec2.SubnetSelection;
|
||||
/**
|
||||
* The security groups to associate with the service. If you do not specify a security group, a new security group is created.
|
||||
*
|
||||
* @default - A new security group is created.
|
||||
*/
|
||||
readonly securityGroups?: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* Specifies whether the task's elastic network interface receives a public IP address.
|
||||
*
|
||||
* If true, each task will receive a public IP address.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly assignPublicIp?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
||||
*/
|
||||
readonly healthCheckGracePeriod?: Duration;
|
||||
}
|
||||
/**
|
||||
* Class to create a queue processing Fargate service
|
||||
*/
|
||||
export declare class QueueProcessingFargateService extends QueueProcessingServiceBase {
|
||||
/**
|
||||
* The Fargate service in this construct.
|
||||
*/
|
||||
readonly service: FargateService;
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* Constructs a new instance of the QueueProcessingFargateService class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props?: QueueProcessingFargateServiceProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueProcessingFargateService=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../../cx-api");return cxapi=()=>tmp,tmp},queue_processing_service_base_1=()=>{var tmp=require("../base/queue-processing-service-base");return queue_processing_service_base_1=()=>tmp,tmp};class QueueProcessingFargateService extends queue_processing_service_base_1().QueueProcessingServiceBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.QueueProcessingFargateService",version:"2.252.0"};service;taskDefinition;constructor(scope,id,props={}){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_QueueProcessingFargateServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,QueueProcessingFargateService),error}if(props.taskDefinition&&props.image)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify only one of taskDefinition or image",this);if(props.taskDefinition)this.taskDefinition=props.taskDefinition;else if(props.image){this.taskDefinition=new(aws_ecs_1()).FargateTaskDefinition(this,"QueueProcessingTaskDef",{memoryLimitMiB:props.memoryLimitMiB||512,cpu:props.cpu||256,ephemeralStorageGiB:props.ephemeralStorageGiB,family:props.family,runtimePlatform:props.runtimePlatform});const containerName=props.containerName??"QueueProcessingContainer";this.taskDefinition.addContainer(containerName,{image:props.image,command:props.command,environment:this.environment,secrets:this.secrets,logging:this.logDriver,healthCheck:props.healthCheck})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);const desiredCount=core_1().FeatureFlags.of(this).isEnabled(cxapi().ECS_REMOVE_DEFAULT_DESIRED_COUNT)?void 0:this.desiredCount;this.service=new(aws_ecs_1()).FargateService(this,"QueueProcessingFargateService",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,serviceName:props.serviceName,minHealthyPercent:props.minHealthyPercent,maxHealthyPercent:props.maxHealthyPercent,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,platformVersion:props.platformVersion,deploymentController:props.deploymentController,securityGroups:props.securityGroups,vpcSubnets:props.taskSubnets,assignPublicIp:props.assignPublicIp,circuitBreaker:props.circuitBreaker,capacityProviderStrategies:props.capacityProviderStrategies,enableExecuteCommand:props.enableExecuteCommand,healthCheckGracePeriod:props.healthCheckGracePeriod}),this.configureAutoscalingForService(this.service),this.grantPermissionsToService(this.service)}}exports.QueueProcessingFargateService=QueueProcessingFargateService;
|
||||
60
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.d.ts
generated
vendored
Normal file
60
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import { FargateTaskDefinition } from '../../../aws-ecs';
|
||||
import { EcsTask } from '../../../aws-events-targets';
|
||||
import type { FargateServiceBaseProps } from '../base/fargate-service-base';
|
||||
import type { ScheduledTaskBaseProps, ScheduledTaskImageProps } from '../base/scheduled-task-base';
|
||||
import { ScheduledTaskBase } from '../base/scheduled-task-base';
|
||||
/**
|
||||
* The properties for the ScheduledFargateTask task.
|
||||
*/
|
||||
export interface ScheduledFargateTaskProps extends ScheduledTaskBaseProps, FargateServiceBaseProps {
|
||||
/**
|
||||
* The properties to define if using an existing TaskDefinition in this construct.
|
||||
* ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly scheduledFargateTaskDefinitionOptions?: ScheduledFargateTaskDefinitionOptions;
|
||||
/**
|
||||
* The properties to define if the construct is to create a TaskDefinition.
|
||||
* ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
|
||||
*
|
||||
* @default none
|
||||
*/
|
||||
readonly scheduledFargateTaskImageOptions?: ScheduledFargateTaskImageOptions;
|
||||
}
|
||||
/**
|
||||
* The properties for the ScheduledFargateTask using an image.
|
||||
*/
|
||||
export interface ScheduledFargateTaskImageOptions extends ScheduledTaskImageProps, FargateServiceBaseProps {
|
||||
}
|
||||
/**
|
||||
* The properties for the ScheduledFargateTask using a task definition.
|
||||
*/
|
||||
export interface ScheduledFargateTaskDefinitionOptions {
|
||||
/**
|
||||
* The task definition to use for tasks in the service. Image or taskDefinition must be specified, but not both.
|
||||
*
|
||||
* [disable-awslint:ref-via-interface]
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
}
|
||||
/**
|
||||
* A scheduled Fargate task that will be initiated off of CloudWatch Events.
|
||||
*/
|
||||
export declare class ScheduledFargateTask extends ScheduledTaskBase {
|
||||
/**
|
||||
* The Fargate task definition in this construct.
|
||||
*/
|
||||
readonly taskDefinition: FargateTaskDefinition;
|
||||
/**
|
||||
* The ECS task in this construct.
|
||||
*/
|
||||
readonly task: EcsTask;
|
||||
/**
|
||||
* Constructs a new instance of the ScheduledFargateTask class.
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props: ScheduledFargateTaskProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/fargate/scheduled-fargate-task.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScheduledFargateTask=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ecs_1=()=>{var tmp=require("../../../aws-ecs");return aws_ecs_1=()=>tmp,tmp},aws_events_targets_1=()=>{var tmp=require("../../../aws-events-targets");return aws_events_targets_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},scheduled_task_base_1=()=>{var tmp=require("../base/scheduled-task-base");return scheduled_task_base_1=()=>tmp,tmp};class ScheduledFargateTask extends scheduled_task_base_1().ScheduledTaskBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs_patterns.ScheduledFargateTask",version:"2.252.0"};taskDefinition;task;constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_patterns_ScheduledFargateTaskProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ScheduledFargateTask),error}if(props.scheduledFargateTaskDefinitionOptions&&props.scheduledFargateTaskImageOptions)throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyScheduledFargateTaskDefinition`,"You must specify either a scheduledFargateTaskDefinitionOptions or scheduledFargateTaskOptions, not both.",this);if(props.scheduledFargateTaskDefinitionOptions)this.taskDefinition=props.scheduledFargateTaskDefinitionOptions.taskDefinition;else if(props.scheduledFargateTaskImageOptions){const taskImageOptions=props.scheduledFargateTaskImageOptions,containerName=taskImageOptions.containerName??"ScheduledContainer";this.taskDefinition=new(aws_ecs_1()).FargateTaskDefinition(this,"ScheduledTaskDef",{memoryLimitMiB:taskImageOptions.memoryLimitMiB||512,cpu:taskImageOptions.cpu||256,ephemeralStorageGiB:taskImageOptions.ephemeralStorageGiB}),this.taskDefinition.addContainer(containerName,{image:taskImageOptions.image,command:taskImageOptions.command,environment:taskImageOptions.environment,secrets:taskImageOptions.secrets,logging:taskImageOptions.logDriver??this.createAWSLogDriver(this.node.id)})}else throw new(core_1()).ValidationError((0,literal_string_1().lit)`SpecifyOneTaskDefinitionImage`,"You must specify one of: taskDefinition or image",this);props.taskDefinition&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-ecs-patterns:propertyIgnored","Property 'taskDefinition' is ignored, use 'scheduledFargateTaskDefinitionOptions' or 'scheduledFargateTaskImageOptions' instead."),props.cpu&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-ecs-patterns:propertyIgnored","Property 'cpu' is ignored, use 'scheduledFargateTaskImageOptions.cpu' instead."),props.memoryLimitMiB&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-ecs-patterns:propertyIgnored","Property 'memoryLimitMiB' is ignored, use 'scheduledFargateTaskImageOptions.memoryLimitMiB' instead."),props.ephemeralStorageGiB&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-ecs-patterns:propertyIgnored","Property 'ephemeralStorageGiB' is ignored, use 'scheduledFargateTaskImageOptions.ephemeralStorageGiB' instead."),props.runtimePlatform&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-ecs-patterns:propertyIgnored","Property 'runtimePlatform' is ignored."),this.task=new(aws_events_targets_1()).EcsTask({cluster:this.cluster,taskDefinition:this.taskDefinition,taskCount:this.desiredTaskCount,subnetSelection:this.subnetSelection,platformVersion:props.platformVersion,securityGroups:props.securityGroups,propagateTags:props.propagateTags,tags:props.tags}),this.addTaskAsTarget(this.task)}}exports.ScheduledFargateTask=ScheduledFargateTask;
|
||||
19
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/index.d.ts
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export * from './ecs/queue-processing-ecs-service';
|
||||
export * from './fargate/queue-processing-fargate-service';
|
||||
export * from './base/queue-processing-service-base';
|
||||
export * from './ecs/network-load-balanced-ecs-service';
|
||||
export * from './fargate/network-load-balanced-fargate-service';
|
||||
export * from './base/network-load-balanced-service-base';
|
||||
export * from './ecs/application-load-balanced-ecs-service';
|
||||
export * from './fargate/application-load-balanced-fargate-service';
|
||||
export * from './base/application-load-balanced-service-base';
|
||||
export * from './base/fargate-service-base';
|
||||
export * from './ecs/scheduled-ecs-task';
|
||||
export * from './fargate/scheduled-fargate-task';
|
||||
export * from './base/scheduled-task-base';
|
||||
export * from './base/application-multiple-target-groups-service-base';
|
||||
export * from './ecs/application-multiple-target-groups-ecs-service';
|
||||
export * from './fargate/application-multiple-target-groups-fargate-service';
|
||||
export * from './base/network-multiple-target-groups-service-base';
|
||||
export * from './ecs/network-multiple-target-groups-ecs-service';
|
||||
export * from './fargate/network-multiple-target-groups-fargate-service';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ecs-patterns/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user