aws-cdk-lib.aws_vpclattice.CfnListener.DefaultActionProperty

interface DefaultActionProperty

LanguageType name
.NETAmazon.CDK.AWS.VpcLattice.CfnListener.DefaultActionProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsvpclattice#CfnListener_DefaultActionProperty
Javasoftware.amazon.awscdk.services.vpclattice.CfnListener.DefaultActionProperty
Pythonaws_cdk.aws_vpclattice.CfnListener.DefaultActionProperty
TypeScript aws-cdk-lib » aws_vpclattice » CfnListener » DefaultActionProperty

The action for the default rule.

Each listener has a default rule. Each rule consists of a priority, one or more actions, and one or more conditions. The default rule is the rule that's used if no other rules match. Each rule must include exactly one of the following types of actions: forward or fixed-response , and it must be the last action to be performed.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const defaultActionProperty: vpclattice.CfnListener.DefaultActionProperty = {
  fixedResponse: {
    statusCode: 123,
  },
  forward: {
    targetGroups: [{
      targetGroupIdentifier: 'targetGroupIdentifier',

      // the properties below are optional
      weight: 123,
    }],
  },
};

Properties

NameTypeDescription
fixedResponse?IResolvable | FixedResponsePropertyInformation about an action that returns a custom HTTP response.
forward?IResolvable | ForwardPropertyDescribes a forward action.

fixedResponse?

Type: IResolvable | FixedResponseProperty (optional)

Information about an action that returns a custom HTTP response.


forward?

Type: IResolvable | ForwardProperty (optional)

Describes a forward action.

You can use forward actions to route requests to one or more target groups.