alicloud.ga.getForwardingRules
This data source provides the Global Accelerator (GA) Forwarding Rules of the current Alibaba Cloud user.
NOTE: Available in v1.120.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Ga.GetForwardingRules.Invoke(new()
{
AcceleratorId = "example_value",
ListenerId = "example_value",
Ids = new[]
{
"example_value",
},
});
return new Dictionary<string, object?>
{
["firstGaForwardingRuleId"] = example.Apply(getForwardingRulesResult => getForwardingRulesResult.ForwardingRules[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ga.GetForwardingRules(ctx, &ga.GetForwardingRulesArgs{
AcceleratorId: "example_value",
ListenerId: "example_value",
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("firstGaForwardingRuleId", example.ForwardingRules[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.GaFunctions;
import com.pulumi.alicloud.ga.inputs.GetForwardingRulesArgs;
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 = GaFunctions.getForwardingRules(GetForwardingRulesArgs.builder()
.acceleratorId("example_value")
.listenerId("example_value")
.ids("example_value")
.build());
ctx.export("firstGaForwardingRuleId", example.applyValue(getForwardingRulesResult -> getForwardingRulesResult.forwardingRules()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ga.get_forwarding_rules(accelerator_id="example_value",
listener_id="example_value",
ids=["example_value"])
pulumi.export("firstGaForwardingRuleId", example.forwarding_rules[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.ga.getForwardingRules({
acceleratorId: "example_value",
listenerId: "example_value",
ids: ["example_value"],
});
export const firstGaForwardingRuleId = example.then(example => example.forwardingRules?.[0]?.id);
variables:
example:
fn::invoke:
Function: alicloud:ga:getForwardingRules
Arguments:
acceleratorId: example_value
listenerId: example_value
ids:
- example_value
outputs:
firstGaForwardingRuleId: ${example.forwardingRules[0].id}
Using getForwardingRules
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 getForwardingRules(args: GetForwardingRulesArgs, opts?: InvokeOptions): Promise<GetForwardingRulesResult>
function getForwardingRulesOutput(args: GetForwardingRulesOutputArgs, opts?: InvokeOptions): Output<GetForwardingRulesResult>
def get_forwarding_rules(accelerator_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
listener_id: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetForwardingRulesResult
def get_forwarding_rules_output(accelerator_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetForwardingRulesResult]
func GetForwardingRules(ctx *Context, args *GetForwardingRulesArgs, opts ...InvokeOption) (*GetForwardingRulesResult, error)
func GetForwardingRulesOutput(ctx *Context, args *GetForwardingRulesOutputArgs, opts ...InvokeOption) GetForwardingRulesResultOutput
> Note: This function is named GetForwardingRules
in the Go SDK.
public static class GetForwardingRules
{
public static Task<GetForwardingRulesResult> InvokeAsync(GetForwardingRulesArgs args, InvokeOptions? opts = null)
public static Output<GetForwardingRulesResult> Invoke(GetForwardingRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetForwardingRulesResult> getForwardingRules(GetForwardingRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ga/getForwardingRules:getForwardingRules
arguments:
# arguments dictionary
The following arguments are supported:
- Accelerator
Id string The ID of the Global Accelerator instance.
- Listener
Id string The ID of the listener.
- Ids List<string>
A list of Forwarding Rule IDs.
- Output
File string - Status string
The status of the acceleration region. Valid values:
active
,configuring
.
- Accelerator
Id string The ID of the Global Accelerator instance.
- Listener
Id string The ID of the listener.
- Ids []string
A list of Forwarding Rule IDs.
- Output
File string - Status string
The status of the acceleration region. Valid values:
active
,configuring
.
- accelerator
Id String The ID of the Global Accelerator instance.
- listener
Id String The ID of the listener.
- ids List<String>
A list of Forwarding Rule IDs.
- output
File String - status String
The status of the acceleration region. Valid values:
active
,configuring
.
- accelerator
Id string The ID of the Global Accelerator instance.
- listener
Id string The ID of the listener.
- ids string[]
A list of Forwarding Rule IDs.
- output
File string - status string
The status of the acceleration region. Valid values:
active
,configuring
.
- accelerator_
id str The ID of the Global Accelerator instance.
- listener_
id str The ID of the listener.
- ids Sequence[str]
A list of Forwarding Rule IDs.
- output_
file str - status str
The status of the acceleration region. Valid values:
active
,configuring
.
- accelerator
Id String The ID of the Global Accelerator instance.
- listener
Id String The ID of the listener.
- ids List<String>
A list of Forwarding Rule IDs.
- output
File String - status String
The status of the acceleration region. Valid values:
active
,configuring
.
getForwardingRules Result
The following output properties are available:
- Accelerator
Id string - Forwarding
Rules List<Pulumi.Ali Cloud. Ga. Outputs. Get Forwarding Rules Forwarding Rule> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Listener
Id string - Output
File string - Status string
- Accelerator
Id string - Forwarding
Rules []GetForwarding Rules Forwarding Rule - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Listener
Id string - Output
File string - Status string
- accelerator
Id String - forwarding
Rules List<GetForwarding Rules Forwarding Rule> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- listener
Id String - output
File String - status String
- accelerator
Id string - forwarding
Rules GetForwarding Rules Forwarding Rule[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- listener
Id string - output
File string - status string
- accelerator_
id str - forwarding_
rules Sequence[GetForwarding Rules Forwarding Rule] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- listener_
id str - output_
file str - status str
- accelerator
Id String - forwarding
Rules List<Property Map> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- listener
Id String - output
File String - status String
Supporting Types
GetForwardingRulesForwardingRule
- Forwarding
Rule stringId Forwarding Policy ID.
- Forwarding
Rule stringName Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- Forwarding
Rule stringStatus Forwarding Policy Status.
- Id string
- Listener
Id string The ID of the listener.
- Priority int
Forwarding policy priority.
- Rule
Actions List<Pulumi.Ali Cloud. Ga. Inputs. Get Forwarding Rules Forwarding Rule Rule Action> The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- Rule
Conditions List<Pulumi.Ali Cloud. Ga. Inputs. Get Forwarding Rules Forwarding Rule Rule Condition> Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
- Forwarding
Rule stringId Forwarding Policy ID.
- Forwarding
Rule stringName Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- Forwarding
Rule stringStatus Forwarding Policy Status.
- Id string
- Listener
Id string The ID of the listener.
- Priority int
Forwarding policy priority.
- Rule
Actions []GetForwarding Rules Forwarding Rule Rule Action The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- Rule
Conditions []GetForwarding Rules Forwarding Rule Rule Condition Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
- forwarding
Rule StringId Forwarding Policy ID.
- forwarding
Rule StringName Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- forwarding
Rule StringStatus Forwarding Policy Status.
- id String
- listener
Id String The ID of the listener.
- priority Integer
Forwarding policy priority.
- rule
Actions List<GetForwarding Rules Forwarding Rule Rule Action> The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- rule
Conditions List<GetForwarding Rules Forwarding Rule Rule Condition> Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
- forwarding
Rule stringId Forwarding Policy ID.
- forwarding
Rule stringName Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- forwarding
Rule stringStatus Forwarding Policy Status.
- id string
- listener
Id string The ID of the listener.
- priority number
Forwarding policy priority.
- rule
Actions GetForwarding Rules Forwarding Rule Rule Action[] The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- rule
Conditions GetForwarding Rules Forwarding Rule Rule Condition[] Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
- forwarding_
rule_ strid Forwarding Policy ID.
- forwarding_
rule_ strname Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- forwarding_
rule_ strstatus Forwarding Policy Status.
- id str
- listener_
id str The ID of the listener.
- priority int
Forwarding policy priority.
- rule_
actions Sequence[GetForwarding Rules Forwarding Rule Rule Action] The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- rule_
conditions Sequence[GetForwarding Rules Forwarding Rule Rule Condition] Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
- forwarding
Rule StringId Forwarding Policy ID.
- forwarding
Rule StringName Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
- forwarding
Rule StringStatus Forwarding Policy Status.
- id String
- listener
Id String The ID of the listener.
- priority Number
Forwarding policy priority.
- rule
Actions List<Property Map> The IP protocol used by the GA instance.
order
- Forwarding priority.rule_action_type
- Forward action type.forward_group_config
- Forwarding configuration.server_group_tuples
- Terminal node group configuration.endpoint_group_id
- Terminal node group ID.- rule
Conditions List<Property Map> Forward action.
rule_condition_type
- Forwarding condition type.path_config
- Path configuration information.values
- The length of the path is 1-128 characters.host_config
- Domain name configuration information.values
- The domain name is 3-128 characters long.
GetForwardingRulesForwardingRuleRuleAction
- forward
Group List<Property Map>Configs - order Number
- rule
Action StringType
GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig
GetForwardingRulesForwardingRuleRuleActionForwardGroupConfigServerGroupTuple
- Endpoint
Group stringId
- Endpoint
Group stringId
- endpoint
Group StringId
- endpoint
Group stringId
- endpoint
Group StringId
GetForwardingRulesForwardingRuleRuleCondition
GetForwardingRulesForwardingRuleRuleConditionHostConfig
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
GetForwardingRulesForwardingRuleRuleConditionPathConfig
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.