1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. gwlb
  5. Listener
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.gwlb.Listener

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    LoadBalancerId string
    The ID of the gateway load balancer instance.
    ServerGroupId string
    The ID of the server group.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request.
    ListenerDescription 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 (-).

    Tags Dictionary<string, string>
    The list of tags.
    LoadBalancerId string
    The ID of the gateway load balancer instance.
    ServerGroupId string
    The ID of the server group.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request.
    ListenerDescription 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 (-).

    Tags map[string]string
    The list of tags.
    loadBalancerId String
    The ID of the gateway load balancer instance.
    serverGroupId String
    The ID of the server group.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    tags Map<String,String>
    The list of tags.
    loadBalancerId string
    The ID of the gateway load balancer instance.
    serverGroupId string
    The ID of the server group.
    dryRun boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    tags {[key: string]: string}
    The list of tags.
    load_balancer_id str
    The ID of the gateway load balancer instance.
    server_group_id str
    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 (-).

    tags Mapping[str, str]
    The list of tags.
    loadBalancerId String
    The ID of the gateway load balancer instance.
    serverGroupId String
    The ID of the server group.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    tags 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The ID of the region.
    Status string
    The current status of the listener. Value:
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The ID of the region.
    Status string
    The current status of the listener. Value:
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The ID of the region.
    status String
    The current status of the listener. Value:
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    The ID of the region.
    status string
    The current status of the listener. Value:
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    The ID of the region.
    status str
    The current status of the listener. Value:
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The ID of the region.
    status String
    The current status of the listener. Value:

    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.
    The following state arguments are supported:
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request.
    ListenerDescription 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 (-).

    LoadBalancerId string
    The ID of the gateway load balancer instance.
    RegionId string
    The ID of the region.
    ServerGroupId string
    The ID of the server group.
    Status string
    The current status of the listener. Value:
    Tags Dictionary<string, string>
    The list of tags.
    DryRun bool
    Specifies whether to perform only a dry run, without performing the actual request.
    ListenerDescription 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 (-).

    LoadBalancerId string
    The ID of the gateway load balancer instance.
    RegionId string
    The ID of the region.
    ServerGroupId string
    The ID of the server group.
    Status string
    The current status of the listener. Value:
    Tags map[string]string
    The list of tags.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    loadBalancerId String
    The ID of the gateway load balancer instance.
    regionId String
    The ID of the region.
    serverGroupId String
    The ID of the server group.
    status String
    The current status of the listener. Value:
    tags Map<String,String>
    The list of tags.
    dryRun boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    loadBalancerId string
    The ID of the gateway load balancer instance.
    regionId string
    The ID of the region.
    serverGroupId string
    The ID of the server group.
    status string
    The current status of the listener. Value:
    tags {[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_id str
    The ID of the gateway load balancer instance.
    region_id str
    The ID of the region.
    server_group_id str
    The ID of the server group.
    status str
    The current status of the listener. Value:
    tags Mapping[str, str]
    The list of tags.
    dryRun Boolean
    Specifies whether to perform only a dry run, without performing the actual request.
    listenerDescription 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 (-).

    loadBalancerId String
    The ID of the gateway load balancer instance.
    regionId String
    The ID of the region.
    serverGroupId String
    The ID of the server group.
    status String
    The current status of the listener. Value:
    tags 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi