UNPKG

@altostra/core

Version:

Core library for shared types and logic

96 lines (95 loc) 3.15 kB
import type { Integer } from "../../../common/CustomTypes/Integer"; import type { NonEmptyString } from "../../../common/CustomTypes/NonEmptyString"; import type { NaturalNumber, NaturalNumberOrZero } from "../../../common/CustomTypes/Numerics"; import type { Dict } from "../../../common/Types"; import type { Arn } from "../../Arn"; import type { NameValuePair } from "../common"; import type { CloudFormationValue } from "../IntrinsicFunctions"; export interface ContainerDefinition { Command?: CloudFormationValue[]; Cpu?: Integer; DependsOn?: ContainerDependency[]; DisableNetworking?: boolean; DnsSearchDomains?: string[]; DnsServers?: string[]; DockerLabels?: Dict<string>; DockerSecurityOptions?: string[]; EntryPoint?: string[]; Environment?: NameValuePair[]; EnvironmentFiles?: EnvironmentFile[]; Essential?: boolean; ExtraHosts?: HostEntry[]; FirelensConfiguration?: FirelensConfiguration; HealthCheck?: HealthCheck; Hostname?: CloudFormationValue; Image?: CloudFormationValue; Interactive?: boolean; Links?: string; LinuxParameters?: object; LogConfiguration?: LogConfiguration; Memory?: NaturalNumber; MemoryReservation?: NaturalNumber; MountPoints?: MountPoint[]; Name: CloudFormationValue<NonEmptyString>; PortMappings?: PortMapping[]; Privileged?: boolean; PseudoTerminal?: boolean; ReadonlyRootFilesystem?: boolean; RepositoryCredentials?: { CredentialsParameter: CloudFormationValue<Arn>; }; } export interface ContainerDependency { Condition: ContainerDependencyCondition; ContainerName: string; } export declare type ContainerDependencyCondition = 'COMPLETE' | 'HEALTHY' | 'START' | 'SUCCESS'; export interface EnvironmentFile { Type: 's3'; Value: CloudFormationValue<Arn>; } export interface HostEntry { Hostname: string; IpAddress: string; } export interface FirelensConfiguration { Options?: FirelensConfigurationOptions; Type?: 'fluentbit' | 'fluentd'; } export interface FirelensConfigurationOptions { 'enable-ecs-log-metadata'?: boolean; 'config-file-type'?: 'file' | 's3'; 'config-file-value'?: string; } export interface HealthCheck { Command?: HealthCheckCommand; Interval?: NaturalNumber; Retries?: NaturalNumber; StartPeriod?: NaturalNumberOrZero; Timeout?: NaturalNumber; } export declare type HealthCheckCommand = [ 'CMD-SHELL' | 'CMD', ...string[] ]; export interface MountPoint { ContainerPath: string; SourceVolume: string; ReadOnly?: boolean; } export interface PortMapping { ContainerPort: NaturalNumber; HostPort?: NaturalNumberOrZero; Protocol?: 'tcp' | 'udp'; } export declare type LaunchType = 'EC2' | 'EXTERNAL' | 'FARGATE'; export interface LogConfiguration { LogDriver: LogDriver; Options?: Record<string, unknown>; SecretOptions?: Secret[]; } export declare type LogDriver = 'awsfirelens' | 'awslogs' | 'fluentd' | 'gelf' | 'journald' | 'json-file' | 'splunk' | 'syslog'; export interface Secret { Name: CloudFormationValue; ValueFrom: CloudFormationValue; }