import type { CfnRule } from 'aws-cdk-lib/aws-vpclattice'; import type { ITargetGroup } from './aws-vpclattice-targets'; import type { HttpFixedResponse } from './util'; export interface IRuleAction { forward?: CfnRule.ForwardProperty; fixedResponse?: CfnRule.FixedResponseProperty; } export declare class RuleAction implements IRuleAction { /** * Forward to one or more Target Groups * * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-rule-forward.html */ static forwardAction(targetGroup: ITargetGroup, weight?: number): RuleAction; /** * Forward to one or more Target Groups which are weighted differently * * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-rule-forward.html */ static weightedForwardAction(weightedTargetGroups: WeightedTargetGroup[]): RuleAction; /** * Return a fixed response * * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-rule-fixedresponse.html */ static fixedResponseAction(statusCode: HttpFixedResponse): RuleAction; forward?: CfnRule.ForwardProperty; fixedResponse?: CfnRule.FixedResponseProperty; /** * Create an instance of RuleAction * * The default class should be good enough for most cases and * should be created by using one of the static factory functions, * but allow overriding to make sure we allow flexibility for the future. */ protected constructor(action: IRuleAction); } /** * A Target Group and weight combination */ export interface WeightedTargetGroup { /** * The target group */ readonly targetGroup: ITargetGroup; /** * The target group's weight * * Range is [0..1000). * * @default - 1 */ readonly weight?: number; }