UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

267 lines (266 loc) 9.04 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage flow log * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * projectName: "default", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooFlowLog = new volcengine.vpc.FlowLog("fooFlowLog", { * flowLogName: "acc-test-flow-log", * description: "acc-test", * resourceType: "subnet", * resourceId: fooSubnet.id, * trafficType: "All", * logProjectName: "acc-test-project", * logTopicName: "acc-test-topic", * aggregationInterval: 10, * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * ``` * * ## Import * * FlowLog can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:vpc/flowLog:FlowLog default resource_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 aggregation interval of flow log. Unit: minute. Valid values: `1`, `5`, `10`. */ readonly aggregationInterval: pulumi.Output<number>; /** * The business status of flow log. */ readonly businessStatus: pulumi.Output<string>; /** * The created time of flow log. */ readonly createdAt: pulumi.Output<string>; /** * The description of flow log. */ readonly description: pulumi.Output<string | undefined>; /** * The name of flow log. */ readonly flowLogName: pulumi.Output<string>; /** * The reason why flow log is locked. */ readonly lockReason: pulumi.Output<string>; /** * The ID of log project. */ readonly logProjectId: pulumi.Output<string>; /** * The name of log project. If there is no corresponding log project with the name, a new log project will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ readonly logProjectName: pulumi.Output<string>; /** * The ID of log topic. */ readonly logTopicId: pulumi.Output<string>; /** * The name of log topic. If there is no corresponding log topic with the name, a new log topic will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ readonly logTopicName: pulumi.Output<string>; /** * The project name of flow log. */ readonly projectName: pulumi.Output<string>; /** * The ID of resource. */ readonly resourceId: pulumi.Output<string>; /** * The type of resource. Valid values: `vpc`, `subnet`, `eni`. */ readonly resourceType: pulumi.Output<string>; /** * The status of flow log. Values: `Active`, `Pending`, `Inactive`, `Creating`, `Deleting`. */ readonly status: pulumi.Output<string>; /** * Tags. */ readonly tags: pulumi.Output<outputs.vpc.FlowLogTag[] | undefined>; /** * The type of traffic. Valid values: `All`, `Allow`, `Drop`. */ readonly trafficType: pulumi.Output<string>; /** * The updated time of 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 aggregation interval of flow log. Unit: minute. Valid values: `1`, `5`, `10`. */ aggregationInterval?: pulumi.Input<number>; /** * The business status of flow log. */ businessStatus?: pulumi.Input<string>; /** * The created time of flow log. */ createdAt?: pulumi.Input<string>; /** * The description of flow log. */ description?: pulumi.Input<string>; /** * The name of flow log. */ flowLogName?: pulumi.Input<string>; /** * The reason why flow log is locked. */ lockReason?: pulumi.Input<string>; /** * The ID of log project. */ logProjectId?: pulumi.Input<string>; /** * The name of log project. If there is no corresponding log project with the name, a new log project will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ logProjectName?: pulumi.Input<string>; /** * The ID of log topic. */ logTopicId?: pulumi.Input<string>; /** * The name of log topic. If there is no corresponding log topic with the name, a new log topic will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ logTopicName?: pulumi.Input<string>; /** * The project name of flow log. */ projectName?: pulumi.Input<string>; /** * The ID of resource. */ resourceId?: pulumi.Input<string>; /** * The type of resource. Valid values: `vpc`, `subnet`, `eni`. */ resourceType?: pulumi.Input<string>; /** * The status of flow log. Values: `Active`, `Pending`, `Inactive`, `Creating`, `Deleting`. */ status?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vpc.FlowLogTag>[]>; /** * The type of traffic. Valid values: `All`, `Allow`, `Drop`. */ trafficType?: pulumi.Input<string>; /** * The updated time of flow log. */ updatedAt?: pulumi.Input<string>; } /** * The set of arguments for constructing a FlowLog resource. */ export interface FlowLogArgs { /** * The aggregation interval of flow log. Unit: minute. Valid values: `1`, `5`, `10`. */ aggregationInterval: pulumi.Input<number>; /** * The description of flow log. */ description?: pulumi.Input<string>; /** * The name of flow log. */ flowLogName: pulumi.Input<string>; /** * The name of log project. If there is no corresponding log project with the name, a new log project will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ logProjectName: pulumi.Input<string>; /** * The name of log topic. If there is no corresponding log topic with the name, a new log topic will be created. * When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignoreChanges ignore changes in fields. */ logTopicName: pulumi.Input<string>; /** * The project name of flow log. */ projectName?: pulumi.Input<string>; /** * The ID of resource. */ resourceId: pulumi.Input<string>; /** * The type of resource. Valid values: `vpc`, `subnet`, `eni`. */ resourceType: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vpc.FlowLogTag>[]>; /** * The type of traffic. Valid values: `All`, `Allow`, `Drop`. */ trafficType: pulumi.Input<string>; }