tencentcloud.ApiGatewayUsagePlan
Explore with Pulumi AI
Use this resource to create API gateway usage plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.ApiGatewayUsagePlan("example", {
maxRequestNum: 100,
maxRequestNumPreSec: 10,
usagePlanDesc: "desc.",
usagePlanName: "tf_example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.ApiGatewayUsagePlan("example",
max_request_num=100,
max_request_num_pre_sec=10,
usage_plan_desc="desc.",
usage_plan_name="tf_example")
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.NewApiGatewayUsagePlan(ctx, "example", &tencentcloud.ApiGatewayUsagePlanArgs{
MaxRequestNum: pulumi.Float64(100),
MaxRequestNumPreSec: pulumi.Float64(10),
UsagePlanDesc: pulumi.String("desc."),
UsagePlanName: pulumi.String("tf_example"),
})
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 example = new Tencentcloud.ApiGatewayUsagePlan("example", new()
{
MaxRequestNum = 100,
MaxRequestNumPreSec = 10,
UsagePlanDesc = "desc.",
UsagePlanName = "tf_example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayUsagePlan;
import com.pulumi.tencentcloud.ApiGatewayUsagePlanArgs;
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 example = new ApiGatewayUsagePlan("example", ApiGatewayUsagePlanArgs.builder()
.maxRequestNum(100)
.maxRequestNumPreSec(10)
.usagePlanDesc("desc.")
.usagePlanName("tf_example")
.build());
}
}
resources:
example:
type: tencentcloud:ApiGatewayUsagePlan
properties:
maxRequestNum: 100
maxRequestNumPreSec: 10
usagePlanDesc: desc.
usagePlanName: tf_example
Create ApiGatewayUsagePlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiGatewayUsagePlan(name: string, args: ApiGatewayUsagePlanArgs, opts?: CustomResourceOptions);
@overload
def ApiGatewayUsagePlan(resource_name: str,
args: ApiGatewayUsagePlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiGatewayUsagePlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
usage_plan_name: Optional[str] = None,
api_gateway_usage_plan_id: Optional[str] = None,
max_request_num: Optional[float] = None,
max_request_num_pre_sec: Optional[float] = None,
usage_plan_desc: Optional[str] = None)
func NewApiGatewayUsagePlan(ctx *Context, name string, args ApiGatewayUsagePlanArgs, opts ...ResourceOption) (*ApiGatewayUsagePlan, error)
public ApiGatewayUsagePlan(string name, ApiGatewayUsagePlanArgs args, CustomResourceOptions? opts = null)
public ApiGatewayUsagePlan(String name, ApiGatewayUsagePlanArgs args)
public ApiGatewayUsagePlan(String name, ApiGatewayUsagePlanArgs args, CustomResourceOptions options)
type: tencentcloud:ApiGatewayUsagePlan
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 ApiGatewayUsagePlanArgs
- 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 ApiGatewayUsagePlanArgs
- 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 ApiGatewayUsagePlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiGatewayUsagePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiGatewayUsagePlanArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiGatewayUsagePlan 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 ApiGatewayUsagePlan resource accepts the following input properties:
- Usage
Plan stringName - Custom usage plan name.
- Api
Gateway stringUsage Plan Id - ID of the resource.
- Max
Request doubleNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- Max
Request doubleNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- Usage
Plan stringDesc - Custom usage plan description.
- Usage
Plan stringName - Custom usage plan name.
- Api
Gateway stringUsage Plan Id - ID of the resource.
- Max
Request float64Num - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- Max
Request float64Num Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- Usage
Plan stringDesc - Custom usage plan description.
- usage
Plan StringName - Custom usage plan name.
- api
Gateway StringUsage Plan Id - ID of the resource.
- max
Request DoubleNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request DoubleNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- usage
Plan StringDesc - Custom usage plan description.
- usage
Plan stringName - Custom usage plan name.
- api
Gateway stringUsage Plan Id - ID of the resource.
- max
Request numberNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request numberNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- usage
Plan stringDesc - Custom usage plan description.
- usage_
plan_ strname - Custom usage plan name.
- api_
gateway_ strusage_ plan_ id - ID of the resource.
- max_
request_ floatnum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max_
request_ floatnum_ pre_ sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- usage_
plan_ strdesc - Custom usage plan description.
- usage
Plan StringName - Custom usage plan name.
- api
Gateway StringUsage Plan Id - ID of the resource.
- max
Request NumberNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request NumberNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- usage
Plan StringDesc - Custom usage plan description.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiGatewayUsagePlan resource produces the following output properties:
- Attach
Api List<string>Keys - Attach API keys list.
- Attach
Lists List<ApiGateway Usage Plan Attach List> - Attach service and API list.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Attach
Api []stringKeys - Attach API keys list.
- Attach
Lists []ApiGateway Usage Plan Attach List - Attach service and API list.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- attach
Api List<String>Keys - Attach API keys list.
- attach
Lists List<ApiGateway Usage Plan Attach List> - Attach service and API list.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- attach
Api string[]Keys - Attach API keys list.
- attach
Lists ApiGateway Usage Plan Attach List[] - Attach service and API list.
- create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- id string
- The provider-assigned unique ID for this managed resource.
- modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- attach_
api_ Sequence[str]keys - Attach API keys list.
- attach_
lists Sequence[ApiGateway Usage Plan Attach List] - Attach service and API list.
- create_
time str - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- id str
- The provider-assigned unique ID for this managed resource.
- modify_
time str - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- attach
Api List<String>Keys - Attach API keys list.
- attach
Lists List<Property Map> - Attach service and API list.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
Look up Existing ApiGatewayUsagePlan Resource
Get an existing ApiGatewayUsagePlan 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?: ApiGatewayUsagePlanState, opts?: CustomResourceOptions): ApiGatewayUsagePlan
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_gateway_usage_plan_id: Optional[str] = None,
attach_api_keys: Optional[Sequence[str]] = None,
attach_lists: Optional[Sequence[ApiGatewayUsagePlanAttachListArgs]] = None,
create_time: Optional[str] = None,
max_request_num: Optional[float] = None,
max_request_num_pre_sec: Optional[float] = None,
modify_time: Optional[str] = None,
usage_plan_desc: Optional[str] = None,
usage_plan_name: Optional[str] = None) -> ApiGatewayUsagePlan
func GetApiGatewayUsagePlan(ctx *Context, name string, id IDInput, state *ApiGatewayUsagePlanState, opts ...ResourceOption) (*ApiGatewayUsagePlan, error)
public static ApiGatewayUsagePlan Get(string name, Input<string> id, ApiGatewayUsagePlanState? state, CustomResourceOptions? opts = null)
public static ApiGatewayUsagePlan get(String name, Output<String> id, ApiGatewayUsagePlanState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ApiGatewayUsagePlan 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
Gateway stringUsage Plan Id - ID of the resource.
- Attach
Api List<string>Keys - Attach API keys list.
- Attach
Lists List<ApiGateway Usage Plan Attach List> - Attach service and API list.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Max
Request doubleNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- Max
Request doubleNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Usage
Plan stringDesc - Custom usage plan description.
- Usage
Plan stringName - Custom usage plan name.
- Api
Gateway stringUsage Plan Id - ID of the resource.
- Attach
Api []stringKeys - Attach API keys list.
- Attach
Lists []ApiGateway Usage Plan Attach List Args - Attach service and API list.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Max
Request float64Num - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- Max
Request float64Num Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Usage
Plan stringDesc - Custom usage plan description.
- Usage
Plan stringName - Custom usage plan name.
- api
Gateway StringUsage Plan Id - ID of the resource.
- attach
Api List<String>Keys - Attach API keys list.
- attach
Lists List<ApiGateway Usage Plan Attach List> - Attach service and API list.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- max
Request DoubleNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request DoubleNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- usage
Plan StringDesc - Custom usage plan description.
- usage
Plan StringName - Custom usage plan name.
- api
Gateway stringUsage Plan Id - ID of the resource.
- attach
Api string[]Keys - Attach API keys list.
- attach
Lists ApiGateway Usage Plan Attach List[] - Attach service and API list.
- create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- max
Request numberNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request numberNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- usage
Plan stringDesc - Custom usage plan description.
- usage
Plan stringName - Custom usage plan name.
- api_
gateway_ strusage_ plan_ id - ID of the resource.
- attach_
api_ Sequence[str]keys - Attach API keys list.
- attach_
lists Sequence[ApiGateway Usage Plan Attach List Args] - Attach service and API list.
- create_
time str - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- max_
request_ floatnum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max_
request_ floatnum_ pre_ sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- modify_
time str - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- usage_
plan_ strdesc - Custom usage plan description.
- usage_
plan_ strname - Custom usage plan name.
- api
Gateway StringUsage Plan Id - ID of the resource.
- attach
Api List<String>Keys - Attach API keys list.
- attach
Lists List<Property Map> - Attach service and API list.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- max
Request NumberNum - Total number of requests allowed. Valid values: -1, [1,99999999]. The default value is -1, which indicates no limit.
- max
Request NumberNum Pre Sec - Limit of requests per second. Valid values: -1, [1,2000]. The default value is -1, which indicates no limit.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- usage
Plan StringDesc - Custom usage plan description.
- usage
Plan StringName - Custom usage plan name.
Supporting Types
ApiGatewayUsagePlanAttachList, ApiGatewayUsagePlanAttachListArgs
- Api
Id string - The API ID, this value is empty if attach service.
- Api
Name string - The API name, this value is empty if attach service.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Environment string
- The environment name.
- Method string
- The API method, this value is empty if attach service.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Path string
- The API path, this value is empty if attach service.
- Service
Id string - The service ID.
- Service
Name string - The service name.
- Api
Id string - The API ID, this value is empty if attach service.
- Api
Name string - The API name, this value is empty if attach service.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Environment string
- The environment name.
- Method string
- The API method, this value is empty if attach service.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Path string
- The API path, this value is empty if attach service.
- Service
Id string - The service ID.
- Service
Name string - The service name.
- api
Id String - The API ID, this value is empty if attach service.
- api
Name String - The API name, this value is empty if attach service.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- environment String
- The environment name.
- method String
- The API method, this value is empty if attach service.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- path String
- The API path, this value is empty if attach service.
- service
Id String - The service ID.
- service
Name String - The service name.
- api
Id string - The API ID, this value is empty if attach service.
- api
Name string - The API name, this value is empty if attach service.
- create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- environment string
- The environment name.
- method string
- The API method, this value is empty if attach service.
- modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- path string
- The API path, this value is empty if attach service.
- service
Id string - The service ID.
- service
Name string - The service name.
- api_
id str - The API ID, this value is empty if attach service.
- api_
name str - The API name, this value is empty if attach service.
- create_
time str - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- environment str
- The environment name.
- method str
- The API method, this value is empty if attach service.
- modify_
time str - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- path str
- The API path, this value is empty if attach service.
- service_
id str - The service ID.
- service_
name str - The service name.
- api
Id String - The API ID, this value is empty if attach service.
- api
Name String - The API name, this value is empty if attach service.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- environment String
- The environment name.
- method String
- The API method, this value is empty if attach service.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- path String
- The API path, this value is empty if attach service.
- service
Id String - The service ID.
- service
Name String - The service name.
Import
API gateway usage plan can be imported using the id, e.g.
$ pulumi import tencentcloud:index/apiGatewayUsagePlan:ApiGatewayUsagePlan plan usagePlan-gyeafpab
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.