1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. NetworkingSecgroupRuleV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.NetworkingSecgroupRuleV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a Security Group Rule resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const exampleSecgroup = new flexibleengine.NetworkingSecgroupV2("exampleSecgroup", {description: "My neutron security group"});
    const secgroupRule1 = new flexibleengine.NetworkingSecgroupRuleV2("secgroupRule1", {
        direction: "ingress",
        ethertype: "IPv4",
        protocol: "tcp",
        portRangeMin: 22,
        portRangeMax: 22,
        remoteIpPrefix: "0.0.0.0/0",
        securityGroupId: exampleSecgroup.networkingSecgroupV2Id,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_secgroup = flexibleengine.NetworkingSecgroupV2("exampleSecgroup", description="My neutron security group")
    secgroup_rule1 = flexibleengine.NetworkingSecgroupRuleV2("secgroupRule1",
        direction="ingress",
        ethertype="IPv4",
        protocol="tcp",
        port_range_min=22,
        port_range_max=22,
        remote_ip_prefix="0.0.0.0/0",
        security_group_id=example_secgroup.networking_secgroup_v2_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleSecgroup, err := flexibleengine.NewNetworkingSecgroupV2(ctx, "exampleSecgroup", &flexibleengine.NetworkingSecgroupV2Args{
    			Description: pulumi.String("My neutron security group"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewNetworkingSecgroupRuleV2(ctx, "secgroupRule1", &flexibleengine.NetworkingSecgroupRuleV2Args{
    			Direction:       pulumi.String("ingress"),
    			Ethertype:       pulumi.String("IPv4"),
    			Protocol:        pulumi.String("tcp"),
    			PortRangeMin:    pulumi.Float64(22),
    			PortRangeMax:    pulumi.Float64(22),
    			RemoteIpPrefix:  pulumi.String("0.0.0.0/0"),
    			SecurityGroupId: exampleSecgroup.NetworkingSecgroupV2Id,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleSecgroup = new Flexibleengine.NetworkingSecgroupV2("exampleSecgroup", new()
        {
            Description = "My neutron security group",
        });
    
        var secgroupRule1 = new Flexibleengine.NetworkingSecgroupRuleV2("secgroupRule1", new()
        {
            Direction = "ingress",
            Ethertype = "IPv4",
            Protocol = "tcp",
            PortRangeMin = 22,
            PortRangeMax = 22,
            RemoteIpPrefix = "0.0.0.0/0",
            SecurityGroupId = exampleSecgroup.NetworkingSecgroupV2Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.NetworkingSecgroupV2;
    import com.pulumi.flexibleengine.NetworkingSecgroupV2Args;
    import com.pulumi.flexibleengine.NetworkingSecgroupRuleV2;
    import com.pulumi.flexibleengine.NetworkingSecgroupRuleV2Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleSecgroup = new NetworkingSecgroupV2("exampleSecgroup", NetworkingSecgroupV2Args.builder()
                .description("My neutron security group")
                .build());
    
            var secgroupRule1 = new NetworkingSecgroupRuleV2("secgroupRule1", NetworkingSecgroupRuleV2Args.builder()
                .direction("ingress")
                .ethertype("IPv4")
                .protocol("tcp")
                .portRangeMin(22)
                .portRangeMax(22)
                .remoteIpPrefix("0.0.0.0/0")
                .securityGroupId(exampleSecgroup.networkingSecgroupV2Id())
                .build());
    
        }
    }
    
    resources:
      exampleSecgroup:
        type: flexibleengine:NetworkingSecgroupV2
        properties:
          description: My neutron security group
      secgroupRule1:
        type: flexibleengine:NetworkingSecgroupRuleV2
        properties:
          direction: ingress
          ethertype: IPv4
          protocol: tcp
          portRangeMin: 22
          portRangeMax: 22
          remoteIpPrefix: 0.0.0.0/0
          securityGroupId: ${exampleSecgroup.networkingSecgroupV2Id}
    

    Create NetworkingSecgroupRuleV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkingSecgroupRuleV2(name: string, args: NetworkingSecgroupRuleV2Args, opts?: CustomResourceOptions);
    @overload
    def NetworkingSecgroupRuleV2(resource_name: str,
                                 args: NetworkingSecgroupRuleV2Args,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingSecgroupRuleV2(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 security_group_id: Optional[str] = None,
                                 direction: Optional[str] = None,
                                 ethertype: Optional[str] = None,
                                 protocol: Optional[str] = None,
                                 port_range_max: Optional[float] = None,
                                 port_range_min: Optional[float] = None,
                                 description: Optional[str] = None,
                                 region: Optional[str] = None,
                                 remote_group_id: Optional[str] = None,
                                 remote_ip_prefix: Optional[str] = None,
                                 networking_secgroup_rule_v2_id: Optional[str] = None,
                                 tenant_id: Optional[str] = None,
                                 timeouts: Optional[NetworkingSecgroupRuleV2TimeoutsArgs] = None)
    func NewNetworkingSecgroupRuleV2(ctx *Context, name string, args NetworkingSecgroupRuleV2Args, opts ...ResourceOption) (*NetworkingSecgroupRuleV2, error)
    public NetworkingSecgroupRuleV2(string name, NetworkingSecgroupRuleV2Args args, CustomResourceOptions? opts = null)
    public NetworkingSecgroupRuleV2(String name, NetworkingSecgroupRuleV2Args args)
    public NetworkingSecgroupRuleV2(String name, NetworkingSecgroupRuleV2Args args, CustomResourceOptions options)
    
    type: flexibleengine:NetworkingSecgroupRuleV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkingSecgroupRuleV2Args
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingSecgroupRuleV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkingSecgroupRuleV2Resource = new Flexibleengine.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", new()
    {
        SecurityGroupId = "string",
        Direction = "string",
        Ethertype = "string",
        Protocol = "string",
        PortRangeMax = 0,
        PortRangeMin = 0,
        Description = "string",
        Region = "string",
        RemoteGroupId = "string",
        RemoteIpPrefix = "string",
        NetworkingSecgroupRuleV2Id = "string",
        Timeouts = new Flexibleengine.Inputs.NetworkingSecgroupRuleV2TimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := flexibleengine.NewNetworkingSecgroupRuleV2(ctx, "networkingSecgroupRuleV2Resource", &flexibleengine.NetworkingSecgroupRuleV2Args{
    	SecurityGroupId:            pulumi.String("string"),
    	Direction:                  pulumi.String("string"),
    	Ethertype:                  pulumi.String("string"),
    	Protocol:                   pulumi.String("string"),
    	PortRangeMax:               pulumi.Float64(0),
    	PortRangeMin:               pulumi.Float64(0),
    	Description:                pulumi.String("string"),
    	Region:                     pulumi.String("string"),
    	RemoteGroupId:              pulumi.String("string"),
    	RemoteIpPrefix:             pulumi.String("string"),
    	NetworkingSecgroupRuleV2Id: pulumi.String("string"),
    	Timeouts: &flexibleengine.NetworkingSecgroupRuleV2TimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var networkingSecgroupRuleV2Resource = new NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", NetworkingSecgroupRuleV2Args.builder()
        .securityGroupId("string")
        .direction("string")
        .ethertype("string")
        .protocol("string")
        .portRangeMax(0)
        .portRangeMin(0)
        .description("string")
        .region("string")
        .remoteGroupId("string")
        .remoteIpPrefix("string")
        .networkingSecgroupRuleV2Id("string")
        .timeouts(NetworkingSecgroupRuleV2TimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    networking_secgroup_rule_v2_resource = flexibleengine.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource",
        security_group_id="string",
        direction="string",
        ethertype="string",
        protocol="string",
        port_range_max=0,
        port_range_min=0,
        description="string",
        region="string",
        remote_group_id="string",
        remote_ip_prefix="string",
        networking_secgroup_rule_v2_id="string",
        timeouts={
            "delete": "string",
        })
    
    const networkingSecgroupRuleV2Resource = new flexibleengine.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", {
        securityGroupId: "string",
        direction: "string",
        ethertype: "string",
        protocol: "string",
        portRangeMax: 0,
        portRangeMin: 0,
        description: "string",
        region: "string",
        remoteGroupId: "string",
        remoteIpPrefix: "string",
        networkingSecgroupRuleV2Id: "string",
        timeouts: {
            "delete": "string",
        },
    });
    
    type: flexibleengine:NetworkingSecgroupRuleV2
    properties:
        description: string
        direction: string
        ethertype: string
        networkingSecgroupRuleV2Id: string
        portRangeMax: 0
        portRangeMin: 0
        protocol: string
        region: string
        remoteGroupId: string
        remoteIpPrefix: string
        securityGroupId: string
        timeouts:
            delete: string
    

    NetworkingSecgroupRuleV2 Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NetworkingSecgroupRuleV2 resource accepts the following input properties:

    Direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    SecurityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    Description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    NetworkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    PortRangeMax double
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    PortRangeMin double
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    Protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    RemoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    TenantId string
    The owner of the security group.

    Deprecated: Deprecated

    Timeouts NetworkingSecgroupRuleV2Timeouts
    Direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    SecurityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    Description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    NetworkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    PortRangeMax float64
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    PortRangeMin float64
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    Protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    RemoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    TenantId string
    The owner of the security group.

    Deprecated: Deprecated

    Timeouts NetworkingSecgroupRuleV2TimeoutsArgs
    direction String
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    securityGroupId String
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    description String
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id String
    The resource ID in UUID format.
    portRangeMax Double
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin Double
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol String
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix String
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    tenantId String
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2Timeouts
    direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    securityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    portRangeMax number
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin number
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    tenantId string
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2Timeouts
    direction str
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype str
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    security_group_id str
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    description str
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    networking_secgroup_rule_v2_id str
    The resource ID in UUID format.
    port_range_max float
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    port_range_min float
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol str
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remote_group_id str
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remote_ip_prefix str
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    tenant_id str
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2TimeoutsArgs
    direction String
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    securityGroupId String
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    description String
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id String
    The resource ID in UUID format.
    portRangeMax Number
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin Number
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol String
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix String
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    tenantId String
    The owner of the security group.

    Deprecated: Deprecated

    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkingSecgroupRuleV2 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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkingSecgroupRuleV2 Resource

    Get an existing NetworkingSecgroupRuleV2 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?: NetworkingSecgroupRuleV2State, opts?: CustomResourceOptions): NetworkingSecgroupRuleV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            direction: Optional[str] = None,
            ethertype: Optional[str] = None,
            networking_secgroup_rule_v2_id: Optional[str] = None,
            port_range_max: Optional[float] = None,
            port_range_min: Optional[float] = None,
            protocol: Optional[str] = None,
            region: Optional[str] = None,
            remote_group_id: Optional[str] = None,
            remote_ip_prefix: Optional[str] = None,
            security_group_id: Optional[str] = None,
            tenant_id: Optional[str] = None,
            timeouts: Optional[NetworkingSecgroupRuleV2TimeoutsArgs] = None) -> NetworkingSecgroupRuleV2
    func GetNetworkingSecgroupRuleV2(ctx *Context, name string, id IDInput, state *NetworkingSecgroupRuleV2State, opts ...ResourceOption) (*NetworkingSecgroupRuleV2, error)
    public static NetworkingSecgroupRuleV2 Get(string name, Input<string> id, NetworkingSecgroupRuleV2State? state, CustomResourceOptions? opts = null)
    public static NetworkingSecgroupRuleV2 get(String name, Output<String> id, NetworkingSecgroupRuleV2State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:NetworkingSecgroupRuleV2    get:      id: ${id}
    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.
    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:
    Description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    Direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    NetworkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    PortRangeMax double
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    PortRangeMin double
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    Protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    RemoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    SecurityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    TenantId string
    The owner of the security group.

    Deprecated: Deprecated

    Timeouts NetworkingSecgroupRuleV2Timeouts
    Description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    Direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    NetworkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    PortRangeMax float64
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    PortRangeMin float64
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    Protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    RemoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    SecurityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    TenantId string
    The owner of the security group.

    Deprecated: Deprecated

    Timeouts NetworkingSecgroupRuleV2TimeoutsArgs
    description String
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    direction String
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id String
    The resource ID in UUID format.
    portRangeMax Double
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin Double
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol String
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix String
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    securityGroupId String
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    tenantId String
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2Timeouts
    description string
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    direction string
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype string
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id string
    The resource ID in UUID format.
    portRangeMax number
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin number
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol string
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId string
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix string
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    securityGroupId string
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    tenantId string
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2Timeouts
    description str
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    direction str
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype str
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    networking_secgroup_rule_v2_id str
    The resource ID in UUID format.
    port_range_max float
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    port_range_min float
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol str
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remote_group_id str
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remote_ip_prefix str
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    security_group_id str
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    tenant_id str
    The owner of the security group.

    Deprecated: Deprecated

    timeouts NetworkingSecgroupRuleV2TimeoutsArgs
    description String
    Specifies the supplementary information about the security group rule. This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >). Changing this creates a new security group rule.
    direction String
    The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    The layer 3 protocol type, valid values are IPv4 or IPv6. Changing this creates a new security group rule.
    networkingSecgroupRuleV2Id String
    The resource ID in UUID format.
    portRangeMax Number
    The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    portRangeMin Number
    The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule.
    protocol String
    The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ipv6-encap
    • ipv6-frag
    • ipv6-icmp
    • ipv6-nonxt
    • ipv6-opts
    • ipv6-route
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    The remote group id, the value needs to be an FlexibleEngine ID of a security group in the same tenant. Changing this creates a new security group rule.
    remoteIpPrefix String
    The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
    securityGroupId String
    The security group ID the rule should belong to. Changing this creates a new security group rule.
    tenantId String
    The owner of the security group.

    Deprecated: Deprecated

    timeouts Property Map

    Supporting Types

    NetworkingSecgroupRuleV2Timeouts, NetworkingSecgroupRuleV2TimeoutsArgs

    Delete string
    Delete string
    delete String
    delete string
    delete str
    delete String

    Import

    Security Group Rules can be imported using the id, e.g.

    $ pulumi import flexibleengine:index/networkingSecgroupRuleV2:NetworkingSecgroupRuleV2 secgroup_rule_1 aeb68ee3-6e9d-4256-955c-9584a6212745
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud