Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace APITypes

Index

Type aliases

API: { createdAt: string; environments?: APIEnvironment[]; executionIamRole: string; id: string; links: { awsAccounts: string; organisations: string }; vpcSecurityGroupIds?: string; vpcSubnetIds?: string; whiteListedEmails?: string[] }

Type declaration

  • createdAt: string
  • Optional environments?: APIEnvironment[]
  • executionIamRole: string
  • id: string
  • links: { awsAccounts: string; organisations: string }
    • awsAccounts: string
    • organisations: string
  • Optional vpcSecurityGroupIds?: string
  • Optional vpcSubnetIds?: string
  • Optional whiteListedEmails?: string[]
APIDeploymentPayload: { cors: boolean | APIEnvironmentCorsConfiguration; env: string; handler: string; memorySize?: number; network?: APIEnvironmentNetworkConfiguration | null; routes: APIEnvironmentRoute[]; runtime: string; s3: S3ObjectCredentials["s3"]; scheduledFunctions?: APIDeploymentPayloadScheduledFunction[]; scope: string; timeout: number; variables: {} }

Type declaration

APIDeploymentPayloadScheduledFunction: { export: string; handler: string; label: string; module: string; name: string; retryOnFail: boolean; timeout: number }

Type declaration

  • export: string

    The name of the exported function in the "module" to execute the function

  • handler: string

    The relative path including the function name to the file to execute the function

  • label: string

    A human readable label for the function to display

  • module: string

    The relative path to the file to execute the function

  • name: string

    A unique identifier for the function within the scope of the Hosted API

  • retryOnFail: boolean

    If set to true the function will automatically retry if the function fails

  • timeout: number

    The time in seconds allowed for the function to finish executing

APIEnvironment: { apiId: string; cors: APIEnvironmentCorsConfiguration | boolean; environment: string; lastDeployment: string; routes: APIEnvironmentRoute[]; scheduledFunctions?: APIEnvironmentScheduledFunction[]; status?: "Warning" | "Error" | "Okay" | "Unknown"; vpcSecurityGroupIds?: string; vpcSubnetIds?: string }

Type declaration

APIEnvironmentCorsConfiguration: { credentials?: boolean; exposedHeaders?: string[]; headers?: string[]; maxAge?: number; origins?: string[] }

Type declaration

  • Optional credentials?: boolean
  • Optional exposedHeaders?: string[]
  • Optional headers?: string[]
  • Optional maxAge?: number
  • Optional origins?: string[]
APIEnvironmentMetricsSearchParameters: { endTime: string; period: number; startTime: string }

Type declaration

  • endTime: string
  • period: number
  • startTime: string
APIEnvironmentNetworkConfiguration: { vpcSecurityGroups: string[]; vpcSubnets: string[] }

Type declaration

  • vpcSecurityGroups: string[]
  • vpcSubnets: string[]
APIEnvironmentRoute: { module: string; route: string }

Type declaration

  • module: string
  • route: string
APIEnvironmentSchedule: { days: DayOfWeek[]; failureEmailAddresses: string[]; hour: number; isDisabled: boolean; minute: number }

Type declaration

  • days: DayOfWeek[]

    The days the schedule should be triggered

  • failureEmailAddresses: string[]

    A list of email addresses to send a failure email if the scheduled function fails

  • hour: number

    The UTC timezone hour the schedule should be triggered in 24 hour time. I.e. must be between 0 and 23.

  • isDisabled: boolean

    true if the schedule is currently disabled

  • minute: number

    The minute the schedule should be triggered. I.e. must be between 0 and 59.

APIEnvironmentScheduledFunction: APIDeploymentPayloadScheduledFunction & { aws: { eventBridge: { name: string }; lambda: { functionArn: string } }; schedule?: APIEnvironmentSchedule }