UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

360 lines (359 loc) 12.6 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages CTS **data** tracker resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const dataBucket = config.requireObject("dataBucket"); * const transferBucket = config.requireObject("transferBucket"); * const tracker = new huaweicloud.cts.DataTracker("tracker", { * dataBucket: dataBucket, * bucketName: transferBucket, * filePrefix: "cloudTrace", * ltsEnabled: true, * }); * ``` * * ## Import * * CTS data tracker can be imported using `name`, e.g.bash * * ```sh * $ pulumi import huaweicloud:Cts/dataTracker:DataTracker tracker your_tracker_name * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attribute is `tags`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the resource. Also you can ignore changes as below. hcl resource "huaweicloud_cts_data_tracker" "test" { * * ... * * lifecycle { * * ignore_changes = [tags] * * } } */ export declare class DataTracker extends pulumi.CustomResource { /** * Get an existing DataTracker resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DataTrackerState, opts?: pulumi.CustomResourceOptions): DataTracker; /** * Returns true if the given object is an instance of DataTracker. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DataTracker; /** * The cloud service delegation name. */ readonly agencyName: pulumi.Output<string>; /** * Specifies the OBS bucket to which traces will be transferred. */ readonly bucketName: pulumi.Output<string | undefined>; /** * Specifies the compression type of trace files. The value can be **gzip** * or **json**. The default value is **gzip**. */ readonly compressType: pulumi.Output<string | undefined>; /** * The creation time of the tracker. */ readonly createTime: pulumi.Output<number>; /** * Specifies the OBS bucket tracked by the data tracker. * Changing this creates a new resource. */ readonly dataBucket: pulumi.Output<string>; /** * Specifies an array of operation types tracked by the data tracker, * the value of operation can be **WRITE** or **READ**. */ readonly dataOperations: pulumi.Output<string[]>; /** * It indicates the cause of the abnormal status. */ readonly detail: pulumi.Output<string>; /** * The Account ID. */ readonly domainId: pulumi.Output<string>; /** * Specifies whether tracker is enabled. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Specifies the file name prefix to mark trace files that need to be stored * in an OBS bucket. The value contains `0` to `64` characters. Only letters, numbers, hyphens (-), underscores (_), * and periods (.) are allowed. */ readonly filePrefix: pulumi.Output<string | undefined>; /** * The LTS log group ID. */ readonly groupId: pulumi.Output<string>; /** * Whether CTS has been granted permissions to perform operations on the OBS bucket. */ readonly isAuthorizedBucket: pulumi.Output<boolean>; /** * Specifies whether to divide the path of the trace file by cloud service. * The default value is **true**. */ readonly isSortByService: pulumi.Output<boolean | undefined>; /** * The name of the log group that CTS creates in LTS. */ readonly logGroupName: pulumi.Output<string>; /** * The name of the log topic that CTS creates in LTS. */ readonly logTopicName: pulumi.Output<string>; /** * Specifies whether trace analysis is enabled. */ readonly ltsEnabled: pulumi.Output<boolean | undefined>; /** * Specifies the data tracker name. The name cannot be system or ststem-trace. * Changing this creates a new resource. */ readonly name: pulumi.Output<string>; /** * Specifies the retention period that traces are stored in `bucketName`, * the value can be `0`(permanent), `30`, `60`, `90`, `180` or `1,095`. */ readonly obsRetentionPeriod: pulumi.Output<number | undefined>; /** * Specifies the region in which to manage the CTS data tracker resource. * If omitted, the provider-level region will be used. Changing this creates a new resource. */ readonly region: pulumi.Output<string>; /** * The tracker status, the value can be **enabled**, **disabled** or **error**. */ readonly status: pulumi.Output<string>; /** * The LTS log stream ID. */ readonly streamId: pulumi.Output<string>; /** * Specifies the key/value pairs to associate with the CTS data tracker. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Whether traces will be transferred. */ readonly transferEnabled: pulumi.Output<boolean>; /** * The tracker type, only **data** is available. */ readonly type: pulumi.Output<string>; /** * Specifies whether trace file verification is enabled during trace transfer. */ readonly validateFile: pulumi.Output<boolean | undefined>; /** * Create a DataTracker resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DataTrackerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DataTracker resources. */ export interface DataTrackerState { /** * The cloud service delegation name. */ agencyName?: pulumi.Input<string>; /** * Specifies the OBS bucket to which traces will be transferred. */ bucketName?: pulumi.Input<string>; /** * Specifies the compression type of trace files. The value can be **gzip** * or **json**. The default value is **gzip**. */ compressType?: pulumi.Input<string>; /** * The creation time of the tracker. */ createTime?: pulumi.Input<number>; /** * Specifies the OBS bucket tracked by the data tracker. * Changing this creates a new resource. */ dataBucket?: pulumi.Input<string>; /** * Specifies an array of operation types tracked by the data tracker, * the value of operation can be **WRITE** or **READ**. */ dataOperations?: pulumi.Input<pulumi.Input<string>[]>; /** * It indicates the cause of the abnormal status. */ detail?: pulumi.Input<string>; /** * The Account ID. */ domainId?: pulumi.Input<string>; /** * Specifies whether tracker is enabled. */ enabled?: pulumi.Input<boolean>; /** * Specifies the file name prefix to mark trace files that need to be stored * in an OBS bucket. The value contains `0` to `64` characters. Only letters, numbers, hyphens (-), underscores (_), * and periods (.) are allowed. */ filePrefix?: pulumi.Input<string>; /** * The LTS log group ID. */ groupId?: pulumi.Input<string>; /** * Whether CTS has been granted permissions to perform operations on the OBS bucket. */ isAuthorizedBucket?: pulumi.Input<boolean>; /** * Specifies whether to divide the path of the trace file by cloud service. * The default value is **true**. */ isSortByService?: pulumi.Input<boolean>; /** * The name of the log group that CTS creates in LTS. */ logGroupName?: pulumi.Input<string>; /** * The name of the log topic that CTS creates in LTS. */ logTopicName?: pulumi.Input<string>; /** * Specifies whether trace analysis is enabled. */ ltsEnabled?: pulumi.Input<boolean>; /** * Specifies the data tracker name. The name cannot be system or ststem-trace. * Changing this creates a new resource. */ name?: pulumi.Input<string>; /** * Specifies the retention period that traces are stored in `bucketName`, * the value can be `0`(permanent), `30`, `60`, `90`, `180` or `1,095`. */ obsRetentionPeriod?: pulumi.Input<number>; /** * Specifies the region in which to manage the CTS data tracker resource. * If omitted, the provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * The tracker status, the value can be **enabled**, **disabled** or **error**. */ status?: pulumi.Input<string>; /** * The LTS log stream ID. */ streamId?: pulumi.Input<string>; /** * Specifies the key/value pairs to associate with the CTS data tracker. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Whether traces will be transferred. */ transferEnabled?: pulumi.Input<boolean>; /** * The tracker type, only **data** is available. */ type?: pulumi.Input<string>; /** * Specifies whether trace file verification is enabled during trace transfer. */ validateFile?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a DataTracker resource. */ export interface DataTrackerArgs { /** * Specifies the OBS bucket to which traces will be transferred. */ bucketName?: pulumi.Input<string>; /** * Specifies the compression type of trace files. The value can be **gzip** * or **json**. The default value is **gzip**. */ compressType?: pulumi.Input<string>; /** * Specifies the OBS bucket tracked by the data tracker. * Changing this creates a new resource. */ dataBucket: pulumi.Input<string>; /** * Specifies an array of operation types tracked by the data tracker, * the value of operation can be **WRITE** or **READ**. */ dataOperations?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies whether tracker is enabled. */ enabled?: pulumi.Input<boolean>; /** * Specifies the file name prefix to mark trace files that need to be stored * in an OBS bucket. The value contains `0` to `64` characters. Only letters, numbers, hyphens (-), underscores (_), * and periods (.) are allowed. */ filePrefix?: pulumi.Input<string>; /** * Specifies whether to divide the path of the trace file by cloud service. * The default value is **true**. */ isSortByService?: pulumi.Input<boolean>; /** * Specifies whether trace analysis is enabled. */ ltsEnabled?: pulumi.Input<boolean>; /** * Specifies the data tracker name. The name cannot be system or ststem-trace. * Changing this creates a new resource. */ name?: pulumi.Input<string>; /** * Specifies the retention period that traces are stored in `bucketName`, * the value can be `0`(permanent), `30`, `60`, `90`, `180` or `1,095`. */ obsRetentionPeriod?: pulumi.Input<number>; /** * Specifies the region in which to manage the CTS data tracker resource. * If omitted, the provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Specifies the key/value pairs to associate with the CTS data tracker. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies whether trace file verification is enabled during trace transfer. */ validateFile?: pulumi.Input<boolean>; }