@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
201 lines (200 loc) • 8.83 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a IEC security group rule resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const secgroupRuleTest = new huaweicloud.iec.SecurityGroupRule("secgroupRuleTest", {
* direction: "ingress",
* portRangeMin: 22,
* portRangeMax: 22,
* ethertype: "IPv4",
* protocol: "tcp",
* securityGroupId: _var.iec_security_group_id,
* remoteIpPrefix: "0.0.0.0/0",
* });
* ```
*/
export declare class SecurityGroupRule extends pulumi.CustomResource {
/**
* Get an existing SecurityGroupRule 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?: SecurityGroupRuleState, opts?: pulumi.CustomResourceOptions): SecurityGroupRule;
/**
* Returns true if the given object is an instance of SecurityGroupRule. 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 SecurityGroupRule;
/**
* Specifies a description of the security group rule. Changing this
* parameter creates a new security group rule resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the direction of the rule, valid values are **ingress** or
* **egress**. Changing this parameter creates a new security group rule resource.
*/
readonly direction: pulumi.Output<string>;
/**
* Specifies the layer 3 protocol type, valid values are **IPv4**(IPv4 is
* default) or **IPv6**. Changing this parameter creates a new security group rule resource.
*/
readonly ethertype: pulumi.Output<string | undefined>;
/**
* Specifies the higher part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
readonly portRangeMax: pulumi.Output<number | undefined>;
/**
* Specifies the lower part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
readonly portRangeMin: pulumi.Output<number | undefined>;
/**
* Specifies the layer 4 protocol type, valid values are following. The valid
* values are: **tcp**, **udp**, **icmp** and **gre**. Changing this parameter creates a new security group rule
* resource.
*/
readonly protocol: pulumi.Output<string>;
/**
* Specifies the remote group id, the value needs to be an ID of a
* security group. This parameter and remoteIpPrefix are alternative. Changing this parameter creates a new security
* group rule resource.
*/
readonly remoteGroupId: pulumi.Output<string | undefined>;
/**
* Specifies the remote CIDR, the value to be a valid CIDR (i.e.
* 192.168.0.0/16). This parameter and remoteGroupId are alternative. Changing this parameter creates a new security
* group rule resource.
*/
readonly remoteIpPrefix: pulumi.Output<string | undefined>;
/**
* Specifies the security group id the rule should belong to. Changing
* this parameter creates a new security group rule resource.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* Create a SecurityGroupRule 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: SecurityGroupRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SecurityGroupRule resources.
*/
export interface SecurityGroupRuleState {
/**
* Specifies a description of the security group rule. Changing this
* parameter creates a new security group rule resource.
*/
description?: pulumi.Input<string>;
/**
* Specifies the direction of the rule, valid values are **ingress** or
* **egress**. Changing this parameter creates a new security group rule resource.
*/
direction?: pulumi.Input<string>;
/**
* Specifies the layer 3 protocol type, valid values are **IPv4**(IPv4 is
* default) or **IPv6**. Changing this parameter creates a new security group rule resource.
*/
ethertype?: pulumi.Input<string>;
/**
* Specifies the higher part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
portRangeMax?: pulumi.Input<number>;
/**
* Specifies the lower part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
portRangeMin?: pulumi.Input<number>;
/**
* Specifies the layer 4 protocol type, valid values are following. The valid
* values are: **tcp**, **udp**, **icmp** and **gre**. Changing this parameter creates a new security group rule
* resource.
*/
protocol?: pulumi.Input<string>;
/**
* Specifies the remote group id, the value needs to be an ID of a
* security group. This parameter and remoteIpPrefix are alternative. Changing this parameter creates a new security
* group rule resource.
*/
remoteGroupId?: pulumi.Input<string>;
/**
* Specifies the remote CIDR, the value to be a valid CIDR (i.e.
* 192.168.0.0/16). This parameter and remoteGroupId are alternative. Changing this parameter creates a new security
* group rule resource.
*/
remoteIpPrefix?: pulumi.Input<string>;
/**
* Specifies the security group id the rule should belong to. Changing
* this parameter creates a new security group rule resource.
*/
securityGroupId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SecurityGroupRule resource.
*/
export interface SecurityGroupRuleArgs {
/**
* Specifies a description of the security group rule. Changing this
* parameter creates a new security group rule resource.
*/
description?: pulumi.Input<string>;
/**
* Specifies the direction of the rule, valid values are **ingress** or
* **egress**. Changing this parameter creates a new security group rule resource.
*/
direction: pulumi.Input<string>;
/**
* Specifies the layer 3 protocol type, valid values are **IPv4**(IPv4 is
* default) or **IPv6**. Changing this parameter creates a new security group rule resource.
*/
ethertype?: pulumi.Input<string>;
/**
* Specifies the higher part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
portRangeMax?: pulumi.Input<number>;
/**
* Specifies the lower part of the allowed port range, valid integer value
* needs to be between `1` and `65,535`. Changing this parameter creates a new security group rule resource.
*/
portRangeMin?: pulumi.Input<number>;
/**
* Specifies the layer 4 protocol type, valid values are following. The valid
* values are: **tcp**, **udp**, **icmp** and **gre**. Changing this parameter creates a new security group rule
* resource.
*/
protocol: pulumi.Input<string>;
/**
* Specifies the remote group id, the value needs to be an ID of a
* security group. This parameter and remoteIpPrefix are alternative. Changing this parameter creates a new security
* group rule resource.
*/
remoteGroupId?: pulumi.Input<string>;
/**
* Specifies the remote CIDR, the value to be a valid CIDR (i.e.
* 192.168.0.0/16). This parameter and remoteGroupId are alternative. Changing this parameter creates a new security
* group rule resource.
*/
remoteIpPrefix?: pulumi.Input<string>;
/**
* Specifies the security group id the rule should belong to. Changing
* this parameter creates a new security group rule resource.
*/
securityGroupId: pulumi.Input<string>;
}