Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigUpdator

Hierarchy

  • ConfigUpdator

Index

Constructors

constructor

  • new ConfigUpdator(lambdaArn: string, eventType?: EventType, defaultLambdaFunctionAssociations?: Types.LambdaFunctionAssociations): ConfigUpdator
  • constructor

    Parameters

    • lambdaArn: string

      Lambda arn

    • Default value eventType: EventType = "viewer-request"
    • Default value defaultLambdaFunctionAssociations: Types.LambdaFunctionAssociations = {Quantity: 0,Items: []}

    Returns ConfigUpdator

Properties

Private defaultLambdaFunctionAssociations

defaultLambdaFunctionAssociations: Types.LambdaFunctionAssociations

Private eventType

eventType: EventType

Private lambdaArn

lambdaArn: string

Methods

attatchEdgeFunction

  • attatchEdgeFunction(config: Types.DistributionConfig): Types.DistributionConfig
  • update distribution config to attach edge function

    Parameters

    • config: Types.DistributionConfig

      CloudFront distribution config

    Returns Types.DistributionConfig

    updated distribution config

createUpdateDistributionConfig

  • createUpdateDistributionConfig(config: Types.DistributionConfig, action: string): Types.DistributionConfig
  • Generate update CloudFront distribution config

    Parameters

    • config: Types.DistributionConfig
    • action: string

      update action type

    Returns Types.DistributionConfig

    config

createUpdateDistributionParam

  • createUpdateDistributionParam(data: GetDistributionResult, config: Types.DistributionConfig): UpdateDistributionRequest
  • Generate update CloudFront distribution params

    Parameters

    • data: GetDistributionResult

      cloudfront.getCloudFrontDistribution results

    • config: Types.DistributionConfig

      updated distribution config

    Returns UpdateDistributionRequest

    update distribution param

detatchEdgeFunction

  • detatchEdgeFunction(config: Types.DistributionConfig): Types.DistributionConfig
  • update distribution config to detach target edge function

    Parameters

    • config: Types.DistributionConfig

      CloudFront distribution config

    Returns Types.DistributionConfig

    updated distribution config

getLambdaArn

  • getLambdaArn(): string

getTargetEventType

isTargetLambdaArn

  • isTargetLambdaArn(arn: string): boolean
  • Check lambda function arn

    Parameters

    • arn: string

      Lambda Arn

    Returns boolean

    result

updateEventType

Generated using TypeDoc