1. Packages
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. gtm
  6. Policy
Viewing docs for bytepluscc v0.0.42
published on Monday, Jul 20, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.42
published on Monday, Jul 20, 2026 by Byteplus

    Scheduling policy configuration under the GTM instance, identified by GtmId and PolicyType, and maintained via UpdatePolicy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const gTMPolicyDemo = new bytepluscc.gtm.Policy("GTMPolicyDemo", {
        gtmId: "003cd3af-dc55-xxxxx-xxxxxx-41470d406367",
        policyType: "perf",
        targets: [{
            pool_id: "ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66",
        }],
        alarmOnly: false,
        routingMode: "geo-lb",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    g_tm_policy_demo = bytepluscc.gtm.Policy("GTMPolicyDemo",
        gtm_id="003cd3af-dc55-xxxxx-xxxxxx-41470d406367",
        policy_type="perf",
        targets=[{
            "pool_id": "ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66",
        }],
        alarm_only=False,
        routing_mode="geo-lb")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/gtm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gtm.NewPolicy(ctx, "GTMPolicyDemo", &gtm.PolicyArgs{
    			GtmId:      pulumi.String("003cd3af-dc55-xxxxx-xxxxxx-41470d406367"),
    			PolicyType: pulumi.String("perf"),
    			Targets: gtm.PolicyTargetArray{
    				&gtm.PolicyTargetArgs{
    					Pool_id: "ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66",
    				},
    			},
    			AlarmOnly:   pulumi.Bool(false),
    			RoutingMode: pulumi.String("geo-lb"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var gTMPolicyDemo = new Bytepluscc.Gtm.Policy("GTMPolicyDemo", new()
        {
            GtmId = "003cd3af-dc55-xxxxx-xxxxxx-41470d406367",
            PolicyType = "perf",
            Targets = new[]
            {
                new Bytepluscc.Gtm.Inputs.PolicyTargetArgs
                {
                    Pool_id = "ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66",
                },
            },
            AlarmOnly = false,
            RoutingMode = "geo-lb",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.gtm.Policy;
    import com.byteplus.bytepluscc.gtm.PolicyArgs;
    import com.pulumi.bytepluscc.gtm.inputs.PolicyTargetArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var gTMPolicyDemo = new Policy("gTMPolicyDemo", PolicyArgs.builder()
                .gtmId("003cd3af-dc55-xxxxx-xxxxxx-41470d406367")
                .policyType("perf")
                .targets(PolicyTargetArgs.builder()
                    .pool_id("ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66")
                    .build())
                .alarmOnly(false)
                .routingMode("geo-lb")
                .build());
    
        }
    }
    
    resources:
      gTMPolicyDemo:
        type: bytepluscc:gtm:Policy
        name: GTMPolicyDemo
        properties:
          gtmId: 003cd3af-dc55-xxxxx-xxxxxx-41470d406367
          policyType: perf
          targets:
            - pool_id: ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66
          alarmOnly: false
          routingMode: geo-lb
    
    pulumi {
      required_providers {
        bytepluscc = {
          source = "pulumi/bytepluscc"
        }
      }
    }
    
    resource "bytepluscc_gtm_policy" "GTMPolicyDemo" {
      gtm_id      = "003cd3af-dc55-xxxxx-xxxxxx-41470d406367"
      policy_type = "perf"
      targets {
        pool_id = "ad65b9fb-e8f5-xxxxx-xxxxxx-bc4f2741cd66"
      }
      alarm_only   = false
      routing_mode = "geo-lb"
    }
    

    Create Policy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: PolicyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               gtm_id: Optional[str] = None,
               policy_type: Optional[str] = None,
               alarm_only: Optional[bool] = None,
               routing_mode: Optional[str] = None,
               targets: Optional[Sequence[PolicyTargetArgs]] = None)
    func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: bytepluscc:gtm:Policy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "bytepluscc_gtm_policy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyArgs
    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 PolicyArgs
    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 PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyArgs
    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 policyResource = new Bytepluscc.Gtm.Policy("policyResource", new()
    {
        GtmId = "string",
        PolicyType = "string",
        AlarmOnly = false,
        RoutingMode = "string",
        Targets = new[]
        {
            new Bytepluscc.Gtm.Inputs.PolicyTargetArgs
            {
                PoolId = "string",
            },
        },
    });
    
    example, err := gtm.NewPolicy(ctx, "policyResource", &gtm.PolicyArgs{
    	GtmId:       pulumi.String("string"),
    	PolicyType:  pulumi.String("string"),
    	AlarmOnly:   pulumi.Bool(false),
    	RoutingMode: pulumi.String("string"),
    	Targets: gtm.PolicyTargetArray{
    		&gtm.PolicyTargetArgs{
    			PoolId: pulumi.String("string"),
    		},
    	},
    })
    
    resource "bytepluscc_gtm_policy" "policyResource" {
      lifecycle {
        create_before_destroy = true
      }
      gtm_id       = "string"
      policy_type  = "string"
      alarm_only   = false
      routing_mode = "string"
      targets {
        pool_id = "string"
      }
    }
    
    var policyResource = new com.byteplus.bytepluscc.gtm.Policy("policyResource", com.byteplus.bytepluscc.gtm.PolicyArgs.builder()
        .gtmId("string")
        .policyType("string")
        .alarmOnly(false)
        .routingMode("string")
        .targets(PolicyTargetArgs.builder()
            .poolId("string")
            .build())
        .build());
    
    policy_resource = bytepluscc.gtm.Policy("policyResource",
        gtm_id="string",
        policy_type="string",
        alarm_only=False,
        routing_mode="string",
        targets=[{
            "pool_id": "string",
        }])
    
    const policyResource = new bytepluscc.gtm.Policy("policyResource", {
        gtmId: "string",
        policyType: "string",
        alarmOnly: false,
        routingMode: "string",
        targets: [{
            poolId: "string",
        }],
    });
    
    type: bytepluscc:gtm:Policy
    properties:
        alarmOnly: false
        gtmId: string
        policyType: string
        routingMode: string
        targets:
            - poolId: string
    

    Policy 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 Policy resource accepts the following input properties:

    GtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    PolicyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    AlarmOnly bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    RoutingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    Targets List<Byteplus.PolicyTarget>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    GtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    PolicyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    AlarmOnly bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    RoutingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    Targets []PolicyTargetArgs
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    gtm_id string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    policy_type string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    alarm_only bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    routing_mode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    targets list(object)
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    gtmId String
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    policyType String
    Strategy type. geo: Basic routing. perf: Intelligent routing
    alarmOnly Boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    routingMode String
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    targets List<PolicyTarget>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    gtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    policyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    alarmOnly boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    routingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    targets PolicyTarget[]
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    gtm_id str
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    policy_type str
    Strategy type. geo: Basic routing. perf: Intelligent routing
    alarm_only bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    routing_mode str
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    targets Sequence[PolicyTargetArgs]
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    gtmId String
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    policyType String
    Strategy type. geo: Basic routing. perf: Intelligent routing
    alarmOnly Boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    routingMode String
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    targets List<Property Map>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PerfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    Statistics Byteplus.PolicyStatistics
    Statistical information about address status
    Id string
    The provider-assigned unique ID for this managed resource.
    PerfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    Statistics PolicyStatistics
    Statistical information about address status
    id string
    The provider-assigned unique ID for this managed resource.
    perf_mode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    statistics object
    Statistical information about address status
    id String
    The provider-assigned unique ID for this managed resource.
    perfMode String
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    statistics PolicyStatistics
    Statistical information about address status
    id string
    The provider-assigned unique ID for this managed resource.
    perfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    statistics PolicyStatistics
    Statistical information about address status
    id str
    The provider-assigned unique ID for this managed resource.
    perf_mode str
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    statistics PolicyStatistics
    Statistical information about address status
    id String
    The provider-assigned unique ID for this managed resource.
    perfMode String
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    statistics Property Map
    Statistical information about address status

    Look up Existing Policy Resource

    Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alarm_only: Optional[bool] = None,
            gtm_id: Optional[str] = None,
            perf_mode: Optional[str] = None,
            policy_type: Optional[str] = None,
            routing_mode: Optional[str] = None,
            statistics: Optional[PolicyStatisticsArgs] = None,
            targets: Optional[Sequence[PolicyTargetArgs]] = None) -> Policy
    func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
    public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
    public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:gtm:Policy    get:      id: ${id}
    import {
      to = bytepluscc_gtm_policy.example
      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.
    The following state arguments are supported:
    AlarmOnly bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    GtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    PerfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    PolicyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    RoutingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    Statistics Byteplus.PolicyStatistics
    Statistical information about address status
    Targets List<Byteplus.PolicyTarget>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    AlarmOnly bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    GtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    PerfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    PolicyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    RoutingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    Statistics PolicyStatisticsArgs
    Statistical information about address status
    Targets []PolicyTargetArgs
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    alarm_only bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    gtm_id string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    perf_mode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    policy_type string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    routing_mode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    statistics object
    Statistical information about address status
    targets list(object)
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    alarmOnly Boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    gtmId String
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    perfMode String
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    policyType String
    Strategy type. geo: Basic routing. perf: Intelligent routing
    routingMode String
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    statistics PolicyStatistics
    Statistical information about address status
    targets List<PolicyTarget>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    alarmOnly boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    gtmId string
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    perfMode string
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    policyType string
    Strategy type. geo: Basic routing. perf: Intelligent routing
    routingMode string
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    statistics PolicyStatistics
    Statistical information about address status
    targets PolicyTarget[]
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    alarm_only bool
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    gtm_id str
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    perf_mode str
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    policy_type str
    Strategy type. geo: Basic routing. perf: Intelligent routing
    routing_mode str
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    statistics PolicyStatisticsArgs
    Statistical information about address status
    targets Sequence[PolicyTargetArgs]
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
    alarmOnly Boolean
    If the current address pool set is unavailable, Cloud Scheduling GTM only triggers an alert notification and does not automatically switch to an available address pool. true: Cloud Scheduling GTM only triggers an alert notification. false: Cloud Scheduling GTM automatically switches to an available address pool
    gtmId String
    UUID of the GTM instance. You can obtain GtmId through the ListGtms API
    perfMode String
    Routing mode for intelligent routing strategy. perf: Performance first. capacity: Capacity first. feedback: Load feedback
    policyType String
    Strategy type. geo: Basic routing. perf: Intelligent routing
    routingMode String
    Routing mode. The parameter values are: lb: Based on load balancing, user traffic is routed proportionally to different IDCs. geo: Based on the user's geographic location and operator, user traffic is routed to the nearest IDC on the same operator's network. geo-lb (default): First, based on the user's geographic location and operator, user traffic is routed to the nearest IDC access line on the same operator's network. Then, based on load balancing, user traffic is routed proportionally to multiple IDCs
    statistics Property Map
    Statistical information about address status
    targets List<Property Map>
    Traffic target for intelligent routing strategy Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.

    Supporting Types

    PolicyStatistics, PolicyStatisticsArgs

    ActiveAddr int
    Number of available addresses
    InactiveAddr int
    Number of unavailable addresses
    ActiveAddr int
    Number of available addresses
    InactiveAddr int
    Number of unavailable addresses
    active_addr number
    Number of available addresses
    inactive_addr number
    Number of unavailable addresses
    activeAddr Integer
    Number of available addresses
    inactiveAddr Integer
    Number of unavailable addresses
    activeAddr number
    Number of available addresses
    inactiveAddr number
    Number of unavailable addresses
    active_addr int
    Number of available addresses
    inactive_addr int
    Number of unavailable addresses
    activeAddr Number
    Number of available addresses
    inactiveAddr Number
    Number of unavailable addresses

    PolicyTarget, PolicyTargetArgs

    PoolId string
    Address pool ID.
    PoolId string
    Address pool ID.
    pool_id string
    Address pool ID.
    poolId String
    Address pool ID.
    poolId string
    Address pool ID.
    pool_id str
    Address pool ID.
    poolId String
    Address pool ID.

    Import

    $ pulumi import bytepluscc:gtm/policy:Policy example "gtm_id|policy_type"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.42
    published on Monday, Jul 20, 2026 by Byteplus

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial