1. Packages
  2. Openstack Provider
  3. API Docs
  4. getFwPolicyV2
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.getFwPolicyV2

Explore with Pulumi AI

OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const policy = openstack.getFwPolicyV2({
    name: "tf_test_policy",
});
Copy
import pulumi
import pulumi_openstack as openstack

policy = openstack.get_fw_policy_v2(name="tf_test_policy")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := openstack.GetFwPolicyV2(ctx, &openstack.GetFwPolicyV2Args{
			Name: pulumi.StringRef("tf_test_policy"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var policy = OpenStack.GetFwPolicyV2.Invoke(new()
    {
        Name = "tf_test_policy",
    });

});
Copy
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.GetFwPolicyV2Args;
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 policy = OpenstackFunctions.getFwPolicyV2(GetFwPolicyV2Args.builder()
            .name("tf_test_policy")
            .build());

    }
}
Copy
variables:
  policy:
    fn::invoke:
      function: openstack:getFwPolicyV2
      arguments:
        name: tf_test_policy
Copy

Using getFwPolicyV2

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 getFwPolicyV2(args: GetFwPolicyV2Args, opts?: InvokeOptions): Promise<GetFwPolicyV2Result>
function getFwPolicyV2Output(args: GetFwPolicyV2OutputArgs, opts?: InvokeOptions): Output<GetFwPolicyV2Result>
Copy
def get_fw_policy_v2(audited: Optional[bool] = None,
                     description: Optional[str] = None,
                     name: Optional[str] = None,
                     policy_id: Optional[str] = None,
                     project_id: Optional[str] = None,
                     region: Optional[str] = None,
                     shared: Optional[bool] = None,
                     tenant_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFwPolicyV2Result
def get_fw_policy_v2_output(audited: Optional[pulumi.Input[bool]] = None,
                     description: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     policy_id: Optional[pulumi.Input[str]] = None,
                     project_id: Optional[pulumi.Input[str]] = None,
                     region: Optional[pulumi.Input[str]] = None,
                     shared: Optional[pulumi.Input[bool]] = None,
                     tenant_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFwPolicyV2Result]
Copy
func GetFwPolicyV2(ctx *Context, args *GetFwPolicyV2Args, opts ...InvokeOption) (*GetFwPolicyV2Result, error)
func GetFwPolicyV2Output(ctx *Context, args *GetFwPolicyV2OutputArgs, opts ...InvokeOption) GetFwPolicyV2ResultOutput
Copy

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

public static class GetFwPolicyV2 
{
    public static Task<GetFwPolicyV2Result> InvokeAsync(GetFwPolicyV2Args args, InvokeOptions? opts = null)
    public static Output<GetFwPolicyV2Result> Invoke(GetFwPolicyV2InvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFwPolicyV2Result> getFwPolicyV2(GetFwPolicyV2Args args, InvokeOptions options)
public static Output<GetFwPolicyV2Result> getFwPolicyV2(GetFwPolicyV2Args args, InvokeOptions options)
Copy
fn::invoke:
  function: openstack:index/getFwPolicyV2:getFwPolicyV2
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Audited bool
Whether this policy has been audited.
Description string
Human-readable description of the policy.
Name string
The name of the firewall policy.
PolicyId string
The ID of the firewall policy.
ProjectId string
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
Region Changes to this property will trigger replacement. 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.
Shared bool
Whether this policy is shared across all projects.
TenantId string
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.
Audited bool
Whether this policy has been audited.
Description string
Human-readable description of the policy.
Name string
The name of the firewall policy.
PolicyId string
The ID of the firewall policy.
ProjectId string
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
Region Changes to this property will trigger replacement. 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.
Shared bool
Whether this policy is shared across all projects.
TenantId string
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.
audited Boolean
Whether this policy has been audited.
description String
Human-readable description of the policy.
name String
The name of the firewall policy.
policyId String
The ID of the firewall policy.
projectId String
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
region Changes to this property will trigger replacement. 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.
shared Boolean
Whether this policy is shared across all projects.
tenantId String
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.
audited boolean
Whether this policy has been audited.
description string
Human-readable description of the policy.
name string
The name of the firewall policy.
policyId string
The ID of the firewall policy.
projectId string
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
region Changes to this property will trigger replacement. 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.
shared boolean
Whether this policy is shared across all projects.
tenantId string
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.
audited bool
Whether this policy has been audited.
description str
Human-readable description of the policy.
name str
The name of the firewall policy.
policy_id str
The ID of the firewall policy.
project_id str
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
region Changes to this property will trigger replacement. 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.
shared bool
Whether this policy is shared across all projects.
tenant_id str
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.
audited Boolean
Whether this policy has been audited.
description String
Human-readable description of the policy.
name String
The name of the firewall policy.
policyId String
The ID of the firewall policy.
projectId String
This argument conflicts and is interchangeable with tenant_id. The owner of the firewall policy.
region Changes to this property will trigger replacement. 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.
shared Boolean
Whether this policy is shared across all projects.
tenantId String
This argument conflicts and is interchangeable with project_id. The owner of the firewall policy.

getFwPolicyV2 Result

The following output properties are available:

Audited bool
The audit status of the firewall policy.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
See Argument Reference above.
Region string
See Argument Reference above.
Rules List<string>
The array of one or more firewall rules that comprise the policy.
Shared bool
The sharing status of the firewall policy.
TenantId string
See Argument Reference above.
Description string
Name string
See Argument Reference above.
PolicyId string
See Argument Reference above.
Audited bool
The audit status of the firewall policy.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
See Argument Reference above.
Region string
See Argument Reference above.
Rules []string
The array of one or more firewall rules that comprise the policy.
Shared bool
The sharing status of the firewall policy.
TenantId string
See Argument Reference above.
Description string
Name string
See Argument Reference above.
PolicyId string
See Argument Reference above.
audited Boolean
The audit status of the firewall policy.
id String
The provider-assigned unique ID for this managed resource.
projectId String
See Argument Reference above.
region String
See Argument Reference above.
rules List<String>
The array of one or more firewall rules that comprise the policy.
shared Boolean
The sharing status of the firewall policy.
tenantId String
See Argument Reference above.
description String
name String
See Argument Reference above.
policyId String
See Argument Reference above.
audited boolean
The audit status of the firewall policy.
id string
The provider-assigned unique ID for this managed resource.
projectId string
See Argument Reference above.
region string
See Argument Reference above.
rules string[]
The array of one or more firewall rules that comprise the policy.
shared boolean
The sharing status of the firewall policy.
tenantId string
See Argument Reference above.
description string
name string
See Argument Reference above.
policyId string
See Argument Reference above.
audited bool
The audit status of the firewall policy.
id str
The provider-assigned unique ID for this managed resource.
project_id str
See Argument Reference above.
region str
See Argument Reference above.
rules Sequence[str]
The array of one or more firewall rules that comprise the policy.
shared bool
The sharing status of the firewall policy.
tenant_id str
See Argument Reference above.
description str
name str
See Argument Reference above.
policy_id str
See Argument Reference above.
audited Boolean
The audit status of the firewall policy.
id String
The provider-assigned unique ID for this managed resource.
projectId String
See Argument Reference above.
region String
See Argument Reference above.
rules List<String>
The array of one or more firewall rules that comprise the policy.
shared Boolean
The sharing status of the firewall policy.
tenantId String
See Argument Reference above.
description String
name String
See Argument Reference above.
policyId 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 v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi