UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

310 lines (309 loc) 9.01 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of tls rule appliers * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const config = new pulumi.Config(); * const name = config.get("name") || "tf-test-rule-applier"; * const fooProject = new volcengine.tls.Project("fooProject", { * projectName: name, * description: "tf-test-project-desc", * }); * const fooTopic = new volcengine.tls.Topic("fooTopic", { * projectId: fooProject.id, * topicName: name, * ttl: 60, * shardCount: 2, * autoSplit: true, * maxSplitShard: 10, * enableTracking: true, * timeKey: "request_time", * timeFormat: "%Y-%m-%dT%H:%M:%S,%f", * tags: [{ * key: "k1", * value: "v1", * }], * logPublicIp: true, * enableHotTtl: true, * hotTtl: 30, * coldTtl: 30, * archiveTtl: 0, * }); * const fooRule = new volcengine.tls.Rule("fooRule", { * topicId: fooTopic.id, * ruleName: "tf-test-rule", * logType: "delimiter_log", * logSample: "2018-05-22 15:35:53.850,INFO,XXXX", * inputType: 1, * extractRule: { * delimiter: ",", * keys: [ * "time", * "level", * "msg", * ], * timeKey: "time", * timeFormat: "%Y-%m-%d %H:%M:%S.%f", * quote: "\"", * timeZone: "GMT+08:00", * }, * userDefineRule: { * enableRawLog: true, * tailFiles: true, * shardHashKey: { * hashKey: "3C", * }, * advanced: { * closeInactive: 10, * closeRemoved: false, * closeRenamed: false, * closeEof: false, * closeTimeout: 1, * }, * }, * containerRule: { * stream: "all", * containerNameRegex: ".*test.*", * includeContainerLabelRegex: { * Key1: "Value12", * Key2: "Value23", * }, * excludeContainerLabelRegex: { * Key1: "Value12", * Key2: "Value22", * }, * includeContainerEnvRegex: { * Key1: "Value1", * Key2: "Value2", * }, * excludeContainerEnvRegex: { * Key1: "Value1", * Key2: "Value2", * }, * envTag: { * Key1: "Value1", * Key2: "Value2", * }, * kubernetesRule: { * namespaceNameRegex: ".*test.*", * workloadType: "Deployment", * workloadNameRegex: ".*test.*", * includePodLabelRegex: { * Key1: "Value1", * Key2: "Value2", * }, * excludePodLabelRegex: { * Key1: "Value1", * Key2: "Value2", * }, * podNameRegex: ".*test.*", * labelTag: { * Key1: "Value1", * Key2: "Value2", * }, * annotationTag: { * Key1: "Value1", * Key2: "Value2", * }, * }, * }, * }); * const fooHostGroup = new volcengine.tls.HostGroup("fooHostGroup", { * hostGroupName: name, * hostGroupType: "Label", * hostIdentifier: "tf-controller", * autoUpdate: false, * serviceLogging: false, * }); * // resource "volcengine_tls_rule_applier" "foo" { * // rule_id = volcengine_tls_rule.foo.id * // host_group_id = volcengine_tls_host_group.foo.id * // } * const fooRuleAppliers = volcengine.tls.getRuleAppliersOutput({ * ruleId: fooRule.id, * }); * ``` */ export declare function getRuleAppliers(args: GetRuleAppliersArgs, opts?: pulumi.InvokeOptions): Promise<GetRuleAppliersResult>; /** * A collection of arguments for invoking getRuleAppliers. */ export interface GetRuleAppliersArgs { /** * File name where to save data source results. */ outputFile?: string; /** * The rule id. */ ruleId: string; } /** * A collection of values returned by getRuleAppliers. */ export interface GetRuleAppliersResult { /** * The host group info list. */ readonly hostGroupInfos: outputs.tls.GetRuleAppliersHostGroupInfo[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly outputFile?: string; readonly ruleId: string; /** * The total count of query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of tls rule appliers * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const config = new pulumi.Config(); * const name = config.get("name") || "tf-test-rule-applier"; * const fooProject = new volcengine.tls.Project("fooProject", { * projectName: name, * description: "tf-test-project-desc", * }); * const fooTopic = new volcengine.tls.Topic("fooTopic", { * projectId: fooProject.id, * topicName: name, * ttl: 60, * shardCount: 2, * autoSplit: true, * maxSplitShard: 10, * enableTracking: true, * timeKey: "request_time", * timeFormat: "%Y-%m-%dT%H:%M:%S,%f", * tags: [{ * key: "k1", * value: "v1", * }], * logPublicIp: true, * enableHotTtl: true, * hotTtl: 30, * coldTtl: 30, * archiveTtl: 0, * }); * const fooRule = new volcengine.tls.Rule("fooRule", { * topicId: fooTopic.id, * ruleName: "tf-test-rule", * logType: "delimiter_log", * logSample: "2018-05-22 15:35:53.850,INFO,XXXX", * inputType: 1, * extractRule: { * delimiter: ",", * keys: [ * "time", * "level", * "msg", * ], * timeKey: "time", * timeFormat: "%Y-%m-%d %H:%M:%S.%f", * quote: "\"", * timeZone: "GMT+08:00", * }, * userDefineRule: { * enableRawLog: true, * tailFiles: true, * shardHashKey: { * hashKey: "3C", * }, * advanced: { * closeInactive: 10, * closeRemoved: false, * closeRenamed: false, * closeEof: false, * closeTimeout: 1, * }, * }, * containerRule: { * stream: "all", * containerNameRegex: ".*test.*", * includeContainerLabelRegex: { * Key1: "Value12", * Key2: "Value23", * }, * excludeContainerLabelRegex: { * Key1: "Value12", * Key2: "Value22", * }, * includeContainerEnvRegex: { * Key1: "Value1", * Key2: "Value2", * }, * excludeContainerEnvRegex: { * Key1: "Value1", * Key2: "Value2", * }, * envTag: { * Key1: "Value1", * Key2: "Value2", * }, * kubernetesRule: { * namespaceNameRegex: ".*test.*", * workloadType: "Deployment", * workloadNameRegex: ".*test.*", * includePodLabelRegex: { * Key1: "Value1", * Key2: "Value2", * }, * excludePodLabelRegex: { * Key1: "Value1", * Key2: "Value2", * }, * podNameRegex: ".*test.*", * labelTag: { * Key1: "Value1", * Key2: "Value2", * }, * annotationTag: { * Key1: "Value1", * Key2: "Value2", * }, * }, * }, * }); * const fooHostGroup = new volcengine.tls.HostGroup("fooHostGroup", { * hostGroupName: name, * hostGroupType: "Label", * hostIdentifier: "tf-controller", * autoUpdate: false, * serviceLogging: false, * }); * // resource "volcengine_tls_rule_applier" "foo" { * // rule_id = volcengine_tls_rule.foo.id * // host_group_id = volcengine_tls_host_group.foo.id * // } * const fooRuleAppliers = volcengine.tls.getRuleAppliersOutput({ * ruleId: fooRule.id, * }); * ``` */ export declare function getRuleAppliersOutput(args: GetRuleAppliersOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetRuleAppliersResult>; /** * A collection of arguments for invoking getRuleAppliers. */ export interface GetRuleAppliersOutputArgs { /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The rule id. */ ruleId: pulumi.Input<string>; }