ionoscloud.nlb.getForwardingRule
Explore with Pulumi AI
The Network Load Balancer Forwarding Rule data source can be used to search for and return existing network forwarding rules. 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 string so that it is specific enough to return only one result.
By ID
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.nlb.getForwardingRule({
datacenterId: "datacenter_id",
networkloadbalancerId: "networkloadbalancer_id",
id: "networkloadbalancer_forwardingrule_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.nlb.get_forwarding_rule(datacenter_id="datacenter_id",
networkloadbalancer_id="networkloadbalancer_id",
id="networkloadbalancer_forwardingrule_id")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/nlb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nlb.LookupForwardingRule(ctx, &nlb.LookupForwardingRuleArgs{
DatacenterId: "datacenter_id",
NetworkloadbalancerId: "networkloadbalancer_id",
Id: pulumi.StringRef("networkloadbalancer_forwardingrule_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.Nlb.GetForwardingRule.Invoke(new()
{
DatacenterId = "datacenter_id",
NetworkloadbalancerId = "networkloadbalancer_id",
Id = "networkloadbalancer_forwardingrule_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.nlb.NlbFunctions;
import com.pulumi.ionoscloud.nlb.inputs.GetForwardingRuleArgs;
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 = NlbFunctions.getForwardingRule(GetForwardingRuleArgs.builder()
.datacenterId("datacenter_id")
.networkloadbalancerId("networkloadbalancer_id")
.id("networkloadbalancer_forwardingrule_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:nlb:getForwardingRule
arguments:
datacenterId: datacenter_id
networkloadbalancerId: networkloadbalancer_id
id: networkloadbalancer_forwardingrule_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.nlb.getForwardingRule({
datacenterId: "datacenter_id",
networkloadbalancerId: "networkloadbalancer_id",
name: "Network Load Balancer Forwarding Rule Example",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.nlb.get_forwarding_rule(datacenter_id="datacenter_id",
networkloadbalancer_id="networkloadbalancer_id",
name="Network Load Balancer Forwarding Rule Example")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/nlb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nlb.LookupForwardingRule(ctx, &nlb.LookupForwardingRuleArgs{
DatacenterId: "datacenter_id",
NetworkloadbalancerId: "networkloadbalancer_id",
Name: pulumi.StringRef("Network Load Balancer Forwarding Rule Example"),
}, 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.Nlb.GetForwardingRule.Invoke(new()
{
DatacenterId = "datacenter_id",
NetworkloadbalancerId = "networkloadbalancer_id",
Name = "Network Load Balancer Forwarding Rule Example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.nlb.NlbFunctions;
import com.pulumi.ionoscloud.nlb.inputs.GetForwardingRuleArgs;
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 = NlbFunctions.getForwardingRule(GetForwardingRuleArgs.builder()
.datacenterId("datacenter_id")
.networkloadbalancerId("networkloadbalancer_id")
.name("Network Load Balancer Forwarding Rule Example")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:nlb:getForwardingRule
arguments:
datacenterId: datacenter_id
networkloadbalancerId: networkloadbalancer_id
name: Network Load Balancer Forwarding Rule Example
Using getForwardingRule
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 getForwardingRule(args: GetForwardingRuleArgs, opts?: InvokeOptions): Promise<GetForwardingRuleResult>
function getForwardingRuleOutput(args: GetForwardingRuleOutputArgs, opts?: InvokeOptions): Output<GetForwardingRuleResult>
def get_forwarding_rule(datacenter_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
networkloadbalancer_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetForwardingRuleResult
def get_forwarding_rule_output(datacenter_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
networkloadbalancer_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetForwardingRuleResult]
func LookupForwardingRule(ctx *Context, args *LookupForwardingRuleArgs, opts ...InvokeOption) (*LookupForwardingRuleResult, error)
func LookupForwardingRuleOutput(ctx *Context, args *LookupForwardingRuleOutputArgs, opts ...InvokeOption) LookupForwardingRuleResultOutput
> Note: This function is named LookupForwardingRule
in the Go SDK.
public static class GetForwardingRule
{
public static Task<GetForwardingRuleResult> InvokeAsync(GetForwardingRuleArgs args, InvokeOptions? opts = null)
public static Output<GetForwardingRuleResult> Invoke(GetForwardingRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetForwardingRuleResult> getForwardingRule(GetForwardingRuleArgs args, InvokeOptions options)
public static Output<GetForwardingRuleResult> getForwardingRule(GetForwardingRuleArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:nlb/getForwardingRule:getForwardingRule
arguments:
# arguments dictionary
The following arguments are supported:
- Datacenter
Id string - Datacenter's UUID.
- Networkloadbalancer
Id string - Network Load Balancer's UUID.
- Id string
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer forwarding rule that you want to search for.
- Datacenter
Id string - Datacenter's UUID.
- Networkloadbalancer
Id string - Network Load Balancer's UUID.
- Id string
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer forwarding rule that you want to search for.
- datacenter
Id String - Datacenter's UUID.
- networkloadbalancer
Id String - Network Load Balancer's UUID.
- id String
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing network load balancer forwarding rule that you want to search for.
- datacenter
Id string - Datacenter's UUID.
- networkloadbalancer
Id string - Network Load Balancer's UUID.
- id string
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name string
- Name of an existing network load balancer forwarding rule that you want to search for.
- datacenter_
id str - Datacenter's UUID.
- networkloadbalancer_
id str - Network Load Balancer's UUID.
- id str
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name str
- Name of an existing network load balancer forwarding rule that you want to search for.
- datacenter
Id String - Datacenter's UUID.
- networkloadbalancer
Id String - Network Load Balancer's UUID.
- id String
ID of the network load balancer forwarding rule you want to search for.
Both
datacenter_id
andnetworkloadbalancer_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing network load balancer forwarding rule that you want to search for.
getForwardingRule Result
The following output properties are available:
- Algorithm string
- Algorithm for the balancing.
- Datacenter
Id string - Health
Checks List<Ionoscloud.Get Forwarding Rule Health Check> - Health check attributes for Network Load Balancer forwarding rule target.
- Id string
- The id of that Network Load Balancer forwarding rule.
- Listener
Ip string - Listening IP. (inbound)
- Listener
Port int - Listening port number. (inbound) (range: 1 to 65535)
- Name string
- The name of that Network Load Balancer forwarding rule.
- Networkloadbalancer
Id string - Protocol string
- Protocol of the balancing.
- Targets
List<Ionoscloud.
Get Forwarding Rule Target> - Array of items in that collection.
- Algorithm string
- Algorithm for the balancing.
- Datacenter
Id string - Health
Checks []GetForwarding Rule Health Check - Health check attributes for Network Load Balancer forwarding rule target.
- Id string
- The id of that Network Load Balancer forwarding rule.
- Listener
Ip string - Listening IP. (inbound)
- Listener
Port int - Listening port number. (inbound) (range: 1 to 65535)
- Name string
- The name of that Network Load Balancer forwarding rule.
- Networkloadbalancer
Id string - Protocol string
- Protocol of the balancing.
- Targets
[]Get
Forwarding Rule Target - Array of items in that collection.
- algorithm String
- Algorithm for the balancing.
- datacenter
Id String - health
Checks List<GetForwarding Rule Health Check> - Health check attributes for Network Load Balancer forwarding rule target.
- id String
- The id of that Network Load Balancer forwarding rule.
- listener
Ip String - Listening IP. (inbound)
- listener
Port Integer - Listening port number. (inbound) (range: 1 to 65535)
- name String
- The name of that Network Load Balancer forwarding rule.
- networkloadbalancer
Id String - protocol String
- Protocol of the balancing.
- targets
List<Get
Forwarding Rule Target> - Array of items in that collection.
- algorithm string
- Algorithm for the balancing.
- datacenter
Id string - health
Checks GetForwarding Rule Health Check[] - Health check attributes for Network Load Balancer forwarding rule target.
- id string
- The id of that Network Load Balancer forwarding rule.
- listener
Ip string - Listening IP. (inbound)
- listener
Port number - Listening port number. (inbound) (range: 1 to 65535)
- name string
- The name of that Network Load Balancer forwarding rule.
- networkloadbalancer
Id string - protocol string
- Protocol of the balancing.
- targets
Get
Forwarding Rule Target[] - Array of items in that collection.
- algorithm str
- Algorithm for the balancing.
- datacenter_
id str - health_
checks Sequence[GetForwarding Rule Health Check] - Health check attributes for Network Load Balancer forwarding rule target.
- id str
- The id of that Network Load Balancer forwarding rule.
- listener_
ip str - Listening IP. (inbound)
- listener_
port int - Listening port number. (inbound) (range: 1 to 65535)
- name str
- The name of that Network Load Balancer forwarding rule.
- networkloadbalancer_
id str - protocol str
- Protocol of the balancing.
- targets
Sequence[Get
Forwarding Rule Target] - Array of items in that collection.
- algorithm String
- Algorithm for the balancing.
- datacenter
Id String - health
Checks List<Property Map> - Health check attributes for Network Load Balancer forwarding rule target.
- id String
- The id of that Network Load Balancer forwarding rule.
- listener
Ip String - Listening IP. (inbound)
- listener
Port Number - Listening port number. (inbound) (range: 1 to 65535)
- name String
- The name of that Network Load Balancer forwarding rule.
- networkloadbalancer
Id String - protocol String
- Protocol of the balancing.
- targets List<Property Map>
- Array of items in that collection.
Supporting Types
GetForwardingRuleHealthCheck
- Client
Timeout int - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- Connect
Timeout int - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- Retries int
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- Target
Timeout int - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
- Client
Timeout int - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- Connect
Timeout int - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- Retries int
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- Target
Timeout int - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
- client
Timeout Integer - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- connect
Timeout Integer - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- retries Integer
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- target
Timeout Integer - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
- client
Timeout number - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- connect
Timeout number - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- retries number
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- target
Timeout number - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
- client_
timeout int - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- connect_
timeout int - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- retries int
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- target_
timeout int - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
- client
Timeout Number - ClientTimeout is expressed in milliseconds. This inactivity timeout applies when the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.
- connect
Timeout Number - It specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
- retries Number
- Retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used.
- target
Timeout Number - TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. If unset, the default of 50 seconds will be used.
GetForwardingRuleTarget
- Health
Checks List<Ionoscloud.Get Forwarding Rule Target Health Check> - Health check attributes for Network Load Balancer forwarding rule target.
- Ip string
- IP of a balanced target VM.
- Port int
- Port of the balanced target service. (range: 1 to 65535).
- Proxy
Protocol string - The proxy protocol version.
- Weight int
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
- Health
Checks []GetForwarding Rule Target Health Check - Health check attributes for Network Load Balancer forwarding rule target.
- Ip string
- IP of a balanced target VM.
- Port int
- Port of the balanced target service. (range: 1 to 65535).
- Proxy
Protocol string - The proxy protocol version.
- Weight int
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
- health
Checks List<GetForwarding Rule Target Health Check> - Health check attributes for Network Load Balancer forwarding rule target.
- ip String
- IP of a balanced target VM.
- port Integer
- Port of the balanced target service. (range: 1 to 65535).
- proxy
Protocol String - The proxy protocol version.
- weight Integer
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
- health
Checks GetForwarding Rule Target Health Check[] - Health check attributes for Network Load Balancer forwarding rule target.
- ip string
- IP of a balanced target VM.
- port number
- Port of the balanced target service. (range: 1 to 65535).
- proxy
Protocol string - The proxy protocol version.
- weight number
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
- health_
checks Sequence[GetForwarding Rule Target Health Check] - Health check attributes for Network Load Balancer forwarding rule target.
- ip str
- IP of a balanced target VM.
- port int
- Port of the balanced target service. (range: 1 to 65535).
- proxy_
protocol str - The proxy protocol version.
- weight int
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
- health
Checks List<Property Map> - Health check attributes for Network Load Balancer forwarding rule target.
- ip String
- IP of a balanced target VM.
- port Number
- Port of the balanced target service. (range: 1 to 65535).
- proxy
Protocol String - The proxy protocol version.
- weight Number
- Weight parameter is used to adjust the target VM's weight relative to other target VMs.
GetForwardingRuleTargetHealthCheck
- Check bool
- Check specifies whether the target VM's health is checked.
- Check
Interval int - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- Maintenance bool
- Maintenance specifies if a target VM should be marked as down, even if it is not.
- Check bool
- Check specifies whether the target VM's health is checked.
- Check
Interval int - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- Maintenance bool
- Maintenance specifies if a target VM should be marked as down, even if it is not.
- check Boolean
- Check specifies whether the target VM's health is checked.
- check
Interval Integer - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- maintenance Boolean
- Maintenance specifies if a target VM should be marked as down, even if it is not.
- check boolean
- Check specifies whether the target VM's health is checked.
- check
Interval number - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- maintenance boolean
- Maintenance specifies if a target VM should be marked as down, even if it is not.
- check bool
- Check specifies whether the target VM's health is checked.
- check_
interval int - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- maintenance bool
- Maintenance specifies if a target VM should be marked as down, even if it is not.
- check Boolean
- Check specifies whether the target VM's health is checked.
- check
Interval Number - CheckInterval determines the duration (in milliseconds) between consecutive health checks. If unspecified a default of 2000 ms is used.
- maintenance Boolean
- Maintenance specifies if a target VM should be marked as down, even if it is not.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.