Class AWSDeployer<T>
Type parameters
Hierarchy
-
Deployer<T>
- AWSDeployer
Constructors
Properties
Methods
Constructors
-
Parameters
-
manager: DeploymentManager
-
resources: any
Returns AWSDeployer
-
Properties
Methods
-
Replace / by _ as theses ID are not allowed in AWS
Parameters
-
id: string
Returns string
-
-
Find the common prefix between two strings
Example
commonPrefix("/test/plop1", "/templates/") => "/te"
Parameters
-
str1: string
to compare
-
str2: string
to compare
Returns string
-
-
Create a bucket if it does not exist
Parameters
-
Bucket: string
Returns Promise<void>
-
-
Create DNS entry
Parameters
-
domain: string
to create
-
type: string
of DNS
-
value: string
the value of the record
-
Default value targetZone: HostedZone = undefined
Returns Promise<void>
-
-
Initiate the default value for resources
Returns Promise<void>
-
Deploy the application
Returns Promise<any>
-
Create a certificate for a domain Will use Route 53 to do the validation
Parameters
-
domain: string
to create the certificate for
-
zone: HostedZone
Returns Promise<CertificateDetail>
-
-
Parameters
-
command: string
-
Optional stdin: string
-
Optional resolveOnError: boolean
-
Optional logLevel: WorkerLogLevel
Returns Promise<object>
-
-
Parameters
-
accountId: any
-
region: any
Returns object[]
-
-
Return the current AWS Identity used
Returns Promise<GetCallerIdentityResponse>
-
Return the Webda Application
Returns Application
-
Get a certificate or create it
Parameters
-
domain: string
to get certificate for
-
Default value region: string = undefined
Returns Promise<any>
-
-
Take this.resources[key].Tags and add all remaining Tags from this.resources.Tags
Parameters
-
Default value key: string | object[] = undefined
of the resources to add
Returns object[]
-
-
Take this.resources[key].Tags and add all remaining Tags from this.resources.Tags
Parameters
-
Default value key: string | object[] = undefined
of the resources to add
Returns object
-
[key: string]: string
-
-
Return the S3 Tagging string
Parameters
-
Default value key: string | object[] = undefined
of the resources to add
Returns string
-
-
Return the default VPC for the current region
Returns Promise<object>
-
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 permissionsParameters
-
Default value additionalStatements: any[] = []
Returns Promise<any>
-
-
Return AWS region
Returns string
-
Get the closest zone to the domain
Parameters
-
domain: any
to get zone for
Returns Promise<HostedZone>
-
-
Hash the string
Parameters
-
str: string
to hash
-
Default value type: string = "md5"
of hash
-
Default value format: "hex" | "base64" = "hex"
hex or b64
Returns string
-
-
Returns Promise<void>
-
Generate a MD5 in hex
Parameters
-
str: string
to hash
Returns string
-
-
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>
-
Send a full folder (recursive) on bucket
Parameters
-
bucket: string
to send data to
-
folder: string
path to local folder to send
-
Default value prefix: string = ""
prefix on the bucket
Returns Promise<void>
-
-
Replace the resources variables
this.resources = this.replaceVariables(this.resources);
Returns void
-
Replace variables in resources
Parameters
-
obj: any
to replace variables from
Returns any
-
-
Set the deployer name
Parameters
-
name: string
Returns void
-
-
Set the deployer name
Parameters
-
type: string
Returns void
-
-
Transform a tag array into a tag map
Parameters
-
tags: TagsDefinition
Returns object
-
[key: string]: string
-
-
Transform a tag map into a tag array
Parameters
-
tags: TagsDefinition
Returns object[]
-
-
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 maxretries
has been reached. Between each call, it will wait thedelay
If it reaches the max retries without a good answer from callback, the Promise will be rejected
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>
-
Generated using TypeDoc
Abstract AWS Deployer
It includes some basic utilities methods to be used by final deployers