@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
243 lines (242 loc) • 8.08 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a flow log resource under the ER instance within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const instanceId = config.requireObject("instanceId");
* const logGroupId = config.requireObject("logGroupId");
* const logStreamId = config.requireObject("logStreamId");
* const resourceId = config.requireObject("resourceId");
* const flowLogName = config.requireObject("flowLogName");
* const test = new huaweicloud.er.FlowLog("test", {
* instanceId: instanceId,
* logStoreType: "LTS",
* logGroupId: logGroupId,
* logStreamId: logStreamId,
* resourceType: "attachment",
* resourceId: resourceId,
* description: "Flow log created by terraform",
* enabled: false,
* });
* ```
*
* ## Import
*
* The flow log can be imported using the related `instance_id` and their `id`, separated by a slash (/), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Er/flowLog:FlowLog test <instance_id>/<id>
* ```
*/
export declare class FlowLog extends pulumi.CustomResource {
/**
* Get an existing FlowLog 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?: FlowLogState, opts?: pulumi.CustomResourceOptions): FlowLog;
/**
* Returns true if the given object is an instance of FlowLog. 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 FlowLog;
/**
* The creation time of the flow log.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies the description of the flow log.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies whether to enable the flow log function. The default value is **true**.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* Specifies the ID of the ER instance to which the flow log belongs.
* Changing this creates a new resource.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Specifies the LTS log group ID.
* Changing this creates a new resource.
*/
readonly logGroupId: pulumi.Output<string>;
/**
* Specifies the storage type of flow log. The valid value is **LTS**.
* Changing this creates a new resource.
*/
readonly logStoreType: pulumi.Output<string>;
/**
* Specifies the LTS log stream ID.
* Changing this creates a new resource.
*/
readonly logStreamId: pulumi.Output<string>;
/**
* Specifies the name of the flow log.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the resource ID to which the logs to be collected.
* Changing this creates a new resource.
*/
readonly resourceId: pulumi.Output<string>;
/**
* Specifies the resource type to which the logs to be collected.
* The valid value is **attachment**.
* Changing this creates a new resource.
*/
readonly resourceType: pulumi.Output<string>;
/**
* The current status of the flow log.
*/
readonly state: pulumi.Output<string>;
/**
* The latest update time of the flow log.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a FlowLog 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: FlowLogArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering FlowLog resources.
*/
export interface FlowLogState {
/**
* The creation time of the flow log.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies the description of the flow log.
*/
description?: pulumi.Input<string>;
/**
* Specifies whether to enable the flow log function. The default value is **true**.
*/
enabled?: pulumi.Input<boolean>;
/**
* Specifies the ID of the ER instance to which the flow log belongs.
* Changing this creates a new resource.
*/
instanceId?: pulumi.Input<string>;
/**
* Specifies the LTS log group ID.
* Changing this creates a new resource.
*/
logGroupId?: pulumi.Input<string>;
/**
* Specifies the storage type of flow log. The valid value is **LTS**.
* Changing this creates a new resource.
*/
logStoreType?: pulumi.Input<string>;
/**
* Specifies the LTS log stream ID.
* Changing this creates a new resource.
*/
logStreamId?: pulumi.Input<string>;
/**
* Specifies the name of the flow log.
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the resource ID to which the logs to be collected.
* Changing this creates a new resource.
*/
resourceId?: pulumi.Input<string>;
/**
* Specifies the resource type to which the logs to be collected.
* The valid value is **attachment**.
* Changing this creates a new resource.
*/
resourceType?: pulumi.Input<string>;
/**
* The current status of the flow log.
*/
state?: pulumi.Input<string>;
/**
* The latest update time of the flow log.
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a FlowLog resource.
*/
export interface FlowLogArgs {
/**
* Specifies the description of the flow log.
*/
description?: pulumi.Input<string>;
/**
* Specifies whether to enable the flow log function. The default value is **true**.
*/
enabled?: pulumi.Input<boolean>;
/**
* Specifies the ID of the ER instance to which the flow log belongs.
* Changing this creates a new resource.
*/
instanceId: pulumi.Input<string>;
/**
* Specifies the LTS log group ID.
* Changing this creates a new resource.
*/
logGroupId: pulumi.Input<string>;
/**
* Specifies the storage type of flow log. The valid value is **LTS**.
* Changing this creates a new resource.
*/
logStoreType: pulumi.Input<string>;
/**
* Specifies the LTS log stream ID.
* Changing this creates a new resource.
*/
logStreamId: pulumi.Input<string>;
/**
* Specifies the name of the flow log.
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used.
* Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the resource ID to which the logs to be collected.
* Changing this creates a new resource.
*/
resourceId: pulumi.Input<string>;
/**
* Specifies the resource type to which the logs to be collected.
* The valid value is **attachment**.
* Changing this creates a new resource.
*/
resourceType: pulumi.Input<string>;
}