Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.NetworkLoadBalancer.getListeners
Explore with Pulumi AI
This data source provides the list of Listeners in Oracle Cloud Infrastructure Network Load Balancer service.
Lists all listeners associated with a given network load balancer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testListeners = oci.NetworkLoadBalancer.getListeners({
networkLoadBalancerId: testNetworkLoadBalancer.id,
});
import pulumi
import pulumi_oci as oci
test_listeners = oci.NetworkLoadBalancer.get_listeners(network_load_balancer_id=test_network_load_balancer["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/NetworkLoadBalancer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := NetworkLoadBalancer.GetListeners(ctx, &networkloadbalancer.GetListenersArgs{
NetworkLoadBalancerId: testNetworkLoadBalancer.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testListeners = Oci.NetworkLoadBalancer.GetListeners.Invoke(new()
{
NetworkLoadBalancerId = testNetworkLoadBalancer.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.NetworkLoadBalancer.NetworkLoadBalancerFunctions;
import com.pulumi.oci.NetworkLoadBalancer.inputs.GetListenersArgs;
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 testListeners = NetworkLoadBalancerFunctions.getListeners(GetListenersArgs.builder()
.networkLoadBalancerId(testNetworkLoadBalancer.id())
.build());
}
}
variables:
testListeners:
fn::invoke:
Function: oci:NetworkLoadBalancer:getListeners
Arguments:
networkLoadBalancerId: ${testNetworkLoadBalancer.id}
Using getListeners
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getListeners(args: GetListenersArgs, opts?: InvokeOptions): Promise<GetListenersResult>
function getListenersOutput(args: GetListenersOutputArgs, opts?: InvokeOptions): Output<GetListenersResult>
def get_listeners(filters: Optional[Sequence[_networkloadbalancer.GetListenersFilter]] = None,
network_load_balancer_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetListenersResult
def get_listeners_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_networkloadbalancer.GetListenersFilterArgs]]]] = None,
network_load_balancer_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetListenersResult]
func GetListeners(ctx *Context, args *GetListenersArgs, opts ...InvokeOption) (*GetListenersResult, error)
func GetListenersOutput(ctx *Context, args *GetListenersOutputArgs, opts ...InvokeOption) GetListenersResultOutput
> Note: This function is named GetListeners
in the Go SDK.
public static class GetListeners
{
public static Task<GetListenersResult> InvokeAsync(GetListenersArgs args, InvokeOptions? opts = null)
public static Output<GetListenersResult> Invoke(GetListenersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetListenersResult> getListeners(GetListenersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:NetworkLoadBalancer/getListeners:getListeners
arguments:
# arguments dictionary
The following arguments are supported:
- Network
Load stringBalancer Id - The OCID of the network load balancer to update.
- Filters
List<Get
Listeners Filter>
- Network
Load stringBalancer Id - The OCID of the network load balancer to update.
- Filters
[]Get
Listeners Filter
- network
Load StringBalancer Id - The OCID of the network load balancer to update.
- filters
List<Get
Listeners Filter>
- network
Load stringBalancer Id - The OCID of the network load balancer to update.
- filters
Get
Listeners Filter[]
- network_
load_ strbalancer_ id - The OCID of the network load balancer to update.
- filters
Sequence[networkloadbalancer.
Get Listeners Filter]
- network
Load StringBalancer Id - The OCID of the network load balancer to update.
- filters List<Property Map>
getListeners Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Collections List<GetListeners Listener Collection> - The list of listener_collection.
- Network
Load stringBalancer Id - Filters
List<Get
Listeners Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Collections []GetListeners Listener Collection - The list of listener_collection.
- Network
Load stringBalancer Id - Filters
[]Get
Listeners Filter
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Collections List<GetListeners Listener Collection> - The list of listener_collection.
- network
Load StringBalancer Id - filters
List<Get
Listeners Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- listener
Collections GetListeners Listener Collection[] - The list of listener_collection.
- network
Load stringBalancer Id - filters
Get
Listeners Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- listener_
collections Sequence[networkloadbalancer.Get Listeners Listener Collection] - The list of listener_collection.
- network_
load_ strbalancer_ id - filters
Sequence[networkloadbalancer.
Get Listeners Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Collections List<Property Map> - The list of listener_collection.
- network
Load StringBalancer Id - filters List<Property Map>
Supporting Types
GetListenersFilter
GetListenersListenerCollection
GetListenersListenerCollectionItem
- Default
Backend stringSet Name - The name of the associated backend set. Example:
example_backend_set
- Id string
- Ip
Version string - IP version associated with the listener.
- Is
Ppv2enabled bool - Property to enable/disable PPv2 feature for this listener.
- L3ip
Idle intTimeout - The duration for L3IP idle timeout in seconds. Example:
200
- Name string
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- Network
Load stringBalancer Id - The OCID of the network load balancer to update.
- Port int
- The communication port for the listener. Example:
80
- Protocol string
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- Tcp
Idle intTimeout - The duration for TCP idle timeout in seconds. Example:
300
- Udp
Idle intTimeout - The duration for UDP idle timeout in seconds. Example:
120
- Default
Backend stringSet Name - The name of the associated backend set. Example:
example_backend_set
- Id string
- Ip
Version string - IP version associated with the listener.
- Is
Ppv2enabled bool - Property to enable/disable PPv2 feature for this listener.
- L3ip
Idle intTimeout - The duration for L3IP idle timeout in seconds. Example:
200
- Name string
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- Network
Load stringBalancer Id - The OCID of the network load balancer to update.
- Port int
- The communication port for the listener. Example:
80
- Protocol string
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- Tcp
Idle intTimeout - The duration for TCP idle timeout in seconds. Example:
300
- Udp
Idle intTimeout - The duration for UDP idle timeout in seconds. Example:
120
- default
Backend StringSet Name - The name of the associated backend set. Example:
example_backend_set
- id String
- ip
Version String - IP version associated with the listener.
- is
Ppv2enabled Boolean - Property to enable/disable PPv2 feature for this listener.
- l3ip
Idle IntegerTimeout - The duration for L3IP idle timeout in seconds. Example:
200
- name String
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- network
Load StringBalancer Id - The OCID of the network load balancer to update.
- port Integer
- The communication port for the listener. Example:
80
- protocol String
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- tcp
Idle IntegerTimeout - The duration for TCP idle timeout in seconds. Example:
300
- udp
Idle IntegerTimeout - The duration for UDP idle timeout in seconds. Example:
120
- default
Backend stringSet Name - The name of the associated backend set. Example:
example_backend_set
- id string
- ip
Version string - IP version associated with the listener.
- is
Ppv2enabled boolean - Property to enable/disable PPv2 feature for this listener.
- l3ip
Idle numberTimeout - The duration for L3IP idle timeout in seconds. Example:
200
- name string
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- network
Load stringBalancer Id - The OCID of the network load balancer to update.
- port number
- The communication port for the listener. Example:
80
- protocol string
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- tcp
Idle numberTimeout - The duration for TCP idle timeout in seconds. Example:
300
- udp
Idle numberTimeout - The duration for UDP idle timeout in seconds. Example:
120
- default_
backend_ strset_ name - The name of the associated backend set. Example:
example_backend_set
- id str
- ip_
version str - IP version associated with the listener.
- is_
ppv2enabled bool - Property to enable/disable PPv2 feature for this listener.
- l3ip_
idle_ inttimeout - The duration for L3IP idle timeout in seconds. Example:
200
- name str
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- network_
load_ strbalancer_ id - The OCID of the network load balancer to update.
- port int
- The communication port for the listener. Example:
80
- protocol str
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- tcp_
idle_ inttimeout - The duration for TCP idle timeout in seconds. Example:
300
- udp_
idle_ inttimeout - The duration for UDP idle timeout in seconds. Example:
120
- default
Backend StringSet Name - The name of the associated backend set. Example:
example_backend_set
- id String
- ip
Version String - IP version associated with the listener.
- is
Ppv2enabled Boolean - Property to enable/disable PPv2 feature for this listener.
- l3ip
Idle NumberTimeout - The duration for L3IP idle timeout in seconds. Example:
200
- name String
- A friendly name for the listener. It must be unique and it cannot be changed. Example:
example_listener
- network
Load StringBalancer Id - The OCID of the network load balancer to update.
- port Number
- The communication port for the listener. Example:
80
- protocol String
- The protocol on which the listener accepts connection requests. For public network load balancers, ANY protocol refers to TCP/UDP with the wildcard port. For private network load balancers, ANY protocol refers to TCP/UDP/ICMP (note that ICMP requires isPreserveSourceDestination to be set to true). "ListNetworkLoadBalancersProtocols" API is deprecated and it will not return the updated values. Use the allowed values for the protocol instead. Example:
TCP
- tcp
Idle NumberTimeout - The duration for TCP idle timeout in seconds. Example:
300
- udp
Idle NumberTimeout - The duration for UDP idle timeout in seconds. Example:
120
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.