@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
136 lines (135 loc) • 4.74 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Use this resource to manage the log config of a CCE cluster within HuaweiCloud.
*
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const test = new huaweicloud.cce.ClusterLogConfig("test", {
* clusterId: clusterId,
* ttlInDays: 3,
* logConfigs: [
* {
* name: "kube-apiserver",
* enable: true,
* },
* {
* name: "kube-controller-manager",
* enable: false,
* },
* {
* name: "kube-scheduler",
* enable: false,
* },
* {
* name: "audit",
* enable: true,
* },
* ],
* });
* ```
*
* ## Import
*
* The cluster log config can be imported using the cluster ID, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cce/clusterLogConfig:ClusterLogConfig test <cluster_id>
* ```
*/
export declare class ClusterLogConfig extends pulumi.CustomResource {
/**
* Get an existing ClusterLogConfig 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?: ClusterLogConfigState, opts?: pulumi.CustomResourceOptions): ClusterLogConfig;
/**
* Returns true if the given object is an instance of ClusterLogConfig. 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 ClusterLogConfig;
/**
* Specifies the cluster ID.
*/
readonly clusterId: pulumi.Output<string>;
/**
* Specifies the list of log configs.
* The logConfigs structure is documented below.
*/
readonly logConfigs: pulumi.Output<outputs.Cce.ClusterLogConfigLogConfig[] | undefined>;
/**
* Specifies the region in which to create the cluster log config resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the log keeping days, default to `7`.
*/
readonly ttlInDays: pulumi.Output<number>;
/**
* Create a ClusterLogConfig 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: ClusterLogConfigArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ClusterLogConfig resources.
*/
export interface ClusterLogConfigState {
/**
* Specifies the cluster ID.
*/
clusterId?: pulumi.Input<string>;
/**
* Specifies the list of log configs.
* The logConfigs structure is documented below.
*/
logConfigs?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterLogConfigLogConfig>[]>;
/**
* Specifies the region in which to create the cluster log config resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the log keeping days, default to `7`.
*/
ttlInDays?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ClusterLogConfig resource.
*/
export interface ClusterLogConfigArgs {
/**
* Specifies the cluster ID.
*/
clusterId: pulumi.Input<string>;
/**
* Specifies the list of log configs.
* The logConfigs structure is documented below.
*/
logConfigs?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterLogConfigLogConfig>[]>;
/**
* Specifies the region in which to create the cluster log config resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the log keeping days, default to `7`.
*/
ttlInDays?: pulumi.Input<number>;
}