alicloud.ga.ForwardingRule
Explore with Pulumi AI
Provides a Global Accelerator (GA) Forwarding Rule resource.
For information about Global Accelerator (GA) Forwarding Rule and how to use it, see What is Forwarding Rule.
NOTE: Available since v1.120.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const region = config.get("region") || "cn-hangzhou";
const name = config.get("name") || "tf-example";
const _default = alicloud.getRegions({
    current: true,
});
const example = new alicloud.ga.Accelerator("example", {
    duration: 3,
    spec: "2",
    acceleratorName: name,
    autoUseCoupon: false,
    description: name,
    autoRenewDuration: 2,
    renewalStatus: "AutoRenewal",
});
const exampleBandwidthPackage = new alicloud.ga.BandwidthPackage("example", {
    type: "Basic",
    bandwidth: 20,
    bandwidthType: "Basic",
    duration: "1",
    autoPay: true,
    paymentType: "Subscription",
    autoUseCoupon: false,
    bandwidthPackageName: name,
    description: name,
});
const exampleBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("example", {
    acceleratorId: example.id,
    bandwidthPackageId: exampleBandwidthPackage.id,
});
const exampleListener = new alicloud.ga.Listener("example", {
    acceleratorId: exampleBandwidthPackageAttachment.acceleratorId,
    clientAffinity: "SOURCE_IP",
    description: name,
    name: name,
    protocol: "HTTP",
    proxyProtocol: true,
    portRanges: [{
        fromPort: 60,
        toPort: 60,
    }],
});
const exampleEipAddress = new alicloud.ecs.EipAddress("example", {
    bandwidth: "10",
    internetChargeType: "PayByBandwidth",
});
const virtual = new alicloud.ga.EndpointGroup("virtual", {
    acceleratorId: example.id,
    endpointConfigurations: [{
        endpoint: exampleEipAddress.ipAddress,
        type: "PublicIp",
        weight: 20,
        enableClientipPreservation: true,
    }],
    endpointGroupRegion: _default.then(_default => _default.regions?.[0]?.id),
    listenerId: exampleListener.id,
    description: name,
    endpointGroupType: "virtual",
    endpointRequestProtocol: "HTTPS",
    healthCheckIntervalSeconds: 4,
    healthCheckPath: "/path",
    name: name,
    thresholdCount: 4,
    trafficPercentage: 20,
    portOverrides: {
        endpointPort: 80,
        listenerPort: 60,
    },
});
const exampleForwardingRule = new alicloud.ga.ForwardingRule("example", {
    acceleratorId: example.id,
    listenerId: exampleListener.id,
    ruleConditions: [
        {
            ruleConditionType: "Path",
            pathConfig: {
                values: ["/testpathconfig"],
            },
        },
        {
            ruleConditionType: "Host",
            hostConfigs: [{
                values: ["www.test.com"],
            }],
        },
    ],
    ruleActions: [{
        order: 40,
        ruleActionType: "ForwardGroup",
        forwardGroupConfig: {
            serverGroupTuples: [{
                endpointGroupId: virtual.id,
            }],
        },
    }],
    priority: 2,
    forwardingRuleName: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
region = config.get("region")
if region is None:
    region = "cn-hangzhou"
name = config.get("name")
if name is None:
    name = "tf-example"
default = alicloud.get_regions(current=True)
example = alicloud.ga.Accelerator("example",
    duration=3,
    spec="2",
    accelerator_name=name,
    auto_use_coupon=False,
    description=name,
    auto_renew_duration=2,
    renewal_status="AutoRenewal")
example_bandwidth_package = alicloud.ga.BandwidthPackage("example",
    type="Basic",
    bandwidth=20,
    bandwidth_type="Basic",
    duration="1",
    auto_pay=True,
    payment_type="Subscription",
    auto_use_coupon=False,
    bandwidth_package_name=name,
    description=name)
example_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("example",
    accelerator_id=example.id,
    bandwidth_package_id=example_bandwidth_package.id)
example_listener = alicloud.ga.Listener("example",
    accelerator_id=example_bandwidth_package_attachment.accelerator_id,
    client_affinity="SOURCE_IP",
    description=name,
    name=name,
    protocol="HTTP",
    proxy_protocol=True,
    port_ranges=[{
        "from_port": 60,
        "to_port": 60,
    }])
example_eip_address = alicloud.ecs.EipAddress("example",
    bandwidth="10",
    internet_charge_type="PayByBandwidth")
virtual = alicloud.ga.EndpointGroup("virtual",
    accelerator_id=example.id,
    endpoint_configurations=[{
        "endpoint": example_eip_address.ip_address,
        "type": "PublicIp",
        "weight": 20,
        "enable_clientip_preservation": True,
    }],
    endpoint_group_region=default.regions[0].id,
    listener_id=example_listener.id,
    description=name,
    endpoint_group_type="virtual",
    endpoint_request_protocol="HTTPS",
    health_check_interval_seconds=4,
    health_check_path="/path",
    name=name,
    threshold_count=4,
    traffic_percentage=20,
    port_overrides={
        "endpoint_port": 80,
        "listener_port": 60,
    })
example_forwarding_rule = alicloud.ga.ForwardingRule("example",
    accelerator_id=example.id,
    listener_id=example_listener.id,
    rule_conditions=[
        {
            "rule_condition_type": "Path",
            "path_config": {
                "values": ["/testpathconfig"],
            },
        },
        {
            "rule_condition_type": "Host",
            "host_configs": [{
                "values": ["www.test.com"],
            }],
        },
    ],
    rule_actions=[{
        "order": 40,
        "rule_action_type": "ForwardGroup",
        "forward_group_config": {
            "server_group_tuples": [{
                "endpoint_group_id": virtual.id,
            }],
        },
    }],
    priority=2,
    forwarding_rule_name=name)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		region := "cn-hangzhou"
		if param := cfg.Get("region"); param != "" {
			region = param
		}
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
			Current: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		example, err := ga.NewAccelerator(ctx, "example", &ga.AcceleratorArgs{
			Duration:          pulumi.Int(3),
			Spec:              pulumi.String("2"),
			AcceleratorName:   pulumi.String(name),
			AutoUseCoupon:     pulumi.Bool(false),
			Description:       pulumi.String(name),
			AutoRenewDuration: pulumi.Int(2),
			RenewalStatus:     pulumi.String("AutoRenewal"),
		})
		if err != nil {
			return err
		}
		exampleBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "example", &ga.BandwidthPackageArgs{
			Type:                 pulumi.String("Basic"),
			Bandwidth:            pulumi.Int(20),
			BandwidthType:        pulumi.String("Basic"),
			Duration:             pulumi.String("1"),
			AutoPay:              pulumi.Bool(true),
			PaymentType:          pulumi.String("Subscription"),
			AutoUseCoupon:        pulumi.Bool(false),
			BandwidthPackageName: pulumi.String(name),
			Description:          pulumi.String(name),
		})
		if err != nil {
			return err
		}
		exampleBandwidthPackageAttachment, err := ga.NewBandwidthPackageAttachment(ctx, "example", &ga.BandwidthPackageAttachmentArgs{
			AcceleratorId:      example.ID(),
			BandwidthPackageId: exampleBandwidthPackage.ID(),
		})
		if err != nil {
			return err
		}
		exampleListener, err := ga.NewListener(ctx, "example", &ga.ListenerArgs{
			AcceleratorId:  exampleBandwidthPackageAttachment.AcceleratorId,
			ClientAffinity: pulumi.String("SOURCE_IP"),
			Description:    pulumi.String(name),
			Name:           pulumi.String(name),
			Protocol:       pulumi.String("HTTP"),
			ProxyProtocol:  pulumi.Bool(true),
			PortRanges: ga.ListenerPortRangeArray{
				&ga.ListenerPortRangeArgs{
					FromPort: pulumi.Int(60),
					ToPort:   pulumi.Int(60),
				},
			},
		})
		if err != nil {
			return err
		}
		exampleEipAddress, err := ecs.NewEipAddress(ctx, "example", &ecs.EipAddressArgs{
			Bandwidth:          pulumi.String("10"),
			InternetChargeType: pulumi.String("PayByBandwidth"),
		})
		if err != nil {
			return err
		}
		virtual, err := ga.NewEndpointGroup(ctx, "virtual", &ga.EndpointGroupArgs{
			AcceleratorId: example.ID(),
			EndpointConfigurations: ga.EndpointGroupEndpointConfigurationArray{
				&ga.EndpointGroupEndpointConfigurationArgs{
					Endpoint:                   exampleEipAddress.IpAddress,
					Type:                       pulumi.String("PublicIp"),
					Weight:                     pulumi.Int(20),
					EnableClientipPreservation: pulumi.Bool(true),
				},
			},
			EndpointGroupRegion:        pulumi.String(_default.Regions[0].Id),
			ListenerId:                 exampleListener.ID(),
			Description:                pulumi.String(name),
			EndpointGroupType:          pulumi.String("virtual"),
			EndpointRequestProtocol:    pulumi.String("HTTPS"),
			HealthCheckIntervalSeconds: pulumi.Int(4),
			HealthCheckPath:            pulumi.String("/path"),
			Name:                       pulumi.String(name),
			ThresholdCount:             pulumi.Int(4),
			TrafficPercentage:          pulumi.Int(20),
			PortOverrides: &ga.EndpointGroupPortOverridesArgs{
				EndpointPort: pulumi.Int(80),
				ListenerPort: pulumi.Int(60),
			},
		})
		if err != nil {
			return err
		}
		_, err = ga.NewForwardingRule(ctx, "example", &ga.ForwardingRuleArgs{
			AcceleratorId: example.ID(),
			ListenerId:    exampleListener.ID(),
			RuleConditions: ga.ForwardingRuleRuleConditionArray{
				&ga.ForwardingRuleRuleConditionArgs{
					RuleConditionType: pulumi.String("Path"),
					PathConfig: &ga.ForwardingRuleRuleConditionPathConfigArgs{
						Values: pulumi.StringArray{
							pulumi.String("/testpathconfig"),
						},
					},
				},
				&ga.ForwardingRuleRuleConditionArgs{
					RuleConditionType: pulumi.String("Host"),
					HostConfigs: ga.ForwardingRuleRuleConditionHostConfigArray{
						&ga.ForwardingRuleRuleConditionHostConfigArgs{
							Values: pulumi.StringArray{
								pulumi.String("www.test.com"),
							},
						},
					},
				},
			},
			RuleActions: ga.ForwardingRuleRuleActionArray{
				&ga.ForwardingRuleRuleActionArgs{
					Order:          pulumi.Int(40),
					RuleActionType: pulumi.String("ForwardGroup"),
					ForwardGroupConfig: &ga.ForwardingRuleRuleActionForwardGroupConfigArgs{
						ServerGroupTuples: ga.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArray{
							&ga.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs{
								EndpointGroupId: virtual.ID(),
							},
						},
					},
				},
			},
			Priority:           pulumi.Int(2),
			ForwardingRuleName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var region = config.Get("region") ?? "cn-hangzhou";
    var name = config.Get("name") ?? "tf-example";
    var @default = AliCloud.GetRegions.Invoke(new()
    {
        Current = true,
    });
    var example = new AliCloud.Ga.Accelerator("example", new()
    {
        Duration = 3,
        Spec = "2",
        AcceleratorName = name,
        AutoUseCoupon = false,
        Description = name,
        AutoRenewDuration = 2,
        RenewalStatus = "AutoRenewal",
    });
    var exampleBandwidthPackage = new AliCloud.Ga.BandwidthPackage("example", new()
    {
        Type = "Basic",
        Bandwidth = 20,
        BandwidthType = "Basic",
        Duration = "1",
        AutoPay = true,
        PaymentType = "Subscription",
        AutoUseCoupon = false,
        BandwidthPackageName = name,
        Description = name,
    });
    var exampleBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("example", new()
    {
        AcceleratorId = example.Id,
        BandwidthPackageId = exampleBandwidthPackage.Id,
    });
    var exampleListener = new AliCloud.Ga.Listener("example", new()
    {
        AcceleratorId = exampleBandwidthPackageAttachment.AcceleratorId,
        ClientAffinity = "SOURCE_IP",
        Description = name,
        Name = name,
        Protocol = "HTTP",
        ProxyProtocol = true,
        PortRanges = new[]
        {
            new AliCloud.Ga.Inputs.ListenerPortRangeArgs
            {
                FromPort = 60,
                ToPort = 60,
            },
        },
    });
    var exampleEipAddress = new AliCloud.Ecs.EipAddress("example", new()
    {
        Bandwidth = "10",
        InternetChargeType = "PayByBandwidth",
    });
    var @virtual = new AliCloud.Ga.EndpointGroup("virtual", new()
    {
        AcceleratorId = example.Id,
        EndpointConfigurations = new[]
        {
            new AliCloud.Ga.Inputs.EndpointGroupEndpointConfigurationArgs
            {
                Endpoint = exampleEipAddress.IpAddress,
                Type = "PublicIp",
                Weight = 20,
                EnableClientipPreservation = true,
            },
        },
        EndpointGroupRegion = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
        ListenerId = exampleListener.Id,
        Description = name,
        EndpointGroupType = "virtual",
        EndpointRequestProtocol = "HTTPS",
        HealthCheckIntervalSeconds = 4,
        HealthCheckPath = "/path",
        Name = name,
        ThresholdCount = 4,
        TrafficPercentage = 20,
        PortOverrides = new AliCloud.Ga.Inputs.EndpointGroupPortOverridesArgs
        {
            EndpointPort = 80,
            ListenerPort = 60,
        },
    });
    var exampleForwardingRule = new AliCloud.Ga.ForwardingRule("example", new()
    {
        AcceleratorId = example.Id,
        ListenerId = exampleListener.Id,
        RuleConditions = new[]
        {
            new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionArgs
            {
                RuleConditionType = "Path",
                PathConfig = new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionPathConfigArgs
                {
                    Values = new[]
                    {
                        "/testpathconfig",
                    },
                },
            },
            new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionArgs
            {
                RuleConditionType = "Host",
                HostConfigs = new[]
                {
                    new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionHostConfigArgs
                    {
                        Values = new[]
                        {
                            "www.test.com",
                        },
                    },
                },
            },
        },
        RuleActions = new[]
        {
            new AliCloud.Ga.Inputs.ForwardingRuleRuleActionArgs
            {
                Order = 40,
                RuleActionType = "ForwardGroup",
                ForwardGroupConfig = new AliCloud.Ga.Inputs.ForwardingRuleRuleActionForwardGroupConfigArgs
                {
                    ServerGroupTuples = new[]
                    {
                        new AliCloud.Ga.Inputs.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs
                        {
                            EndpointGroupId = @virtual.Id,
                        },
                    },
                },
            },
        },
        Priority = 2,
        ForwardingRuleName = name,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.alicloud.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.BandwidthPackage;
import com.pulumi.alicloud.ga.BandwidthPackageArgs;
import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
import com.pulumi.alicloud.ga.Listener;
import com.pulumi.alicloud.ga.ListenerArgs;
import com.pulumi.alicloud.ga.inputs.ListenerPortRangeArgs;
import com.pulumi.alicloud.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.ga.EndpointGroup;
import com.pulumi.alicloud.ga.EndpointGroupArgs;
import com.pulumi.alicloud.ga.inputs.EndpointGroupEndpointConfigurationArgs;
import com.pulumi.alicloud.ga.inputs.EndpointGroupPortOverridesArgs;
import com.pulumi.alicloud.ga.ForwardingRule;
import com.pulumi.alicloud.ga.ForwardingRuleArgs;
import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleConditionArgs;
import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleConditionPathConfigArgs;
import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleActionArgs;
import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleActionForwardGroupConfigArgs;
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 config = ctx.config();
        final var region = config.get("region").orElse("cn-hangzhou");
        final var name = config.get("name").orElse("tf-example");
        final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
            .current(true)
            .build());
        var example = new Accelerator("example", AcceleratorArgs.builder()
            .duration(3)
            .spec("2")
            .acceleratorName(name)
            .autoUseCoupon(false)
            .description(name)
            .autoRenewDuration("2")
            .renewalStatus("AutoRenewal")
            .build());
        var exampleBandwidthPackage = new BandwidthPackage("exampleBandwidthPackage", BandwidthPackageArgs.builder()
            .type("Basic")
            .bandwidth(20)
            .bandwidthType("Basic")
            .duration(1)
            .autoPay(true)
            .paymentType("Subscription")
            .autoUseCoupon(false)
            .bandwidthPackageName(name)
            .description(name)
            .build());
        var exampleBandwidthPackageAttachment = new BandwidthPackageAttachment("exampleBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
            .acceleratorId(example.id())
            .bandwidthPackageId(exampleBandwidthPackage.id())
            .build());
        var exampleListener = new Listener("exampleListener", ListenerArgs.builder()
            .acceleratorId(exampleBandwidthPackageAttachment.acceleratorId())
            .clientAffinity("SOURCE_IP")
            .description(name)
            .name(name)
            .protocol("HTTP")
            .proxyProtocol(true)
            .portRanges(ListenerPortRangeArgs.builder()
                .fromPort(60)
                .toPort(60)
                .build())
            .build());
        var exampleEipAddress = new EipAddress("exampleEipAddress", EipAddressArgs.builder()
            .bandwidth("10")
            .internetChargeType("PayByBandwidth")
            .build());
        var virtual = new EndpointGroup("virtual", EndpointGroupArgs.builder()
            .acceleratorId(example.id())
            .endpointConfigurations(EndpointGroupEndpointConfigurationArgs.builder()
                .endpoint(exampleEipAddress.ipAddress())
                .type("PublicIp")
                .weight("20")
                .enableClientipPreservation(true)
                .build())
            .endpointGroupRegion(default_.regions()[0].id())
            .listenerId(exampleListener.id())
            .description(name)
            .endpointGroupType("virtual")
            .endpointRequestProtocol("HTTPS")
            .healthCheckIntervalSeconds(4)
            .healthCheckPath("/path")
            .name(name)
            .thresholdCount(4)
            .trafficPercentage(20)
            .portOverrides(EndpointGroupPortOverridesArgs.builder()
                .endpointPort(80)
                .listenerPort(60)
                .build())
            .build());
        var exampleForwardingRule = new ForwardingRule("exampleForwardingRule", ForwardingRuleArgs.builder()
            .acceleratorId(example.id())
            .listenerId(exampleListener.id())
            .ruleConditions(            
                ForwardingRuleRuleConditionArgs.builder()
                    .ruleConditionType("Path")
                    .pathConfig(ForwardingRuleRuleConditionPathConfigArgs.builder()
                        .values("/testpathconfig")
                        .build())
                    .build(),
                ForwardingRuleRuleConditionArgs.builder()
                    .ruleConditionType("Host")
                    .hostConfigs(ForwardingRuleRuleConditionHostConfigArgs.builder()
                        .values("www.test.com")
                        .build())
                    .build())
            .ruleActions(ForwardingRuleRuleActionArgs.builder()
                .order("40")
                .ruleActionType("ForwardGroup")
                .forwardGroupConfig(ForwardingRuleRuleActionForwardGroupConfigArgs.builder()
                    .serverGroupTuples(ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                        .endpointGroupId(virtual.id())
                        .build())
                    .build())
                .build())
            .priority(2)
            .forwardingRuleName(name)
            .build());
    }
}
configuration:
  region:
    type: string
    default: cn-hangzhou
  name:
    type: string
    default: tf-example
resources:
  example:
    type: alicloud:ga:Accelerator
    properties:
      duration: 3
      spec: '2'
      acceleratorName: ${name}
      autoUseCoupon: false
      description: ${name}
      autoRenewDuration: '2'
      renewalStatus: AutoRenewal
  exampleBandwidthPackage:
    type: alicloud:ga:BandwidthPackage
    name: example
    properties:
      type: Basic
      bandwidth: 20
      bandwidthType: Basic
      duration: 1
      autoPay: true
      paymentType: Subscription
      autoUseCoupon: false
      bandwidthPackageName: ${name}
      description: ${name}
  exampleBandwidthPackageAttachment:
    type: alicloud:ga:BandwidthPackageAttachment
    name: example
    properties:
      acceleratorId: ${example.id}
      bandwidthPackageId: ${exampleBandwidthPackage.id}
  exampleListener:
    type: alicloud:ga:Listener
    name: example
    properties:
      acceleratorId: ${exampleBandwidthPackageAttachment.acceleratorId}
      clientAffinity: SOURCE_IP
      description: ${name}
      name: ${name}
      protocol: HTTP
      proxyProtocol: true
      portRanges:
        - fromPort: 60
          toPort: 60
  exampleEipAddress:
    type: alicloud:ecs:EipAddress
    name: example
    properties:
      bandwidth: '10'
      internetChargeType: PayByBandwidth
  virtual:
    type: alicloud:ga:EndpointGroup
    properties:
      acceleratorId: ${example.id}
      endpointConfigurations:
        - endpoint: ${exampleEipAddress.ipAddress}
          type: PublicIp
          weight: '20'
          enableClientipPreservation: true
      endpointGroupRegion: ${default.regions[0].id}
      listenerId: ${exampleListener.id}
      description: ${name}
      endpointGroupType: virtual
      endpointRequestProtocol: HTTPS
      healthCheckIntervalSeconds: 4
      healthCheckPath: /path
      name: ${name}
      thresholdCount: 4
      trafficPercentage: 20
      portOverrides:
        endpointPort: 80
        listenerPort: 60
  exampleForwardingRule:
    type: alicloud:ga:ForwardingRule
    name: example
    properties:
      acceleratorId: ${example.id}
      listenerId: ${exampleListener.id}
      ruleConditions:
        - ruleConditionType: Path
          pathConfig:
            values:
              - /testpathconfig
        - ruleConditionType: Host
          hostConfigs:
            - values:
                - www.test.com
      ruleActions:
        - order: '40'
          ruleActionType: ForwardGroup
          forwardGroupConfig:
            serverGroupTuples:
              - endpointGroupId: ${virtual.id}
      priority: 2
      forwardingRuleName: ${name}
variables:
  default:
    fn::invoke:
      function: alicloud:getRegions
      arguments:
        current: true
Create ForwardingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ForwardingRule(name: string, args: ForwardingRuleArgs, opts?: CustomResourceOptions);@overload
def ForwardingRule(resource_name: str,
                   args: ForwardingRuleArgs,
                   opts: Optional[ResourceOptions] = None)
@overload
def ForwardingRule(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   accelerator_id: Optional[str] = None,
                   listener_id: Optional[str] = None,
                   rule_actions: Optional[Sequence[ForwardingRuleRuleActionArgs]] = None,
                   rule_conditions: Optional[Sequence[ForwardingRuleRuleConditionArgs]] = None,
                   forwarding_rule_name: Optional[str] = None,
                   priority: Optional[int] = None)func NewForwardingRule(ctx *Context, name string, args ForwardingRuleArgs, opts ...ResourceOption) (*ForwardingRule, error)public ForwardingRule(string name, ForwardingRuleArgs args, CustomResourceOptions? opts = null)
public ForwardingRule(String name, ForwardingRuleArgs args)
public ForwardingRule(String name, ForwardingRuleArgs args, CustomResourceOptions options)
type: alicloud:ga:ForwardingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ForwardingRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var forwardingRuleResource = new AliCloud.Ga.ForwardingRule("forwardingRuleResource", new()
{
    AcceleratorId = "string",
    ListenerId = "string",
    RuleActions = new[]
    {
        new AliCloud.Ga.Inputs.ForwardingRuleRuleActionArgs
        {
            Order = 0,
            RuleActionType = "string",
            ForwardGroupConfig = new AliCloud.Ga.Inputs.ForwardingRuleRuleActionForwardGroupConfigArgs
            {
                ServerGroupTuples = new[]
                {
                    new AliCloud.Ga.Inputs.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs
                    {
                        EndpointGroupId = "string",
                    },
                },
            },
            RuleActionValue = "string",
        },
    },
    RuleConditions = new[]
    {
        new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionArgs
        {
            RuleConditionType = "string",
            HostConfigs = new[]
            {
                new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionHostConfigArgs
                {
                    Values = new[]
                    {
                        "string",
                    },
                },
            },
            PathConfig = new AliCloud.Ga.Inputs.ForwardingRuleRuleConditionPathConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
            RuleConditionValue = "string",
        },
    },
    ForwardingRuleName = "string",
    Priority = 0,
});
example, err := ga.NewForwardingRule(ctx, "forwardingRuleResource", &ga.ForwardingRuleArgs{
	AcceleratorId: pulumi.String("string"),
	ListenerId:    pulumi.String("string"),
	RuleActions: ga.ForwardingRuleRuleActionArray{
		&ga.ForwardingRuleRuleActionArgs{
			Order:          pulumi.Int(0),
			RuleActionType: pulumi.String("string"),
			ForwardGroupConfig: &ga.ForwardingRuleRuleActionForwardGroupConfigArgs{
				ServerGroupTuples: ga.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArray{
					&ga.ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs{
						EndpointGroupId: pulumi.String("string"),
					},
				},
			},
			RuleActionValue: pulumi.String("string"),
		},
	},
	RuleConditions: ga.ForwardingRuleRuleConditionArray{
		&ga.ForwardingRuleRuleConditionArgs{
			RuleConditionType: pulumi.String("string"),
			HostConfigs: ga.ForwardingRuleRuleConditionHostConfigArray{
				&ga.ForwardingRuleRuleConditionHostConfigArgs{
					Values: pulumi.StringArray{
						pulumi.String("string"),
					},
				},
			},
			PathConfig: &ga.ForwardingRuleRuleConditionPathConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			RuleConditionValue: pulumi.String("string"),
		},
	},
	ForwardingRuleName: pulumi.String("string"),
	Priority:           pulumi.Int(0),
})
var forwardingRuleResource = new ForwardingRule("forwardingRuleResource", ForwardingRuleArgs.builder()
    .acceleratorId("string")
    .listenerId("string")
    .ruleActions(ForwardingRuleRuleActionArgs.builder()
        .order(0)
        .ruleActionType("string")
        .forwardGroupConfig(ForwardingRuleRuleActionForwardGroupConfigArgs.builder()
            .serverGroupTuples(ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                .endpointGroupId("string")
                .build())
            .build())
        .ruleActionValue("string")
        .build())
    .ruleConditions(ForwardingRuleRuleConditionArgs.builder()
        .ruleConditionType("string")
        .hostConfigs(ForwardingRuleRuleConditionHostConfigArgs.builder()
            .values("string")
            .build())
        .pathConfig(ForwardingRuleRuleConditionPathConfigArgs.builder()
            .values("string")
            .build())
        .ruleConditionValue("string")
        .build())
    .forwardingRuleName("string")
    .priority(0)
    .build());
forwarding_rule_resource = alicloud.ga.ForwardingRule("forwardingRuleResource",
    accelerator_id="string",
    listener_id="string",
    rule_actions=[{
        "order": 0,
        "rule_action_type": "string",
        "forward_group_config": {
            "server_group_tuples": [{
                "endpoint_group_id": "string",
            }],
        },
        "rule_action_value": "string",
    }],
    rule_conditions=[{
        "rule_condition_type": "string",
        "host_configs": [{
            "values": ["string"],
        }],
        "path_config": {
            "values": ["string"],
        },
        "rule_condition_value": "string",
    }],
    forwarding_rule_name="string",
    priority=0)
const forwardingRuleResource = new alicloud.ga.ForwardingRule("forwardingRuleResource", {
    acceleratorId: "string",
    listenerId: "string",
    ruleActions: [{
        order: 0,
        ruleActionType: "string",
        forwardGroupConfig: {
            serverGroupTuples: [{
                endpointGroupId: "string",
            }],
        },
        ruleActionValue: "string",
    }],
    ruleConditions: [{
        ruleConditionType: "string",
        hostConfigs: [{
            values: ["string"],
        }],
        pathConfig: {
            values: ["string"],
        },
        ruleConditionValue: "string",
    }],
    forwardingRuleName: "string",
    priority: 0,
});
type: alicloud:ga:ForwardingRule
properties:
    acceleratorId: string
    forwardingRuleName: string
    listenerId: string
    priority: 0
    ruleActions:
        - forwardGroupConfig:
            serverGroupTuples:
                - endpointGroupId: string
          order: 0
          ruleActionType: string
          ruleActionValue: string
    ruleConditions:
        - hostConfigs:
            - values:
                - string
          pathConfig:
            values:
                - string
          ruleConditionType: string
          ruleConditionValue: string
ForwardingRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ForwardingRule resource accepts the following input properties:
- AcceleratorId string
- The ID of the Global Accelerator instance.
- ListenerId string
- The ID of the listener.
- RuleActions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action> 
- Forward action. See rule_actionsbelow.
- RuleConditions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition> 
- Forwarding condition list. See rule_conditionsbelow.
- ForwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- Priority int
- Forwarding policy priority.
- AcceleratorId string
- The ID of the Global Accelerator instance.
- ListenerId string
- The ID of the listener.
- RuleActions []ForwardingRule Rule Action Args 
- Forward action. See rule_actionsbelow.
- RuleConditions []ForwardingRule Rule Condition Args 
- Forwarding condition list. See rule_conditionsbelow.
- ForwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- Priority int
- Forwarding policy priority.
- acceleratorId String
- The ID of the Global Accelerator instance.
- listenerId String
- The ID of the listener.
- ruleActions List<ForwardingRule Rule Action> 
- Forward action. See rule_actionsbelow.
- ruleConditions List<ForwardingRule Rule Condition> 
- Forwarding condition list. See rule_conditionsbelow.
- forwardingRule StringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- priority Integer
- Forwarding policy priority.
- acceleratorId string
- The ID of the Global Accelerator instance.
- listenerId string
- The ID of the listener.
- ruleActions ForwardingRule Rule Action[] 
- Forward action. See rule_actionsbelow.
- ruleConditions ForwardingRule Rule Condition[] 
- Forwarding condition list. See rule_conditionsbelow.
- forwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- priority number
- Forwarding policy priority.
- accelerator_id str
- The ID of the Global Accelerator instance.
- listener_id str
- The ID of the listener.
- rule_actions Sequence[ForwardingRule Rule Action Args] 
- Forward action. See rule_actionsbelow.
- rule_conditions Sequence[ForwardingRule Rule Condition Args] 
- Forwarding condition list. See rule_conditionsbelow.
- forwarding_rule_ strname 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- priority int
- Forwarding policy priority.
- acceleratorId String
- The ID of the Global Accelerator instance.
- listenerId String
- The ID of the listener.
- ruleActions List<Property Map>
- Forward action. See rule_actionsbelow.
- ruleConditions List<Property Map>
- Forwarding condition list. See rule_conditionsbelow.
- forwardingRule StringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- priority Number
- Forwarding policy priority.
Outputs
All input properties are implicitly available as output properties. Additionally, the ForwardingRule resource produces the following output properties:
- ForwardingRule stringId 
- The ID of the Forwarding Rule.
- ForwardingRule stringStatus 
- The status of the Forwarding Rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- ForwardingRule stringId 
- The ID of the Forwarding Rule.
- ForwardingRule stringStatus 
- The status of the Forwarding Rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- forwardingRule StringId 
- The ID of the Forwarding Rule.
- forwardingRule StringStatus 
- The status of the Forwarding Rule.
- id String
- The provider-assigned unique ID for this managed resource.
- forwardingRule stringId 
- The ID of the Forwarding Rule.
- forwardingRule stringStatus 
- The status of the Forwarding Rule.
- id string
- The provider-assigned unique ID for this managed resource.
- forwarding_rule_ strid 
- The ID of the Forwarding Rule.
- forwarding_rule_ strstatus 
- The status of the Forwarding Rule.
- id str
- The provider-assigned unique ID for this managed resource.
- forwardingRule StringId 
- The ID of the Forwarding Rule.
- forwardingRule StringStatus 
- The status of the Forwarding Rule.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ForwardingRule Resource
Get an existing ForwardingRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ForwardingRuleState, opts?: CustomResourceOptions): ForwardingRule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accelerator_id: Optional[str] = None,
        forwarding_rule_id: Optional[str] = None,
        forwarding_rule_name: Optional[str] = None,
        forwarding_rule_status: Optional[str] = None,
        listener_id: Optional[str] = None,
        priority: Optional[int] = None,
        rule_actions: Optional[Sequence[ForwardingRuleRuleActionArgs]] = None,
        rule_conditions: Optional[Sequence[ForwardingRuleRuleConditionArgs]] = None) -> ForwardingRulefunc GetForwardingRule(ctx *Context, name string, id IDInput, state *ForwardingRuleState, opts ...ResourceOption) (*ForwardingRule, error)public static ForwardingRule Get(string name, Input<string> id, ForwardingRuleState? state, CustomResourceOptions? opts = null)public static ForwardingRule get(String name, Output<String> id, ForwardingRuleState state, CustomResourceOptions options)resources:  _:    type: alicloud:ga:ForwardingRule    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AcceleratorId string
