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:
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Listener
Id string - The ID of the listener.
- Rule
Actions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action> - Forward action. See
rule_actions
below. - Rule
Conditions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition> - Forwarding condition list. See
rule_conditions
below. - Forwarding
Rule 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.
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Listener
Id string - The ID of the listener.
- Rule
Actions []ForwardingRule Rule Action Args - Forward action. See
rule_actions
below. - Rule
Conditions []ForwardingRule Rule Condition Args - Forwarding condition list. See
rule_conditions
below. - Forwarding
Rule 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.
- accelerator
Id String - The ID of the Global Accelerator instance.
- listener
Id String - The ID of the listener.
- rule
Actions List<ForwardingRule Rule Action> - Forward action. See
rule_actions
below. - rule
Conditions List<ForwardingRule Rule Condition> - Forwarding condition list. See
rule_conditions
below. - forwarding
Rule 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.
- accelerator
Id string - The ID of the Global Accelerator instance.
- listener
Id string - The ID of the listener.
- rule
Actions ForwardingRule Rule Action[] - Forward action. See
rule_actions
below. - rule
Conditions ForwardingRule Rule Condition[] - Forwarding condition list. See
rule_conditions
below. - forwarding
Rule 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_actions
below. - rule_
conditions Sequence[ForwardingRule Rule Condition Args] - Forwarding condition list. See
rule_conditions
below. - 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.
- accelerator
Id String - The ID of the Global Accelerator instance.
- listener
Id String - The ID of the listener.
- rule
Actions List<Property Map> - Forward action. See
rule_actions
below. - rule
Conditions List<Property Map> - Forwarding condition list. See
rule_conditions
below. - forwarding
Rule 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:
- Forwarding
Rule stringId - The ID of the Forwarding Rule.
- Forwarding
Rule stringStatus - The status of the Forwarding Rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Forwarding
Rule stringId - The ID of the Forwarding Rule.
- Forwarding
Rule stringStatus - The status of the Forwarding Rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- forwarding
Rule StringId - The ID of the Forwarding Rule.
- forwarding
Rule StringStatus - The status of the Forwarding Rule.
- id String
- The provider-assigned unique ID for this managed resource.
- forwarding
Rule stringId - The ID of the Forwarding Rule.
- forwarding
Rule 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.
- forwarding
Rule StringId - The ID of the Forwarding Rule.
- forwarding
Rule 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) -> ForwardingRule
func 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)
Resource lookup is not supported in YAML
- 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.
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Forwarding
Rule stringId - The ID of the Forwarding Rule.
- Forwarding
Rule 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 (-).
- Forwarding
Rule stringStatus - The status of the Forwarding Rule.
- Listener
Id string - The ID of the listener.
- Priority int
- Forwarding policy priority.
- Rule
Actions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action> - Forward action. See
rule_actions
below. - Rule
Conditions List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition> - Forwarding condition list. See
rule_conditions
below.
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Forwarding
Rule stringId - The ID of the Forwarding Rule.
- Forwarding
Rule 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 (-).
- Forwarding
Rule stringStatus - The status of the Forwarding Rule.
- Listener
Id string - The ID of the listener.
- Priority int
- Forwarding policy priority.
- Rule
Actions []ForwardingRule Rule Action Args - Forward action. See
rule_actions
below. - Rule
Conditions []ForwardingRule Rule Condition Args - Forwarding condition list. See
rule_conditions
below.
- accelerator
Id String - The ID of the Global Accelerator instance.
- forwarding
Rule StringId - The ID of the Forwarding Rule.
- forwarding
Rule 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 (-).
- forwarding
Rule StringStatus - The status of the Forwarding Rule.
- listener
Id String - The ID of the listener.
- priority Integer
- Forwarding policy priority.
- rule
Actions List<ForwardingRule Rule Action> - Forward action. See
rule_actions
below. - rule
Conditions List<ForwardingRule Rule Condition> - Forwarding condition list. See
rule_conditions
below.
- accelerator
Id string - The ID of the Global Accelerator instance.
- forwarding
Rule stringId - The ID of the Forwarding Rule.
- forwarding
Rule 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 (-).
- forwarding
Rule stringStatus - The status of the Forwarding Rule.
- listener
Id string - The ID of the listener.
- priority number
- Forwarding policy priority.
- rule
Actions ForwardingRule Rule Action[] - Forward action. See
rule_actions
below. - rule
Conditions ForwardingRule Rule Condition[] - Forwarding condition list. See
rule_conditions
below.
- 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_actions
below. - rule_
conditions Sequence[ForwardingRule Rule Condition Args] - Forwarding condition list. See
rule_conditions
below.
- accelerator
Id String - The ID of the Global Accelerator instance.
- forwarding
Rule StringId - The ID of the Forwarding Rule.
- forwarding
Rule 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 (-).
- forwarding
Rule StringStatus - The status of the Forwarding Rule.
- listener
Id String - The ID of the listener.
- priority Number
- Forwarding policy priority.
- rule
Actions List<Property Map> - Forward action. See
rule_actions
below. - rule
Conditions List<Property Map> - Forwarding condition list. See
rule_conditions
below.
Supporting Types
ForwardingRuleRuleAction, ForwardingRuleRuleActionArgs
- Order int
- Forwarding priority.
- Rule
Action stringType - The type of the forwarding action. Valid values:
ForwardGroup
,Redirect
,FixResponse
,Rewrite
,AddHeader
,RemoveHeader
,Drop
. - Forward
Group Pulumi.Config Ali Cloud. Ga. Inputs. Forwarding Rule Rule Action Forward Group Config Forwarding configuration. See
forward_group_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to configure forwarding actions.- Rule
Action stringValue - The value of the forwarding action type. For more information, see How to use it.
- Order int
- Forwarding priority.
- Rule
Action stringType - 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_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to configure forwarding actions.- Rule
Action stringValue - The value of the forwarding action type. For more information, see How to use it.
- order Integer
- Forwarding priority.
- rule
Action StringType - 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_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to configure forwarding actions.- rule
Action StringValue - The value of the forwarding action type. For more information, see How to use it.
- order number
- Forwarding priority.
- rule
Action stringType - 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_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to configure forwarding actions.- rule
Action 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_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to 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.
- rule
Action StringType - The type of the forwarding action. Valid values:
ForwardGroup
,Redirect
,FixResponse
,Rewrite
,AddHeader
,RemoveHeader
,Drop
. - forward
Group Property MapConfig Forwarding configuration. See
forward_group_config
below.NOTE: From version 1.207.0, We recommend that you do not use
forward_group_config
, and we recommend that you use therule_action_type
andrule_action_value
to configure forwarding actions.- rule
Action StringValue - The value of the forwarding action type. For more information, see How to use it.
ForwardingRuleRuleActionForwardGroupConfig, ForwardingRuleRuleActionForwardGroupConfigArgs
- Server
Group 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_tuples
below.
- Server
Group []ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple - The information about the endpoint group. See
server_group_tuples
below.
- server
Group List<ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple> - The information about the endpoint group. See
server_group_tuples
below.
- server
Group ForwardingTuples Rule Rule Action Forward Group Config Server Group Tuple[] - The information about the endpoint group. See
server_group_tuples
below.
- server_
group_ Sequence[Forwardingtuples Rule Rule Action Forward Group Config Server Group Tuple] - The information about the endpoint group. See
server_group_tuples
below.
- server
Group List<Property Map>Tuples - The information about the endpoint group. See
server_group_tuples
below.
ForwardingRuleRuleActionForwardGroupConfigServerGroupTuple, ForwardingRuleRuleActionForwardGroupConfigServerGroupTupleArgs
- Endpoint
Group stringId - The ID of the endpoint group.
- Endpoint
Group stringId - The ID of the endpoint group.
- endpoint
Group StringId - The ID of the endpoint group.
- endpoint
Group stringId - The ID of the endpoint group.
- endpoint_
group_ strid - The ID of the endpoint group.
- endpoint
Group StringId - The ID of the endpoint group.
ForwardingRuleRuleCondition, ForwardingRuleRuleConditionArgs
- Rule
Condition stringType - The type of the forwarding conditions. Valid values:
Host
,Path
,RequestHeader
,Query
,Method
,Cookie
,SourceIP
. NOTE: From version 1.231.0,rule_condition_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - Host
Configs List<Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition Host Config> The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- Path
Config Pulumi.Ali Cloud. Ga. Inputs. Forwarding Rule Rule Condition Path Config - The configuration of the path. See
path_config
below. - Rule
Condition stringValue - The value of the forwarding condition type. For more information, see How to use it.
- Rule
Condition stringType - The type of the forwarding conditions. Valid values:
Host
,Path
,RequestHeader
,Query
,Method
,Cookie
,SourceIP
. NOTE: From version 1.231.0,rule_condition_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - Host
Configs []ForwardingRule Rule Condition Host Config The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- Path
Config ForwardingRule Rule Condition Path Config - The configuration of the path. See
path_config
below. - Rule
Condition stringValue - The value of the forwarding condition type. For more information, see How to use it.
- rule
Condition StringType - The type of the forwarding conditions. Valid values:
Host
,Path
,RequestHeader
,Query
,Method
,Cookie
,SourceIP
. NOTE: From version 1.231.0,rule_condition_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - host
Configs List<ForwardingRule Rule Condition Host Config> The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- path
Config ForwardingRule Rule Condition Path Config - The configuration of the path. See
path_config
below. - rule
Condition StringValue - The value of the forwarding condition type. For more information, see How to use it.
- rule
Condition stringType - The type of the forwarding conditions. Valid values:
Host
,Path
,RequestHeader
,Query
,Method
,Cookie
,SourceIP
. NOTE: From version 1.231.0,rule_condition_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - host
Configs ForwardingRule Rule Condition Host Config[] The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- path
Config ForwardingRule Rule Condition Path Config - The configuration of the path. See
path_config
below. - rule
Condition 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_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - host_
configs Sequence[ForwardingRule Rule Condition Host Config] The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- path_
config ForwardingRule Rule Condition Path Config - The configuration of the path. See
path_config
below. - rule_
condition_ strvalue - The value of the forwarding condition type. For more information, see How to use it.
- rule
Condition StringType - The type of the forwarding conditions. Valid values:
Host
,Path
,RequestHeader
,Query
,Method
,Cookie
,SourceIP
. NOTE: From version 1.231.0,rule_condition_type
can be set toRequestHeader
,Query
,Method
,Cookie
,SourceIP
. - host
Configs List<Property Map> The configuration of the domain name. See
host_config
below.NOTE: From version 1.231.0, We recommend that you do not use
path_config
orhost_config
, and we recommend that you use therule_condition_type
andrule_condition_value
to configure forwarding conditions.- path
Config Property Map - The configuration of the path. See
path_config
below. - rule
Condition 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
alicloud
Terraform Provider.