ionoscloud.alb.getBalancer
Explore with Pulumi AI
The Application Load Balancer data source can be used to search for and return an existing Application Load Balancer. You can provide a string for the name parameter which will be compared with provisioned Application Load Balancers. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search and make sure that your resources have unique names.
Example Usage
By Id
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.alb.getBalancer({
datacenterId: exampleIonoscloudDatacenter.id,
id: "alb_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.alb.get_balancer(datacenter_id=example_ionoscloud_datacenter["id"],
id="alb_id")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.LookupBalancer(ctx, &alb.LookupBalancerArgs{
DatacenterId: exampleIonoscloudDatacenter.Id,
Id: pulumi.StringRef("alb_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Alb.GetBalancer.Invoke(new()
{
DatacenterId = exampleIonoscloudDatacenter.Id,
Id = "alb_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.alb.AlbFunctions;
import com.pulumi.ionoscloud.alb.inputs.GetBalancerArgs;
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 example = AlbFunctions.getBalancer(GetBalancerArgs.builder()
.datacenterId(exampleIonoscloudDatacenter.id())
.id("alb_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:alb:getBalancer
arguments:
datacenterId: ${exampleIonoscloudDatacenter.id}
id: alb_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.alb.getBalancer({
datacenterId: exampleIonoscloudDatacenter.id,
name: "ALB name",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.alb.get_balancer(datacenter_id=example_ionoscloud_datacenter["id"],
name="ALB name")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.LookupBalancer(ctx, &alb.LookupBalancerArgs{
DatacenterId: exampleIonoscloudDatacenter.Id,
Name: pulumi.StringRef("ALB name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Alb.GetBalancer.Invoke(new()
{
DatacenterId = exampleIonoscloudDatacenter.Id,
Name = "ALB name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.alb.AlbFunctions;
import com.pulumi.ionoscloud.alb.inputs.GetBalancerArgs;
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 example = AlbFunctions.getBalancer(GetBalancerArgs.builder()
.datacenterId(exampleIonoscloudDatacenter.id())
.name("ALB name")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:alb:getBalancer
arguments:
datacenterId: ${exampleIonoscloudDatacenter.id}
name: ALB name
By Name with Partial Match
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.alb.getBalancer({
datacenterId: exampleIonoscloudDatacenter.id,
name: "name",
partialMatch: true,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.alb.get_balancer(datacenter_id=example_ionoscloud_datacenter["id"],
name="name",
partial_match=True)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.LookupBalancer(ctx, &alb.LookupBalancerArgs{
DatacenterId: exampleIonoscloudDatacenter.Id,
Name: pulumi.StringRef("name"),
PartialMatch: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Alb.GetBalancer.Invoke(new()
{
DatacenterId = exampleIonoscloudDatacenter.Id,
Name = "name",
PartialMatch = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.alb.AlbFunctions;
import com.pulumi.ionoscloud.alb.inputs.GetBalancerArgs;
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 example = AlbFunctions.getBalancer(GetBalancerArgs.builder()
.datacenterId(exampleIonoscloudDatacenter.id())
.name("name")
.partialMatch(true)
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:alb:getBalancer
arguments:
datacenterId: ${exampleIonoscloudDatacenter.id}
name: name
partialMatch: true
Using getBalancer
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 getBalancer(args: GetBalancerArgs, opts?: InvokeOptions): Promise<GetBalancerResult>
function getBalancerOutput(args: GetBalancerOutputArgs, opts?: InvokeOptions): Output<GetBalancerResult>
def get_balancer(datacenter_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
partial_match: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetBalancerResult
def get_balancer_output(datacenter_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
partial_match: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBalancerResult]
func LookupBalancer(ctx *Context, args *LookupBalancerArgs, opts ...InvokeOption) (*LookupBalancerResult, error)
func LookupBalancerOutput(ctx *Context, args *LookupBalancerOutputArgs, opts ...InvokeOption) LookupBalancerResultOutput
> Note: This function is named LookupBalancer
in the Go SDK.
public static class GetBalancer
{
public static Task<GetBalancerResult> InvokeAsync(GetBalancerArgs args, InvokeOptions? opts = null)
public static Output<GetBalancerResult> Invoke(GetBalancerInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBalancerResult> getBalancer(GetBalancerArgs args, InvokeOptions options)
public static Output<GetBalancerResult> getBalancer(GetBalancerArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:alb/getBalancer:getBalancer
arguments:
# arguments dictionary
The following arguments are supported:
- Datacenter
Id string - Datacenter's UUID.
- Id string
- ID of the application load balancer you want to search for.
- Name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- Datacenter
Id string - Datacenter's UUID.
- Id string
- ID of the application load balancer you want to search for.
- Name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- datacenter
Id String - Datacenter's UUID.
- id String
- ID of the application load balancer you want to search for.
- name String
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- datacenter
Id string - Datacenter's UUID.
- id string
- ID of the application load balancer you want to search for.
- name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match boolean Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- datacenter_
id str - Datacenter's UUID.
- id str
- ID of the application load balancer you want to search for.
- name str
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial_
match bool Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- datacenter
Id String - Datacenter's UUID.
- id String
- ID of the application load balancer you want to search for.
- name String
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
getBalancer Result
The following output properties are available:
- Central
Logging bool - Turn logging on and off for this product. Default value is 'false'.
- Datacenter
Id string - Flowlogs
List<Ionoscloud.
Get Balancer Flowlog> - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Id string
- Id of the application load balancer.
- Ips List<string>
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- Lb
Private List<string>Ips - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- Listener
Lan int - ID of the listening (inbound) LAN.
- Logging
Format string - Name string
- Specifies the name of the flow log.
- Target
Lan int - ID of the balanced private target LAN (outbound).
- Partial
Match bool
- Central
Logging bool - Turn logging on and off for this product. Default value is 'false'.
- Datacenter
Id string - Flowlogs
[]Get
Balancer Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Id string
- Id of the application load balancer.
- Ips []string
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- Lb
Private []stringIps - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- Listener
Lan int - ID of the listening (inbound) LAN.
- Logging
Format string - Name string
- Specifies the name of the flow log.
- Target
Lan int - ID of the balanced private target LAN (outbound).
- Partial
Match bool
- central
Logging Boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id String - flowlogs
List<Get
Balancer Flowlog> - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- id String
- Id of the application load balancer.
- ips List<String>
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- lb
Private List<String>Ips - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- listener
Lan Integer - ID of the listening (inbound) LAN.
- logging
Format String - name String
- Specifies the name of the flow log.
- target
Lan Integer - ID of the balanced private target LAN (outbound).
- partial
Match Boolean
- central
Logging boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id string - flowlogs
Get
Balancer Flowlog[] - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- id string
- Id of the application load balancer.
- ips string[]
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- lb
Private string[]Ips - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- listener
Lan number - ID of the listening (inbound) LAN.
- logging
Format string - name string
- Specifies the name of the flow log.
- target
Lan number - ID of the balanced private target LAN (outbound).
- partial
Match boolean
- central_
logging bool - Turn logging on and off for this product. Default value is 'false'.
- datacenter_
id str - flowlogs
Sequence[Get
Balancer Flowlog] - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- id str
- Id of the application load balancer.
- ips Sequence[str]
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- lb_
private_ Sequence[str]ips - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- listener_
lan int - ID of the listening (inbound) LAN.
- logging_
format str - name str
- Specifies the name of the flow log.
- target_
lan int - ID of the balanced private target LAN (outbound).
- partial_
match bool
- central
Logging Boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id String - flowlogs List<Property Map>
- Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- id String
- Id of the application load balancer.
- ips List<String>
- Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan are customer-reserved public IPs for the public Load Balancers, and private IPs for the private Load Balancers.
- lb
Private List<String>Ips - Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- listener
Lan Number - ID of the listening (inbound) LAN.
- logging
Format String - name String
- Specifies the name of the flow log.
- target
Lan Number - ID of the balanced private target LAN (outbound).
- partial
Match Boolean
Supporting Types
GetBalancerFlowlog
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- Bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- Direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- Id string
- ID of the application load balancer you want to search for.
- Name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- Bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- Direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- Id string
- ID of the application load balancer you want to search for.
- Name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket String
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- direction String
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id String
- ID of the application load balancer you want to search for.
- name String
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
- action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id string
- ID of the application load balancer you want to search for.
- name string
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
- action str
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket str
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- direction str
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id str
- ID of the application load balancer you want to search for.
- name str
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket String
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- direction String
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id String
- ID of the application load balancer you want to search for.
- name String
- Name of an existing application load balancer that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.