Listener
Provides a Load Balancer Listener resource.
Note:
aws.alb.Listeneris known asaws.lb.Listener. The functionality is identical.
Example Usage
Forward Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndTargetGroup = new Aws.LB.TargetGroup("frontEndTargetGroup", new Aws.LB.TargetGroupArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
CertificateArn = "arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4",
DefaultActions =
{
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
TargetGroupArn = frontEndTargetGroup.Arn,
Type = "forward",
},
},
LoadBalancerArn = frontEndLoadBalancer.Arn,
Port = 443,
Protocol = "HTTPS",
SslPolicy = "ELBSecurityPolicy-2016-08",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
frontEndLoadBalancer, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "frontEndTargetGroup", nil)
if err != nil {
return err
}
_, err = lb.NewListener(ctx, "frontEndListener", &lb.ListenerArgs{
CertificateArn: pulumi.String("arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4"),
DefaultActions: lb.ListenerDefaultActionArray{
&lb.ListenerDefaultActionArgs{
TargetGroupArn: frontEndTargetGroup.Arn,
Type: pulumi.String("forward"),
},
},
LoadBalancerArn: frontEndLoadBalancer.Arn,
Port: pulumi.Int(443),
Protocol: pulumi.String("HTTPS"),
SslPolicy: pulumi.String("ELBSecurityPolicy-2016-08"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_target_group = aws.lb.TargetGroup("frontEndTargetGroup")
front_end_listener = aws.lb.Listener("frontEndListener",
certificate_arn="arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4",
default_actions=[{
"target_group_arn": front_end_target_group.arn,
"type": "forward",
}],
load_balancer_arn=front_end_load_balancer.arn,
port="443",
protocol="HTTPS",
ssl_policy="ELBSecurityPolicy-2016-08")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndTargetGroup = new aws.lb.TargetGroup("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {
certificateArn: "arn:aws:iam::187416307283:server-certificate/test_cert_rab3wuqwgja25ct3n4jdj2tzu4",
defaultActions: [{
targetGroupArn: frontEndTargetGroup.arn,
type: "forward",
}],
loadBalancerArn: frontEndLoadBalancer.arn,
port: 443,
protocol: "HTTPS",
sslPolicy: "ELBSecurityPolicy-2016-08",
});Redirect Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
DefaultActions =
{
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
Redirect = new Aws.LB.Inputs.ListenerDefaultActionRedirectArgs
{
Port = "443",
Protocol = "HTTPS",
StatusCode = "HTTP_301",
},
Type = "redirect",
},
},
LoadBalancerArn = frontEndLoadBalancer.Arn,
Port = 80,
Protocol = "HTTP",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
frontEndLoadBalancer, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
_, err = lb.NewListener(ctx, "frontEndListener", &lb.ListenerArgs{
DefaultActions: lb.ListenerDefaultActionArray{
&lb.ListenerDefaultActionArgs{
Redirect: &lb.ListenerDefaultActionRedirectArgs{
Port: pulumi.String("443"),
Protocol: pulumi.String("HTTPS"),
StatusCode: pulumi.String("HTTP_301"),
},
Type: pulumi.String("redirect"),
},
},
LoadBalancerArn: frontEndLoadBalancer.Arn,
Port: pulumi.Int(80),
Protocol: pulumi.String("HTTP"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_listener = aws.lb.Listener("frontEndListener",
default_actions=[{
"redirect": {
"port": "443",
"protocol": "HTTPS",
"status_code": "HTTP_301",
},
"type": "redirect",
}],
load_balancer_arn=front_end_load_balancer.arn,
port="80",
protocol="HTTP")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {
defaultActions: [{
redirect: {
port: "443",
protocol: "HTTPS",
statusCode: "HTTP_301",
},
type: "redirect",
}],
loadBalancerArn: frontEndLoadBalancer.arn,
port: 80,
protocol: "HTTP",
});Fixed-response Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
DefaultActions =
{
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
FixedResponse = new Aws.LB.Inputs.ListenerDefaultActionFixedResponseArgs
{
ContentType = "text/plain",
MessageBody = "Fixed response content",
StatusCode = "200",
},
Type = "fixed-response",
},
},
LoadBalancerArn = frontEndLoadBalancer.Arn,
Port = 80,
Protocol = "HTTP",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
frontEndLoadBalancer, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
_, err = lb.NewListener(ctx, "frontEndListener", &lb.ListenerArgs{
DefaultActions: lb.ListenerDefaultActionArray{
&lb.ListenerDefaultActionArgs{
FixedResponse: &lb.ListenerDefaultActionFixedResponseArgs{
ContentType: pulumi.String("text/plain"),
MessageBody: pulumi.String("Fixed response content"),
StatusCode: pulumi.String("200"),
},
Type: pulumi.String("fixed-response"),
},
},
LoadBalancerArn: frontEndLoadBalancer.Arn,
Port: pulumi.Int(80),
Protocol: pulumi.String("HTTP"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_listener = aws.lb.Listener("frontEndListener",
default_actions=[{
"fixedResponse": {
"content_type": "text/plain",
"messageBody": "Fixed response content",
"status_code": "200",
},
"type": "fixed-response",
}],
load_balancer_arn=front_end_load_balancer.arn,
port="80",
protocol="HTTP")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {
defaultActions: [{
fixedResponse: {
contentType: "text/plain",
messageBody: "Fixed response content",
statusCode: "200",
},
type: "fixed-response",
}],
loadBalancerArn: frontEndLoadBalancer.arn,
port: 80,
protocol: "HTTP",
});Authenticate-cognito Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndTargetGroup = new Aws.LB.TargetGroup("frontEndTargetGroup", new Aws.LB.TargetGroupArgs
{
});
var pool = new Aws.Cognito.UserPool("pool", new Aws.Cognito.UserPoolArgs
{
});
var client = new Aws.Cognito.UserPoolClient("client", new Aws.Cognito.UserPoolClientArgs
{
});
var domain = new Aws.Cognito.UserPoolDomain("domain", new Aws.Cognito.UserPoolDomainArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
DefaultActions =
{
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
AuthenticateCognito = new Aws.LB.Inputs.ListenerDefaultActionAuthenticateCognitoArgs
{
UserPoolArn = pool.Arn,
UserPoolClientId = client.Id,
UserPoolDomain = domain.Domain,
},
Type = "authenticate-cognito",
},
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
TargetGroupArn = frontEndTargetGroup.Arn,
Type = "forward",
},
},
LoadBalancerArn = frontEndLoadBalancer.Arn,
Port = 80,
Protocol = "HTTP",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
frontEndLoadBalancer, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "frontEndTargetGroup", nil)
if err != nil {
return err
}
pool, err := cognito.NewUserPool(ctx, "pool", nil)
if err != nil {
return err
}
client, err := cognito.NewUserPoolClient(ctx, "client", nil)
if err != nil {
return err
}
domain, err := cognito.NewUserPoolDomain(ctx, "domain", nil)
if err != nil {
return err
}
_, err = lb.NewListener(ctx, "frontEndListener", &lb.ListenerArgs{
DefaultActions: lb.ListenerDefaultActionArray{
&lb.ListenerDefaultActionArgs{
AuthenticateCognito: &lb.ListenerDefaultActionAuthenticateCognitoArgs{
UserPoolArn: pool.Arn,
UserPoolClientId: client.ID(),
UserPoolDomain: domain.Domain,
},
Type: pulumi.String("authenticate-cognito"),
},
&lb.ListenerDefaultActionArgs{
TargetGroupArn: frontEndTargetGroup.Arn,
Type: pulumi.String("forward"),
},
},
LoadBalancerArn: frontEndLoadBalancer.Arn,
Port: pulumi.Int(80),
Protocol: pulumi.String("HTTP"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_target_group = aws.lb.TargetGroup("frontEndTargetGroup")
pool = aws.cognito.UserPool("pool")
client = aws.cognito.UserPoolClient("client")
domain = aws.cognito.UserPoolDomain("domain")
front_end_listener = aws.lb.Listener("frontEndListener",
default_actions=[
{
"authenticateCognito": {
"userPoolArn": pool.arn,
"userPoolClientId": client.id,
"userPoolDomain": domain.domain,
},
"type": "authenticate-cognito",
},
{
"target_group_arn": front_end_target_group.arn,
"type": "forward",
},
],
load_balancer_arn=front_end_load_balancer.arn,
port="80",
protocol="HTTP")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndTargetGroup = new aws.lb.TargetGroup("front_end", {});
const pool = new aws.cognito.UserPool("pool", {});
const client = new aws.cognito.UserPoolClient("client", {});
const domain = new aws.cognito.UserPoolDomain("domain", {});
const frontEndListener = new aws.lb.Listener("front_end", {
defaultActions: [
{
authenticateCognito: {
userPoolArn: pool.arn,
userPoolClientId: client.id,
userPoolDomain: domain.domain,
},
type: "authenticate-cognito",
},
{
targetGroupArn: frontEndTargetGroup.arn,
type: "forward",
},
],
loadBalancerArn: frontEndLoadBalancer.arn,
port: 80,
protocol: "HTTP",
});Authenticate-oidc Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
{
});
var frontEndTargetGroup = new Aws.LB.TargetGroup("frontEndTargetGroup", new Aws.LB.TargetGroupArgs
{
});
var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
{
DefaultActions =
{
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
AuthenticateOidc = new Aws.LB.Inputs.ListenerDefaultActionAuthenticateOidcArgs
{
AuthorizationEndpoint = "https://example.com/authorization_endpoint",
ClientId = "client_id",
ClientSecret = "client_secret",
Issuer = "https://example.com",
TokenEndpoint = "https://example.com/token_endpoint",
UserInfoEndpoint = "https://example.com/user_info_endpoint",
},
Type = "authenticate-oidc",
},
new Aws.LB.Inputs.ListenerDefaultActionArgs
{
TargetGroupArn = frontEndTargetGroup.Arn,
Type = "forward",
},
},
LoadBalancerArn = frontEndLoadBalancer.Arn,
Port = 80,
Protocol = "HTTP",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
frontEndLoadBalancer, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
if err != nil {
return err
}
frontEndTargetGroup, err := lb.NewTargetGroup(ctx, "frontEndTargetGroup", nil)
if err != nil {
return err
}
_, err = lb.NewListener(ctx, "frontEndListener", &lb.ListenerArgs{
DefaultActions: lb.ListenerDefaultActionArray{
&lb.ListenerDefaultActionArgs{
AuthenticateOidc: &lb.ListenerDefaultActionAuthenticateOidcArgs{
AuthorizationEndpoint: pulumi.String("https://example.com/authorization_endpoint"),
ClientId: pulumi.String("client_id"),
ClientSecret: pulumi.String("client_secret"),
Issuer: pulumi.String("https://example.com"),
TokenEndpoint: pulumi.String("https://example.com/token_endpoint"),
UserInfoEndpoint: pulumi.String("https://example.com/user_info_endpoint"),
},
Type: pulumi.String("authenticate-oidc"),
},
&lb.ListenerDefaultActionArgs{
TargetGroupArn: frontEndTargetGroup.Arn,
Type: pulumi.String("forward"),
},
},
LoadBalancerArn: frontEndLoadBalancer.Arn,
Port: pulumi.Int(80),
Protocol: pulumi.String("HTTP"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_target_group = aws.lb.TargetGroup("frontEndTargetGroup")
front_end_listener = aws.lb.Listener("frontEndListener",
default_actions=[
{
"authenticateOidc": {
"authorizationEndpoint": "https://example.com/authorization_endpoint",
"client_id": "client_id",
"client_secret": "client_secret",
"issuer": "https://example.com",
"tokenEndpoint": "https://example.com/token_endpoint",
"userInfoEndpoint": "https://example.com/user_info_endpoint",
},
"type": "authenticate-oidc",
},
{
"target_group_arn": front_end_target_group.arn,
"type": "forward",
},
],
load_balancer_arn=front_end_load_balancer.arn,
port="80",
protocol="HTTP")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndTargetGroup = new aws.lb.TargetGroup("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {
defaultActions: [
{
authenticateOidc: {
authorizationEndpoint: "https://example.com/authorization_endpoint",
clientId: "client_id",
clientSecret: "client_secret",
issuer: "https://example.com",
tokenEndpoint: "https://example.com/token_endpoint",
userInfoEndpoint: "https://example.com/user_info_endpoint",
},
type: "authenticate-oidc",
},
{
targetGroupArn: frontEndTargetGroup.arn,
type: "forward",
},
],
loadBalancerArn: frontEndLoadBalancer.arn,
port: 80,
protocol: "HTTP",
});Deprecated: aws.applicationloadbalancing.Listener has been deprecated in favor of aws.alb.Listener
Create a Listener Resource
new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);def Listener(resource_name, opts=None, certificate_arn=None, default_actions=None, load_balancer_arn=None, port=None, protocol=None, ssl_policy=None, __props__=None);func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Listener Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Listener resource accepts the following input properties:
- Default
Actions List<ListenerDefault Action Args> An Action block. Action blocks are documented below.
- Load
Balancer stringArn The ARN of the load balancer.
- Port int
The port on which the load balancer is listening.
- Certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- Protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- Ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- Default
Actions []ListenerDefault Action An Action block. Action blocks are documented below.
- Load
Balancer stringArn The ARN of the load balancer.
- Port int
The port on which the load balancer is listening.
- Certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- Protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- Ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- default
Actions ListenerDefault Action[] An Action block. Action blocks are documented below.
- load
Balancer stringArn The ARN of the load balancer.
- port number
The port on which the load balancer is listening.
- certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- default_
actions List[ListenerDefault Action] An Action block. Action blocks are documented below.
- load_
balancer_ strarn The ARN of the load balancer.
- port float
The port on which the load balancer is listening.
- certificate_
arn str The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- protocol str
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- ssl_
policy str The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
Outputs
All input properties are implicitly available as output properties. Additionally, the Listener resource produces the following output properties:
Look up an Existing Listener Resource
Get an existing Listener resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ListenerState, opts?: CustomResourceOptions): Listenerstatic get(resource_name, id, opts=None, arn=None, certificate_arn=None, default_actions=None, load_balancer_arn=None, port=None, protocol=None, ssl_policy=None, __props__=None);func GetListener(ctx *Context, name string, id IDInput, state *ListenerState, opts ...ResourceOption) (*Listener, error)public static Listener Get(string name, Input<string> id, ListenerState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
The Amazon Resource Name (ARN) of the target group.
- Certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- Default
Actions List<ListenerDefault Action Args> An Action block. Action blocks are documented below.
- Load
Balancer stringArn The ARN of the load balancer.
- Port int
The port on which the load balancer is listening.
- Protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- Ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- Arn string
The Amazon Resource Name (ARN) of the target group.
- Certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- Default
Actions []ListenerDefault Action An Action block. Action blocks are documented below.
- Load
Balancer stringArn The ARN of the load balancer.
- Port int
The port on which the load balancer is listening.
- Protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- Ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- arn string
The Amazon Resource Name (ARN) of the target group.
- certificate
Arn string The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- default
Actions ListenerDefault Action[] An Action block. Action blocks are documented below.
- load
Balancer stringArn The ARN of the load balancer.
- port number
The port on which the load balancer is listening.
- protocol string
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- ssl
Policy string The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
- arn str
The Amazon Resource Name (ARN) of the target group.
- certificate_
arn str The ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. For adding additional SSL certificates, see the
aws.lb.ListenerCertificateresource.- default_
actions List[ListenerDefault Action] An Action block. Action blocks are documented below.
- load_
balancer_ strarn The ARN of the load balancer.
- port float
The port on which the load balancer is listening.
- protocol str
The protocol for connections from clients to the load balancer. Valid values are
TCP,TLS,UDP,TCP_UDP,HTTPandHTTPS. Defaults toHTTP.- ssl_
policy str The name of the SSL Policy for the listener. Required if
protocolisHTTPSorTLS.
Supporting Types
ListenerDefaultAction
- Type string
The type of routing action. Valid values are
forward,redirect,fixed-response,authenticate-cognitoandauthenticate-oidc.- Authenticate
Cognito ListenerDefault Action Authenticate Cognito Args - Authenticate
Oidc ListenerDefault Action Authenticate Oidc Args - Fixed
Response ListenerDefault Action Fixed Response Args Information for creating an action that returns a custom HTTP response. Required if
typeisfixed-response.- Forward
Listener
Default Action Forward Args Information for creating an action that distributes requests among one or more target groups. Specify only if
typeisforward. If you specify bothforwardblock andtarget_group_arnattribute, you can specify only one target group usingforwardand it must be the same target group specified intarget_group_arn.- Order int
- Redirect
Listener
Default Action Redirect Args Information for creating a redirect action. Required if
typeisredirect.- Target
Group stringArn The ARN of the Target Group to which to route traffic. Specify only if
typeisforwardand you want to route to a single target group. To route to one or more target groups, use aforwardblock instead.
- Type string
The type of routing action. Valid values are
forward,redirect,fixed-response,authenticate-cognitoandauthenticate-oidc.- Authenticate
Cognito ListenerDefault Action Authenticate Cognito - Authenticate
Oidc ListenerDefault Action Authenticate Oidc - Fixed
Response ListenerDefault Action Fixed Response Information for creating an action that returns a custom HTTP response. Required if
typeisfixed-response.- Forward
Listener
Default Action Forward Information for creating an action that distributes requests among one or more target groups. Specify only if
typeisforward. If you specify bothforwardblock andtarget_group_arnattribute, you can specify only one target group usingforwardand it must be the same target group specified intarget_group_arn.- Order int
- Redirect
Listener
Default Action Redirect Information for creating a redirect action. Required if
typeisredirect.- Target
Group stringArn The ARN of the Target Group to which to route traffic. Specify only if
typeisforwardand you want to route to a single target group. To route to one or more target groups, use aforwardblock instead.
- type string
The type of routing action. Valid values are
forward,redirect,fixed-response,authenticate-cognitoandauthenticate-oidc.- authenticate
Cognito ListenerDefault Action Authenticate Cognito - authenticate
Oidc ListenerDefault Action Authenticate Oidc - fixed
Response ListenerDefault Action Fixed Response Information for creating an action that returns a custom HTTP response. Required if
typeisfixed-response.- forward
Listener
Default Action Forward Information for creating an action that distributes requests among one or more target groups. Specify only if
typeisforward. If you specify bothforwardblock andtarget_group_arnattribute, you can specify only one target group usingforwardand it must be the same target group specified intarget_group_arn.- order number
- redirect
Listener
Default Action Redirect Information for creating a redirect action. Required if
typeisredirect.- target
Group stringArn The ARN of the Target Group to which to route traffic. Specify only if
typeisforwardand you want to route to a single target group. To route to one or more target groups, use aforwardblock instead.
- type str
The type of routing action. Valid values are
forward,redirect,fixed-response,authenticate-cognitoandauthenticate-oidc.- authenticate
Cognito Dict[ListenerDefault Action Authenticate Cognito] - authenticate
Oidc Dict[ListenerDefault Action Authenticate Oidc] - fixed
Response Dict[ListenerDefault Action Fixed Response] Information for creating an action that returns a custom HTTP response. Required if
typeisfixed-response.- forward
Dict[Listener
Default Action Forward] Information for creating an action that distributes requests among one or more target groups. Specify only if
typeisforward. If you specify bothforwardblock andtarget_group_arnattribute, you can specify only one target group usingforwardand it must be the same target group specified intarget_group_arn.- order float
- redirect
Dict[Listener
Default Action Redirect] Information for creating a redirect action. Required if
typeisredirect.- target_
group_ strarn The ARN of the Target Group to which to route traffic. Specify only if
typeisforwardand you want to route to a single target group. To route to one or more target groups, use aforwardblock instead.
ListenerDefaultActionAuthenticateCognito
- User
Pool stringArn The ARN of the Cognito user pool.
- User
Pool stringClient Id The ID of the Cognito user pool client.
- User
Pool stringDomain The domain prefix or fully-qualified domain name of the Cognito user pool.
- Authentication
Request Dictionary<string, string>Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- On
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- Scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- Session
Timeout int The maximum duration of the authentication session, in seconds.
- User
Pool stringArn The ARN of the Cognito user pool.
- User
Pool stringClient Id The ID of the Cognito user pool client.
- User
Pool stringDomain The domain prefix or fully-qualified domain name of the Cognito user pool.
- Authentication
Request map[string]stringExtra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- On
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- Scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- Session
Timeout int The maximum duration of the authentication session, in seconds.
- user
Pool stringArn The ARN of the Cognito user pool.
- user
Pool stringClient Id The ID of the Cognito user pool client.
- user
Pool stringDomain The domain prefix or fully-qualified domain name of the Cognito user pool.
- authentication
Request {[key: string]: string}Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- on
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- session
Timeout number The maximum duration of the authentication session, in seconds.
- user
Pool strArn The ARN of the Cognito user pool.
- user
Pool strClient Id The ID of the Cognito user pool client.
- user
Pool strDomain The domain prefix or fully-qualified domain name of the Cognito user pool.
- authentication
Request Dict[str, str]Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- on
Unauthenticated strRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- scope str
The set of user claims to be requested from the IdP.
- str
The name of the cookie used to maintain session information.
- session
Timeout float The maximum duration of the authentication session, in seconds.
ListenerDefaultActionAuthenticateOidc
- string
The authorization endpoint of the IdP.
- Client
Id string The OAuth 2.0 client identifier.
- Client
Secret string The OAuth 2.0 client secret.
- Issuer string
The OIDC issuer identifier of the IdP.
- Token
Endpoint string The token endpoint of the IdP.
- User
Info stringEndpoint The user info endpoint of the IdP.
- Authentication
Request Dictionary<string, string>Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- On
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- Scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- Session
Timeout int The maximum duration of the authentication session, in seconds.
- string
The authorization endpoint of the IdP.
- Client
Id string The OAuth 2.0 client identifier.
- Client
Secret string The OAuth 2.0 client secret.
- Issuer string
The OIDC issuer identifier of the IdP.
- Token
Endpoint string The token endpoint of the IdP.
- User
Info stringEndpoint The user info endpoint of the IdP.
- Authentication
Request map[string]stringExtra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- On
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- Scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- Session
Timeout int The maximum duration of the authentication session, in seconds.
- string
The authorization endpoint of the IdP.
- client
Id string The OAuth 2.0 client identifier.
- client
Secret string The OAuth 2.0 client secret.
- issuer string
The OIDC issuer identifier of the IdP.
- token
Endpoint string The token endpoint of the IdP.
- user
Info stringEndpoint The user info endpoint of the IdP.
- authentication
Request {[key: string]: string}Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- on
Unauthenticated stringRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- scope string
The set of user claims to be requested from the IdP.
- string
The name of the cookie used to maintain session information.
- session
Timeout number The maximum duration of the authentication session, in seconds.
- str
The authorization endpoint of the IdP.
- client_
id str The OAuth 2.0 client identifier.
- client_
secret str The OAuth 2.0 client secret.
- issuer str
The OIDC issuer identifier of the IdP.
- token
Endpoint str The token endpoint of the IdP.
- user
Info strEndpoint The user info endpoint of the IdP.
- authentication
Request Dict[str, str]Extra Params The query parameters to include in the redirect request to the authorization endpoint. Max: 10.
- on
Unauthenticated strRequest The behavior if the user is not authenticated. Valid values:
deny,allowandauthenticate- scope str
The set of user claims to be requested from the IdP.
- str
The name of the cookie used to maintain session information.
- session
Timeout float The maximum duration of the authentication session, in seconds.
ListenerDefaultActionFixedResponse
- Content
Type string The content type. Valid values are
text/plain,text/css,text/html,application/javascriptandapplication/json.- Message
Body string The message body.
- Status
Code string The HTTP response code. Valid values are
2XX,4XX, or5XX.
- Content
Type string The content type. Valid values are
text/plain,text/css,text/html,application/javascriptandapplication/json.- Message
Body string The message body.
- Status
Code string The HTTP response code. Valid values are
2XX,4XX, or5XX.
- content
Type string The content type. Valid values are
text/plain,text/css,text/html,application/javascriptandapplication/json.- message
Body string The message body.
- status
Code string The HTTP response code. Valid values are
2XX,4XX, or5XX.
- content_
type str The content type. Valid values are
text/plain,text/css,text/html,application/javascriptandapplication/json.- message
Body str The message body.
- status_
code str The HTTP response code. Valid values are
2XX,4XX, or5XX.
ListenerDefaultActionForward
- Target
Groups List<ListenerDefault Action Forward Target Group Args> One or more target groups block.
- Stickiness
Listener
Default Action Forward Stickiness Args The target group stickiness for the rule.
- Target
Groups []ListenerDefault Action Forward Target Group One or more target groups block.
- Stickiness
Listener
Default Action Forward Stickiness The target group stickiness for the rule.
- target
Groups ListenerDefault Action Forward Target Group[] One or more target groups block.
- stickiness
Listener
Default Action Forward Stickiness The target group stickiness for the rule.
- target
Groups List[ListenerDefault Action Forward Target Group] One or more target groups block.
- stickiness
Dict[Listener
Default Action Forward Stickiness] The target group stickiness for the rule.
ListenerDefaultActionForwardStickiness
ListenerDefaultActionForwardTargetGroup
ListenerDefaultActionRedirect
- Status
Code string The HTTP redirect code. The redirect is either permanent (
HTTP_301) or temporary (HTTP_302).- Host string
The hostname. This component is not percent-encoded. The hostname can contain
#{host}. Defaults to#{host}.- Path string
The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to
/#{path}.- Port string
The port. Specify a value from
1to65535or#{port}. Defaults to#{port}.- Protocol string
The protocol. Valid values are
HTTP,HTTPS, or#{protocol}. Defaults to#{protocol}.- Query string
The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to
#{query}.
- Status
Code string The HTTP redirect code. The redirect is either permanent (
HTTP_301) or temporary (HTTP_302).- Host string
The hostname. This component is not percent-encoded. The hostname can contain
#{host}. Defaults to#{host}.- Path string
The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to
/#{path}.- Port string
The port. Specify a value from
1to65535or#{port}. Defaults to#{port}.- Protocol string
The protocol. Valid values are
HTTP,HTTPS, or#{protocol}. Defaults to#{protocol}.- Query string
The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to
#{query}.
- status
Code string The HTTP redirect code. The redirect is either permanent (
HTTP_301) or temporary (HTTP_302).- host string
The hostname. This component is not percent-encoded. The hostname can contain
#{host}. Defaults to#{host}.- path string
The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to
/#{path}.- port string
The port. Specify a value from
1to65535or#{port}. Defaults to#{port}.- protocol string
The protocol. Valid values are
HTTP,HTTPS, or#{protocol}. Defaults to#{protocol}.- query string
The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to
#{query}.
- status_
code str The HTTP redirect code. The redirect is either permanent (
HTTP_301) or temporary (HTTP_302).- host str
The hostname. This component is not percent-encoded. The hostname can contain
#{host}. Defaults to#{host}.- path str
The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to
/#{path}.- port str
The port. Specify a value from
1to65535or#{port}. Defaults to#{port}.- protocol str
The protocol. Valid values are
HTTP,HTTPS, or#{protocol}. Defaults to#{protocol}.- query str
The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to
#{query}.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.