alicloud.quotas.TemplateQuota
Explore with Pulumi AI
Provides a Quotas Template Quota resource.
For information about Quotas Template Quota and how to use it, see What is Template Quota.
NOTE: Available since v1.206.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.quotas.TemplateQuota("default", {
quotaActionCode: "q_desktop-count",
productCode: "gws",
noticeType: 3,
dimensions: [{
key: "regionId",
value: "cn-hangzhou",
}],
desireValue: 1001,
envLanguage: "zh",
quotaCategory: "CommonQuota",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.quotas.TemplateQuota("default",
quota_action_code="q_desktop-count",
product_code="gws",
notice_type=3,
dimensions=[{
"key": "regionId",
"value": "cn-hangzhou",
}],
desire_value=1001,
env_language="zh",
quota_category="CommonQuota")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/quotas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := quotas.NewTemplateQuota(ctx, "default", "as.TemplateQuotaArgs{
QuotaActionCode: pulumi.String("q_desktop-count"),
ProductCode: pulumi.String("gws"),
NoticeType: pulumi.Int(3),
Dimensions: quotas.TemplateQuotaDimensionArray{
"as.TemplateQuotaDimensionArgs{
Key: pulumi.String("regionId"),
Value: pulumi.String("cn-hangzhou"),
},
},
DesireValue: pulumi.Float64(1001),
EnvLanguage: pulumi.String("zh"),
QuotaCategory: pulumi.String("CommonQuota"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Quotas.TemplateQuota("default", new()
{
QuotaActionCode = "q_desktop-count",
ProductCode = "gws",
NoticeType = 3,
Dimensions = new[]
{
new AliCloud.Quotas.Inputs.TemplateQuotaDimensionArgs
{
Key = "regionId",
Value = "cn-hangzhou",
},
},
DesireValue = 1001,
EnvLanguage = "zh",
QuotaCategory = "CommonQuota",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.quotas.TemplateQuota;
import com.pulumi.alicloud.quotas.TemplateQuotaArgs;
import com.pulumi.alicloud.quotas.inputs.TemplateQuotaDimensionArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new TemplateQuota("default", TemplateQuotaArgs.builder()
.quotaActionCode("q_desktop-count")
.productCode("gws")
.noticeType(3)
.dimensions(TemplateQuotaDimensionArgs.builder()
.key("regionId")
.value("cn-hangzhou")
.build())
.desireValue(1001)
.envLanguage("zh")
.quotaCategory("CommonQuota")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:quotas:TemplateQuota
properties:
quotaActionCode: q_desktop-count
productCode: gws
noticeType: 3
dimensions:
- key: regionId
value: cn-hangzhou
desireValue: 1001
envLanguage: zh
quotaCategory: CommonQuota
Create TemplateQuota Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TemplateQuota(name: string, args: TemplateQuotaArgs, opts?: CustomResourceOptions);
@overload
def TemplateQuota(resource_name: str,
args: TemplateQuotaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TemplateQuota(resource_name: str,
opts: Optional[ResourceOptions] = None,
desire_value: Optional[float] = None,
product_code: Optional[str] = None,
quota_action_code: Optional[str] = None,
dimensions: Optional[Sequence[TemplateQuotaDimensionArgs]] = None,
effective_time: Optional[str] = None,
env_language: Optional[str] = None,
expire_time: Optional[str] = None,
notice_type: Optional[int] = None,
quota_category: Optional[str] = None)
func NewTemplateQuota(ctx *Context, name string, args TemplateQuotaArgs, opts ...ResourceOption) (*TemplateQuota, error)
public TemplateQuota(string name, TemplateQuotaArgs args, CustomResourceOptions? opts = null)
public TemplateQuota(String name, TemplateQuotaArgs args)
public TemplateQuota(String name, TemplateQuotaArgs args, CustomResourceOptions options)
type: alicloud:quotas:TemplateQuota
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 TemplateQuotaArgs
- 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 TemplateQuotaArgs
- 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 TemplateQuotaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateQuotaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TemplateQuotaArgs
- 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 templateQuotaResource = new AliCloud.Quotas.TemplateQuota("templateQuotaResource", new()
{
DesireValue = 0,
ProductCode = "string",
QuotaActionCode = "string",
Dimensions = new[]
{
new AliCloud.Quotas.Inputs.TemplateQuotaDimensionArgs
{
Key = "string",
Value = "string",
},
},
EffectiveTime = "string",
EnvLanguage = "string",
ExpireTime = "string",
NoticeType = 0,
QuotaCategory = "string",
});
example, err := quotas.NewTemplateQuota(ctx, "templateQuotaResource", "as.TemplateQuotaArgs{
DesireValue: pulumi.Float64(0),
ProductCode: pulumi.String("string"),
QuotaActionCode: pulumi.String("string"),
Dimensions: quotas.TemplateQuotaDimensionArray{
"as.TemplateQuotaDimensionArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
EffectiveTime: pulumi.String("string"),
EnvLanguage: pulumi.String("string"),
ExpireTime: pulumi.String("string"),
NoticeType: pulumi.Int(0),
QuotaCategory: pulumi.String("string"),
})
var templateQuotaResource = new TemplateQuota("templateQuotaResource", TemplateQuotaArgs.builder()
.desireValue(0)
.productCode("string")
.quotaActionCode("string")
.dimensions(TemplateQuotaDimensionArgs.builder()
.key("string")
.value("string")
.build())
.effectiveTime("string")
.envLanguage("string")
.expireTime("string")
.noticeType(0)
.quotaCategory("string")
.build());
template_quota_resource = alicloud.quotas.TemplateQuota("templateQuotaResource",
desire_value=0,
product_code="string",
quota_action_code="string",
dimensions=[alicloud.quotas.TemplateQuotaDimensionArgs(
key="string",
value="string",
)],
effective_time="string",
env_language="string",
expire_time="string",
notice_type=0,
quota_category="string")
const templateQuotaResource = new alicloud.quotas.TemplateQuota("templateQuotaResource", {
desireValue: 0,
productCode: "string",
quotaActionCode: "string",
dimensions: [{
key: "string",
value: "string",
}],
effectiveTime: "string",
envLanguage: "string",
expireTime: "string",
noticeType: 0,
quotaCategory: "string",
});
type: alicloud:quotas:TemplateQuota
properties:
desireValue: 0
dimensions:
- key: string
value: string
effectiveTime: string
envLanguage: string
expireTime: string
noticeType: 0
productCode: string
quotaActionCode: string
quotaCategory: string
TemplateQuota Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TemplateQuota resource accepts the following input properties:
- Desire
Value double - Quota application value.
- Product
Code string - The abbreviation of the cloud service name.
- Quota
Action stringCode - The quota ID.
- Dimensions
List<Pulumi.
Ali Cloud. Quotas. Inputs. Template Quota Dimension> - The Quota Dimensions. See
dimensions
below. - Effective
Time string - The UTC time when the quota takes effect.
- Env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- Expire
Time string - The UTC time when the quota expires.
- Notice
Type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- Quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- Desire
Value float64 - Quota application value.
- Product
Code string - The abbreviation of the cloud service name.
- Quota
Action stringCode - The quota ID.
- Dimensions
[]Template
Quota Dimension Args - The Quota Dimensions. See
dimensions
below. - Effective
Time string - The UTC time when the quota takes effect.
- Env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- Expire
Time string - The UTC time when the quota expires.
- Notice
Type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- Quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value Double - Quota application value.
- product
Code String - The abbreviation of the cloud service name.
- quota
Action StringCode - The quota ID.
- dimensions
List<Template
Quota Dimension> - The Quota Dimensions. See
dimensions
below. - effective
Time String - The UTC time when the quota takes effect.
- env
Language String - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time String - The UTC time when the quota expires.
- notice
Type Integer - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- quota
Category String - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value number - Quota application value.
- product
Code string - The abbreviation of the cloud service name.
- quota
Action stringCode - The quota ID.
- dimensions
Template
Quota Dimension[] - The Quota Dimensions. See
dimensions
below. - effective
Time string - The UTC time when the quota takes effect.
- env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time string - The UTC time when the quota expires.
- notice
Type number - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire_
value float - Quota application value.
- product_
code str - The abbreviation of the cloud service name.
- quota_
action_ strcode - The quota ID.
- dimensions
Sequence[Template
Quota Dimension Args] - The Quota Dimensions. See
dimensions
below. - effective_
time str - The UTC time when the quota takes effect.
- env_
language str - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire_
time str - The UTC time when the quota expires.
- notice_
type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- quota_
category str - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value Number - Quota application value.
- product
Code String - The abbreviation of the cloud service name.
- quota
Action StringCode - The quota ID.
- dimensions List<Property Map>
- The Quota Dimensions. See
dimensions
below. - effective
Time String - The UTC time when the quota takes effect.
- env
Language String - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time String - The UTC time when the quota expires.
- notice
Type Number - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- quota
Category String - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
Outputs
All input properties are implicitly available as output properties. Additionally, the TemplateQuota resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TemplateQuota Resource
Get an existing TemplateQuota 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?: TemplateQuotaState, opts?: CustomResourceOptions): TemplateQuota
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
desire_value: Optional[float] = None,
dimensions: Optional[Sequence[TemplateQuotaDimensionArgs]] = None,
effective_time: Optional[str] = None,
env_language: Optional[str] = None,
expire_time: Optional[str] = None,
notice_type: Optional[int] = None,
product_code: Optional[str] = None,
quota_action_code: Optional[str] = None,
quota_category: Optional[str] = None) -> TemplateQuota
func GetTemplateQuota(ctx *Context, name string, id IDInput, state *TemplateQuotaState, opts ...ResourceOption) (*TemplateQuota, error)
public static TemplateQuota Get(string name, Input<string> id, TemplateQuotaState? state, CustomResourceOptions? opts = null)
public static TemplateQuota get(String name, Output<String> id, TemplateQuotaState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Desire
Value double - Quota application value.
- Dimensions
List<Pulumi.
Ali Cloud. Quotas. Inputs. Template Quota Dimension> - The Quota Dimensions. See
dimensions
below. - Effective
Time string - The UTC time when the quota takes effect.
- Env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- Expire
Time string - The UTC time when the quota expires.
- Notice
Type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- Product
Code string - The abbreviation of the cloud service name.
- Quota
Action stringCode - The quota ID.
- Quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- Desire
Value float64 - Quota application value.
- Dimensions
[]Template
Quota Dimension Args - The Quota Dimensions. See
dimensions
below. - Effective
Time string - The UTC time when the quota takes effect.
- Env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- Expire
Time string - The UTC time when the quota expires.
- Notice
Type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- Product
Code string - The abbreviation of the cloud service name.
- Quota
Action stringCode - The quota ID.
- Quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value Double - Quota application value.
- dimensions
List<Template
Quota Dimension> - The Quota Dimensions. See
dimensions
below. - effective
Time String - The UTC time when the quota takes effect.
- env
Language String - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time String - The UTC time when the quota expires.
- notice
Type Integer - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- product
Code String - The abbreviation of the cloud service name.
- quota
Action StringCode - The quota ID.
- quota
Category String - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value number - Quota application value.
- dimensions
Template
Quota Dimension[] - The Quota Dimensions. See
dimensions
below. - effective
Time string - The UTC time when the quota takes effect.
- env
Language string - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time string - The UTC time when the quota expires.
- notice
Type number - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- product
Code string - The abbreviation of the cloud service name.
- quota
Action stringCode - The quota ID.
- quota
Category string - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire_
value float - Quota application value.
- dimensions
Sequence[Template
Quota Dimension Args] - The Quota Dimensions. See
dimensions
below. - effective_
time str - The UTC time when the quota takes effect.
- env_
language str - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire_
time str - The UTC time when the quota expires.
- notice_
type int - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- product_
code str - The abbreviation of the cloud service name.
- quota_
action_ strcode - The quota ID.
- quota_
category str - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
- desire
Value Number - Quota application value.
- dimensions List<Property Map>
- The Quota Dimensions. See
dimensions
below. - effective
Time String - The UTC time when the quota takes effect.
- env
Language String - The language of the quota alert notification. Value:
- zh: Chinese.
- en: English.
- expire
Time String - The UTC time when the quota expires.
- notice
Type Number - Whether to notify the result of quota promotion application. Value:
- 0: No.
- 3: Yes.
- product
Code String - The abbreviation of the cloud service name.
- quota
Action StringCode - The quota ID.
- quota
Category String - Type of quota. Value:
- CommonQuota : Generic quota.
- WhiteListLabel: Equity quota.
- FlowControl:API rate quota.
Supporting Types
TemplateQuotaDimension, TemplateQuotaDimensionArgs
Import
Quotas Template Quota can be imported using the id, e.g.
$ pulumi import alicloud:quotas/templateQuota:TemplateQuota example <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
alicloud
Terraform Provider.