Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CreateRuleCommand

Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.

Each rule consists of a priority, one or more actions, and one or more conditions. Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener rules in the Application Load Balancers Guide.

example

Use a bare-bones client and the command you need to make an API call.

import { ElasticLoadBalancingV2Client, CreateRuleCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import
// const { ElasticLoadBalancingV2Client, CreateRuleCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import
const client = new ElasticLoadBalancingV2Client(config);
const command = new CreateRuleCommand(input);
const response = await client.send(command);
see

CreateRuleCommandInput for command's input shape.

see

CreateRuleCommandOutput for command's response shape.

see

config for ElasticLoadBalancingV2Client's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: CreateRuleCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<CreateRuleCommandInput, CreateRuleCommandOutput>