@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
367 lines (366 loc) • 12.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages CTS system 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 bucketName = config.requireObject("bucketName");
* const tracker = new huaweicloud.cts.Tracker("tracker", {
* bucketName: bucketName,
* filePrefix: "cts",
* ltsEnabled: true,
* });
* ```
*
* ## Import
*
* CTS tracker can be imported using `name`, only **system** is available. e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cts/tracker:Tracker tracker system
* ```
*
* 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 attributes include`tags`, `delete_tracker`. 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_tracker" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* tags, delete_tracker
*
* ]
*
* } }
*/
export declare class Tracker extends pulumi.CustomResource {
/**
* Get an existing Tracker 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?: TrackerState, opts?: pulumi.CustomResourceOptions): Tracker;
/**
* Returns true if the given object is an instance of Tracker. 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 Tracker;
/**
* 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 whether the tracker can be deleted.
*/
readonly deleteTracker: pulumi.Output<boolean | undefined>;
/**
* 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 names of the cloud services for which traces don't need to be transferred.
* Currently, only **KMS** is supported.
*/
readonly excludeServices: pulumi.Output<string[] | 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>;
/**
* Specifies the ID of KMS key used for trace file encryption.
*/
readonly kmsId: pulumi.Output<string | 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>;
/**
* The tracker name, only **system** is available.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies whether to apply the tracker configuration to the organization.
* If the value is set to **true**, the audit logs of all members in the organization in the current region will be
* transferred to the OBS bucket or LTS log stream configured for the management tracker.
*/
readonly organizationEnabled: pulumi.Output<boolean>;
/**
* Specifies the region in which to manage the CTS system 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 tracker.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Whether traces will be transferred.
*/
readonly transferEnabled: pulumi.Output<boolean>;
/**
* The tracker type, only **system** 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 Tracker 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?: TrackerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Tracker resources.
*/
export interface TrackerState {
/**
* 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 whether the tracker can be deleted.
*/
deleteTracker?: pulumi.Input<boolean>;
/**
* 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 names of the cloud services for which traces don't need to be transferred.
* Currently, only **KMS** is supported.
*/
excludeServices?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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>;
/**
* Specifies the ID of KMS key used for trace file encryption.
*/
kmsId?: pulumi.Input<string>;
/**
* 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>;
/**
* The tracker name, only **system** is available.
*/
name?: pulumi.Input<string>;
/**
* Specifies whether to apply the tracker configuration to the organization.
* If the value is set to **true**, the audit logs of all members in the organization in the current region will be
* transferred to the OBS bucket or LTS log stream configured for the management tracker.
*/
organizationEnabled?: pulumi.Input<boolean>;
/**
* Specifies the region in which to manage the CTS system 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 tracker.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Whether traces will be transferred.
*/
transferEnabled?: pulumi.Input<boolean>;
/**
* The tracker type, only **system** 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 Tracker resource.
*/
export interface TrackerArgs {
/**
* 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 whether the tracker can be deleted.
*/
deleteTracker?: pulumi.Input<boolean>;
/**
* Specifies whether tracker is enabled.
*/
enabled?: pulumi.Input<boolean>;
/**
* Specifies the names of the cloud services for which traces don't need to be transferred.
* Currently, only **KMS** is supported.
*/
excludeServices?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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 the ID of KMS key used for trace file encryption.
*/
kmsId?: pulumi.Input<string>;
/**
* Specifies whether trace analysis is enabled.
*/
ltsEnabled?: pulumi.Input<boolean>;
/**
* Specifies whether to apply the tracker configuration to the organization.
* If the value is set to **true**, the audit logs of all members in the organization in the current region will be
* transferred to the OBS bucket or LTS log stream configured for the management tracker.
*/
organizationEnabled?: pulumi.Input<boolean>;
/**
* Specifies the region in which to manage the CTS system 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 tracker.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies whether trace file verification is enabled during trace transfer.
*/
validateFile?: pulumi.Input<boolean>;
}