Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.LoadBalancer.getHostnames
Explore with Pulumi AI
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: testLoadBalancer.id,
});
import pulumi
import pulumi_oci as oci
test_hostnames = oci.LoadBalancer.get_hostnames(load_balancer_id=test_load_balancer["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/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: testLoadBalancer.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 = testLoadBalancer.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(testLoadBalancer.id())
.build());
}
}
variables:
testHostnames:
fn::invoke:
Function: oci:LoadBalancer:getHostnames
Arguments:
loadBalancerId: ${testLoadBalancer.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:
- Load
Balancer stringId - The OCID of the load balancer associated with the hostnames to retrieve.
- Filters
List<Get
Hostnames Filter>
- Load
Balancer stringId - The OCID of the load balancer associated with the hostnames to retrieve.
- Filters
[]Get
Hostnames Filter
- load
Balancer StringId - The OCID of the load balancer associated with the hostnames to retrieve.
- filters
List<Get
Hostnames Filter>
- load
Balancer stringId - The OCID of the load balancer associated with the hostnames to retrieve.
- filters
Get
Hostnames Filter[]
- load_
balancer_ strid - The OCID of the load balancer associated with the hostnames to retrieve.
- filters
Sequence[loadbalancer.
Get Hostnames Filter]
- load
Balancer StringId - 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<Get
Hostnames Hostname> - The list of hostnames.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId - Filters
List<Get
Hostnames Filter>
- Hostnames
[]Get
Hostnames Hostname - The list of hostnames.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId - Filters
[]Get
Hostnames Filter
- hostnames
List<Get
Hostnames Hostname> - The list of hostnames.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringId - filters
List<Get
Hostnames Filter>
- hostnames
Get
Hostnames Hostname[] - The list of hostnames.
- id string
- The provider-assigned unique ID for this managed resource.
- load
Balancer stringId - filters
Get
Hostnames Filter[]
- hostnames
Sequence[loadbalancer.
Get Hostnames Hostname] - The list of hostnames.
- id str
- The provider-assigned unique ID for this managed resource.
- load_
balancer_ strid - filters
Sequence[loadbalancer.
Get Hostnames Filter]
- hostnames List<Property Map>
- The list of hostnames.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringId - filters List<Property Map>
Supporting Types
GetHostnamesFilter
GetHostnamesHostname
- Hostname string
- A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- Load
Balancer stringId - 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
- Load
Balancer stringId - 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
- load
Balancer StringId - 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
- load
Balancer stringId - 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_ strid - 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
- load
Balancer StringId - 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.