aws-cdk-lib.aws_vpclattice.CfnRule.ActionProperty

interface ActionProperty

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

Describes the action for a rule.

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 actionProperty: vpclattice.CfnRule.ActionProperty = {
  fixedResponse: {
    statusCode: 123,
  },
  forward: {
    targetGroups: [{
      targetGroupIdentifier: 'targetGroupIdentifier',

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

Properties

NameTypeDescription
fixedResponse?IResolvable | FixedResponsePropertyDescribes the rule action that returns a custom HTTP response.
forward?IResolvable | ForwardPropertyThe forward action.

fixedResponse?

Type: IResolvable | FixedResponseProperty (optional)

Describes the rule action that returns a custom HTTP response.


forward?

Type: IResolvable | ForwardProperty (optional)

The forward action.

Traffic that matches the rule is forwarded to the specified target groups.