import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface SgRuleConfig extends cdktf.TerraformMetaArguments { /** * Rule status. `0` is off, `1` is on. This parameter is not required or is 1 when creating. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#enable SgRule#enable} */ readonly enable?: number; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#id SgRule#id} * * Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. * If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. */ readonly id?: string; /** * data block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#data SgRule#data} */ readonly data: SgRuleData; } export interface SgRuleData { /** * Description. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#description SgRule#description} */ readonly description: string; /** * Destination example: `net`: IP/CIDR (192.168.0.2); `template`: parameter template (ipm-dyodhpby); `instance`: asset instance (ins-123456); `resourcegroup`: asset group (/all groups/group 1/subgroup 1); `tag`: resource tag ({"Key":"tag key","Value":"tag value"}); `region`: region (ap-gaungzhou). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#dest_content SgRule#dest_content} */ readonly destContent: string; /** * Access destination type. Valid values: net|template|instance|resourcegroup|tag|region. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#dest_type SgRule#dest_type} */ readonly destType: string; /** * The port to apply access control rules. Valid values: `-1/-1`: all ports, `80`: port 80. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#port SgRule#port} */ readonly port?: string; /** * Protocol. TCP/UDP/ICMP/ANY. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#protocol SgRule#protocol} */ readonly protocol?: string; /** * The action that Cloud Firewall performs on the traffic. Valid values: `accept`: allow, `drop`: deny. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#rule_action SgRule#rule_action} */ readonly ruleAction: string; /** * Parameter template ID of port and protocol type; mutually exclusive with Protocol and Port. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#service_template_id SgRule#service_template_id} */ readonly serviceTemplateId?: string; /** * Source example: `net`: IP/CIDR (192.168.0.2); `template`: parameter template (ipm-dyodhpby); `instance`: asset instance (ins-123456); `resourcegroup`: asset group (/all groups/group 1/subgroup 1); `tag`: resource tag ({"Key":"tag key","Value":"tag value"}); `region`: region (ap-gaungzhou). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#source_content SgRule#source_content} */ readonly sourceContent: string; /** * Access source type. Valid values: net|template|instance|resourcegroup|tag|region. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#source_type SgRule#source_type} */ readonly sourceType: string; } export declare function sgRuleDataToTerraform(struct?: SgRuleDataOutputReference | SgRuleData): any; export declare function sgRuleDataToHclTerraform(struct?: SgRuleDataOutputReference | SgRuleData): any; export declare class SgRuleDataOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): SgRuleData | undefined; set internalValue(value: SgRuleData | undefined); private _description?; get description(): string; set description(value: string); get descriptionInput(): string; private _destContent?; get destContent(): string; set destContent(value: string); get destContentInput(): string; private _destType?; get destType(): string; set destType(value: string); get destTypeInput(): string; get orderIndex(): any; private _port?; get port(): string; set port(value: string); resetPort(): void; get portInput(): string; private _protocol?; get protocol(): string; set protocol(value: string); resetProtocol(): void; get protocolInput(): string; private _ruleAction?; get ruleAction(): string; set ruleAction(value: string); get ruleActionInput(): string; private _serviceTemplateId?; get serviceTemplateId(): string; set serviceTemplateId(value: string); resetServiceTemplateId(): void; get serviceTemplateIdInput(): string; private _sourceContent?; get sourceContent(): string; set sourceContent(value: string); get sourceContentInput(): string; private _sourceType?; get sourceType(): string; set sourceType(value: string); get sourceTypeInput(): string; } /** * Represents a {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule tencentcloud_sg_rule} */ export declare class SgRule extends cdktf.TerraformResource { static readonly tfResourceType = "tencentcloud_sg_rule"; /** * Generates CDKTF code for importing a SgRule resource upon running "cdktf plan " * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the SgRule to import * @param importFromId The id of the existing SgRule that should be imported. Refer to the {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the SgRule to import is found */ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any; /** * Create a new {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/sg_rule tencentcloud_sg_rule} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options SgRuleConfig */ constructor(scope: Construct, id: string, config: SgRuleConfig); private _enable?; get enable(): number; set enable(value: number); resetEnable(): void; get enableInput(): number; private _id?; get id(): string; set id(value: string); resetId(): void; get idInput(): string; private _data; get data(): SgRuleDataOutputReference; putData(value: SgRuleData): void; get dataInput(): SgRuleData; protected synthesizeAttributes(): { [name: string]: any; }; protected synthesizeHclAttributes(): { [name: string]: any; }; }