tencentcloud.TsfApiRateLimitRule
Explore with Pulumi AI
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:
- Api
Id string - Api Id.
- Max
Qps double - qps value.
- Tsf
Api stringRate Limit Rule Id - ID of the resource.
- Usable
Status string - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- Api
Id string - Api Id.
- Max
Qps float64 - qps value.
- Tsf
Api stringRate Limit Rule Id - ID of the resource.
- Usable
Status string - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id String - Api Id.
- max
Qps Double - qps value.
- tsf
Api StringRate Limit Rule Id - ID of the resource.
- usable
Status String - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id string - Api Id.
- max
Qps number - qps value.
- tsf
Api stringRate Limit Rule Id - ID of the resource.
- usable
Status 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_ strrate_ limit_ rule_ id - ID of the resource.
- usable_
status str - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id String - Api Id.
- max
Qps Number - qps value.
- tsf
Api StringRate Limit Rule Id - ID of the resource.
- usable
Status 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:
- Created
Time string - creation time.
- Description string
- describe.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rule
Content string - Rule content.
- Rule
Id string - rule Id.
- Rule
Name string - Current limit name.
- Tsf
Rule stringId - Tsf Rule ID.
- Updated
Time string - update time.
- Created
Time string - creation time.
- Description string
- describe.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rule
Content string - Rule content.
- Rule
Id string - rule Id.
- Rule
Name string - Current limit name.
- Tsf
Rule stringId - Tsf Rule ID.
- Updated
Time string - update time.
- created
Time String - creation time.
- description String
- describe.
- id String
- The provider-assigned unique ID for this managed resource.
- rule
Content String - Rule content.
- rule
Id String - rule Id.
- rule
Name String - Current limit name.
- tsf
Rule StringId - Tsf Rule ID.
- updated
Time String - update time.
- created
Time string - creation time.
- description string
- describe.
- id string
- The provider-assigned unique ID for this managed resource.
- rule
Content string - Rule content.
- rule
Id string - rule Id.
- rule
Name string - Current limit name.
- tsf
Rule stringId - Tsf Rule ID.
- updated
Time 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_ strid - Tsf Rule ID.
- updated_
time str - update time.
- created
Time String - creation time.
- description String
- describe.
- id String
- The provider-assigned unique ID for this managed resource.
- rule
Content String - Rule content.
- rule
Id String - rule Id.
- rule
Name String - Current limit name.
- tsf
Rule StringId - Tsf Rule ID.
- updated
Time 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.
- Api
Id string - Api Id.
- Created
Time string - creation time.
- Description string
- describe.
- Max
Qps double - qps value.
- Rule
Content string - Rule content.
- Rule
Id string - rule Id.
- Rule
Name string - Current limit name.
- Tsf
Api stringRate Limit Rule Id - ID of the resource.
- Tsf
Rule stringId - Tsf Rule ID.
- Updated
Time string - update time.
- Usable
Status string - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- Api
Id string - Api Id.
- Created
Time string - creation time.
- Description string
- describe.
- Max
Qps float64 - qps value.
- Rule
Content string - Rule content.
- Rule
Id string - rule Id.
- Rule
Name string - Current limit name.
- Tsf
Api stringRate Limit Rule Id - ID of the resource.
- Tsf
Rule stringId - Tsf Rule ID.
- Updated
Time string - update time.
- Usable
Status string - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id String - Api Id.
- created
Time String - creation time.
- description String
- describe.
- max
Qps Double - qps value.
- rule
Content String - Rule content.
- rule
Id String - rule Id.
- rule
Name String - Current limit name.
- tsf
Api StringRate Limit Rule Id - ID of the resource.
- tsf
Rule StringId - Tsf Rule ID.
- updated
Time String - update time.
- usable
Status String - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id string - Api Id.
- created
Time string - creation time.
- description string
- describe.
- max
Qps number - qps value.
- rule
Content string - Rule content.
- rule
Id string - rule Id.
- rule
Name string - Current limit name.
- tsf
Api stringRate Limit Rule Id - ID of the resource.
- tsf
Rule stringId - Tsf Rule ID.
- updated
Time string - update time.
- usable
Status 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_ strrate_ limit_ rule_ id - ID of the resource.
- tsf_
rule_ strid - Tsf Rule ID.
- updated_
time str - update time.
- usable_
status str - Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
- api
Id String - Api Id.
- created
Time String - creation time.
- description String
- describe.
- max
Qps Number - qps value.
- rule
Content String - Rule content.
- rule
Id String - rule Id.
- rule
Name String - Current limit name.
- tsf
Api StringRate Limit Rule Id - ID of the resource.
- tsf
Rule StringId - Tsf Rule ID.
- updated
Time String - update time.
- usable
Status 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.