1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClsCosRecharge
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.ClsCosRecharge

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const cosRecharge = new tencentcloud.ClsCosRecharge("cosRecharge", {
    bucket: "cos-lock-1308919341",
    bucketRegion: "ap-guangzhou",
    extractRuleInfo: {
        backtracking: 0,
        filterKeyRegexes: [{
            key: "__CONTENT__",
            regex: "dasd",
        }],
        isGbk: 0,
        jsonStandard: 0,
        keys: [],
        metadataType: 0,
        unMatchUpLoadSwitch: false,
    },
    logType: "minimalist_log",
    logsetId: "dd426d1a-95bc-4bca-b8c2-baa169261812",
    prefix: "test",
    topicId: "7e34a3a7-635e-4da8-9005-88106c1fde69",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

cos_recharge = tencentcloud.ClsCosRecharge("cosRecharge",
    bucket="cos-lock-1308919341",
    bucket_region="ap-guangzhou",
    extract_rule_info={
        "backtracking": 0,
        "filter_key_regexes": [{
            "key": "__CONTENT__",
            "regex": "dasd",
        }],
        "is_gbk": 0,
        "json_standard": 0,
        "keys": [],
        "metadata_type": 0,
        "un_match_up_load_switch": False,
    },
    log_type="minimalist_log",
    logset_id="dd426d1a-95bc-4bca-b8c2-baa169261812",
    prefix="test",
    topic_id="7e34a3a7-635e-4da8-9005-88106c1fde69")
Copy
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.NewClsCosRecharge(ctx, "cosRecharge", &tencentcloud.ClsCosRechargeArgs{
			Bucket:       pulumi.String("cos-lock-1308919341"),
			BucketRegion: pulumi.String("ap-guangzhou"),
			ExtractRuleInfo: &tencentcloud.ClsCosRechargeExtractRuleInfoArgs{
				Backtracking: pulumi.Float64(0),
				FilterKeyRegexes: tencentcloud.ClsCosRechargeExtractRuleInfoFilterKeyRegexArray{
					&tencentcloud.ClsCosRechargeExtractRuleInfoFilterKeyRegexArgs{
						Key:   pulumi.String("__CONTENT__"),
						Regex: pulumi.String("dasd"),
					},
				},
				IsGbk:               pulumi.Float64(0),
				JsonStandard:        pulumi.Float64(0),
				Keys:                pulumi.StringArray{},
				MetadataType:        pulumi.Float64(0),
				UnMatchUpLoadSwitch: pulumi.Bool(false),
			},
			LogType:  pulumi.String("minimalist_log"),
			LogsetId: pulumi.String("dd426d1a-95bc-4bca-b8c2-baa169261812"),
			Prefix:   pulumi.String("test"),
			TopicId:  pulumi.String("7e34a3a7-635e-4da8-9005-88106c1fde69"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var cosRecharge = new Tencentcloud.ClsCosRecharge("cosRecharge", new()
    {
        Bucket = "cos-lock-1308919341",
        BucketRegion = "ap-guangzhou",
        ExtractRuleInfo = new Tencentcloud.Inputs.ClsCosRechargeExtractRuleInfoArgs
        {
            Backtracking = 0,
            FilterKeyRegexes = new[]
            {
                new Tencentcloud.Inputs.ClsCosRechargeExtractRuleInfoFilterKeyRegexArgs
                {
                    Key = "__CONTENT__",
                    Regex = "dasd",
                },
            },
            IsGbk = 0,
            JsonStandard = 0,
            Keys = new() { },
            MetadataType = 0,
            UnMatchUpLoadSwitch = false,
        },
        LogType = "minimalist_log",
        LogsetId = "dd426d1a-95bc-4bca-b8c2-baa169261812",
        Prefix = "test",
        TopicId = "7e34a3a7-635e-4da8-9005-88106c1fde69",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsCosRecharge;
import com.pulumi.tencentcloud.ClsCosRechargeArgs;
import com.pulumi.tencentcloud.inputs.ClsCosRechargeExtractRuleInfoArgs;
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 cosRecharge = new ClsCosRecharge("cosRecharge", ClsCosRechargeArgs.builder()
            .bucket("cos-lock-1308919341")
            .bucketRegion("ap-guangzhou")
            .extractRuleInfo(ClsCosRechargeExtractRuleInfoArgs.builder()
                .backtracking(0)
                .filterKeyRegexes(ClsCosRechargeExtractRuleInfoFilterKeyRegexArgs.builder()
                    .key("__CONTENT__")
                    .regex("dasd")
                    .build())
                .isGbk(0)
                .jsonStandard(0)
                .keys()
                .metadataType(0)
                .unMatchUpLoadSwitch(false)
                .build())
            .logType("minimalist_log")
            .logsetId("dd426d1a-95bc-4bca-b8c2-baa169261812")
            .prefix("test")
            .topicId("7e34a3a7-635e-4da8-9005-88106c1fde69")
            .build());

    }
}
Copy
resources:
  cosRecharge:
    type: tencentcloud:ClsCosRecharge
    properties:
      bucket: cos-lock-1308919341
      bucketRegion: ap-guangzhou
      extractRuleInfo:
        backtracking: 0
        filterKeyRegexes:
          - key: __CONTENT__
            regex: dasd
        isGbk: 0
        jsonStandard: 0
        keys: []
        metadataType: 0
        unMatchUpLoadSwitch: false
      logType: minimalist_log
      logsetId: dd426d1a-95bc-4bca-b8c2-baa169261812
      prefix: test
      topicId: 7e34a3a7-635e-4da8-9005-88106c1fde69
Copy

Create ClsCosRecharge Resource

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

Constructor syntax

new ClsCosRecharge(name: string, args: ClsCosRechargeArgs, opts?: CustomResourceOptions);
@overload
def ClsCosRecharge(resource_name: str,
                   args: ClsCosRechargeArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ClsCosRecharge(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   bucket: Optional[str] = None,
                   bucket_region: Optional[str] = None,
                   log_type: Optional[str] = None,
                   logset_id: Optional[str] = None,
                   prefix: Optional[str] = None,
                   topic_id: Optional[str] = None,
                   cls_cos_recharge_id: Optional[str] = None,
                   compress: Optional[str] = None,
                   extract_rule_info: Optional[ClsCosRechargeExtractRuleInfoArgs] = None,
                   name: Optional[str] = None)
func NewClsCosRecharge(ctx *Context, name string, args ClsCosRechargeArgs, opts ...ResourceOption) (*ClsCosRecharge, error)
public ClsCosRecharge(string name, ClsCosRechargeArgs args, CustomResourceOptions? opts = null)
public ClsCosRecharge(String name, ClsCosRechargeArgs args)
public ClsCosRecharge(String name, ClsCosRechargeArgs args, CustomResourceOptions options)
type: tencentcloud:ClsCosRecharge
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClsCosRechargeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClsCosRechargeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClsCosRechargeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClsCosRechargeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClsCosRechargeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Bucket This property is required. string
cos bucket.
BucketRegion This property is required. string
cos bucket region.
LogType This property is required. string
log type.
LogsetId This property is required. string
logset id.
Prefix This property is required. string
cos file prefix.
TopicId This property is required. string
topic id.
ClsCosRechargeId string
ID of the resource.
Compress string
supported gzip, lzop, snappy.
ExtractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
Name string
recharge name.
Bucket This property is required. string
cos bucket.
BucketRegion This property is required. string
cos bucket region.
LogType This property is required. string
log type.
LogsetId This property is required. string
logset id.
Prefix This property is required. string
cos file prefix.
TopicId This property is required. string
topic id.
ClsCosRechargeId string
ID of the resource.
Compress string
supported gzip, lzop, snappy.
ExtractRuleInfo ClsCosRechargeExtractRuleInfoArgs
extract rule info.
Name string
recharge name.
bucket This property is required. String
cos bucket.
bucketRegion This property is required. String
cos bucket region.
logType This property is required. String
log type.
logsetId This property is required. String
logset id.
prefix This property is required. String
cos file prefix.
topicId This property is required. String
topic id.
clsCosRechargeId String
ID of the resource.
compress String
supported gzip, lzop, snappy.
extractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
name String
recharge name.
bucket This property is required. string
cos bucket.
bucketRegion This property is required. string
cos bucket region.
logType This property is required. string
log type.
logsetId This property is required. string
logset id.
prefix This property is required. string
cos file prefix.
topicId This property is required. string
topic id.
clsCosRechargeId string
ID of the resource.
compress string
supported gzip, lzop, snappy.
extractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
name string
recharge name.
bucket This property is required. str
cos bucket.
bucket_region This property is required. str
cos bucket region.
log_type This property is required. str
log type.
logset_id This property is required. str
logset id.
prefix This property is required. str
cos file prefix.
topic_id This property is required. str
topic id.
cls_cos_recharge_id str
ID of the resource.
compress str
supported gzip, lzop, snappy.
extract_rule_info ClsCosRechargeExtractRuleInfoArgs
extract rule info.
name str
recharge name.
bucket This property is required. String
cos bucket.
bucketRegion This property is required. String
cos bucket region.
logType This property is required. String
log type.
logsetId This property is required. String
logset id.
prefix This property is required. String
cos file prefix.
topicId This property is required. String
topic id.
clsCosRechargeId String
ID of the resource.
compress String
supported gzip, lzop, snappy.
extractRuleInfo Property Map
extract rule info.
name String
recharge name.

Outputs

All input properties are implicitly available as output properties. Additionally, the ClsCosRecharge 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 ClsCosRecharge Resource

Get an existing ClsCosRecharge 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?: ClsCosRechargeState, opts?: CustomResourceOptions): ClsCosRecharge
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket: Optional[str] = None,
        bucket_region: Optional[str] = None,
        cls_cos_recharge_id: Optional[str] = None,
        compress: Optional[str] = None,
        extract_rule_info: Optional[ClsCosRechargeExtractRuleInfoArgs] = None,
        log_type: Optional[str] = None,
        logset_id: Optional[str] = None,
        name: Optional[str] = None,
        prefix: Optional[str] = None,
        topic_id: Optional[str] = None) -> ClsCosRecharge
func GetClsCosRecharge(ctx *Context, name string, id IDInput, state *ClsCosRechargeState, opts ...ResourceOption) (*ClsCosRecharge, error)
public static ClsCosRecharge Get(string name, Input<string> id, ClsCosRechargeState? state, CustomResourceOptions? opts = null)
public static ClsCosRecharge get(String name, Output<String> id, ClsCosRechargeState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:ClsCosRecharge    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Bucket string
cos bucket.
BucketRegion string
cos bucket region.
ClsCosRechargeId string
ID of the resource.
Compress string
supported gzip, lzop, snappy.
ExtractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
LogType string
log type.
LogsetId string
logset id.
Name string
recharge name.
Prefix string
cos file prefix.
TopicId string
topic id.
Bucket string
cos bucket.
BucketRegion string
cos bucket region.
ClsCosRechargeId string
ID of the resource.
Compress string
supported gzip, lzop, snappy.
ExtractRuleInfo ClsCosRechargeExtractRuleInfoArgs
extract rule info.
LogType string
log type.
LogsetId string
logset id.
Name string
recharge name.
Prefix string
cos file prefix.
TopicId string
topic id.
bucket String
cos bucket.
bucketRegion String
cos bucket region.
clsCosRechargeId String
ID of the resource.
compress String
supported gzip, lzop, snappy.
extractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
logType String
log type.
logsetId String
logset id.
name String
recharge name.
prefix String
cos file prefix.
topicId String
topic id.
bucket string
cos bucket.
bucketRegion string
cos bucket region.
clsCosRechargeId string
ID of the resource.
compress string
supported gzip, lzop, snappy.
extractRuleInfo ClsCosRechargeExtractRuleInfo
extract rule info.
logType string
log type.
logsetId string
logset id.
name string
recharge name.
prefix string
cos file prefix.
topicId string
topic id.
bucket str
cos bucket.
bucket_region str
cos bucket region.
cls_cos_recharge_id str
ID of the resource.
compress str
supported gzip, lzop, snappy.
extract_rule_info ClsCosRechargeExtractRuleInfoArgs
extract rule info.
log_type str
log type.
logset_id str
logset id.
name str
recharge name.
prefix str
cos file prefix.
topic_id str
topic id.
bucket String
cos bucket.
bucketRegion String
cos bucket region.
clsCosRechargeId String
ID of the resource.
compress String
supported gzip, lzop, snappy.
extractRuleInfo Property Map
extract rule info.
logType String
log type.
logsetId String
logset id.
name String
recharge name.
prefix String
cos file prefix.
topicId String
topic id.

Supporting Types

ClsCosRechargeExtractRuleInfo
, ClsCosRechargeExtractRuleInfoArgs

Address string
syslog address.
Backtracking double
backtracking data volume in incremental acquisition mode.
BeginRegex string
begin line regex.
Delimiter string
log delimiter.
FilterKeyRegexes List<ClsCosRechargeExtractRuleInfoFilterKeyRegex>
rules that need to filter logs.
IsGbk double
gbk encoding.
JsonStandard double
is standard json.
Keys List<string>
key list.
LogRegex string
log regex.
MetaTags List<ClsCosRechargeExtractRuleInfoMetaTag>
metadata tag list.
MetadataType double
metadata type.
ParseProtocol string
parse protocol.
PathRegex string
metadata path regex.
Protocol string
syslog protocol.
TimeFormat string
time format.
TimeKey string
time key.
UnMatchLogKey string
parsing failure log key.
UnMatchUpLoadSwitch bool
whether to upload the parsing failure log.
Address string
syslog address.
Backtracking float64
backtracking data volume in incremental acquisition mode.
BeginRegex string
begin line regex.
Delimiter string
log delimiter.
FilterKeyRegexes []ClsCosRechargeExtractRuleInfoFilterKeyRegex
rules that need to filter logs.
IsGbk float64
gbk encoding.
JsonStandard float64
is standard json.
Keys []string
key list.
LogRegex string
log regex.
MetaTags []ClsCosRechargeExtractRuleInfoMetaTag
metadata tag list.
MetadataType float64
metadata type.
ParseProtocol string
parse protocol.
PathRegex string
metadata path regex.
Protocol string
syslog protocol.
TimeFormat string
time format.
TimeKey string
time key.
UnMatchLogKey string
parsing failure log key.
UnMatchUpLoadSwitch bool
whether to upload the parsing failure log.
address String
syslog address.
backtracking Double
backtracking data volume in incremental acquisition mode.
beginRegex String
begin line regex.
delimiter String
log delimiter.
filterKeyRegexes List<ClsCosRechargeExtractRuleInfoFilterKeyRegex>
rules that need to filter logs.
isGbk Double
gbk encoding.
jsonStandard Double
is standard json.
keys List<String>
key list.
logRegex String
log regex.
metaTags List<ClsCosRechargeExtractRuleInfoMetaTag>
metadata tag list.
metadataType Double
metadata type.
parseProtocol String
parse protocol.
pathRegex String
metadata path regex.
protocol String
syslog protocol.
timeFormat String
time format.
timeKey String
time key.
unMatchLogKey String
parsing failure log key.
unMatchUpLoadSwitch Boolean
whether to upload the parsing failure log.
address string
syslog address.
backtracking number
backtracking data volume in incremental acquisition mode.
beginRegex string
begin line regex.
delimiter string
log delimiter.
filterKeyRegexes ClsCosRechargeExtractRuleInfoFilterKeyRegex[]
rules that need to filter logs.
isGbk number
gbk encoding.
jsonStandard number
is standard json.
keys string[]
key list.
logRegex string
log regex.
metaTags ClsCosRechargeExtractRuleInfoMetaTag[]
metadata tag list.
metadataType number
metadata type.
parseProtocol string
parse protocol.
pathRegex string
metadata path regex.
protocol string
syslog protocol.
timeFormat string
time format.
timeKey string
time key.
unMatchLogKey string
parsing failure log key.
unMatchUpLoadSwitch boolean
whether to upload the parsing failure log.
address str
syslog address.
backtracking float
backtracking data volume in incremental acquisition mode.
begin_regex str
begin line regex.
delimiter str
log delimiter.
filter_key_regexes Sequence[ClsCosRechargeExtractRuleInfoFilterKeyRegex]
rules that need to filter logs.
is_gbk float
gbk encoding.
json_standard float
is standard json.
keys Sequence[str]
key list.
log_regex str
log regex.
meta_tags Sequence[ClsCosRechargeExtractRuleInfoMetaTag]
metadata tag list.
metadata_type float
metadata type.
parse_protocol str
parse protocol.
path_regex str
metadata path regex.
protocol str
syslog protocol.
time_format str
time format.
time_key str
time key.
un_match_log_key str
parsing failure log key.
un_match_up_load_switch bool
whether to upload the parsing failure log.
address String
syslog address.
backtracking Number
backtracking data volume in incremental acquisition mode.
beginRegex String
begin line regex.
delimiter String
log delimiter.
filterKeyRegexes List<Property Map>
rules that need to filter logs.
isGbk Number
gbk encoding.
jsonStandard Number
is standard json.
keys List<String>
key list.
logRegex String
log regex.
metaTags List<Property Map>
metadata tag list.
metadataType Number
metadata type.
parseProtocol String
parse protocol.
pathRegex String
metadata path regex.
protocol String
syslog protocol.
timeFormat String
time format.
timeKey String
time key.
unMatchLogKey String
parsing failure log key.
unMatchUpLoadSwitch Boolean
whether to upload the parsing failure log.

ClsCosRechargeExtractRuleInfoFilterKeyRegex
, ClsCosRechargeExtractRuleInfoFilterKeyRegexArgs

Key This property is required. string
need filter log key.
Regex This property is required. string
need filter log regex.
Key This property is required. string
need filter log key.
Regex This property is required. string
need filter log regex.
key This property is required. String
need filter log key.
regex This property is required. String
need filter log regex.
key This property is required. string
need filter log key.
regex This property is required. string
need filter log regex.
key This property is required. str
need filter log key.
regex This property is required. str
need filter log regex.
key This property is required. String
need filter log key.
regex This property is required. String
need filter log regex.

ClsCosRechargeExtractRuleInfoMetaTag
, ClsCosRechargeExtractRuleInfoMetaTagArgs

Key string
metadata key.
Value string
metadata value.
Key string
metadata key.
Value string
metadata value.
key String
metadata key.
value String
metadata value.
key string
metadata key.
value string
metadata value.
key str
metadata key.
value str
metadata value.
key String
metadata key.
value String
metadata value.

Import

cls cos_recharge can be imported using the id, e.g.

$ pulumi import tencentcloud:index/clsCosRecharge:ClsCosRecharge cos_recharge topic_id#cos_recharge_id
Copy

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.