We recommend new projects start with resources from the AWS provider.
aws-native.vpclattice.getRule
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.
Using getRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRule(args: GetRuleArgs, opts?: InvokeOptions): Promise<GetRuleResult>
function getRuleOutput(args: GetRuleOutputArgs, opts?: InvokeOptions): Output<GetRuleResult>def get_rule(arn: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetRuleResult
def get_rule_output(arn: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetRuleResult]func LookupRule(ctx *Context, args *LookupRuleArgs, opts ...InvokeOption) (*LookupRuleResult, error)
func LookupRuleOutput(ctx *Context, args *LookupRuleOutputArgs, opts ...InvokeOption) LookupRuleResultOutput> Note: This function is named LookupRule in the Go SDK.
public static class GetRule 
{
    public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetRuleResult> Invoke(GetRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
public static Output<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:vpclattice:getRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Arn string
- The Amazon Resource Name (ARN) of the rule.
- Arn string
- The Amazon Resource Name (ARN) of the rule.
- arn String
- The Amazon Resource Name (ARN) of the rule.
- arn string
- The Amazon Resource Name (ARN) of the rule.
- arn str
- The Amazon Resource Name (ARN) of the rule.
- arn String
- The Amazon Resource Name (ARN) of the rule.
getRule Result
The following output properties are available:
- Action
Pulumi.Aws Native. Vpc Lattice. Outputs. Rule Action 
- Describes the action for a rule.
- Arn string
- The Amazon Resource Name (ARN) of the rule.
- Id string
- The ID of the listener.
- Match
Pulumi.Aws Native. Vpc Lattice. Outputs. Rule Match 
- The rule match.
- Priority 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.
- 
List<Pulumi.Aws Native. Outputs. Tag> 
- The tags for the rule.
- Action
RuleAction 
- Describes the action for a rule.
- Arn string
- The Amazon Resource Name (ARN) of the rule.
- Id string
- The ID of the listener.
- Match
RuleMatch 
- The rule match.
- Priority 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.
- Tag
- The tags for the rule.
- action
RuleAction 
- Describes the action for a rule.
- arn String
- The Amazon Resource Name (ARN) of the rule.
- id String
- The ID of the listener.
- match
RuleMatch 
- The rule match.
- priority 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.
- List<Tag>
- The tags for the rule.
- action
RuleAction 
- Describes the action for a rule.
- arn string
- The Amazon Resource Name (ARN) of the rule.
- id string
- The ID of the listener.
- match
RuleMatch 
- The rule match.
- priority 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.
- Tag[]
- The tags for the rule.
- action
RuleAction 
- Describes the action for a rule.
- arn str
- The Amazon Resource Name (ARN) of the rule.
- id str
- The ID of the listener.
- match
RuleMatch 
- The rule match.
- priority 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.
- Sequence[root_Tag]
- The tags for the rule.
- action Property Map
- Describes the action for a rule.
- arn String
- The Amazon Resource Name (ARN) of the rule.
- id String
- The ID of the listener.
- match Property Map
- The rule match.
- priority 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.
- List<Property Map>
- The tags for the rule.
Supporting Types
RuleAction 
- FixedResponse 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.
- FixedResponse RuleFixed Response 
- The fixed response action. The rule returns a custom HTTP response.
- Forward
RuleForward 
- The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixedResponse RuleFixed Response 
- The fixed response action. The rule returns a custom HTTP response.
- forward
RuleForward 
- The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixedResponse RuleFixed Response 
- The fixed response action. The rule returns a custom HTTP response.
- forward
RuleForward 
- 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
RuleForward 
- The forward action. Traffic that matches the rule is forwarded to the specified target groups.
- fixedResponse 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  
- StatusCode int
- The HTTP response code.
- StatusCode int
- The HTTP response code.
- statusCode Integer
- The HTTP response code.
- statusCode number
- The HTTP response code.
- status_code int
- The HTTP response code.
- statusCode Number
- The HTTP response code.
RuleForward 
- TargetGroups 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. 
- TargetGroups []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. 
- targetGroups 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. 
- targetGroups 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 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. 
- targetGroups 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  
- Match
Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Header Match Type 
- The header match type.
- Name string
- The name of the header.
- CaseSensitive bool
- Indicates whether the match is case sensitive.
- Match
RuleHeader Match Type 
- The header match type.
- Name string
- The name of the header.
- CaseSensitive bool
- Indicates whether the match is case sensitive.
- match
RuleHeader Match Type 
- The header match type.
- name String
- The name of the header.
- caseSensitive Boolean
- Indicates whether the match is case sensitive.
- match
RuleHeader Match Type 
- The header match type.
- name string
- The name of the header.
- caseSensitive boolean
- Indicates whether the match is case sensitive.
- match
RuleHeader Match Type 
- The header match type.
- name str
- The name of the header.
- case_sensitive bool
- Indicates whether the match is case sensitive.
- match Property Map
- The header match type.
- name String
- The name of the header.
- caseSensitive Boolean
- Indicates whether the match is case sensitive.
RuleHeaderMatchType   
RuleHttpMatch  
- HeaderMatches 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.
- PathMatch Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Path Match 
- The path match.
- HeaderMatches []RuleHeader Match 
- The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- Method
RuleHttp Match Method 
- The HTTP method type.
- PathMatch RulePath Match 
- The path match.
- headerMatches List<RuleHeader Match> 
- The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method
RuleHttp Match Method 
- The HTTP method type.
- pathMatch RulePath Match 
- The path match.
- headerMatches RuleHeader Match[] 
- The header matches. Matches incoming requests with rule based on request header value before applying rule action.
- method
RuleHttp Match Method 
- The HTTP method type.
- pathMatch 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
RuleHttp Match Method 
- The HTTP method type.
- path_match RulePath Match 
- The path match.
- headerMatches 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.
- pathMatch Property Map
- The path match.
RuleHttpMatchMethod   
RuleMatch 
- HttpMatch Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Http Match 
- The HTTP criteria that a rule must match.
- HttpMatch RuleHttp Match 
- The HTTP criteria that a rule must match.
- httpMatch RuleHttp Match 
- The HTTP criteria that a rule must match.
- httpMatch RuleHttp Match 
- The HTTP criteria that a rule must match.
- http_match RuleHttp Match 
- The HTTP criteria that a rule must match.
- httpMatch Property Map
- The HTTP criteria that a rule must match.
RulePathMatch  
- Match
Pulumi.Aws Native. Vpc Lattice. Inputs. Rule Path Match Type 
- The type of path match.
- CaseSensitive bool
- Indicates whether the match is case sensitive.
- Match
RulePath Match Type 
- The type of path match.
- CaseSensitive bool
- Indicates whether the match is case sensitive.
- match
RulePath Match Type 
- The type of path match.
- caseSensitive Boolean
- Indicates whether the match is case sensitive.
- match
RulePath Match Type 
- The type of path match.
- caseSensitive boolean
- Indicates whether the match is case sensitive.
- match
RulePath Match Type 
- The type of path match.
- case_sensitive bool
- Indicates whether the match is case sensitive.
- match Property Map
- The type of path match.
- caseSensitive Boolean
- Indicates whether the match is case sensitive.
RulePathMatchType   
RuleWeightedTargetGroup   
- TargetGroup stringIdentifier 
- 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.
- TargetGroup stringIdentifier 
- 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.
- targetGroup StringIdentifier 
- 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.
- targetGroup stringIdentifier 
- 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_ stridentifier 
- 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.
- targetGroup StringIdentifier 
- 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
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.