SecurityGroupRule

Create a SecurityGroupRule Resource

def SecurityGroupRule(resource_name, opts=None, cidr_ip=None, description=None, ip_protocol=None, nic_type=None, policy=None, port_range=None, priority=None, security_group_id=None, source_group_owner_account=None, source_security_group_id=None, type=None, __props__=None);
name string
The unique name of the resource.
args SecurityGroupRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SecurityGroupRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SecurityGroupRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SecurityGroupRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The SecurityGroupRule resource accepts the following input properties:

IpProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

SecurityGroupId string

The security group to apply this rule to.

Type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

CidrIp string

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.

Description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

NicType string

Network type, can be either internet or intranet, the default value is internet.

Policy string

Authorization policy, can be either accept or drop, the default value is accept.

PortRange string

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.

Priority int

Authorization policy priority, with parameter values: 1-100, default value: 1.

SourceGroupOwnerAccount string

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.

SourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

IpProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

SecurityGroupId string

The security group to apply this rule to.

Type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

CidrIp string

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.

Description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

NicType string

Network type, can be either internet or intranet, the default value is internet.

Policy string

Authorization policy, can be either accept or drop, the default value is accept.

PortRange string

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.

Priority int

Authorization policy priority, with parameter values: 1-100, default value: 1.

SourceGroupOwnerAccount string

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.

SourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

ipProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

securityGroupId string

The security group to apply this rule to.

type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

cidrIp string

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.

description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

nicType string

Network type, can be either internet or intranet, the default value is internet.

policy string

Authorization policy, can be either accept or drop, the default value is accept.

portRange string

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.

priority number

Authorization policy priority, with parameter values: 1-100, default value: 1.

sourceGroupOwnerAccount string

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.

sourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

ip_protocol str

The protocol. Can be tcp, udp, icmp, gre or all.

security_group_id str

The security group to apply this rule to.

type str

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

cidr_ip str

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.

description str

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

nic_type str

Network type, can be either internet or intranet, the default value is internet.

policy str

Authorization policy, can be either accept or drop, the default value is accept.

port_range str

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.

priority float

Authorization policy priority, with parameter values: 1-100, default value: 1.

source_group_owner_account str

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.

source_security_group_id str

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

Outputs

All input properties are implicitly available as output properties. Additionally, the SecurityGroupRule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing SecurityGroupRule Resource

Get an existing SecurityGroupRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SecurityGroupRuleState, opts?: CustomResourceOptions): SecurityGroupRule
static get(resource_name, id, opts=None, cidr_ip=None, description=None, ip_protocol=None, nic_type=None, policy=None, port_range=None, priority=None, security_group_id=None, source_group_owner_account=None, source_security_group_id=None, type=None, __props__=None);
func GetSecurityGroupRule(ctx *Context, name string, id IDInput, state *SecurityGroupRuleState, opts ...ResourceOption) (*SecurityGroupRule, error)
public static SecurityGroupRule Get(string name, Input<string> id, SecurityGroupRuleState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CidrIp string

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.

Description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

IpProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

NicType string

Network type, can be either internet or intranet, the default value is internet.

Policy string

Authorization policy, can be either accept or drop, the default value is accept.

PortRange string

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.

Priority int

Authorization policy priority, with parameter values: 1-100, default value: 1.

SecurityGroupId string

The security group to apply this rule to.

SourceGroupOwnerAccount string

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.

SourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

Type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

CidrIp string

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.

Description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

IpProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

NicType string

Network type, can be either internet or intranet, the default value is internet.

Policy string

Authorization policy, can be either accept or drop, the default value is accept.

PortRange string

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.

Priority int

Authorization policy priority, with parameter values: 1-100, default value: 1.

SecurityGroupId string

The security group to apply this rule to.

SourceGroupOwnerAccount string

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.

SourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

Type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

cidrIp string

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.

description string

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

ipProtocol string

The protocol. Can be tcp, udp, icmp, gre or all.

nicType string

Network type, can be either internet or intranet, the default value is internet.

policy string

Authorization policy, can be either accept or drop, the default value is accept.

portRange string

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.

priority number

Authorization policy priority, with parameter values: 1-100, default value: 1.

securityGroupId string

The security group to apply this rule to.

sourceGroupOwnerAccount string

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.

sourceSecurityGroupId string

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

type string

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

cidr_ip str

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.

description str

The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.

ip_protocol str

The protocol. Can be tcp, udp, icmp, gre or all.

nic_type str

Network type, can be either internet or intranet, the default value is internet.

policy str

Authorization policy, can be either accept or drop, the default value is accept.

port_range str

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.

priority float

Authorization policy priority, with parameter values: 1-100, default value: 1.

security_group_id str

The security group to apply this rule to.

source_group_owner_account str

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.

source_security_group_id str

The target security group ID within the same region. If this field is specified, the nic_type can only select intranet.

type str

The type of rule being created. Valid options are ingress (inbound) or egress (outbound).

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.