1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TsfApiRateLimitRule
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.TsfApiRateLimitRule

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a tsf api_rate_limit_rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const apiRateLimitRule = new tencentcloud.TsfApiRateLimitRule("apiRateLimitRule", {
        apiId: "api-xxxxxx",
        maxQps: 10,
        usableStatus: "enable",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    api_rate_limit_rule = tencentcloud.TsfApiRateLimitRule("apiRateLimitRule",
        api_id="api-xxxxxx",
        max_qps=10,
        usable_status="enable")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewTsfApiRateLimitRule(ctx, "apiRateLimitRule", &tencentcloud.TsfApiRateLimitRuleArgs{
    			ApiId:        pulumi.String("api-xxxxxx"),
    			MaxQps:       pulumi.Float64(10),
    			UsableStatus: pulumi.String("enable"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var apiRateLimitRule = new Tencentcloud.TsfApiRateLimitRule("apiRateLimitRule", new()
        {
            ApiId = "api-xxxxxx",
            MaxQps = 10,
            UsableStatus = "enable",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TsfApiRateLimitRule;
    import com.pulumi.tencentcloud.TsfApiRateLimitRuleArgs;
    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) {
            var apiRateLimitRule = new TsfApiRateLimitRule("apiRateLimitRule", TsfApiRateLimitRuleArgs.builder()
                .apiId("api-xxxxxx")
                .maxQps(10)
                .usableStatus("enable")
                .build());
    
        }
    }
    
    resources:
      apiRateLimitRule:
        type: tencentcloud:TsfApiRateLimitRule
        properties:
          apiId: api-xxxxxx
          maxQps: 10
          usableStatus: enable
    

    Create TsfApiRateLimitRule Resource

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

    Constructor syntax

    new TsfApiRateLimitRule(name: string, args: TsfApiRateLimitRuleArgs, opts?: CustomResourceOptions);
    @overload
    def TsfApiRateLimitRule(resource_name: str,
                            args: TsfApiRateLimitRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def TsfApiRateLimitRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            api_id: Optional[str] = None,
                            max_qps: Optional[float] = None,
                            tsf_api_rate_limit_rule_id: Optional[str] = None,
                            usable_status: Optional[str] = None)
    func NewTsfApiRateLimitRule(ctx *Context, name string, args TsfApiRateLimitRuleArgs, opts ...ResourceOption) (*TsfApiRateLimitRule, error)
    public TsfApiRateLimitRule(string name, TsfApiRateLimitRuleArgs args, CustomResourceOptions? opts = null)
    public TsfApiRateLimitRule(String name, TsfApiRateLimitRuleArgs args)
    public TsfApiRateLimitRule(String name, TsfApiRateLimitRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TsfApiRateLimitRule
    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 TsfApiRateLimitRuleArgs
    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 TsfApiRateLimitRuleArgs
    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 TsfApiRateLimitRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TsfApiRateLimitRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TsfApiRateLimitRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ApiId string
    Api Id.
    MaxQps double
    qps value.
    TsfApiRateLimitRuleId string
    ID of the resource.
    UsableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    ApiId string
    Api Id.
    MaxQps float64
    qps value.
    TsfApiRateLimitRuleId string
    ID of the resource.
    UsableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId String
    Api Id.
    maxQps Double
    qps value.
    tsfApiRateLimitRuleId String
    ID of the resource.
    usableStatus String
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId string
    Api Id.
    maxQps number
    qps value.
    tsfApiRateLimitRuleId string
    ID of the resource.
    usableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    api_id str
    Api Id.
    max_qps float
    qps value.
    tsf_api_rate_limit_rule_id str
    ID of the resource.
    usable_status str
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId String
    Api Id.
    maxQps Number
    qps value.
    tsfApiRateLimitRuleId String
    ID of the resource.
    usableStatus String
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.

    Outputs

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

    CreatedTime string
    creation time.
    Description string
    describe.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleContent string
    Rule content.
    RuleId string
    rule Id.
    RuleName string
    Current limit name.
    TsfRuleId string
    Tsf Rule ID.
    UpdatedTime string
    update time.
    CreatedTime string
    creation time.
    Description string
    describe.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleContent string
    Rule content.
    RuleId string
    rule Id.
    RuleName string
    Current limit name.
    TsfRuleId string
    Tsf Rule ID.
    UpdatedTime string
    update time.
    createdTime String
    creation time.
    description String
    describe.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleContent String
    Rule content.
    ruleId String
    rule Id.
    ruleName String
    Current limit name.
    tsfRuleId String
    Tsf Rule ID.
    updatedTime String
    update time.
    createdTime string
    creation time.
    description string
    describe.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleContent string
    Rule content.
    ruleId string
    rule Id.
    ruleName string
    Current limit name.
    tsfRuleId string
    Tsf Rule ID.
    updatedTime string
    update time.
    created_time str
    creation time.
    description str
    describe.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_content str
    Rule content.
    rule_id str
    rule Id.
    rule_name str
    Current limit name.
    tsf_rule_id str
    Tsf Rule ID.
    updated_time str
    update time.
    createdTime String
    creation time.
    description String
    describe.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleContent String
    Rule content.
    ruleId String
    rule Id.
    ruleName String
    Current limit name.
    tsfRuleId String
    Tsf Rule ID.
    updatedTime String
    update time.

    Look up Existing TsfApiRateLimitRule Resource

    Get an existing TsfApiRateLimitRule 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?: TsfApiRateLimitRuleState, opts?: CustomResourceOptions): TsfApiRateLimitRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_id: Optional[str] = None,
            created_time: Optional[str] = None,
            description: Optional[str] = None,
            max_qps: Optional[float] = None,
            rule_content: Optional[str] = None,
            rule_id: Optional[str] = None,
            rule_name: Optional[str] = None,
            tsf_api_rate_limit_rule_id: Optional[str] = None,
            tsf_rule_id: Optional[str] = None,
            updated_time: Optional[str] = None,
            usable_status: Optional[str] = None) -> TsfApiRateLimitRule
    func GetTsfApiRateLimitRule(ctx *Context, name string, id IDInput, state *TsfApiRateLimitRuleState, opts ...ResourceOption) (*TsfApiRateLimitRule, error)
    public static TsfApiRateLimitRule Get(string name, Input<string> id, TsfApiRateLimitRuleState? state, CustomResourceOptions? opts = null)
    public static TsfApiRateLimitRule get(String name, Output<String> id, TsfApiRateLimitRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TsfApiRateLimitRule    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.
    The following state arguments are supported:
    ApiId string
    Api Id.
    CreatedTime string
    creation time.
    Description string
    describe.
    MaxQps double
    qps value.
    RuleContent string
    Rule content.
    RuleId string
    rule Id.
    RuleName string
    Current limit name.
    TsfApiRateLimitRuleId string
    ID of the resource.
    TsfRuleId string
    Tsf Rule ID.
    UpdatedTime string
    update time.
    UsableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    ApiId string
    Api Id.
    CreatedTime string
    creation time.
    Description string
    describe.
    MaxQps float64
    qps value.
    RuleContent string
    Rule content.
    RuleId string
    rule Id.
    RuleName string
    Current limit name.
    TsfApiRateLimitRuleId string
    ID of the resource.
    TsfRuleId string
    Tsf Rule ID.
    UpdatedTime string
    update time.
    UsableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId String
    Api Id.
    createdTime String
    creation time.
    description String
    describe.
    maxQps Double
    qps value.
    ruleContent String
    Rule content.
    ruleId String
    rule Id.
    ruleName String
    Current limit name.
    tsfApiRateLimitRuleId String
    ID of the resource.
    tsfRuleId String
    Tsf Rule ID.
    updatedTime String
    update time.
    usableStatus String
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId string
    Api Id.
    createdTime string
    creation time.
    description string
    describe.
    maxQps number
    qps value.
    ruleContent string
    Rule content.
    ruleId string
    rule Id.
    ruleName string
    Current limit name.
    tsfApiRateLimitRuleId string
    ID of the resource.
    tsfRuleId string
    Tsf Rule ID.
    updatedTime string
    update time.
    usableStatus string
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    api_id str
    Api Id.
    created_time str
    creation time.
    description str
    describe.
    max_qps float
    qps value.
    rule_content str
    Rule content.
    rule_id str
    rule Id.
    rule_name str
    Current limit name.
    tsf_api_rate_limit_rule_id str
    ID of the resource.
    tsf_rule_id str
    Tsf Rule ID.
    updated_time str
    update time.
    usable_status str
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
    apiId String
    Api Id.
    createdTime String
    creation time.
    description String
    describe.
    maxQps Number
    qps value.
    ruleContent String
    Rule content.
    ruleId String
    rule Id.
    ruleName String
    Current limit name.
    tsfApiRateLimitRuleId String
    ID of the resource.
    tsfRuleId String
    Tsf Rule ID.
    updatedTime String
    update time.
    usableStatus String
    Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.

    Import

    tsf api_rate_limit_rule can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tsfApiRateLimitRule:TsfApiRateLimitRule api_rate_limit_rule api_rate_limit_rule_id
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack