1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ga
  5. getForwardingRules
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ga.getForwardingRules

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Global Accelerator (GA) Forwarding Rules of the current Alibaba Cloud user.

NOTE: Available since v1.120.0.

Example Usage

Basic Usage

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);
Copy
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)
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:ga:getForwardingRules
      arguments:
        acceleratorId: example_value
        listenerId: example_value
        ids:
          - example_value
outputs:
  firstGaForwardingRuleId: ${example.forwardingRules[0].id}
Copy

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>
Copy
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]
Copy
func GetForwardingRules(ctx *Context, args *GetForwardingRulesArgs, opts ...InvokeOption) (*GetForwardingRulesResult, error)
func GetForwardingRulesOutput(ctx *Context, args *GetForwardingRulesOutputArgs, opts ...InvokeOption) GetForwardingRulesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetForwardingRulesResult> getForwardingRules(GetForwardingRulesArgs args, InvokeOptions options)
public static Output<GetForwardingRulesResult> getForwardingRules(GetForwardingRulesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ga/getForwardingRules:getForwardingRules
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AcceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Global Accelerator instance.
ListenerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the listener.
Ids Changes to this property will trigger replacement. List<string>
A list of Forwarding Rule IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the acceleration region. Valid values: active, configuring.
AcceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Global Accelerator instance.
ListenerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the listener.
Ids Changes to this property will trigger replacement. []string
A list of Forwarding Rule IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the acceleration region. Valid values: active, configuring.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Global Accelerator instance.
listenerId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the listener.
ids Changes to this property will trigger replacement. List<String>
A list of Forwarding Rule IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the acceleration region. Valid values: active, configuring.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Global Accelerator instance.
listenerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the listener.
ids Changes to this property will trigger replacement. string[]
A list of Forwarding Rule IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of the acceleration region. Valid values: active, configuring.
accelerator_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Global Accelerator instance.
listener_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the listener.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Forwarding Rule IDs.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
The status of the acceleration region. Valid values: active, configuring.
acceleratorId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Global Accelerator instance.
listenerId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the listener.
ids Changes to this property will trigger replacement. List<String>
A list of Forwarding Rule IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the acceleration region. Valid values: active, configuring.

getForwardingRules Result

The following output properties are available:

AcceleratorId string
ForwardingRules List<Pulumi.AliCloud.Ga.Outputs.GetForwardingRulesForwardingRule>
A list of Ga Forwarding Rules. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
ListenerId string
The ID of the listener.
OutputFile string
Status string
AcceleratorId string
ForwardingRules []GetForwardingRulesForwardingRule
A list of Ga Forwarding Rules. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
ListenerId string
The ID of the listener.
OutputFile string
Status string
acceleratorId String
forwardingRules List<GetForwardingRulesForwardingRule>
A list of Ga Forwarding Rules. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
listenerId String
The ID of the listener.
outputFile String
status String
acceleratorId string
forwardingRules GetForwardingRulesForwardingRule[]
A list of Ga Forwarding Rules. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
listenerId string
The ID of the listener.
outputFile string
status string
accelerator_id str
forwarding_rules Sequence[GetForwardingRulesForwardingRule]
A list of Ga Forwarding Rules. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
listener_id str
The ID of the listener.
output_file str
status str
acceleratorId String
forwardingRules List<Property Map>
A list of Ga Forwarding Rules. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
listenerId String
The ID of the listener.
outputFile String
status String

Supporting Types

GetForwardingRulesForwardingRule

ForwardingRuleId This property is required. string
Forwarding Policy ID.
ForwardingRuleName This property is required. string
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
ForwardingRuleStatus This property is required. string
Forwarding Policy Status.
Id This property is required. string
ListenerId This property is required. string
The ID of the listener.
Priority This property is required. int
Forwarding policy priority.
RuleActions This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetForwardingRulesForwardingRuleRuleAction>
The IP protocol used by the GA instance.
RuleConditions This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetForwardingRulesForwardingRuleRuleCondition>
Forward action.
ForwardingRuleId This property is required. string
Forwarding Policy ID.
ForwardingRuleName This property is required. string
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
ForwardingRuleStatus This property is required. string
Forwarding Policy Status.
Id This property is required. string
ListenerId This property is required. string
The ID of the listener.
Priority This property is required. int
Forwarding policy priority.
RuleActions This property is required. []GetForwardingRulesForwardingRuleRuleAction
The IP protocol used by the GA instance.
RuleConditions This property is required. []GetForwardingRulesForwardingRuleRuleCondition
Forward action.
forwardingRuleId This property is required. String
Forwarding Policy ID.
forwardingRuleName This property is required. String
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
forwardingRuleStatus This property is required. String
Forwarding Policy Status.
id This property is required. String
listenerId This property is required. String
The ID of the listener.
priority This property is required. Integer
Forwarding policy priority.
ruleActions This property is required. List<GetForwardingRulesForwardingRuleRuleAction>
The IP protocol used by the GA instance.
ruleConditions This property is required. List<GetForwardingRulesForwardingRuleRuleCondition>
Forward action.
forwardingRuleId This property is required. string
Forwarding Policy ID.
forwardingRuleName This property is required. string
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
forwardingRuleStatus This property is required. string
Forwarding Policy Status.
id This property is required. string
listenerId This property is required. string
The ID of the listener.
priority This property is required. number
Forwarding policy priority.
ruleActions This property is required. GetForwardingRulesForwardingRuleRuleAction[]
The IP protocol used by the GA instance.
ruleConditions This property is required. GetForwardingRulesForwardingRuleRuleCondition[]
Forward action.
forwarding_rule_id This property is required. str
Forwarding Policy ID.
forwarding_rule_name This property is required. str
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
forwarding_rule_status This property is required. str
Forwarding Policy Status.
id This property is required. str
listener_id This property is required. str
The ID of the listener.
priority This property is required. int
Forwarding policy priority.
rule_actions This property is required. Sequence[GetForwardingRulesForwardingRuleRuleAction]
The IP protocol used by the GA instance.
rule_conditions This property is required. Sequence[GetForwardingRulesForwardingRuleRuleCondition]
Forward action.
forwardingRuleId This property is required. String
Forwarding Policy ID.
forwardingRuleName This property is required. String
Forwarding policy name. The length of the name is 2-128 English or Chinese characters.
forwardingRuleStatus This property is required. String
Forwarding Policy Status.
id This property is required. String
listenerId This property is required. String
The ID of the listener.
priority This property is required. Number
Forwarding policy priority.
ruleActions This property is required. List<Property Map>
The IP protocol used by the GA instance.
ruleConditions This property is required. List<Property Map>
Forward action.

GetForwardingRulesForwardingRuleRuleAction

ForwardGroupConfigs This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig>
Forwarding configuration.
Order This property is required. int
Forwarding priority.
RuleActionType This property is required. string
Forward action type.
ForwardGroupConfigs This property is required. []GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig
Forwarding configuration.
Order This property is required. int
Forwarding priority.
RuleActionType This property is required. string
Forward action type.
forwardGroupConfigs This property is required. List<GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig>
Forwarding configuration.
order This property is required. Integer
Forwarding priority.
ruleActionType This property is required. String
Forward action type.
forwardGroupConfigs This property is required. GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig[]
Forwarding configuration.
order This property is required. number
Forwarding priority.
ruleActionType This property is required. string
Forward action type.
forward_group_configs This property is required. Sequence[GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig]
Forwarding configuration.
order This property is required. int
Forwarding priority.
rule_action_type This property is required. str
Forward action type.
forwardGroupConfigs This property is required. List<Property Map>
Forwarding configuration.
order This property is required. Number
Forwarding priority.
ruleActionType This property is required. String
Forward action type.

GetForwardingRulesForwardingRuleRuleActionForwardGroupConfig

serverGroupTuples This property is required. List<Property Map>
Terminal node group configuration.

GetForwardingRulesForwardingRuleRuleActionForwardGroupConfigServerGroupTuple

EndpointGroupId This property is required. string
Terminal node group ID.
EndpointGroupId This property is required. string
Terminal node group ID.
endpointGroupId This property is required. String
Terminal node group ID.
endpointGroupId This property is required. string
Terminal node group ID.
endpoint_group_id This property is required. str
Terminal node group ID.
endpointGroupId This property is required. String
Terminal node group ID.

GetForwardingRulesForwardingRuleRuleCondition

HostConfigs This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetForwardingRulesForwardingRuleRuleConditionHostConfig>
Domain name configuration information.
PathConfigs This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetForwardingRulesForwardingRuleRuleConditionPathConfig>
Path configuration information.
RuleConditionType This property is required. string
Forwarding condition type.
HostConfigs This property is required. []GetForwardingRulesForwardingRuleRuleConditionHostConfig
Domain name configuration information.
PathConfigs This property is required. []GetForwardingRulesForwardingRuleRuleConditionPathConfig
Path configuration information.
RuleConditionType This property is required. string
Forwarding condition type.
hostConfigs This property is required. List<GetForwardingRulesForwardingRuleRuleConditionHostConfig>
Domain name configuration information.
pathConfigs This property is required. List<GetForwardingRulesForwardingRuleRuleConditionPathConfig>
Path configuration information.
ruleConditionType This property is required. String
Forwarding condition type.
hostConfigs This property is required. GetForwardingRulesForwardingRuleRuleConditionHostConfig[]
Domain name configuration information.
pathConfigs This property is required. GetForwardingRulesForwardingRuleRuleConditionPathConfig[]
Path configuration information.
ruleConditionType This property is required. string
Forwarding condition type.
host_configs This property is required. Sequence[GetForwardingRulesForwardingRuleRuleConditionHostConfig]
Domain name configuration information.
path_configs This property is required. Sequence[GetForwardingRulesForwardingRuleRuleConditionPathConfig]
Path configuration information.
rule_condition_type This property is required. str
Forwarding condition type.
hostConfigs This property is required. List<Property Map>
Domain name configuration information.
pathConfigs This property is required. List<Property Map>
Path configuration information.
ruleConditionType This property is required. String
Forwarding condition type.

GetForwardingRulesForwardingRuleRuleConditionHostConfig

Values This property is required. List<string>
The domain name is 3-128 characters long.
Values This property is required. []string
The domain name is 3-128 characters long.
values This property is required. List<String>
The domain name is 3-128 characters long.
values This property is required. string[]
The domain name is 3-128 characters long.
values This property is required. Sequence[str]
The domain name is 3-128 characters long.
values This property is required. List<String>
The domain name is 3-128 characters long.

GetForwardingRulesForwardingRuleRuleConditionPathConfig

Values This property is required. List<string>
The domain name is 3-128 characters long.
Values This property is required. []string
The domain name is 3-128 characters long.
values This property is required. List<String>
The domain name is 3-128 characters long.
values This property is required. string[]
The domain name is 3-128 characters long.
values This property is required. Sequence[str]
The domain name is 3-128 characters long.
values This property is required. List<String>
The domain name is 3-128 characters long.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi