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

tencentcloud.VpcTrafficPackage

Explore with Pulumi AI

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

    Provides a resource to create a vpc traffic_package

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.VpcTrafficPackage("example", {trafficAmount: 10});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.VpcTrafficPackage("example", traffic_amount=10)
    
    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.NewVpcTrafficPackage(ctx, "example", &tencentcloud.VpcTrafficPackageArgs{
    			TrafficAmount: pulumi.Float64(10),
    		})
    		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.VpcTrafficPackage("example", new()
        {
            TrafficAmount = 10,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.VpcTrafficPackage;
    import com.pulumi.tencentcloud.VpcTrafficPackageArgs;
    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 VpcTrafficPackage("example", VpcTrafficPackageArgs.builder()
                .trafficAmount(10)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:VpcTrafficPackage
        properties:
          trafficAmount: 10
    

    Create VpcTrafficPackage Resource

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

    Constructor syntax

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

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

    TrafficAmount double
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    VpcTrafficPackageId string
    ID of the resource.
    TrafficAmount float64
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    VpcTrafficPackageId string
    ID of the resource.
    trafficAmount Double
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    vpcTrafficPackageId String
    ID of the resource.
    trafficAmount number
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    vpcTrafficPackageId string
    ID of the resource.
    traffic_amount float
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    vpc_traffic_package_id str
    ID of the resource.
    trafficAmount Number
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    vpcTrafficPackageId String
    ID of the resource.

    Outputs

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

    CreatedTime string
    Created time.
    Id string
    The provider-assigned unique ID for this managed resource.
    RemainingAmount double
    Remaining amount.
    UsedAmount double
    Used amount.
    CreatedTime string
    Created time.
    Id string
    The provider-assigned unique ID for this managed resource.
    RemainingAmount float64
    Remaining amount.
    UsedAmount float64
    Used amount.
    createdTime String
    Created time.
    id String
    The provider-assigned unique ID for this managed resource.
    remainingAmount Double
    Remaining amount.
    usedAmount Double
    Used amount.
    createdTime string
    Created time.
    id string
    The provider-assigned unique ID for this managed resource.
    remainingAmount number
    Remaining amount.
    usedAmount number
    Used amount.
    created_time str
    Created time.
    id str
    The provider-assigned unique ID for this managed resource.
    remaining_amount float
    Remaining amount.
    used_amount float
    Used amount.
    createdTime String
    Created time.
    id String
    The provider-assigned unique ID for this managed resource.
    remainingAmount Number
    Remaining amount.
    usedAmount Number
    Used amount.

    Look up Existing VpcTrafficPackage Resource

    Get an existing VpcTrafficPackage 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?: VpcTrafficPackageState, opts?: CustomResourceOptions): VpcTrafficPackage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_time: Optional[str] = None,
            remaining_amount: Optional[float] = None,
            traffic_amount: Optional[float] = None,
            used_amount: Optional[float] = None,
            vpc_traffic_package_id: Optional[str] = None) -> VpcTrafficPackage
    func GetVpcTrafficPackage(ctx *Context, name string, id IDInput, state *VpcTrafficPackageState, opts ...ResourceOption) (*VpcTrafficPackage, error)
    public static VpcTrafficPackage Get(string name, Input<string> id, VpcTrafficPackageState? state, CustomResourceOptions? opts = null)
    public static VpcTrafficPackage get(String name, Output<String> id, VpcTrafficPackageState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:VpcTrafficPackage    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:
    CreatedTime string
    Created time.
    RemainingAmount double
    Remaining amount.
    TrafficAmount double
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    UsedAmount double
    Used amount.
    VpcTrafficPackageId string
    ID of the resource.
    CreatedTime string
    Created time.
    RemainingAmount float64
    Remaining amount.
    TrafficAmount float64
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    UsedAmount float64
    Used amount.
    VpcTrafficPackageId string
    ID of the resource.
    createdTime String
    Created time.
    remainingAmount Double
    Remaining amount.
    trafficAmount Double
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    usedAmount Double
    Used amount.
    vpcTrafficPackageId String
    ID of the resource.
    createdTime string
    Created time.
    remainingAmount number
    Remaining amount.
    trafficAmount number
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    usedAmount number
    Used amount.
    vpcTrafficPackageId string
    ID of the resource.
    created_time str
    Created time.
    remaining_amount float
    Remaining amount.
    traffic_amount float
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    used_amount float
    Used amount.
    vpc_traffic_package_id str
    ID of the resource.
    createdTime String
    Created time.
    remainingAmount Number
    Remaining amount.
    trafficAmount Number
    Traffic Package Amount, eg: 10,20,50,512,1024,5120,51200,60,300,600,3072,6144,30720,61440,307200.
    usedAmount Number
    Used amount.
    vpcTrafficPackageId String
    ID of the resource.

    Import

    vpc traffic_package can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/vpcTrafficPackage:VpcTrafficPackage traffic_package traffic_package_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