@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
139 lines (138 loc) • 6.05 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a Global Accelerator listener.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.globalaccelerator.Accelerator("example", {
* name: "Example",
* ipAddressType: "IPV4",
* enabled: true,
* attributes: {
* flowLogsEnabled: true,
* flowLogsS3Bucket: "example-bucket",
* flowLogsS3Prefix: "flow-logs/",
* },
* });
* const exampleListener = new aws.globalaccelerator.Listener("example", {
* acceleratorArn: example.arn,
* clientAffinity: "SOURCE_IP",
* protocol: "TCP",
* portRanges: [{
* fromPort: 80,
* toPort: 80,
* }],
* });
* ```
*
* ## Import
*
* ### Identity Schema
*
* #### Required
*
* - `arn` (String) Amazon Resource Name (ARN) of the Global Accelerator listener.
*
* Using `pulumi import`, import Global Accelerator listeners using the `id`. For example:
*
* console
*
* % pulumi import aws_globalaccelerator_listener.example arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx
*/
export declare class Listener extends pulumi.CustomResource {
/**
* Get an existing Listener 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?: ListenerState, opts?: pulumi.CustomResourceOptions): Listener;
/**
* Returns true if the given object is an instance of Listener. 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 Listener;
/**
* The Amazon Resource Name (ARN) of your accelerator.
*/
readonly acceleratorArn: pulumi.Output<string>;
/**
* The Amazon Resource Name (ARN) of the listener.
*/
readonly arn: pulumi.Output<string>;
/**
* Direct all requests from a user to the same endpoint. Valid values are `NONE`, `SOURCE_IP`. Default: `NONE`. If `NONE`, Global Accelerator uses the "five-tuple" properties of source IP address, source port, destination IP address, destination port, and protocol to select the hash value. If `SOURCE_IP`, Global Accelerator uses the "two-tuple" properties of source (client) IP address and destination IP address to select the hash value.
*/
readonly clientAffinity: pulumi.Output<string | undefined>;
/**
* The list of port ranges for the connections from clients to the accelerator. Fields documented below.
*/
readonly portRanges: pulumi.Output<outputs.globalaccelerator.ListenerPortRange[]>;
/**
* The protocol for the connections from clients to the accelerator. Valid values are `TCP`, `UDP`.
*/
readonly protocol: pulumi.Output<string>;
/**
* Create a Listener 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: ListenerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Listener resources.
*/
export interface ListenerState {
/**
* The Amazon Resource Name (ARN) of your accelerator.
*/
acceleratorArn?: pulumi.Input<string>;
/**
* The Amazon Resource Name (ARN) of the listener.
*/
arn?: pulumi.Input<string>;
/**
* Direct all requests from a user to the same endpoint. Valid values are `NONE`, `SOURCE_IP`. Default: `NONE`. If `NONE`, Global Accelerator uses the "five-tuple" properties of source IP address, source port, destination IP address, destination port, and protocol to select the hash value. If `SOURCE_IP`, Global Accelerator uses the "two-tuple" properties of source (client) IP address and destination IP address to select the hash value.
*/
clientAffinity?: pulumi.Input<string>;
/**
* The list of port ranges for the connections from clients to the accelerator. Fields documented below.
*/
portRanges?: pulumi.Input<pulumi.Input<inputs.globalaccelerator.ListenerPortRange>[]>;
/**
* The protocol for the connections from clients to the accelerator. Valid values are `TCP`, `UDP`.
*/
protocol?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Listener resource.
*/
export interface ListenerArgs {
/**
* The Amazon Resource Name (ARN) of your accelerator.
*/
acceleratorArn: pulumi.Input<string>;
/**
* Direct all requests from a user to the same endpoint. Valid values are `NONE`, `SOURCE_IP`. Default: `NONE`. If `NONE`, Global Accelerator uses the "five-tuple" properties of source IP address, source port, destination IP address, destination port, and protocol to select the hash value. If `SOURCE_IP`, Global Accelerator uses the "two-tuple" properties of source (client) IP address and destination IP address to select the hash value.
*/
clientAffinity?: pulumi.Input<string>;
/**
* The list of port ranges for the connections from clients to the accelerator. Fields documented below.
*/
portRanges: pulumi.Input<pulumi.Input<inputs.globalaccelerator.ListenerPortRange>[]>;
/**
* The protocol for the connections from clients to the accelerator. Valid values are `TCP`, `UDP`.
*/
protocol: pulumi.Input<string>;
}