Provides a ESA Network Optimization resource.
For information about ESA Network Optimization and how to use it, see What is Network Optimization.
NOTE: Available since v1.244.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = alicloud.esa.getSites({
planSubscribeType: "enterpriseplan",
});
const defaultInteger = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultSite = new alicloud.esa.Site("default", {
siteName: `gositecdn-${defaultInteger.result}.cn`,
instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
coverage: "overseas",
accessType: "NS",
});
const defaultNetworkOptimization = new alicloud.esa.NetworkOptimization("default", {
siteVersion: 0,
siteId: defaultSite.id,
ruleEnable: "on",
websocket: "off",
rule: "(http.host eq \"tf.example.com\")",
grpc: "off",
http2Origin: "off",
smartRouting: "off",
uploadMaxFilesize: "100",
ruleName: "network_optimization",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
default_integer = random.index.Integer("default",
min=10000,
max=99999)
default_site = alicloud.esa.Site("default",
site_name=f"gositecdn-{default_integer['result']}.cn",
instance_id=default.sites[0].instance_id,
coverage="overseas",
access_type="NS")
default_network_optimization = alicloud.esa.NetworkOptimization("default",
site_version=0,
site_id=default_site.id,
rule_enable="on",
websocket="off",
rule="(http.host eq \"tf.example.com\")",
grpc="off",
http2_origin="off",
smart_routing="off",
upload_max_filesize="100",
rule_name="network_optimization")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
}, nil)
if err != nil {
return err
}
defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
SiteName: pulumi.Sprintf("gositecdn-%v.cn", defaultInteger.Result),
InstanceId: pulumi.String(_default.Sites[0].InstanceId),
Coverage: pulumi.String("overseas"),
AccessType: pulumi.String("NS"),
})
if err != nil {
return err
}
_, err = esa.NewNetworkOptimization(ctx, "default", &esa.NetworkOptimizationArgs{
SiteVersion: pulumi.Int(0),
SiteId: defaultSite.ID(),
RuleEnable: pulumi.String("on"),
Websocket: pulumi.String("off"),
Rule: pulumi.String("(http.host eq \"tf.example.com\")"),
Grpc: pulumi.String("off"),
Http2Origin: pulumi.String("off"),
SmartRouting: pulumi.String("off"),
UploadMaxFilesize: pulumi.String("100"),
RuleName: pulumi.String("network_optimization"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Esa.GetSites.Invoke(new()
{
PlanSubscribeType = "enterpriseplan",
});
var defaultInteger = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultSite = new AliCloud.Esa.Site("default", new()
{
SiteName = $"gositecdn-{defaultInteger.Result}.cn",
InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
Coverage = "overseas",
AccessType = "NS",
});
var defaultNetworkOptimization = new AliCloud.Esa.NetworkOptimization("default", new()
{
SiteVersion = 0,
SiteId = defaultSite.Id,
RuleEnable = "on",
Websocket = "off",
Rule = "(http.host eq \"tf.example.com\")",
Grpc = "off",
Http2Origin = "off",
SmartRouting = "off",
UploadMaxFilesize = "100",
RuleName = "network_optimization",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
import com.pulumi.random.Integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.NetworkOptimization;
import com.pulumi.alicloud.esa.NetworkOptimizationArgs;
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 default = EsaFunctions.getSites(GetSitesArgs.builder()
.planSubscribeType("enterpriseplan")
.build());
var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultSite = new Site("defaultSite", SiteArgs.builder()
.siteName(String.format("gositecdn-%s.cn", defaultInteger.result()))
.instanceId(default_.sites()[0].instanceId())
.coverage("overseas")
.accessType("NS")
.build());
var defaultNetworkOptimization = new NetworkOptimization("defaultNetworkOptimization", NetworkOptimizationArgs.builder()
.siteVersion(0)
.siteId(defaultSite.id())
.ruleEnable("on")
.websocket("off")
.rule("(http.host eq \"tf.example.com\")")
.grpc("off")
.http2Origin("off")
.smartRouting("off")
.uploadMaxFilesize("100")
.ruleName("network_optimization")
.build());
}
}
resources:
defaultInteger:
type: random:Integer
name: default
properties:
min: 10000
max: 99999
defaultSite:
type: alicloud:esa:Site
name: default
properties:
siteName: gositecdn-${defaultInteger.result}.cn
instanceId: ${default.sites[0].instanceId}
coverage: overseas
accessType: NS
defaultNetworkOptimization:
type: alicloud:esa:NetworkOptimization
name: default
properties:
siteVersion: '0'
siteId: ${defaultSite.id}
ruleEnable: on
websocket: off
rule: (http.host eq "tf.example.com")
grpc: off
http2Origin: off
smartRouting: off
uploadMaxFilesize: '100'
ruleName: network_optimization
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
planSubscribeType: enterpriseplan
Create NetworkOptimization Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkOptimization(name: string, args: NetworkOptimizationArgs, opts?: CustomResourceOptions);@overload
def NetworkOptimization(resource_name: str,
args: NetworkOptimizationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkOptimization(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[int] = None,
grpc: Optional[str] = None,
http2_origin: Optional[str] = None,
rule: Optional[str] = None,
rule_enable: Optional[str] = None,
rule_name: Optional[str] = None,
sequence: Optional[int] = None,
site_version: Optional[int] = None,
smart_routing: Optional[str] = None,
upload_max_filesize: Optional[str] = None,
websocket: Optional[str] = None)func NewNetworkOptimization(ctx *Context, name string, args NetworkOptimizationArgs, opts ...ResourceOption) (*NetworkOptimization, error)public NetworkOptimization(string name, NetworkOptimizationArgs args, CustomResourceOptions? opts = null)
public NetworkOptimization(String name, NetworkOptimizationArgs args)
public NetworkOptimization(String name, NetworkOptimizationArgs args, CustomResourceOptions options)
type: alicloud:esa:NetworkOptimization
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 NetworkOptimizationArgs
- 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 NetworkOptimizationArgs
- 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 NetworkOptimizationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkOptimizationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkOptimizationArgs
- 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 networkOptimizationResource = new AliCloud.Esa.NetworkOptimization("networkOptimizationResource", new()
{
SiteId = 0,
Grpc = "string",
Http2Origin = "string",
Rule = "string",
RuleEnable = "string",
RuleName = "string",
Sequence = 0,
SiteVersion = 0,
SmartRouting = "string",
UploadMaxFilesize = "string",
Websocket = "string",
});
example, err := esa.NewNetworkOptimization(ctx, "networkOptimizationResource", &esa.NetworkOptimizationArgs{
SiteId: pulumi.Int(0),
Grpc: pulumi.String("string"),
Http2Origin: pulumi.String("string"),
Rule: pulumi.String("string"),
RuleEnable: pulumi.String("string"),
RuleName: pulumi.String("string"),
Sequence: pulumi.Int(0),
SiteVersion: pulumi.Int(0),
SmartRouting: pulumi.String("string"),
UploadMaxFilesize: pulumi.String("string"),
Websocket: pulumi.String("string"),
})
var networkOptimizationResource = new NetworkOptimization("networkOptimizationResource", NetworkOptimizationArgs.builder()
.siteId(0)
.grpc("string")
.http2Origin("string")
.rule("string")
.ruleEnable("string")
.ruleName("string")
.sequence(0)
.siteVersion(0)
.smartRouting("string")
.uploadMaxFilesize("string")
.websocket("string")
.build());
network_optimization_resource = alicloud.esa.NetworkOptimization("networkOptimizationResource",
site_id=0,
grpc="string",
http2_origin="string",
rule="string",
rule_enable="string",
rule_name="string",
sequence=0,
site_version=0,
smart_routing="string",
upload_max_filesize="string",
websocket="string")
const networkOptimizationResource = new alicloud.esa.NetworkOptimization("networkOptimizationResource", {
siteId: 0,
grpc: "string",
http2Origin: "string",
rule: "string",
ruleEnable: "string",
ruleName: "string",
sequence: 0,
siteVersion: 0,
smartRouting: "string",
uploadMaxFilesize: "string",
websocket: "string",
});
type: alicloud:esa:NetworkOptimization
properties:
grpc: string
http2Origin: string
rule: string
ruleEnable: string
ruleName: string
sequence: 0
siteId: 0
siteVersion: 0
smartRouting: string
uploadMaxFilesize: string
websocket: string
NetworkOptimization 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 NetworkOptimization resource accepts the following input properties:
- Site
Id int - Site ID.
- Grpc string
- Whether to enable GRPC, default is disabled. Value range:
- Http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- Rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- Rule
Name string - Rule name.
- Sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- Site
Version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- Smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- Upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- Websocket string
- Whether to enable Websocket, default is enabled. Value range:
- Site
Id int - Site ID.
- Grpc string
- Whether to enable GRPC, default is disabled. Value range:
- Http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- Rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- Rule
Name string - Rule name.
- Sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- Site
Version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- Smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- Upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- Websocket string
- Whether to enable Websocket, default is enabled. Value range:
- site
Id Integer - Site ID.
- grpc String
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin String
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule String
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name String - Rule name.
- sequence Integer
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Version Integer - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing String - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max StringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket String
- Whether to enable Websocket, default is enabled. Value range:
- site
Id number - Site ID.
- grpc string
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name string - Rule name.
- sequence number
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Version number - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket string
- Whether to enable Websocket, default is enabled. Value range:
- site_
id int - Site ID.
- grpc str
- Whether to enable GRPC, default is disabled. Value range:
- http2_
origin str - Whether to enable HTTP2 origin, default is disabled. Value range:
- rule str
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule_
enable str - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule_
name str - Rule name.
- sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site_
version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart_
routing str - Whether to enable smart routing service, default is disabled. Value range:
- upload_
max_ strfilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket str
- Whether to enable Websocket, default is enabled. Value range:
- site
Id Number - Site ID.
- grpc String
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin String
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule String
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name String - Rule name.
- sequence Number
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Version Number - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing String - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max StringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket String
- Whether to enable Websocket, default is enabled. Value range:
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkOptimization resource produces the following output properties:
Look up Existing NetworkOptimization Resource
Get an existing NetworkOptimization 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?: NetworkOptimizationState, opts?: CustomResourceOptions): NetworkOptimization@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
grpc: Optional[str] = None,
http2_origin: Optional[str] = None,
rule: Optional[str] = None,
rule_enable: Optional[str] = None,
rule_name: Optional[str] = None,
sequence: Optional[int] = None,
site_id: Optional[int] = None,
site_version: Optional[int] = None,
smart_routing: Optional[str] = None,
upload_max_filesize: Optional[str] = None,
websocket: Optional[str] = None) -> NetworkOptimizationfunc GetNetworkOptimization(ctx *Context, name string, id IDInput, state *NetworkOptimizationState, opts ...ResourceOption) (*NetworkOptimization, error)public static NetworkOptimization Get(string name, Input<string> id, NetworkOptimizationState? state, CustomResourceOptions? opts = null)public static NetworkOptimization get(String name, Output<String> id, NetworkOptimizationState state, CustomResourceOptions options)resources: _: type: alicloud:esa:NetworkOptimization 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.
- Config
Id int - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- Grpc string
- Whether to enable GRPC, default is disabled. Value range:
- Http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- Rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- Rule
Name string - Rule name.
- Sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- Site
Id int - Site ID.
- Site
Version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- Smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- Upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- Websocket string
- Whether to enable Websocket, default is enabled. Value range:
- Config
Id int - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- Grpc string
- Whether to enable GRPC, default is disabled. Value range:
- Http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- Rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- Rule
Name string - Rule name.
- Sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- Site
Id int - Site ID.
- Site
Version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- Smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- Upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- Websocket string
- Whether to enable Websocket, default is enabled. Value range:
- config
Id Integer - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- grpc String
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin String
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule String
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name String - Rule name.
- sequence Integer
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Id Integer - Site ID.
- site
Version Integer - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing String - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max StringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket String
- Whether to enable Websocket, default is enabled. Value range:
- config
Id number - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- grpc string
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin string
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule string
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name string - Rule name.
- sequence number
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Id number - Site ID.
- site
Version number - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing string - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max stringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket string
- Whether to enable Websocket, default is enabled. Value range:
- config_
id int - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- grpc str
- Whether to enable GRPC, default is disabled. Value range:
- http2_
origin str - Whether to enable HTTP2 origin, default is disabled. Value range:
- rule str
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule_
enable str - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule_
name str - Rule name.
- sequence int
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site_
id int - Site ID.
- site_
version int - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart_
routing str - Whether to enable smart routing service, default is disabled. Value range:
- upload_
max_ strfilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket str
- Whether to enable Websocket, default is enabled. Value range:
- config
Id Number - ConfigId of the configuration, which can be obtained by calling the ListNetworkOptimizations.
- grpc String
- Whether to enable GRPC, default is disabled. Value range:
- http2Origin String
- Whether to enable HTTP2 origin, default is disabled. Value range:
- rule String
- Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- rule
Name String - Rule name.
- sequence Number
- The rule execution order prioritizes lower numerical values. It is only applicable when setting or modifying the order of individual rule configurations.
- site
Id Number - Site ID.
- site
Version Number - The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
- smart
Routing String - Whether to enable smart routing service, default is disabled. Value range:
- upload
Max StringFilesize - Maximum upload file size, in MB, value range: 100~500.
- websocket String
- Whether to enable Websocket, default is enabled. Value range:
Import
ESA Network Optimization can be imported using the id, e.g.
$ pulumi import alicloud:esa/networkOptimization:NetworkOptimization example <site_id>:<config_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.
