alicloud.gwlb.Listener
Explore with Pulumi AI
Provides a GWLB Listener resource.
For information about GWLB Listener and how to use it, see What is Listener.
NOTE: Available since v1.234.0.
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,
dry_run: Optional[bool] = None,
listener_description: Optional[str] = None,
tags: Optional[Mapping[str, 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: alicloud:gwlb: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 examplelistenerResourceResourceFromGwlblistener = new AliCloud.Gwlb.Listener("examplelistenerResourceResourceFromGwlblistener", new()
{
LoadBalancerId = "string",
ServerGroupId = "string",
DryRun = false,
ListenerDescription = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := gwlb.NewListener(ctx, "examplelistenerResourceResourceFromGwlblistener", &gwlb.ListenerArgs{
LoadBalancerId: pulumi.String("string"),
ServerGroupId: pulumi.String("string"),
DryRun: pulumi.Bool(false),
ListenerDescription: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var examplelistenerResourceResourceFromGwlblistener = new Listener("examplelistenerResourceResourceFromGwlblistener", ListenerArgs.builder()
.loadBalancerId("string")
.serverGroupId("string")
.dryRun(false)
.listenerDescription("string")
.tags(Map.of("string", "string"))
.build());
examplelistener_resource_resource_from_gwlblistener = alicloud.gwlb.Listener("examplelistenerResourceResourceFromGwlblistener",
load_balancer_id="string",
server_group_id="string",
dry_run=False,
listener_description="string",
tags={
"string": "string",
})
const examplelistenerResourceResourceFromGwlblistener = new alicloud.gwlb.Listener("examplelistenerResourceResourceFromGwlblistener", {
loadBalancerId: "string",
serverGroupId: "string",
dryRun: false,
listenerDescription: "string",
tags: {
string: "string",
},
});
type: alicloud:gwlb:Listener
properties:
dryRun: false
listenerDescription: string
loadBalancerId: string
serverGroupId: string
tags:
string: 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 gateway load balancer instance.
- Server
Group stringId - The ID of the server group.
- Dry
Run bool - Specifies whether to perform only a dry run, without performing the actual request.
- Listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Dictionary<string, string>
- The list of tags.
- Load
Balancer stringId - The ID of the gateway load balancer instance.
- Server
Group stringId - The ID of the server group.
- Dry
Run bool - Specifies whether to perform only a dry run, without performing the actual request.
- Listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- map[string]string
- The list of tags.
- load
Balancer StringId - The ID of the gateway load balancer instance.
- server
Group StringId - The ID of the server group.
- dry
Run Boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description String The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Map<String,String>
- The list of tags.
- load
Balancer stringId - The ID of the gateway load balancer instance.
- server
Group stringId - The ID of the server group.
- dry
Run boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- {[key: string]: string}
- The list of tags.
- load_
balancer_ strid - The ID of the gateway load balancer instance.
- server_
group_ strid - The ID of the server group.
- dry_
run bool - Specifies whether to perform only a dry run, without performing the actual request.
- listener_
description str The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Mapping[str, str]
- The list of tags.
- load
Balancer StringId - The ID of the gateway load balancer instance.
- server
Group StringId - The ID of the server group.
- dry
Run Boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description String The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Map<String>
- The list of tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Listener resource produces the following output properties:
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,
dry_run: Optional[bool] = None,
listener_description: Optional[str] = None,
load_balancer_id: Optional[str] = None,
region_id: Optional[str] = None,
server_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, 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)
Resource lookup is not supported in YAML
- 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.
- Dry
Run bool - Specifies whether to perform only a dry run, without performing the actual request.
- Listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Load
Balancer stringId - The ID of the gateway load balancer instance.
- Region
Id string - The ID of the region.
- Server
Group stringId - The ID of the server group.
- Status string
- The current status of the listener. Value:
- Dictionary<string, string>
- The list of tags.
- Dry
Run bool - Specifies whether to perform only a dry run, without performing the actual request.
- Listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Load
Balancer stringId - The ID of the gateway load balancer instance.
- Region
Id string - The ID of the region.
- Server
Group stringId - The ID of the server group.
- Status string
- The current status of the listener. Value:
- map[string]string
- The list of tags.
- dry
Run Boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description String The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- load
Balancer StringId - The ID of the gateway load balancer instance.
- region
Id String - The ID of the region.
- server
Group StringId - The ID of the server group.
- status String
- The current status of the listener. Value:
- Map<String,String>
- The list of tags.
- dry
Run boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description string The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- load
Balancer stringId - The ID of the gateway load balancer instance.
- region
Id string - The ID of the region.
- server
Group stringId - The ID of the server group.
- status string
- The current status of the listener. Value:
- {[key: string]: string}
- The list of tags.
- dry_
run bool - Specifies whether to perform only a dry run, without performing the actual request.
- listener_
description str The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- load_
balancer_ strid - The ID of the gateway load balancer instance.
- region_
id str - The ID of the region.
- server_
group_ strid - The ID of the server group.
- status str
- The current status of the listener. Value:
- Mapping[str, str]
- The list of tags.
- dry
Run Boolean - Specifies whether to perform only a dry run, without performing the actual request.
- listener
Description String The custom listener description.
The length is limited to 2 to 256 characters. It supports Chinese and English letters and can contain numbers, half-width commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- load
Balancer StringId - The ID of the gateway load balancer instance.
- region
Id String - The ID of the region.
- server
Group StringId - The ID of the server group.
- status String
- The current status of the listener. Value:
- Map<String>
- The list of tags.
Import
GWLB Listener can be imported using the id, e.g.
$ pulumi import alicloud:gwlb/listener:Listener example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.