volcengine.alb.Listener
Explore with Pulumi AI
Provides a resource to manage alb listener
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooAlb = new volcengine.alb.Alb("fooAlb", {
addressIpVersion: "IPv4",
type: "private",
loadBalancerName: "acc-test-alb-private",
description: "acc-test",
subnetIds: [fooSubnet.id],
projectName: "default",
deleteProtection: "off",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooServerGroup = new volcengine.alb.ServerGroup("fooServerGroup", {
vpcId: fooVpc.id,
serverGroupName: "acc-test-server-group",
description: "acc-test",
serverGroupType: "instance",
scheduler: "wlc",
projectName: "default",
healthCheck: {
enabled: "on",
interval: 3,
timeout: 3,
method: "GET",
},
stickySessionConfig: {
stickySessionEnabled: "on",
stickySessionType: "insert",
cookieTimeout: 1100,
},
});
const fooCertificate = new volcengine.alb.Certificate("fooCertificate", {
description: "tf-test",
publicKey: "public key",
privateKey: "private key",
});
const fooListener = new volcengine.alb.Listener("fooListener", {
loadBalancerId: fooAlb.id,
listenerName: "acc-test-listener",
protocol: "HTTPS",
port: 6666,
enabled: "off",
certificateSource: "alb",
certificateId: fooCertificate.id,
serverGroupId: fooServerGroup.id,
description: "acc test listener",
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_alb = volcengine.alb.Alb("fooAlb",
address_ip_version="IPv4",
type="private",
load_balancer_name="acc-test-alb-private",
description="acc-test",
subnet_ids=[foo_subnet.id],
project_name="default",
delete_protection="off",
tags=[volcengine.alb.AlbTagArgs(
key="k1",
value="v1",
)])
foo_server_group = volcengine.alb.ServerGroup("fooServerGroup",
vpc_id=foo_vpc.id,
server_group_name="acc-test-server-group",
description="acc-test",
server_group_type="instance",
scheduler="wlc",
project_name="default",
health_check=volcengine.alb.ServerGroupHealthCheckArgs(
enabled="on",
interval=3,
timeout=3,
method="GET",
),
sticky_session_config=volcengine.alb.ServerGroupStickySessionConfigArgs(
sticky_session_enabled="on",
sticky_session_type="insert",
cookie_timeout=1100,
))
foo_certificate = volcengine.alb.Certificate("fooCertificate",
description="tf-test",
public_key="public key",
private_key="private key")
foo_listener = volcengine.alb.Listener("fooListener",
load_balancer_id=foo_alb.id,
listener_name="acc-test-listener",
protocol="HTTPS",
port=6666,
enabled="off",
certificate_source="alb",
certificate_id=foo_certificate.id,
server_group_id=foo_server_group.id,
description="acc test listener")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/alb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooAlb, err := alb.NewAlb(ctx, "fooAlb", &alb.AlbArgs{
AddressIpVersion: pulumi.String("IPv4"),
Type: pulumi.String("private"),
LoadBalancerName: pulumi.String("acc-test-alb-private"),
Description: pulumi.String("acc-test"),
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
ProjectName: pulumi.String("default"),
DeleteProtection: pulumi.String("off"),
Tags: alb.AlbTagArray{
&alb.AlbTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
fooServerGroup, err := alb.NewServerGroup(ctx, "fooServerGroup", &alb.ServerGroupArgs{
VpcId: fooVpc.ID(),
ServerGroupName: pulumi.String("acc-test-server-group"),
Description: pulumi.String("acc-test"),
ServerGroupType: pulumi.String("instance"),
Scheduler: pulumi.String("wlc"),
ProjectName: pulumi.String("default"),
HealthCheck: &alb.ServerGroupHealthCheckArgs{
Enabled: pulumi.String("on"),
Interval: pulumi.Int(3),
Timeout: pulumi.Int(3),
Method: pulumi.String("GET"),
},
StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
StickySessionEnabled: pulumi.String("on"),
StickySessionType: pulumi.String("insert"),
CookieTimeout: pulumi.Int(1100),
},
})
if err != nil {
return err
}
fooCertificate, err := alb.NewCertificate(ctx, "fooCertificate", &alb.CertificateArgs{
Description: pulumi.String("tf-test"),
PublicKey: pulumi.String("public key"),
PrivateKey: pulumi.String("private key"),
})
if err != nil {
return err
}
_, err = alb.NewListener(ctx, "fooListener", &alb.ListenerArgs{
LoadBalancerId: fooAlb.ID(),
ListenerName: pulumi.String("acc-test-listener"),
Protocol: pulumi.String("HTTPS"),
Port: pulumi.Int(6666),
Enabled: pulumi.String("off"),
CertificateSource: pulumi.String("alb"),
CertificateId: fooCertificate.ID(),
ServerGroupId: fooServerGroup.ID(),
Description: pulumi.String("acc test listener"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooAlb = new Volcengine.Alb.Alb("fooAlb", new()
{
AddressIpVersion = "IPv4",
Type = "private",
LoadBalancerName = "acc-test-alb-private",
Description = "acc-test",
SubnetIds = new[]
{
fooSubnet.Id,
},
ProjectName = "default",
DeleteProtection = "off",
Tags = new[]
{
new Volcengine.Alb.Inputs.AlbTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooServerGroup = new Volcengine.Alb.ServerGroup("fooServerGroup", new()
{
VpcId = fooVpc.Id,
ServerGroupName = "acc-test-server-group",
Description = "acc-test",
ServerGroupType = "instance",
Scheduler = "wlc",
ProjectName = "default",
HealthCheck = new Volcengine.Alb.Inputs.ServerGroupHealthCheckArgs
{
Enabled = "on",
Interval = 3,
Timeout = 3,
Method = "GET",
},
StickySessionConfig = new Volcengine.Alb.Inputs.ServerGroupStickySessionConfigArgs
{
StickySessionEnabled = "on",
StickySessionType = "insert",
CookieTimeout = 1100,
},
});
var fooCertificate = new Volcengine.Alb.Certificate("fooCertificate", new()
{
Description = "tf-test",
PublicKey = "public key",
PrivateKey = "private key",
});
var fooListener = new Volcengine.Alb.Listener("fooListener", new()
{
LoadBalancerId = fooAlb.Id,
ListenerName = "acc-test-listener",
Protocol = "HTTPS",
Port = 6666,
Enabled = "off",
CertificateSource = "alb",
CertificateId = fooCertificate.Id,
ServerGroupId = fooServerGroup.Id,
Description = "acc test listener",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.alb.Alb;
import com.pulumi.volcengine.alb.AlbArgs;
import com.pulumi.volcengine.alb.inputs.AlbTagArgs;
import com.pulumi.volcengine.alb.ServerGroup;
import com.pulumi.volcengine.alb.ServerGroupArgs;
import com.pulumi.volcengine.alb.inputs.ServerGroupHealthCheckArgs;
import com.pulumi.volcengine.alb.inputs.ServerGroupStickySessionConfigArgs;
import com.pulumi.volcengine.alb.Certificate;
import com.pulumi.volcengine.alb.CertificateArgs;
import com.pulumi.volcengine.alb.Listener;
import com.pulumi.volcengine.alb.ListenerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooAlb = new Alb("fooAlb", AlbArgs.builder()
.addressIpVersion("IPv4")
.type("private")
.loadBalancerName("acc-test-alb-private")
.description("acc-test")
.subnetIds(fooSubnet.id())
.projectName("default")
.deleteProtection("off")
.tags(AlbTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooServerGroup = new ServerGroup("fooServerGroup", ServerGroupArgs.builder()
.vpcId(fooVpc.id())
.serverGroupName("acc-test-server-group")
.description("acc-test")
.serverGroupType("instance")
.scheduler("wlc")
.projectName("default")
.healthCheck(ServerGroupHealthCheckArgs.builder()
.enabled("on")
.interval(3)
.timeout(3)
.method("GET")
.build())
.stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
.stickySessionEnabled("on")
.stickySessionType("insert")
.cookieTimeout("1100")
.build())
.build());
var fooCertificate = new Certificate("fooCertificate", CertificateArgs.builder()
.description("tf-test")
.publicKey("public key")
.privateKey("private key")
.build());
var fooListener = new Listener("fooListener", ListenerArgs.builder()
.loadBalancerId(fooAlb.id())
.listenerName("acc-test-listener")
.protocol("HTTPS")
.port(6666)
.enabled("off")
.certificateSource("alb")
.certificateId(fooCertificate.id())
.serverGroupId(fooServerGroup.id())
.description("acc test listener")
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooAlb:
type: volcengine:alb:Alb
properties:
addressIpVersion: IPv4
type: private
loadBalancerName: acc-test-alb-private
description: acc-test
subnetIds:
- ${fooSubnet.id}
projectName: default
deleteProtection: off
tags:
- key: k1
value: v1
fooServerGroup:
type: volcengine:alb:ServerGroup
properties:
vpcId: ${fooVpc.id}
serverGroupName: acc-test-server-group
description: acc-test
serverGroupType: instance
scheduler: wlc
projectName: default
healthCheck:
enabled: on
interval: 3
timeout: 3
method: GET
stickySessionConfig:
stickySessionEnabled: on
stickySessionType: insert
cookieTimeout: '1100'
fooCertificate:
type: volcengine:alb:Certificate
properties:
description: tf-test
publicKey: public key
privateKey: private key
fooListener:
type: volcengine:alb:Listener
properties:
loadBalancerId: ${fooAlb.id}
listenerName: acc-test-listener
protocol: HTTPS
port: 6666
enabled: off
certificateSource: alb
# cert_center_certificate_id = "cert-***"
certificateId: ${fooCertificate.id}
serverGroupId: ${fooServerGroup.id}
description: acc test listener
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create Listener Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);
@overload
def Listener(resource_name: str,
args: ListenerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Listener(resource_name: str,
opts: Optional[ResourceOptions] = None,
load_balancer_id: Optional[str] = None,
server_group_id: Optional[str] = None,
protocol: Optional[str] = None,
port: Optional[int] = None,
description: Optional[str] = None,
certificate_id: Optional[str] = None,
certificate_source: Optional[str] = None,
customized_cfg_id: Optional[str] = None,
acl_ids: Optional[Sequence[str]] = None,
enable_http2: Optional[str] = None,
enable_quic: Optional[str] = None,
enabled: Optional[str] = None,
listener_name: Optional[str] = None,
cert_center_certificate_id: Optional[str] = None,
ca_certificate_id: Optional[str] = None,
acl_type: Optional[str] = None,
acl_status: Optional[str] = None)
func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)
public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)
public Listener(String name, ListenerArgs args)
public Listener(String name, ListenerArgs args, CustomResourceOptions options)
type: volcengine:alb:Listener
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 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.
- args ListenerArgs
- 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 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.
- name String
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var listenerResource = new Volcengine.Alb.Listener("listenerResource", new()
{
LoadBalancerId = "string",
ServerGroupId = "string",
Protocol = "string",
Port = 0,
Description = "string",
CertificateId = "string",
CertificateSource = "string",
CustomizedCfgId = "string",
AclIds = new[]
{
"string",
},
EnableHttp2 = "string",
EnableQuic = "string",
Enabled = "string",
ListenerName = "string",
CertCenterCertificateId = "string",
CaCertificateId = "string",
AclType = "string",
AclStatus = "string",
});
example, err := alb.NewListener(ctx, "listenerResource", &alb.ListenerArgs{
LoadBalancerId: pulumi.String("string"),
ServerGroupId: pulumi.String("string"),
Protocol: pulumi.String("string"),
Port: pulumi.Int(0),
Description: pulumi.String("string"),
CertificateId: pulumi.String("string"),
CertificateSource: pulumi.String("string"),
CustomizedCfgId: pulumi.String("string"),
AclIds: pulumi.StringArray{
pulumi.String("string"),
},
EnableHttp2: pulumi.String("string"),
EnableQuic: pulumi.String("string"),
Enabled: pulumi.String("string"),
ListenerName: pulumi.String("string"),
CertCenterCertificateId: pulumi.String("string"),
CaCertificateId: pulumi.String("string"),
AclType: pulumi.String("string"),
AclStatus: pulumi.String("string"),
})
var listenerResource = new com.pulumi.volcengine.alb.Listener("listenerResource", com.pulumi.volcengine.alb.ListenerArgs.builder()
.loadBalancerId("string")
.serverGroupId("string")
.protocol("string")
.port(0)
.description("string")
.certificateId("string")
.certificateSource("string")
.customizedCfgId("string")
.aclIds("string")
.enableHttp2("string")
.enableQuic("string")
.enabled("string")
.listenerName("string")
.certCenterCertificateId("string")
.caCertificateId("string")
.aclType("string")
.aclStatus("string")
.build());
listener_resource = volcengine.alb.Listener("listenerResource",
load_balancer_id="string",
server_group_id="string",
protocol="string",
port=0,
description="string",
certificate_id="string",
certificate_source="string",
customized_cfg_id="string",
acl_ids=["string"],
enable_http2="string",
enable_quic="string",
enabled="string",
listener_name="string",
cert_center_certificate_id="string",
ca_certificate_id="string",
acl_type="string",
acl_status="string")
const listenerResource = new volcengine.alb.Listener("listenerResource", {
loadBalancerId: "string",
serverGroupId: "string",
protocol: "string",
port: 0,
description: "string",
certificateId: "string",
certificateSource: "string",
customizedCfgId: "string",
aclIds: ["string"],
enableHttp2: "string",
enableQuic: "string",
enabled: "string",
listenerName: "string",
certCenterCertificateId: "string",
caCertificateId: "string",
aclType: "string",
aclStatus: "string",
});
type: volcengine:alb:Listener
properties:
aclIds:
- string
aclStatus: string
aclType: string
caCertificateId: string
certCenterCertificateId: string
certificateId: string
certificateSource: string
customizedCfgId: string
description: string
enableHttp2: string
enableQuic: string
enabled: string
listenerName: string
loadBalancerId: string
port: 0
protocol: string
serverGroupId: string
Listener Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Listener resource accepts the following input properties:
- Load
Balancer stringId - The Id of the load balancer.
- Port int
- The port receiving request of the Listener, the value range in 1~65535.
- Protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - Server
Group stringId - The server group id associated with the listener.
- Acl
Ids List<string> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- Acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - Acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - Ca
Certificate stringId - The CA certificate id associated with the listener.
- Cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - Certificate
Id string - The certificate id associated with the listener. Source is
alb
. - Certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - Customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- Description string
- The description of the Listener.
- Enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - Enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - Enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - Listener
Name string - The name of the Listener.
- Load
Balancer stringId - The Id of the load balancer.
- Port int
- The port receiving request of the Listener, the value range in 1~65535.
- Protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - Server
Group stringId - The server group id associated with the listener.
- Acl
Ids []string - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- Acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - Acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - Ca
Certificate stringId - The CA certificate id associated with the listener.
- Cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - Certificate
Id string - The certificate id associated with the listener. Source is
alb
. - Certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - Customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- Description string
- The description of the Listener.
- Enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - Enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - Enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - Listener
Name string - The name of the Listener.
- load
Balancer StringId - The Id of the load balancer.
- port Integer
- The port receiving request of the Listener, the value range in 1~65535.
- protocol String
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group StringId - The server group id associated with the listener.
- acl
Ids List<String> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status String - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type String - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate StringId - The CA certificate id associated with the listener.
- cert
Center StringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id String - The certificate id associated with the listener. Source is
alb
. - certificate
Source String - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg StringId - Personalized configuration ID, with a value of " " when not bound.
- description String
- The description of the Listener.
- enable
Http2 String - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic String - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled String
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Name String - The name of the Listener.
- load
Balancer stringId - The Id of the load balancer.
- port number
- The port receiving request of the Listener, the value range in 1~65535.
- protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group stringId - The server group id associated with the listener.
- acl
Ids string[] - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate stringId - The CA certificate id associated with the listener.
- cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id string - The certificate id associated with the listener. Source is
alb
. - certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- description string
- The description of the Listener.
- enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Name string - The name of the Listener.
- load_
balancer_ strid - The Id of the load balancer.
- port int
- The port receiving request of the Listener, the value range in 1~65535.
- protocol str
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server_
group_ strid - The server group id associated with the listener.
- acl_
ids Sequence[str] - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl_
status str - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl_
type str - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca_
certificate_ strid - The CA certificate id associated with the listener.
- cert_
center_ strcertificate_ id - The certificate id associated with the listener. Source is
cert_center
. - certificate_
id str - The certificate id associated with the listener. Source is
alb
. - certificate_
source str - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized_
cfg_ strid - Personalized configuration ID, with a value of " " when not bound.
- description str
- The description of the Listener.
- enable_
http2 str - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable_
quic str - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled str
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener_
name str - The name of the Listener.
- load
Balancer StringId - The Id of the load balancer.
- port Number
- The port receiving request of the Listener, the value range in 1~65535.
- protocol String
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group StringId - The server group id associated with the listener.
- acl
Ids List<String> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status String - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type String - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate StringId - The CA certificate id associated with the listener.
- cert
Center StringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id String - The certificate id associated with the listener. Source is
alb
. - certificate
Source String - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg StringId - Personalized configuration ID, with a value of " " when not bound.
- description String
- The description of the Listener.
- enable
Http2 String - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic String - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled String
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Name String - The name of the Listener.
Outputs
All input properties are implicitly available as output properties. Additionally, the Listener resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Id string - The ID of the Listener.
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Id string - The ID of the Listener.
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Id String - The ID of the Listener.
- id string
- The provider-assigned unique ID for this managed resource.
- listener
Id string - The ID of the Listener.
- id str
- The provider-assigned unique ID for this managed resource.
- listener_
id str - The ID of the Listener.
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Id String - The ID of the Listener.
Look up 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): Listener
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl_ids: Optional[Sequence[str]] = None,
acl_status: Optional[str] = None,
acl_type: Optional[str] = None,
ca_certificate_id: Optional[str] = None,
cert_center_certificate_id: Optional[str] = None,
certificate_id: Optional[str] = None,
certificate_source: Optional[str] = None,
customized_cfg_id: Optional[str] = None,
description: Optional[str] = None,
enable_http2: Optional[str] = None,
enable_quic: Optional[str] = None,
enabled: Optional[str] = None,
listener_id: Optional[str] = None,
listener_name: Optional[str] = None,
load_balancer_id: Optional[str] = None,
port: Optional[int] = None,
protocol: Optional[str] = None,
server_group_id: Optional[str] = None) -> Listener
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)
public static Listener get(String name, Output<String> id, ListenerState state, CustomResourceOptions options)
resources: _: type: volcengine:alb:Listener get: id: ${id}
- 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.
- 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.
- Acl
Ids List<string> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- Acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - Acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - Ca
Certificate stringId - The CA certificate id associated with the listener.
- Cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - Certificate
Id string - The certificate id associated with the listener. Source is
alb
. - Certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - Customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- Description string
- The description of the Listener.
- Enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - Enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - Enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - Listener
Id string - The ID of the Listener.
- Listener
Name string - The name of the Listener.
- Load
Balancer stringId - The Id of the load balancer.
- Port int
- The port receiving request of the Listener, the value range in 1~65535.
- Protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - Server
Group stringId - The server group id associated with the listener.
- Acl
Ids []string - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- Acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - Acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - Ca
Certificate stringId - The CA certificate id associated with the listener.
- Cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - Certificate
Id string - The certificate id associated with the listener. Source is
alb
. - Certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - Customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- Description string
- The description of the Listener.
- Enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - Enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - Enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - Listener
Id string - The ID of the Listener.
- Listener
Name string - The name of the Listener.
- Load
Balancer stringId - The Id of the load balancer.
- Port int
- The port receiving request of the Listener, the value range in 1~65535.
- Protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - Server
Group stringId - The server group id associated with the listener.
- acl
Ids List<String> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status String - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type String - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate StringId - The CA certificate id associated with the listener.
- cert
Center StringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id String - The certificate id associated with the listener. Source is
alb
. - certificate
Source String - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg StringId - Personalized configuration ID, with a value of " " when not bound.
- description String
- The description of the Listener.
- enable
Http2 String - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic String - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled String
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Id String - The ID of the Listener.
- listener
Name String - The name of the Listener.
- load
Balancer StringId - The Id of the load balancer.
- port Integer
- The port receiving request of the Listener, the value range in 1~65535.
- protocol String
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group StringId - The server group id associated with the listener.
- acl
Ids string[] - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status string - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type string - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate stringId - The CA certificate id associated with the listener.
- cert
Center stringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id string - The certificate id associated with the listener. Source is
alb
. - certificate
Source string - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg stringId - Personalized configuration ID, with a value of " " when not bound.
- description string
- The description of the Listener.
- enable
Http2 string - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic string - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled string
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Id string - The ID of the Listener.
- listener
Name string - The name of the Listener.
- load
Balancer stringId - The Id of the load balancer.
- port number
- The port receiving request of the Listener, the value range in 1~65535.
- protocol string
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group stringId - The server group id associated with the listener.
- acl_
ids Sequence[str] - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl_
status str - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl_
type str - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca_
certificate_ strid - The CA certificate id associated with the listener.
- cert_
center_ strcertificate_ id - The certificate id associated with the listener. Source is
cert_center
. - certificate_
id str - The certificate id associated with the listener. Source is
alb
. - certificate_
source str - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized_
cfg_ strid - Personalized configuration ID, with a value of " " when not bound.
- description str
- The description of the Listener.
- enable_
http2 str - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable_
quic str - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled str
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener_
id str - The ID of the Listener.
- listener_
name str - The name of the Listener.
- load_
balancer_ strid - The Id of the load balancer.
- port int
- The port receiving request of the Listener, the value range in 1~65535.
- protocol str
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server_
group_ strid - The server group id associated with the listener.
- acl
Ids List<String> - The id list of the Acl. When the AclStatus parameter is configured as on, AclType and AclIds.N are required.
- acl
Status String - The enable status of Acl. Optional choice contains
on
,off
. Default isoff
. - acl
Type String - The type of the Acl. Optional choice contains
white
,black
. When the AclStatus parameter is configured as on, AclType and AclIds.N are required. - ca
Certificate StringId - The CA certificate id associated with the listener.
- cert
Center StringCertificate Id - The certificate id associated with the listener. Source is
cert_center
. - certificate
Id String - The certificate id associated with the listener. Source is
alb
. - certificate
Source String - The source of the certificate. Valid values:
alb
,cert_center
. Default isalb
. - customized
Cfg StringId - Personalized configuration ID, with a value of " " when not bound.
- description String
- The description of the Listener.
- enable
Http2 String - The HTTP2 feature switch,valid value is on or off. Default is
off
. - enable
Quic String - The QUIC feature switch,valid value is on or off. Default is
off
. - enabled String
- The enable status of the Listener. Optional choice contains
on
,off
. Default ison
. - listener
Id String - The ID of the Listener.
- listener
Name String - The name of the Listener.
- load
Balancer StringId - The Id of the load balancer.
- port Number
- The port receiving request of the Listener, the value range in 1~65535.
- protocol String
- The protocol of the Listener. Optional choice contains
HTTP
,HTTPS
. - server
Group StringId - The server group id associated with the listener.
Import
AlbListener can be imported using the id, e.g.
$ pulumi import volcengine:alb/listener:Listener default lsn-273yv0mhs5xj47fap8sehiiso
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.