We recommend new projects start with resources from the AWS provider.
aws-native.vpclattice.Rule
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions.
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[RuleActionArgs] = None,
match: Optional[RuleMatchArgs] = None,
priority: Optional[int] = None,
listener_identifier: Optional[str] = None,
name: Optional[str] = None,
service_identifier: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
type: aws-native:vpclattice:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. RuleArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RuleArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. RuleArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Rule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- Action
This property is required. Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Action - Describes the action for a rule.
- Match
This property is required. Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Match - The rule match.
- Priority
This property is required. int - 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.
- Listener
Identifier string - The ID or ARN of the listener.
- Name string
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.
- Service
Identifier string - The ID or ARN of the service.
- List<Pulumi.
Aws Native. Inputs. Tag> - The tags for the rule.
- Action
This property is required. RuleAction Args - Describes the action for a rule.
- Match
This property is required. RuleMatch Args - The rule match.
- Priority
This property is required. int - 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.
- Listener
Identifier string - The ID or ARN of the listener.
- Name string
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.
- Service
Identifier string - The ID or ARN of the service.
- Tag
Args - The tags for the rule.
- action
This property is required. RuleAction - Describes the action for a rule.
- match
This property is required. RuleMatch - The rule match.
- priority
This property is required. Integer - 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.
- listener
Identifier String - The ID or ARN of the listener.
- name String
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.
- service
Identifier String - The ID or ARN of the service.
- List<Tag>
- The tags for the rule.
- action
This property is required. RuleAction - Describes the action for a rule.
- match
This property is required. RuleMatch - The rule match.
- priority
This property is required. 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.
- listener
Identifier string - The ID or ARN of the listener.
- name string
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.
- service
Identifier string - The ID or ARN of the service.
- Tag[]
- The tags for the rule.
- action
This property is required. RuleAction Args - Describes the action for a rule.
- match
This property is required. RuleMatch Args - The rule match.
- priority
This property is required. int - 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.
- listener_
identifier str - The ID or ARN of the listener.
- name str
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.
- service_
identifier str - The ID or ARN of the service.
- Sequence[Tag
Args] - The tags for the rule.
- action
This property is required. Property Map - Describes the action for a rule.
- match
This property is required. Property Map - The rule match.
- priority
This property is required. 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.
- listener
Identifier String - The ID or ARN of the listener.
- name String
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.
- service
Identifier String - The ID or ARN of the service.
- List<Property Map>
- The tags for the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
Supporting Types
RuleAction, RuleActionArgs
- Fixed
Response Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Fixed Response - The fixed response action. The rule returns a custom HTTP response.
- Forward
Pulumi.
Aws Native. Vpc Lattice. Inputs. Rule Forward - The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- Fixed
Response RuleFixed Response - The fixed response action. The rule returns a custom HTTP response.
- Forward
Rule
Forward - The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixed
Response RuleFixed Response - The fixed response action. The rule returns a custom HTTP response.
- forward
Rule
Forward - The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixed
Response RuleFixed Response - The fixed response action. The rule returns a custom HTTP response.
- forward
Rule
Forward - The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixed_
response RuleFixed Response - The fixed response action. The rule returns a custom HTTP response.
- forward
Rule
Forward - The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixed
Response Property Map - The fixed response action. The rule returns a custom HTTP response.
- forward Property Map
- The forward action. Traffic that matches the rule is forwarded to the specified target groups.
RuleFixedResponse, RuleFixedResponseArgs
- Status
Code This property is required. int - The HTTP response code.
- Status
Code This property is required. int - The HTTP response code.
- status
Code This property is required. Integer - The HTTP response code.
- status
Code This property is required. number - The HTTP response code.
- status_
code This property is required. int - The HTTP response code.
- status
Code This property is required. Number - The HTTP response code.
RuleForward, RuleForwardArgs
- Target
Groups This property is required. List<Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Weighted Target Group> The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
- Target
Groups This property is required. []RuleWeighted Target Group The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
- target
Groups This property is required. List<RuleWeighted Target Group> The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
- target
Groups This property is required. RuleWeighted Target Group[] The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
- target_
groups This property is required. Sequence[RuleWeighted Target Group] The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
- target
Groups This property is required. List<Property Map> The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
RuleHeaderMatch, RuleHeaderMatchArgs
- Match
This property is required. Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Header Match Type - The header match type.
- Name
This property is required. string - The name of the header.
- Case
Sensitive bool - Indicates whether the match is case sensitive.
- Match
This property is required. RuleHeader Match Type - The header match type.
- Name
This property is required. string - The name of the header.
- Case
Sensitive bool - Indicates whether the match is case sensitive.
- match
This property is required. RuleHeader Match Type - The header match type.
- name
This property is required. String - The name of the header.
- case
Sensitive Boolean - Indicates whether the match is case sensitive.
- match
This property is required. RuleHeader Match Type - The header match type.
- name
This property is required. string - The name of the header.
- case
Sensitive boolean - Indicates whether the match is case sensitive.
- match
This property is required. RuleHeader Match Type - The header match type.
- name
This property is required. str - The name of the header.
- case_
sensitive bool - Indicates whether the match is case sensitive.
- match
This property is required. Property Map - The header match type.
- name
This property is required. String - The name of the header.
- case
Sensitive Boolean - Indicates whether the match is case sensitive.
RuleHeaderMatchType, RuleHeaderMatchTypeArgs
RuleHttpMatch, RuleHttpMatchArgs
- Header
Matches List<Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Header Match> - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- Method
Pulumi.
Aws Native. Vpc Lattice. Rule Http Match Method - The HTTP method type.
- Path
Match Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Path Match - The path match.
- Header
Matches []RuleHeader Match - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- Method
Rule
Http Match Method - The HTTP method type.
- Path
Match RulePath Match - The path match.
- header
Matches List<RuleHeader Match> - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method
Rule
Http Match Method - The HTTP method type.
- path
Match RulePath Match - The path match.
- header
Matches RuleHeader Match[] - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method
Rule
Http Match Method - The HTTP method type.
- path
Match RulePath Match - The path match.
- header_
matches Sequence[RuleHeader Match] - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method
Rule
Http Match Method - The HTTP method type.
- path_
match RulePath Match - The path match.
- header
Matches List<Property Map> - The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "TRACE"
- The HTTP method type.
- path
Match Property Map - The path match.
RuleHttpMatchMethod, RuleHttpMatchMethodArgs
- Connect
- CONNECT
- Delete
- DELETE
- Get
- GET
- Head
- HEAD
- Options
- OPTIONS
- Post
- POST
- Put
- PUT
- Trace
- TRACE
- Rule
Http Match Method Connect - CONNECT
- Rule
Http Match Method Delete - DELETE
- Rule
Http Match Method Get - GET
- Rule
Http Match Method Head - HEAD
- Rule
Http Match Method Options - OPTIONS
- Rule
Http Match Method Post - POST
- Rule
Http Match Method Put - PUT
- Rule
Http Match Method Trace - TRACE
- Connect
- CONNECT
- Delete
- DELETE
- Get
- GET
- Head
- HEAD
- Options
- OPTIONS
- Post
- POST
- Put
- PUT
- Trace
- TRACE
- Connect
- CONNECT
- Delete
- DELETE
- Get
- GET
- Head
- HEAD
- Options
- OPTIONS
- Post
- POST
- Put
- PUT
- Trace
- TRACE
- CONNECT
- CONNECT
- DELETE
- DELETE
- GET
- GET
- HEAD
- HEAD
- OPTIONS
- OPTIONS
- POST
- POST
- PUT
- PUT
- TRACE
- TRACE
- "CONNECT"
- CONNECT
- "DELETE"
- DELETE
- "GET"
- GET
- "HEAD"
- HEAD
- "OPTIONS"
- OPTIONS
- "POST"
- POST
- "PUT"
- PUT
- "TRACE"
- TRACE
RuleMatch, RuleMatchArgs
- Http
Match This property is required. Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Http Match - The HTTP criteria that a rule must match.
- Http
Match This property is required. RuleHttp Match - The HTTP criteria that a rule must match.
- http
Match This property is required. RuleHttp Match - The HTTP criteria that a rule must match.
- http
Match This property is required. RuleHttp Match - The HTTP criteria that a rule must match.
- http_
match This property is required. RuleHttp Match - The HTTP criteria that a rule must match.
- http
Match This property is required. Property Map - The HTTP criteria that a rule must match.
RulePathMatch, RulePathMatchArgs
- Match
This property is required. Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Path Match Type - The type of path match.
- Case
Sensitive bool - Indicates whether the match is case sensitive.
- Match
This property is required. RulePath Match Type - The type of path match.
- Case
Sensitive bool - Indicates whether the match is case sensitive.
- match
This property is required. RulePath Match Type - The type of path match.
- case
Sensitive Boolean - Indicates whether the match is case sensitive.
- match
This property is required. RulePath Match Type - The type of path match.
- case
Sensitive boolean - Indicates whether the match is case sensitive.
- match
This property is required. RulePath Match Type - The type of path match.
- case_
sensitive bool - Indicates whether the match is case sensitive.
- match
This property is required. Property Map - The type of path match.
- case
Sensitive Boolean - Indicates whether the match is case sensitive.
RulePathMatchType, RulePathMatchTypeArgs
RuleWeightedTargetGroup, RuleWeightedTargetGroupArgs
- Target
Group Identifier This property is required. string - The ID of the target group.
- Weight int
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
- Target
Group Identifier This property is required. string - The ID of the target group.
- Weight int
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
- target
Group Identifier This property is required. String - The ID of the target group.
- weight Integer
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
- target
Group Identifier This property is required. string - The ID of the target group.
- weight number
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
- target_
group_ identifier This property is required. str - The ID of the target group.
- weight int
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
- target
Group Identifier This property is required. String - The ID of the target group.
- weight Number
- Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.