- The ID of the Global Accelerator instance.
- ForwardingRule stringId 
- The ID of the Forwarding Rule.
- ForwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- ForwardingRule stringStatus 
- The status of the Forwarding Rule.
- ListenerId string
- The ID of the listener.
- Priority int
- Forwarding policy priority.
- RuleActions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action> 
- Forward action. See rule_actionsbelow.
- RuleConditions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition> 
- Forwarding condition list. See rule_conditionsbelow.
- AcceleratorId string
- The ID of the Global Accelerator instance.
- ForwardingRule stringId 
- The ID of the Forwarding Rule.
- ForwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- ForwardingRule stringStatus 
- The status of the Forwarding Rule.
- ListenerId string
- The ID of the listener.
- Priority int
- Forwarding policy priority.
- RuleActions []ForwardingRule Rule Action Args 
- Forward action. See rule_actionsbelow.
- RuleConditions []ForwardingRule Rule Condition Args 
- Forwarding condition list. See rule_conditionsbelow.
- acceleratorId String
- The ID of the Global Accelerator instance.
- forwardingRule StringId 
- The ID of the Forwarding Rule.
- forwardingRule StringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- forwardingRule StringStatus 
- The status of the Forwarding Rule.
- listenerId String
- The ID of the listener.
- priority Integer
- Forwarding policy priority.
- ruleActions List<ForwardingRule Rule Action> 
- Forward action. See rule_actionsbelow.
- ruleConditions List<ForwardingRule Rule Condition> 
- Forwarding condition list. See rule_conditionsbelow.
- acceleratorId string
- The ID of the Global Accelerator instance.
- forwardingRule stringId 
- The ID of the Forwarding Rule.
- forwardingRule stringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- forwardingRule stringStatus 
- The status of the Forwarding Rule.
- listenerId string
- The ID of the listener.
- priority number
- Forwarding policy priority.
- ruleActions ForwardingRule Rule Action[] 
- Forward action. See rule_actionsbelow.
- ruleConditions ForwardingRule Rule Condition[] 
- Forwarding condition list. See rule_conditionsbelow.
- accelerator_id str
- The ID of the Global Accelerator instance.
- forwarding_rule_ strid 
- The ID of the Forwarding Rule.
- forwarding_rule_ strname 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- forwarding_rule_ strstatus 
- The status of the Forwarding Rule.
- listener_id str
- The ID of the listener.
- priority int
- Forwarding policy priority.
- rule_actions Sequence[ForwardingRule Rule Action Args] 
- Forward action. See rule_actionsbelow.
- rule_conditions Sequence[ForwardingRule Rule Condition Args] 
- Forwarding condition list. See rule_conditionsbelow.
- acceleratorId String
- The ID of the Global Accelerator instance.
- forwardingRule StringId 
- The ID of the Forwarding Rule.
- forwardingRule StringName 
- Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
- forwardingRule StringStatus 
- The status of the Forwarding Rule.
- listenerId String
- The ID of the listener.
- priority Number
- Forwarding policy priority.
- ruleActions List<Property Map>
- Forward action. See rule_actionsbelow.
- ruleConditions List<Property Map>
- Forwarding condition list. See rule_conditionsbelow.
Supporting Types
ForwardingRuleRuleAction, ForwardingRuleRuleActionArgs        
- Order int
- Forwarding priority.
- RuleAction stringType 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- ForwardGroup Pulumi.Config Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action Forward Group Config 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- RuleAction stringValue 
- The value of the forwarding action type. For more information, see How to use it.
- Order int
- Forwarding priority.
- RuleAction stringType 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- ForwardGroup ForwardingConfig Rule Rule Action Forward Group Config 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- RuleAction stringValue 
- The value of the forwarding action type. For more information, see How to use it.
- order Integer
- Forwarding priority.
- ruleAction StringType 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- forwardGroup ForwardingConfig Rule Rule Action Forward Group Config 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- ruleAction StringValue 
- The value of the forwarding action type. For more information, see How to use it.
- order number
- Forwarding priority.
- ruleAction stringType 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- forwardGroup ForwardingConfig Rule Rule Action Forward Group Config 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- ruleAction stringValue 
- The value of the forwarding action type. For more information, see How to use it.
- order int
- Forwarding priority.
- rule_action_ strtype 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- forward_group_ Forwardingconfig Rule Rule Action Forward Group Config 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- rule_action_ strvalue 
- The value of the forwarding action type. For more information, see How to use it.
- order Number
- Forwarding priority.
- ruleAction StringType 
- The type of the forwarding action. Valid values: ForwardGroup,Redirect,FixResponse,Rewrite,AddHeader,RemoveHeader,Drop.
- forwardGroup Property MapConfig 
- Forwarding configuration. See - forward_group_configbelow.- NOTE: From version 1.207.0, We recommend that you do not use - forward_group_config, and we recommend that you use the- rule_action_typeand- rule_action_valueto configure forwarding actions.
- ruleAction StringValue 
- The value of the forwarding action type. For more information, see How to use it.
ForwardingRuleRuleActionForwardGroupConfig, ForwardingRuleRuleActionForwardGroupConfigArgs              
- ServerGroup List<Pulumi.Tuples Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action Forward Group Config Server Group Tuple> 
- The information about the endpoint group. See server_group_tuplesbelow.
- ServerGroup []ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple 
- The information about the endpoint group. See server_group_tuplesbelow.
- serverGroup List<ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple> 
- The information about the endpoint group. See server_group_tuplesbelow.
- serverGroup ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple[] 
- The information about the endpoint group. See server_group_tuplesbelow.
- server_group_ Sequence[Forwardingtuples Rule Rule Action Forward Group Config Server Group Tuple] 
- The information about the endpoint group. See server_group_tuplesbelow.
- serverGroup List<Property Map>Tuples 
- The information about the endpoint group. See server_group_tuplesbelow.
ForwardingRuleRuleActionForwardGroupConfigServerGroupTuple, ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs                    
- EndpointGroup stringId 
- The ID of the endpoint group.
- EndpointGroup stringId 
- The ID of the endpoint group.
- endpointGroup StringId 
- The ID of the endpoint group.
- endpointGroup stringId 
- The ID of the endpoint group.
- endpoint_group_ strid 
- The ID of the endpoint group.
- endpointGroup StringId 
- The ID of the endpoint group.
ForwardingRuleRuleCondition, ForwardingRuleRuleConditionArgs        
- RuleCondition stringType 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- HostConfigs List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition Host Config> 
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- PathConfig Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition Path Config 
- The configuration of the path. See path_configbelow.
- RuleCondition stringValue 
- The value of the forwarding condition type. For more information, see How to use it.
- RuleCondition stringType 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- HostConfigs []ForwardingRule Rule Condition Host Config 
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- PathConfig ForwardingRule Rule Condition Path Config 
- The configuration of the path. See path_configbelow.
- RuleCondition stringValue 
- The value of the forwarding condition type. For more information, see How to use it.
- ruleCondition StringType 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- hostConfigs List<ForwardingRule Rule Condition Host Config> 
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- pathConfig ForwardingRule Rule Condition Path Config 
- The configuration of the path. See path_configbelow.
- ruleCondition StringValue 
- The value of the forwarding condition type. For more information, see How to use it.
- ruleCondition stringType 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- hostConfigs ForwardingRule Rule Condition Host Config[] 
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- pathConfig ForwardingRule Rule Condition Path Config 
- The configuration of the path. See path_configbelow.
- ruleCondition stringValue 
- The value of the forwarding condition type. For more information, see How to use it.
- rule_condition_ strtype 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- host_configs Sequence[ForwardingRule Rule Condition Host Config] 
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- path_config ForwardingRule Rule Condition Path Config 
- The configuration of the path. See path_configbelow.
- rule_condition_ strvalue 
- The value of the forwarding condition type. For more information, see How to use it.
- ruleCondition StringType 
- The type of the forwarding conditions. Valid values: Host,Path,RequestHeader,Query,Method,Cookie,SourceIP. NOTE: From version 1.231.0,rule_condition_typecan be set toRequestHeader,Query,Method,Cookie,SourceIP.
- hostConfigs List<Property Map>
- The configuration of the domain name. See - host_configbelow.- NOTE: From version 1.231.0, We recommend that you do not use - path_configor- host_config, and we recommend that you use the- rule_condition_typeand- rule_condition_valueto configure forwarding conditions.
- pathConfig Property Map
- The configuration of the path. See path_configbelow.
- ruleCondition StringValue 
- The value of the forwarding condition type. For more information, see How to use it.
ForwardingRuleRuleConditionHostConfig, ForwardingRuleRuleConditionHostConfigArgs            
- Values List<string>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- Values []string
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values List<String>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values string[]
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values Sequence[str]
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values List<String>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
ForwardingRuleRuleConditionPathConfig, ForwardingRuleRuleConditionPathConfigArgs            
- Values List<string>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- Values []string
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values List<String>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values string[]
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values Sequence[str]
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
- values List<String>
- The domain name is 3-128 characters long, which can contain letters, numbers, dashes (-) and width period (.), and supports the use of asterisk (*) and width question mark (?) as wildcard characters.
Import
Ga Forwarding Rule can be imported using the id, e.g.
$ pulumi import alicloud:ga/forwardingRule:ForwardingRule example <accelerator_id>:<listener_id>:<forwarding_rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.