Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Latest commit

 

History

History
478 lines (279 loc) · 12.3 KB

File metadata and controls

478 lines (279 loc) · 12.3 KB

API Reference

Constructs

AlbFargateServices

Initializers

import { AlbFargateServices } from 'serverless-container-constructs'

new AlbFargateServices(scope: Construct, id: string, props: AlbFargateServicesProps)
scopeRequired

idRequired
  • Type: string

propsRequired

Properties

externalAlbOptional
public readonly externalAlb: ApplicationLoadBalancer;

internalAlbOptional
public readonly internalAlb: ApplicationLoadBalancer;

BaseFargateServices

Initializers

import { BaseFargateServices } from 'serverless-container-constructs'

new BaseFargateServices(scope: Construct, id: string, props: BaseFargateServicesProps)
scopeRequired

idRequired
  • Type: string

propsRequired

Properties

serviceRequired
public readonly service: FargateService[];

The service(s) created from the task(s).


vpcRequired
public readonly vpc: IVpc;

Structs

AlbFargateServicesProps

Initializer

import { AlbFargateServicesProps } from 'serverless-container-constructs'

const albFargateServicesProps: AlbFargateServicesProps = { ... }
tasksRequired
public readonly tasks: FargateTaskProps[];

enableExecuteCommandOptional
public readonly enableExecuteCommand: boolean;
  • Type: boolean
  • Default: false

Whether to enable ECS Exec support.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html


route53OpsOptional
public readonly route53Ops: Route53Options;

spotOptional
public readonly spot: boolean;
  • Type: boolean
  • Default: false

create a FARGATE_SPOT only cluster.


vpcOptional
public readonly vpc: IVpc;

vpcSubnetsOptional
public readonly vpcSubnets: SubnetSelection;

The subnets to associate with the service.


BaseFargateServicesProps

Initializer

import { BaseFargateServicesProps } from 'serverless-container-constructs'

const baseFargateServicesProps: BaseFargateServicesProps = { ... }
tasksRequired
public readonly tasks: FargateTaskProps[];

enableExecuteCommandOptional
public readonly enableExecuteCommand: boolean;
  • Type: boolean
  • Default: false

Whether to enable ECS Exec support.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html


route53OpsOptional
public readonly route53Ops: Route53Options;

spotOptional
public readonly spot: boolean;
  • Type: boolean
  • Default: false

create a FARGATE_SPOT only cluster.


vpcOptional
public readonly vpc: IVpc;

vpcSubnetsOptional
public readonly vpcSubnets: SubnetSelection;

The subnets to associate with the service.


FargateTaskProps

Initializer

import { FargateTaskProps } from 'serverless-container-constructs'

const fargateTaskProps: FargateTaskProps = { ... }
listenerPortRequired
public readonly listenerPort: number;
  • Type: number

taskRequired
public readonly task: FargateTaskDefinition;

accessibilityOptional
public readonly accessibility: LoadBalancerAccessibility;

Register the service to internal ELB, external ELB or both.


capacityProviderStrategyOptional
public readonly capacityProviderStrategy: CapacityProviderStrategy[];

desiredCountOptional
public readonly desiredCount: number;
  • Type: number
  • Default: 1

desired number of tasks for the service.


scalingPolicyOptional
public readonly scalingPolicy: ServiceScalingPolicy;

service autoscaling policy.


Route53Options

Initializer

import { Route53Options } from 'serverless-container-constructs'

const route53Options: Route53Options = { ... }
externalElbRecordNameOptional
public readonly externalElbRecordName: string;
  • Type: string
  • Default: external

the external ELB record name.


internalElbRecordNameOptional
public readonly internalElbRecordName: string;
  • Type: string
  • Default: internal

the internal ELB record name.


zoneNameOptional
public readonly zoneName: string;
  • Type: string
  • Default: svc.local

private zone name.


ServiceScalingPolicy

Initializer

import { ServiceScalingPolicy } from 'serverless-container-constructs'

const serviceScalingPolicy: ServiceScalingPolicy = { ... }
maxCapacityOptional
public readonly maxCapacity: number;
  • Type: number
  • Default: 10

max capacity for the service autoscaling.


requestPerTargetOptional
public readonly requestPerTarget: number;
  • Type: number
  • Default: 1000

request per target.


targetCpuUtilizationOptional
public readonly targetCpuUtilization: number;
  • Type: number
  • Default: 50

target cpu utilization.


Enums

LoadBalancerAccessibility

The load balancer accessibility.

EXTERNAL_ONLY

register to external load balancer only.


INTERNAL_ONLY

register to internal load balancer only.