aws-cdk-lib.aws_vpclattice.CfnRuleProps

interface CfnRuleProps

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

Properties for defining a CfnRule.

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 cfnRuleProps: vpclattice.CfnRuleProps = {
  action: {
    fixedResponse: {
      statusCode: 123,
    },
    forward: {
      targetGroups: [{
        targetGroupIdentifier: 'targetGroupIdentifier',

        // the properties below are optional
        weight: 123,
      }],
    },
  },
  match: {
    httpMatch: {
      headerMatches: [{
        match: {
          contains: 'contains',
          exact: 'exact',
          prefix: 'prefix',
        },
        name: 'name',

        // the properties below are optional
        caseSensitive: false,
      }],
      method: 'method',
      pathMatch: {
        match: {
          exact: 'exact',
          prefix: 'prefix',
        },

        // the properties below are optional
        caseSensitive: false,
      },
    },
  },
  priority: 123,

  // the properties below are optional
  listenerIdentifier: 'listenerIdentifier',
  name: 'name',
  serviceIdentifier: 'serviceIdentifier',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
actionIResolvable | ActionPropertyDescribes the action for a rule.
matchIResolvable | MatchPropertyThe rule match.
prioritynumberThe priority assigned to the rule.
listenerIdentifier?stringThe ID or Amazon Resource Name (ARN) of the listener.
name?stringThe name of the rule.
serviceIdentifier?stringThe ID or Amazon Resource Name (ARN) of the service.
tags?CfnTag[]The tags for the rule.

action

Type: IResolvable | 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.


match

Type: IResolvable | MatchProperty

The rule match.


priority

Type: number

The priority assigned to the rule.

Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.


listenerIdentifier?

Type: string (optional)

The ID or Amazon Resource Name (ARN) of the listener.


name?

Type: string (optional)

The name of the rule.

The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.

If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.


serviceIdentifier?

Type: string (optional)

The ID or Amazon Resource Name (ARN) of the service.


tags?

Type: CfnTag[] (optional)

The tags for the rule.