1. Packages
  2. OpenStack
  3. API Docs
  4. getFwRuleV2
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

openstack.getFwRuleV2

Explore with Pulumi AI

openstack logo
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

    Use this data source to get information of an available OpenStack firewall rule v2.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const rule = openstack.getFwRuleV2({
        name: "tf_test_rule",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    rule = openstack.get_fw_rule_v2(name="tf_test_rule")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := openstack.GetFwRuleV2(ctx, &openstack.GetFwRuleV2Args{
    			Name: pulumi.StringRef("tf_test_rule"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var rule = OpenStack.GetFwRuleV2.Invoke(new()
        {
            Name = "tf_test_rule",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.OpenstackFunctions;
    import com.pulumi.openstack.inputs.GetFwRuleV2Args;
    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) {
            final var rule = OpenstackFunctions.getFwRuleV2(GetFwRuleV2Args.builder()
                .name("tf_test_rule")
                .build());
    
        }
    }
    
    variables:
      rule:
        fn::invoke:
          Function: openstack:getFwRuleV2
          Arguments:
            name: tf_test_rule
    

    Using getFwRuleV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFwRuleV2(args: GetFwRuleV2Args, opts?: InvokeOptions): Promise<GetFwRuleV2Result>
    function getFwRuleV2Output(args: GetFwRuleV2OutputArgs, opts?: InvokeOptions): Output<GetFwRuleV2Result>
    def get_fw_rule_v2(action: Optional[str] = None,
                       description: Optional[str] = None,
                       destination_ip_address: Optional[str] = None,
                       destination_port: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       firewall_policy_ids: Optional[Sequence[str]] = None,
                       ip_version: Optional[int] = None,
                       name: Optional[str] = None,
                       project_id: Optional[str] = None,
                       protocol: Optional[str] = None,
                       region: Optional[str] = None,
                       rule_id: Optional[str] = None,
                       shared: Optional[bool] = None,
                       source_ip_address: Optional[str] = None,
                       source_port: Optional[str] = None,
                       tenant_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetFwRuleV2Result
    def get_fw_rule_v2_output(action: Optional[pulumi.Input[str]] = None,
                       description: Optional[pulumi.Input[str]] = None,
                       destination_ip_address: Optional[pulumi.Input[str]] = None,
                       destination_port: Optional[pulumi.Input[str]] = None,
                       enabled: Optional[pulumi.Input[bool]] = None,
                       firewall_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       ip_version: Optional[pulumi.Input[int]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[str]] = None,
                       protocol: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       rule_id: Optional[pulumi.Input[str]] = None,
                       shared: Optional[pulumi.Input[bool]] = None,
                       source_ip_address: Optional[pulumi.Input[str]] = None,
                       source_port: Optional[pulumi.Input[str]] = None,
                       tenant_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetFwRuleV2Result]
    func GetFwRuleV2(ctx *Context, args *GetFwRuleV2Args, opts ...InvokeOption) (*GetFwRuleV2Result, error)
    func GetFwRuleV2Output(ctx *Context, args *GetFwRuleV2OutputArgs, opts ...InvokeOption) GetFwRuleV2ResultOutput

    > Note: This function is named GetFwRuleV2 in the Go SDK.

    public static class GetFwRuleV2 
    {
        public static Task<GetFwRuleV2Result> InvokeAsync(GetFwRuleV2Args args, InvokeOptions? opts = null)
        public static Output<GetFwRuleV2Result> Invoke(GetFwRuleV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFwRuleV2Result> getFwRuleV2(GetFwRuleV2Args args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: openstack:index/getFwRuleV2:getFwRuleV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Action string
    Action to be taken when the firewall rule matches.
    Description string
    The description of the firewall rule.
    DestinationIpAddress string
    The destination IP address on which the firewall rule operates.
    DestinationPort string
    The destination port on which the firewall rule operates.
    Enabled bool
    Enabled status for the firewall rule.
    FirewallPolicyIds List<string>
    The ID of the firewall policy the rule belongs to.
    IpVersion int
    IP version, either 4 (default) or 6.
    Name string
    The name of the firewall rule.
    ProjectId string
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    Protocol string
    The protocol type on which the firewall rule operates.
    Region string
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    RuleId string
    The ID of the firewall rule.
    Shared bool
    The sharing status of the firewall policy.
    SourceIpAddress string
    The source IP address on which the firewall rule operates.
    SourcePort string
    The source port on which the firewall rule operates.
    TenantId string
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.
    Action string
    Action to be taken when the firewall rule matches.
    Description string
    The description of the firewall rule.
    DestinationIpAddress string
    The destination IP address on which the firewall rule operates.
    DestinationPort string
    The destination port on which the firewall rule operates.
    Enabled bool
    Enabled status for the firewall rule.
    FirewallPolicyIds []string
    The ID of the firewall policy the rule belongs to.
    IpVersion int
    IP version, either 4 (default) or 6.
    Name string
    The name of the firewall rule.
    ProjectId string
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    Protocol string
    The protocol type on which the firewall rule operates.
    Region string
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    RuleId string
    The ID of the firewall rule.
    Shared bool
    The sharing status of the firewall policy.
    SourceIpAddress string
    The source IP address on which the firewall rule operates.
    SourcePort string
    The source port on which the firewall rule operates.
    TenantId string
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.
    action String
    Action to be taken when the firewall rule matches.
    description String
    The description of the firewall rule.
    destinationIpAddress String
    The destination IP address on which the firewall rule operates.
    destinationPort String
    The destination port on which the firewall rule operates.
    enabled Boolean
    Enabled status for the firewall rule.
    firewallPolicyIds List<String>
    The ID of the firewall policy the rule belongs to.
    ipVersion Integer
    IP version, either 4 (default) or 6.
    name String
    The name of the firewall rule.
    projectId String
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    protocol String
    The protocol type on which the firewall rule operates.
    region String
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    ruleId String
    The ID of the firewall rule.
    shared Boolean
    The sharing status of the firewall policy.
    sourceIpAddress String
    The source IP address on which the firewall rule operates.
    sourcePort String
    The source port on which the firewall rule operates.
    tenantId String
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.
    action string
    Action to be taken when the firewall rule matches.
    description string
    The description of the firewall rule.
    destinationIpAddress string
    The destination IP address on which the firewall rule operates.
    destinationPort string
    The destination port on which the firewall rule operates.
    enabled boolean
    Enabled status for the firewall rule.
    firewallPolicyIds string[]
    The ID of the firewall policy the rule belongs to.
    ipVersion number
    IP version, either 4 (default) or 6.
    name string
    The name of the firewall rule.
    projectId string
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    protocol string
    The protocol type on which the firewall rule operates.
    region string
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    ruleId string
    The ID of the firewall rule.
    shared boolean
    The sharing status of the firewall policy.
    sourceIpAddress string
    The source IP address on which the firewall rule operates.
    sourcePort string
    The source port on which the firewall rule operates.
    tenantId string
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.
    action str
    Action to be taken when the firewall rule matches.
    description str
    The description of the firewall rule.
    destination_ip_address str
    The destination IP address on which the firewall rule operates.
    destination_port str
    The destination port on which the firewall rule operates.
    enabled bool
    Enabled status for the firewall rule.
    firewall_policy_ids Sequence[str]
    The ID of the firewall policy the rule belongs to.
    ip_version int
    IP version, either 4 (default) or 6.
    name str
    The name of the firewall rule.
    project_id str
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    protocol str
    The protocol type on which the firewall rule operates.
    region str
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    rule_id str
    The ID of the firewall rule.
    shared bool
    The sharing status of the firewall policy.
    source_ip_address str
    The source IP address on which the firewall rule operates.
    source_port str
    The source port on which the firewall rule operates.
    tenant_id str
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.
    action String
    Action to be taken when the firewall rule matches.
    description String
    The description of the firewall rule.
    destinationIpAddress String
    The destination IP address on which the firewall rule operates.
    destinationPort String
    The destination port on which the firewall rule operates.
    enabled Boolean
    Enabled status for the firewall rule.
    firewallPolicyIds List<String>
    The ID of the firewall policy the rule belongs to.
    ipVersion Number
    IP version, either 4 (default) or 6.
    name String
    The name of the firewall rule.
    projectId String
    This argument conflicts and is interchangeable with tenant_id. The owner of the firewall rule.
    protocol String
    The protocol type on which the firewall rule operates.
    region String
    The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve firewall policy ids. If omitted, the region argument of the provider is used.
    ruleId String
    The ID of the firewall rule.
    shared Boolean
    The sharing status of the firewall policy.
    sourceIpAddress String
    The source IP address on which the firewall rule operates.
    sourcePort String
    The source port on which the firewall rule operates.
    tenantId String
    This argument conflicts and is interchangeable with project_id. The owner of the firewall rule.

    getFwRuleV2 Result

    The following output properties are available:

    Enabled bool
    See Argument Reference above.
    FirewallPolicyIds List<string>
    The ID of the firewall policy the rule belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    Shared bool
    See Argument Reference above.
    TenantId string
    See Argument Reference above.
    Action string
    See Argument Reference above.
    Description string
    See Argument Reference above.
    DestinationIpAddress string
    See Argument Reference above.
    DestinationPort string
    See Argument Reference above.
    IpVersion int
    See Argument Reference above.
    Name string
    See Argument Reference above.
    Protocol string
    See Argument Reference above.
    RuleId string
    See Argument Reference above.
    SourceIpAddress string
    See Argument Reference above.
    SourcePort string
    See Argument Reference above.
    Enabled bool
    See Argument Reference above.
    FirewallPolicyIds []string
    The ID of the firewall policy the rule belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    Shared bool
    See Argument Reference above.
    TenantId string
    See Argument Reference above.
    Action string
    See Argument Reference above.
    Description string
    See Argument Reference above.
    DestinationIpAddress string
    See Argument Reference above.
    DestinationPort string
    See Argument Reference above.
    IpVersion int
    See Argument Reference above.
    Name string
    See Argument Reference above.
    Protocol string
    See Argument Reference above.
    RuleId string
    See Argument Reference above.
    SourceIpAddress string
    See Argument Reference above.
    SourcePort string
    See Argument Reference above.
    enabled Boolean
    See Argument Reference above.
    firewallPolicyIds List<String>
    The ID of the firewall policy the rule belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    shared Boolean
    See Argument Reference above.
    tenantId String
    See Argument Reference above.
    action String
    See Argument Reference above.
    description String
    See Argument Reference above.
    destinationIpAddress String
    See Argument Reference above.
    destinationPort String
    See Argument Reference above.
    ipVersion Integer
    See Argument Reference above.
    name String
    See Argument Reference above.
    protocol String
    See Argument Reference above.
    ruleId String
    See Argument Reference above.
    sourceIpAddress String
    See Argument Reference above.
    sourcePort String
    See Argument Reference above.
    enabled boolean
    See Argument Reference above.
    firewallPolicyIds string[]
    The ID of the firewall policy the rule belongs to.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    See Argument Reference above.
    region string
    See Argument Reference above.
    shared boolean
    See Argument Reference above.
    tenantId string
    See Argument Reference above.
    action string
    See Argument Reference above.
    description string
    See Argument Reference above.
    destinationIpAddress string
    See Argument Reference above.
    destinationPort string
    See Argument Reference above.
    ipVersion number
    See Argument Reference above.
    name string
    See Argument Reference above.
    protocol string
    See Argument Reference above.
    ruleId string
    See Argument Reference above.
    sourceIpAddress string
    See Argument Reference above.
    sourcePort string
    See Argument Reference above.
    enabled bool
    See Argument Reference above.
    firewall_policy_ids Sequence[str]
    The ID of the firewall policy the rule belongs to.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    See Argument Reference above.
    region str
    See Argument Reference above.
    shared bool
    See Argument Reference above.
    tenant_id str
    See Argument Reference above.
    action str
    See Argument Reference above.
    description str
    See Argument Reference above.
    destination_ip_address str
    See Argument Reference above.
    destination_port str
    See Argument Reference above.
    ip_version int
    See Argument Reference above.
    name str
    See Argument Reference above.
    protocol str
    See Argument Reference above.
    rule_id str
    See Argument Reference above.
    source_ip_address str
    See Argument Reference above.
    source_port str
    See Argument Reference above.
    enabled Boolean
    See Argument Reference above.
    firewallPolicyIds List<String>
    The ID of the firewall policy the rule belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    shared Boolean
    See Argument Reference above.
    tenantId String
    See Argument Reference above.
    action String
    See Argument Reference above.
    description String
    See Argument Reference above.
    destinationIpAddress String
    See Argument Reference above.
    destinationPort String
    See Argument Reference above.
    ipVersion Number
    See Argument Reference above.
    name String
    See Argument Reference above.
    protocol String
    See Argument Reference above.
    ruleId String
    See Argument Reference above.
    sourceIpAddress String
    See Argument Reference above.
    sourcePort String
    See Argument Reference above.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi