1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LoadBalancer
  5. getHostnames
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.LoadBalancer.getHostnames

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of Hostnames in Oracle Cloud Infrastructure Load Balancer service.

    Lists all hostname resources associated with the specified load balancer.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testHostnames = oci.LoadBalancer.getHostnames({
        loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_hostnames = oci.LoadBalancer.get_hostnames(load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/LoadBalancer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := LoadBalancer.GetHostnames(ctx, &loadbalancer.GetHostnamesArgs{
    			LoadBalancerId: oci_load_balancer_load_balancer.Test_load_balancer.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 testHostnames = Oci.LoadBalancer.GetHostnames.Invoke(new()
        {
            LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.LoadBalancer.LoadBalancerFunctions;
    import com.pulumi.oci.LoadBalancer.inputs.GetHostnamesArgs;
    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 testHostnames = LoadBalancerFunctions.getHostnames(GetHostnamesArgs.builder()
                .loadBalancerId(oci_load_balancer_load_balancer.test_load_balancer().id())
                .build());
    
        }
    }
    
    variables:
      testHostnames:
        fn::invoke:
          Function: oci:LoadBalancer:getHostnames
          Arguments:
            loadBalancerId: ${oci_load_balancer_load_balancer.test_load_balancer.id}
    

    Using getHostnames

    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 getHostnames(args: GetHostnamesArgs, opts?: InvokeOptions): Promise<GetHostnamesResult>
    function getHostnamesOutput(args: GetHostnamesOutputArgs, opts?: InvokeOptions): Output<GetHostnamesResult>
    def get_hostnames(filters: Optional[Sequence[_loadbalancer.GetHostnamesFilter]] = None,
                      load_balancer_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetHostnamesResult
    def get_hostnames_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loadbalancer.GetHostnamesFilterArgs]]]] = None,
                      load_balancer_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetHostnamesResult]
    func GetHostnames(ctx *Context, args *GetHostnamesArgs, opts ...InvokeOption) (*GetHostnamesResult, error)
    func GetHostnamesOutput(ctx *Context, args *GetHostnamesOutputArgs, opts ...InvokeOption) GetHostnamesResultOutput

    > Note: This function is named GetHostnames in the Go SDK.

    public static class GetHostnames 
    {
        public static Task<GetHostnamesResult> InvokeAsync(GetHostnamesArgs args, InvokeOptions? opts = null)
        public static Output<GetHostnamesResult> Invoke(GetHostnamesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostnamesResult> getHostnames(GetHostnamesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LoadBalancer/getHostnames:getHostnames
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LoadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    Filters List<GetHostnamesFilter>
    LoadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    Filters []GetHostnamesFilter
    loadBalancerId String
    The OCID of the load balancer associated with the hostnames to retrieve.
    filters List<GetHostnamesFilter>
    loadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    filters GetHostnamesFilter[]
    load_balancer_id str
    The OCID of the load balancer associated with the hostnames to retrieve.
    filters Sequence[loadbalancer.GetHostnamesFilter]
    loadBalancerId String
    The OCID of the load balancer associated with the hostnames to retrieve.
    filters List<Property Map>

    getHostnames Result

    The following output properties are available:

    Hostnames List<GetHostnamesHostname>
    The list of hostnames.
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId string
    Filters List<GetHostnamesFilter>
    Hostnames []GetHostnamesHostname
    The list of hostnames.
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId string
    Filters []GetHostnamesFilter
    hostnames List<GetHostnamesHostname>
    The list of hostnames.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId String
    filters List<GetHostnamesFilter>
    hostnames GetHostnamesHostname[]
    The list of hostnames.
    id string
    The provider-assigned unique ID for this managed resource.
    loadBalancerId string
    filters GetHostnamesFilter[]
    hostnames Sequence[loadbalancer.GetHostnamesHostname]
    The list of hostnames.
    id str
    The provider-assigned unique ID for this managed resource.
    load_balancer_id str
    filters Sequence[loadbalancer.GetHostnamesFilter]
    hostnames List<Property Map>
    The list of hostnames.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId String
    filters List<Property Map>

    Supporting Types

    GetHostnamesFilter

    Name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    Values List<string>
    Regex bool
    Name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    Values []string
    Regex bool
    name String
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    values List<String>
    regex Boolean
    name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    values string[]
    regex boolean
    name str
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    values Sequence[str]
    regex bool
    name String
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    values List<String>
    regex Boolean

    GetHostnamesHostname

    Hostname string
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    LoadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    Name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    State string
    Hostname string
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    LoadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    Name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    State string
    hostname String
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    loadBalancerId String
    The OCID of the load balancer associated with the hostnames to retrieve.
    name String
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    state String
    hostname string
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    loadBalancerId string
    The OCID of the load balancer associated with the hostnames to retrieve.
    name string
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    state string
    hostname str
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    load_balancer_id str
    The OCID of the load balancer associated with the hostnames to retrieve.
    name str
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    state str
    hostname String
    A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com
    loadBalancerId String
    The OCID of the load balancer associated with the hostnames to retrieve.
    name String
    A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
    state String

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi