Class SecurityGroupRule
Inherited Members
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class SecurityGroupRule : CustomResource
Constructors
View SourceSecurityGroupRule(String, SecurityGroupRuleArgs, CustomResourceOptions)
Create a SecurityGroupRule resource with the given unique name, arguments, and options.
Declaration
public SecurityGroupRule(string name, SecurityGroupRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SecurityGroupRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCidrIp
The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
Declaration
public Output<string> CidrIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpProtocol
The protocol. Can be tcp, udp, icmp, gre or all.
Declaration
public Output<string> IpProtocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NicType
Network type, can be either internet or intranet, the default value is internet.
Declaration
public Output<string> NicType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policy
Authorization policy, can be either accept or drop, the default value is accept.
Declaration
public Output<string> Policy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PortRange
The range of port numbers relevant to the IP protocol. Default to "-1/-1". When the protocol is tcp or udp, each side port number range from 1 to 65535 and '-1/-1' will be invalid.
For example, 1/200 means that the range of the port numbers is 1-200. Other protocols' 'port_range' can only be "-1/-1", and other values will be invalid.
Declaration
public Output<string> PortRange { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Priority
Authorization policy priority, with parameter values: 1-100, default value: 1.
Declaration
public Output<int?> Priority { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
SecurityGroupId
The security group to apply this rule to.
Declaration
public Output<string> SecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceGroupOwnerAccount
The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts. This parameter is invalid if cidr_ip has already been set.
Declaration
public Output<string> SourceGroupOwnerAccount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceSecurityGroupId
The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.
Declaration
public Output<string> SourceSecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Type
The type of rule being created. Valid options are ingress (inbound) or egress (outbound).
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SecurityGroupRuleState, CustomResourceOptions)
Get an existing SecurityGroupRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SecurityGroupRule Get(string name, Input<string> id, SecurityGroupRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SecurityGroupRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SecurityGroupRule |