Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CloudFormationDeployer

Deploy the application and its resources using AWS CloudFormation

Hierarchy

  • AWSDeployer<CloudFormationDeployerResources>
    • CloudFormationDeployer

Constructors

Properties

AWS: any
_defaulted: boolean
app: Application
logger: Logger
manager: DeploymentManager
name: string
now: number
openapiS3Object: object

Type declaration

  • key: any
  • src: any
packageDescription: any
parameters: any
resources: CloudFormationDeployerResources
result: any
template: any
type: string

Methods

  • APIGateway(): Promise<void>
  • APIGatewayDomain(): Promise<void>
  • Fargate(): Promise<void>
  • Lambda(): Promise<void>
  • Policy(): Promise<void>
  • Resources(): Promise<void>
  • Role(): Promise<void>
  • _replaceForAWS(id: string): string
  • addAssumeRolePolicyStatement(...statements: any[]): void
  • buildDocker(): Promise<void>
  • commonPrefix(str1: string, str2: string): string
  • completeOpenAPI(openapi: any): Promise<any>
  • createBucket(Bucket: string): Promise<void>
  • createCloudFormation(): Promise<void>
  • createCloudFormationDNSEntry(ref: any, domain: string, HostedZoneId: any): Promise<void>
  • createDNSEntry(domain: string, type: string, value: string, targetZone?: HostedZone): Promise<void>
  • createStatic(info: any): Promise<void>
  • defaultResources(): Promise<void>
  • deleteCloudFormation(): Promise<any>
  • deploy(): Promise<any>
  • doCreateCertificate(domain: string, zone: HostedZone): Promise<CertificateDetail>
  • execute(command: string, stdin?: string, resolveOnError?: boolean, logLevel?: WorkerLogLevel): Promise<object>
  • generateLambdaPackage(): Promise<object>
  • getARNPolicy(accountId: any, region: any): object[]
  • getAWSIdentity(): Promise<GetCallerIdentityResponse>
  • getApplication(): Application
  • getCertificate(domain: string, region?: string): Promise<any>
  • getDefaultTags(key?: string | object[]): object[]
  • getDefaultTagsAsMap(key?: string | object[]): object
  • getDefaultTagsAsS3Tagging(key?: string | object[]): string
  • getDefaultVpc(): Promise<object>
  • getPolicyDocument(additionalStatements?: any[]): Promise<any>
  • Generate the PolicyDocument

    It will browse all services for a method getARNPolicy Allowing you to write some specific Service or Bean that requires specific AWS permissions

    Parameters

    • Default value additionalStatements: any[] = []

    Returns Promise<any>

  • getRegion(): string
  • getStringified(object: any, filename: any, addPrefix?: boolean): object
  • getZoneForDomainName(domain: any): Promise<HostedZone>
  • hash(str: string, type?: string, format?: "hex" | "base64"): string
  • importOpenApi(openapi: any): Promise<void>
  • loadDefaults(): Promise<void>
  • md5(str: string): string
  • putFilesOnBucket(bucket: string, files: object[]): Promise<void>
  • Add files to a bucket

    It uses hash and ETag to avoid uploading files already present

    The files src can be either:

    • a string representing the local path
    • a Buffer with the dynamic content

    Parameters

    • bucket: string

      to send bucket

    • files: object[]

      to send

    Returns Promise<void>

  • putFolderOnBucket(bucket: string, folder: string, prefix?: string): Promise<void>
  • replaceResourcesVariables(): void
  • replaceVariables(obj: any): any
  • sendCloudFormationTemplate(): Promise<void>
  • setName(name: string): void
  • setType(type: string): void
  • uploadStatics(assets?: boolean): Promise<void>
  • waitFor(callback: any, delay: number, retries: number, title: string): Promise<any>
  • Wait for an operation to end

    Some AWS Api require minutes and polling This method will call the callback function until it returns true, or the max retries has been reached. Between each call, it will wait the delay

    If it reaches the max retries without a good answer from callback, the Promise will be rejected

    todo

    move it to core library along with a exponential retry

    Parameters

    • callback: any

      to call between each call

    • delay: number

      between each call to callback

    • retries: number

      max number of retries

    • title: string

      to display

    Returns Promise<any>

  • init(console: any): Promise<-1 | 0>
  • shellCommand(Console: any, args: any): Promise<1 | -1 | 0>

Generated using TypeDoc