@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
266 lines (265 loc) • 9.67 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Resource for managing an AWS VPC Lattice Listener Rule.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.ListenerRule("example", {
* name: "example",
* listenerIdentifier: exampleAwsVpclatticeListener.listenerId,
* serviceIdentifier: exampleAwsVpclatticeService.id,
* priority: 20,
* match: {
* httpMatch: {
* headerMatches: [{
* name: "example-header",
* caseSensitive: false,
* match: {
* exact: "example-contains",
* },
* }],
* pathMatch: {
* caseSensitive: true,
* match: {
* prefix: "/example-path",
* },
* },
* },
* },
* action: {
* forward: {
* targetGroups: [
* {
* targetGroupIdentifier: exampleAwsVpclatticeTargetGroup.id,
* weight: 1,
* },
* {
* targetGroupIdentifier: example2.id,
* weight: 2,
* },
* ],
* },
* },
* });
* ```
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.ListenerRule("example", {
* name: "example",
* listenerIdentifier: exampleAwsVpclatticeListener.listenerId,
* serviceIdentifier: exampleAwsVpclatticeService.id,
* priority: 10,
* match: {
* httpMatch: {
* pathMatch: {
* caseSensitive: false,
* match: {
* exact: "/example-path",
* },
* },
* },
* },
* action: {
* fixedResponse: {
* statusCode: 404,
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC Lattice Listener Rule using the `id`. For example:
*
* ```sh
* $ pulumi import aws:vpclattice/listenerRule:ListenerRule example service123/listener456/rule789
* ```
*/
export declare class ListenerRule extends pulumi.CustomResource {
/**
* Get an existing ListenerRule resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ListenerRuleState, opts?: pulumi.CustomResourceOptions): ListenerRule;
/**
* Returns true if the given object is an instance of ListenerRule. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ListenerRule;
/**
* The action for the listener rule.
* See `action` Block for details.
*/
readonly action: pulumi.Output<outputs.vpclattice.ListenerRuleAction>;
/**
* The ARN for the listener rule.
*/
readonly arn: pulumi.Output<string>;
/**
* The ID or Amazon Resource Name (ARN) of the listener.
*/
readonly listenerIdentifier: pulumi.Output<string>;
/**
* The rule match.
* See `match` Block
*/
readonly match: pulumi.Output<outputs.vpclattice.ListenerRuleMatch>;
/**
* 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.
*/
readonly name: pulumi.Output<string>;
/**
* 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.
*
* The following arguments are optional:
*/
readonly priority: pulumi.Output<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Unique identifier for the listener rule.
*/
readonly ruleId: pulumi.Output<string>;
/**
* The ID or Amazon Resource Identifier (ARN) of the service.
*/
readonly serviceIdentifier: pulumi.Output<string>;
/**
* Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* Create a ListenerRule resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ListenerRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ListenerRule resources.
*/
export interface ListenerRuleState {
/**
* The action for the listener rule.
* See `action` Block for details.
*/
action?: pulumi.Input<inputs.vpclattice.ListenerRuleAction>;
/**
* The ARN for the listener rule.
*/
arn?: pulumi.Input<string>;
/**
* The ID or Amazon Resource Name (ARN) of the listener.
*/
listenerIdentifier?: pulumi.Input<string>;
/**
* The rule match.
* See `match` Block
*/
match?: pulumi.Input<inputs.vpclattice.ListenerRuleMatch>;
/**
* 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.
*/
name?: pulumi.Input<string>;
/**
* 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.
*
* The following arguments are optional:
*/
priority?: pulumi.Input<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Unique identifier for the listener rule.
*/
ruleId?: pulumi.Input<string>;
/**
* The ID or Amazon Resource Identifier (ARN) of the service.
*/
serviceIdentifier?: pulumi.Input<string>;
/**
* Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a ListenerRule resource.
*/
export interface ListenerRuleArgs {
/**
* The action for the listener rule.
* See `action` Block for details.
*/
action: pulumi.Input<inputs.vpclattice.ListenerRuleAction>;
/**
* The ID or Amazon Resource Name (ARN) of the listener.
*/
listenerIdentifier: pulumi.Input<string>;
/**
* The rule match.
* See `match` Block
*/
match: pulumi.Input<inputs.vpclattice.ListenerRuleMatch>;
/**
* 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.
*/
name?: pulumi.Input<string>;
/**
* 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.
*
* The following arguments are optional:
*/
priority: pulumi.Input<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The ID or Amazon Resource Identifier (ARN) of the service.
*/
serviceIdentifier: pulumi.Input<string>;
/**
* Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}