1. Packages
  2. AWS Native
  3. API Docs
  4. vpclattice
  5. Rule

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.vpclattice.Rule

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: aws-native:vpclattice:Rule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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

    The Rule resource accepts the following input properties:

    Action Pulumi.AwsNative.VpcLattice.Inputs.RuleAction
    Describes the action for a rule.
    Match Pulumi.AwsNative.VpcLattice.Inputs.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.
    ListenerIdentifier string
    The ID or Amazon Resource Name (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.

    ServiceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    The tags for the rule.
    Action RuleActionArgs
    Describes the action for a rule.
    Match RuleMatchArgs
    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.
    ListenerIdentifier string
    The ID or Amazon Resource Name (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.

    ServiceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service.
    Tags TagArgs
    The tags for the rule.
    action RuleAction
    Describes the action for a rule.
    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.
    listenerIdentifier String
    The ID or Amazon Resource Name (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.

    serviceIdentifier String
    The ID or Amazon Resource Name (ARN) of the service.
    tags List<Tag>
    The tags for the rule.
    action RuleAction
    Describes the action for a rule.
    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.
    listenerIdentifier string
    The ID or Amazon Resource Name (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.

    serviceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service.
    tags Tag[]
    The tags for the rule.
    action RuleActionArgs
    Describes the action for a rule.
    match RuleMatchArgs
    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.
    listener_identifier str
    The ID or Amazon Resource Name (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 Amazon Resource Name (ARN) of the service.
    tags Sequence[TagArgs]
    The tags for the rule.
    action Property Map
    Describes the action for a rule.
    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.
    listenerIdentifier String
    The ID or Amazon Resource Name (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.

    serviceIdentifier String
    The ID or Amazon Resource Name (ARN) of the service.
    tags 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:

    Arn string
    The Amazon Resource Name (ARN) of the rule.
    AwsId string
    The ID of the listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The Amazon Resource Name (ARN) of the rule.
    AwsId string
    The ID of the listener.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the rule.
    awsId String
    The ID of the listener.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The Amazon Resource Name (ARN) of the rule.
    awsId string
    The ID of the listener.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The Amazon Resource Name (ARN) of the rule.
    aws_id str
    The ID of the listener.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the rule.
    awsId String
    The ID of the listener.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    RuleAction, RuleActionArgs

    FixedResponse Pulumi.AwsNative.VpcLattice.Inputs.RuleFixedResponse
    The fixed response action. The rule returns a custom HTTP response.
    Forward Pulumi.AwsNative.VpcLattice.Inputs.RuleForward
    The forward action. Traffic that matches the rule is forwarded to the specified target groups.
    FixedResponse RuleFixedResponse
    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 RuleFixedResponse
    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 RuleFixedResponse
    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 RuleFixedResponse
    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, RuleFixedResponseArgs

    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, RuleForwardArgs

    TargetGroups List<Pulumi.AwsNative.VpcLattice.Inputs.RuleWeightedTargetGroup>

    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 []RuleWeightedTargetGroup

    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<RuleWeightedTargetGroup>

    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 RuleWeightedTargetGroup[]

    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[RuleWeightedTargetGroup]

    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, RuleHeaderMatchArgs

    Match Pulumi.AwsNative.VpcLattice.Inputs.RuleHeaderMatchType
    The header match type.
    Name string
    The name of the header.
    CaseSensitive bool
    Indicates whether the match is case sensitive.
    Match RuleHeaderMatchType
    The header match type.
    Name string
    The name of the header.
    CaseSensitive bool
    Indicates whether the match is case sensitive.
    match RuleHeaderMatchType
    The header match type.
    name String
    The name of the header.
    caseSensitive Boolean
    Indicates whether the match is case sensitive.
    match RuleHeaderMatchType
    The header match type.
    name string
    The name of the header.
    caseSensitive boolean
    Indicates whether the match is case sensitive.
    match RuleHeaderMatchType
    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, RuleHeaderMatchTypeArgs

    Contains string
    A contains type match.
    Exact string
    An exact type match.
    Prefix string
    A prefix type match. Matches the value with the prefix.
    Contains string
    A contains type match.
    Exact string
    An exact type match.
    Prefix string
    A prefix type match. Matches the value with the prefix.
    contains String
    A contains type match.
    exact String
    An exact type match.
    prefix String
    A prefix type match. Matches the value with the prefix.
    contains string
    A contains type match.
    exact string
    An exact type match.
    prefix string
    A prefix type match. Matches the value with the prefix.
    contains str
    A contains type match.
    exact str
    An exact type match.
    prefix str
    A prefix type match. Matches the value with the prefix.
    contains String
    A contains type match.
    exact String
    An exact type match.
    prefix String
    A prefix type match. Matches the value with the prefix.

    RuleHttpMatch, RuleHttpMatchArgs

    HeaderMatches List<Pulumi.AwsNative.VpcLattice.Inputs.RuleHeaderMatch>
    The header matches. Matches incoming requests with rule based on request header value before applying rule action.
    Method Pulumi.AwsNative.VpcLattice.RuleHttpMatchMethod
    The HTTP method type.
    PathMatch Pulumi.AwsNative.VpcLattice.Inputs.RulePathMatch
    The path match.
    HeaderMatches []RuleHeaderMatch
    The header matches. Matches incoming requests with rule based on request header value before applying rule action.
    Method RuleHttpMatchMethod
    The HTTP method type.
    PathMatch RulePathMatch
    The path match.
    headerMatches List<RuleHeaderMatch>
    The header matches. Matches incoming requests with rule based on request header value before applying rule action.
    method RuleHttpMatchMethod
    The HTTP method type.
    pathMatch RulePathMatch
    The path match.
    headerMatches RuleHeaderMatch[]
    The header matches. Matches incoming requests with rule based on request header value before applying rule action.
    method RuleHttpMatchMethod
    The HTTP method type.
    pathMatch RulePathMatch
    The path match.
    header_matches Sequence[RuleHeaderMatch]
    The header matches. Matches incoming requests with rule based on request header value before applying rule action.
    method RuleHttpMatchMethod
    The HTTP method type.
    path_match RulePathMatch
    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, RuleHttpMatchMethodArgs

    Connect
    CONNECT
    Delete
    DELETE
    Get
    GET
    Head
    HEAD
    Options
    OPTIONS
    Post
    POST
    Put
    PUT
    Trace
    TRACE
    RuleHttpMatchMethodConnect
    CONNECT
    RuleHttpMatchMethodDelete
    DELETE
    RuleHttpMatchMethodGet
    GET
    RuleHttpMatchMethodHead
    HEAD
    RuleHttpMatchMethodOptions
    OPTIONS
    RuleHttpMatchMethodPost
    POST
    RuleHttpMatchMethodPut
    PUT
    RuleHttpMatchMethodTrace
    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

    HttpMatch Pulumi.AwsNative.VpcLattice.Inputs.RuleHttpMatch
    The HTTP criteria that a rule must match.
    HttpMatch RuleHttpMatch
    The HTTP criteria that a rule must match.
    httpMatch RuleHttpMatch
    The HTTP criteria that a rule must match.
    httpMatch RuleHttpMatch
    The HTTP criteria that a rule must match.
    http_match RuleHttpMatch
    The HTTP criteria that a rule must match.
    httpMatch Property Map
    The HTTP criteria that a rule must match.

    RulePathMatch, RulePathMatchArgs

    Match Pulumi.AwsNative.VpcLattice.Inputs.RulePathMatchType
    The type of path match.
    CaseSensitive bool
    Indicates whether the match is case sensitive.
    Match RulePathMatchType
    The type of path match.
    CaseSensitive bool
    Indicates whether the match is case sensitive.
    match RulePathMatchType
    The type of path match.
    caseSensitive Boolean
    Indicates whether the match is case sensitive.
    match RulePathMatchType
    The type of path match.
    caseSensitive boolean
    Indicates whether the match is case sensitive.
    match RulePathMatchType
    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, RulePathMatchTypeArgs

    Exact string
    An exact match of the path.
    Prefix string
    A prefix match of the path.
    Exact string
    An exact match of the path.
    Prefix string
    A prefix match of the path.
    exact String
    An exact match of the path.
    prefix String
    A prefix match of the path.
    exact string
    An exact match of the path.
    prefix string
    A prefix match of the path.
    exact str
    An exact match of the path.
    prefix str
    A prefix match of the path.
    exact String
    An exact match of the path.
    prefix String
    A prefix match of the path.

    RuleWeightedTargetGroup, RuleWeightedTargetGroupArgs

    TargetGroupIdentifier 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.
    TargetGroupIdentifier 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.
    targetGroupIdentifier 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.
    targetGroupIdentifier 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 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.
    targetGroupIdentifier 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

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi