OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi
openstack.getFwRuleV2
Explore with Pulumi AI
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/v4/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.
- Destination
Ip stringAddress - The destination IP address on which the firewall rule operates.
- Destination
Port string - The destination port on which the firewall rule operates.
- Enabled bool
- Enabled status for the firewall rule.
- Firewall
Policy List<string>Ids - The ID of the firewall policy the rule belongs to.
- Ip
Version int - IP version, either 4 (default) or 6.
- Name string
- The name of the firewall rule.
- Project
Id 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. - Rule
Id string - The ID of the firewall rule.
- bool
- The sharing status of the firewall policy.
- Source
Ip stringAddress - The source IP address on which the firewall rule operates.
- Source
Port string - The source port on which the firewall rule operates.
- Tenant
Id 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.
- Destination
Ip stringAddress - The destination IP address on which the firewall rule operates.
- Destination
Port string - The destination port on which the firewall rule operates.
- Enabled bool
- Enabled status for the firewall rule.
- Firewall
Policy []stringIds - The ID of the firewall policy the rule belongs to.
- Ip
Version int - IP version, either 4 (default) or 6.
- Name string
- The name of the firewall rule.
- Project
Id 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. - Rule
Id string - The ID of the firewall rule.
- bool
- The sharing status of the firewall policy.
- Source
Ip stringAddress - The source IP address on which the firewall rule operates.
- Source
Port string - The source port on which the firewall rule operates.
- Tenant
Id 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.
- destination
Ip StringAddress - The destination IP address on which the firewall rule operates.
- destination
Port String - The destination port on which the firewall rule operates.
- enabled Boolean
- Enabled status for the firewall rule.
- firewall
Policy List<String>Ids - The ID of the firewall policy the rule belongs to.
- ip
Version Integer - IP version, either 4 (default) or 6.
- name String
- The name of the firewall rule.
- project
Id 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. - rule
Id String - The ID of the firewall rule.
- Boolean
- The sharing status of the firewall policy.
- source
Ip StringAddress - The source IP address on which the firewall rule operates.
- source
Port String - The source port on which the firewall rule operates.
- tenant
Id 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.
- destination
Ip stringAddress - The destination IP address on which the firewall rule operates.
- destination
Port string - The destination port on which the firewall rule operates.
- enabled boolean
- Enabled status for the firewall rule.
- firewall
Policy string[]Ids - The ID of the firewall policy the rule belongs to.
- ip
Version number - IP version, either 4 (default) or 6.
- name string
- The name of the firewall rule.
- project
Id 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. - rule
Id string - The ID of the firewall rule.
- boolean
- The sharing status of the firewall policy.
- source
Ip stringAddress - The source IP address on which the firewall rule operates.
- source
Port string - The source port on which the firewall rule operates.
- tenant
Id 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_ straddress - 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_ Sequence[str]ids - 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.
- bool
- The sharing status of the firewall policy.
- source_
ip_ straddress - 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.
- destination
Ip StringAddress - The destination IP address on which the firewall rule operates.
- destination
Port String - The destination port on which the firewall rule operates.
- enabled Boolean
- Enabled status for the firewall rule.
- firewall
Policy List<String>Ids - The ID of the firewall policy the rule belongs to.
- ip
Version Number - IP version, either 4 (default) or 6.
- name String
- The name of the firewall rule.
- project
Id 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. - rule
Id String - The ID of the firewall rule.
- Boolean
- The sharing status of the firewall policy.
- source
Ip StringAddress - The source IP address on which the firewall rule operates.
- source
Port String - The source port on which the firewall rule operates.
- tenant
Id 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.
- Firewall
Policy List<string>Ids - The ID of the firewall policy the rule belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- bool
- See Argument Reference above.
- Tenant
Id string - See Argument Reference above.
- Action string
- See Argument Reference above.
- Description string
- See Argument Reference above.
- Destination
Ip stringAddress - See Argument Reference above.
- Destination
Port string - See Argument Reference above.
- Ip
Version int - See Argument Reference above.
- Name string
- See Argument Reference above.
- Protocol string
- See Argument Reference above.
- Rule
Id string - See Argument Reference above.
- Source
Ip stringAddress - See Argument Reference above.
- Source
Port string - See Argument Reference above.
- Enabled bool
- See Argument Reference above.
- Firewall
Policy []stringIds - The ID of the firewall policy the rule belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- bool
- See Argument Reference above.
- Tenant
Id string - See Argument Reference above.
- Action string
- See Argument Reference above.
- Description string
- See Argument Reference above.
- Destination
Ip stringAddress - See Argument Reference above.
- Destination
Port string - See Argument Reference above.
- Ip
Version int - See Argument Reference above.
- Name string
- See Argument Reference above.
- Protocol string
- See Argument Reference above.
- Rule
Id string - See Argument Reference above.
- Source
Ip stringAddress - See Argument Reference above.
- Source
Port string - See Argument Reference above.
- enabled Boolean
- See Argument Reference above.
- firewall
Policy List<String>Ids - The ID of the firewall policy the rule belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- Boolean
- See Argument Reference above.
- tenant
Id String - See Argument Reference above.
- action String
- See Argument Reference above.
- description String
- See Argument Reference above.
- destination
Ip StringAddress - See Argument Reference above.
- destination
Port String - See Argument Reference above.
- ip
Version Integer - See Argument Reference above.
- name String
- See Argument Reference above.
- protocol String
- See Argument Reference above.
- rule
Id String - See Argument Reference above.
- source
Ip StringAddress - See Argument Reference above.
- source
Port String - See Argument Reference above.
- enabled boolean
- See Argument Reference above.
- firewall
Policy string[]Ids - The ID of the firewall policy the rule belongs to.
- id string
- The provider-assigned unique ID for this managed resource.
- project
Id string - See Argument Reference above.
- region string
- See Argument Reference above.
- boolean
- See Argument Reference above.
- tenant
Id string - See Argument Reference above.
- action string
- See Argument Reference above.
- description string
- See Argument Reference above.
- destination
Ip stringAddress - See Argument Reference above.
- destination
Port string - See Argument Reference above.
- ip
Version number - See Argument Reference above.
- name string
- See Argument Reference above.
- protocol string
- See Argument Reference above.
- rule
Id string - See Argument Reference above.
- source
Ip stringAddress - See Argument Reference above.
- source
Port string - See Argument Reference above.
- enabled bool
- See Argument Reference above.
- firewall_
policy_ Sequence[str]ids - 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.
- 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_ straddress - 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_ straddress - See Argument Reference above.
- source_
port str - See Argument Reference above.
- enabled Boolean
- See Argument Reference above.
- firewall
Policy List<String>Ids - The ID of the firewall policy the rule belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- Boolean
- See Argument Reference above.
- tenant
Id String - See Argument Reference above.
- action String
- See Argument Reference above.
- description String
- See Argument Reference above.
- destination
Ip StringAddress - See Argument Reference above.
- destination
Port String - See Argument Reference above.
- ip
Version Number - See Argument Reference above.
- name String
- See Argument Reference above.
- protocol String
- See Argument Reference above.
- rule
Id String - See Argument Reference above.
- source
Ip StringAddress - See Argument Reference above.
- source
Port 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.