openstack.firewall.getPolicy
Explore with Pulumi AI
Use this data source to get firewall policy information of an available OpenStack firewall policy.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var policy = OpenStack.Firewall.GetPolicy.Invoke(new()
{
Name = "tf_test_policy",
});
});
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/firewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := firewall.LookupPolicy(ctx, &firewall.LookupPolicyArgs{
Name: pulumi.StringRef("tf_test_policy"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.firewall.FirewallFunctions;
import com.pulumi.openstack.firewall.inputs.GetPolicyArgs;
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 = FirewallFunctions.getPolicy(GetPolicyArgs.builder()
.name("tf_test_policy")
.build());
}
}
import pulumi
import pulumi_openstack as openstack
policy = openstack.firewall.get_policy(name="tf_test_policy")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const policy = openstack.firewall.getPolicy({
name: "tf_test_policy",
});
variables:
policy:
fn::invoke:
Function: openstack:firewall:getPolicy
Arguments:
name: tf_test_policy
Using getPolicy
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 getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>
function getPolicyOutput(args: GetPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyResult>
def get_policy(name: Optional[str] = None,
policy_id: Optional[str] = None,
region: Optional[str] = None,
tenant_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyResult
def get_policy_output(name: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
tenant_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicyResult]
func LookupPolicy(ctx *Context, args *LookupPolicyArgs, opts ...InvokeOption) (*LookupPolicyResult, error)
func LookupPolicyOutput(ctx *Context, args *LookupPolicyOutputArgs, opts ...InvokeOption) LookupPolicyResultOutput
> Note: This function is named LookupPolicy
in the Go SDK.
public static class GetPolicy
{
public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyResult> Invoke(GetPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:firewall/getPolicy:getPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name of the firewall policy.
- Policy
Id string The ID of the firewall policy.
- 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.- Tenant
Id string The owner of the firewall policy.
- Name string
The name of the firewall policy.
- Policy
Id string The ID of the firewall policy.
- 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.- Tenant
Id string The owner of the firewall policy.
- name String
The name of the firewall policy.
- policy
Id String The ID of the firewall policy.
- 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.- tenant
Id String The owner of the firewall policy.
- name string
The name of the firewall policy.
- policy
Id string The ID of the firewall policy.
- 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.- tenant
Id string The owner of the firewall policy.
- name str
The name of the firewall policy.
- policy_
id str The ID of the firewall policy.
- 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.- tenant_
id str The owner of the firewall policy.
- name String
The name of the firewall policy.
- policy
Id String The ID of the firewall policy.
- 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.- tenant
Id String The owner of the firewall policy.
getPolicy Result
The following output properties are available:
- Audited bool
The audit status of the firewall policy.
- Description string
The description of the firewall policy.
- Id string
The provider-assigned unique ID for this managed resource.
- Region string
See Argument Reference above.
- Rules List<string>
The array of one or more firewall rules that comprise the policy.
- bool
The sharing status of the firewall policy.
- Tenant
Id string See Argument Reference above.
- Name string
See Argument Reference above.
- Policy
Id string See Argument Reference above.
- Audited bool
The audit status of the firewall policy.
- Description string
The description of the firewall policy.
- Id string
The provider-assigned unique ID for this managed resource.
- Region string
See Argument Reference above.
- Rules []string
The array of one or more firewall rules that comprise the policy.
- bool
The sharing status of the firewall policy.
- Tenant
Id string See Argument Reference above.
- Name string
See Argument Reference above.
- Policy
Id string See Argument Reference above.
- audited Boolean
The audit status of the firewall policy.
- description String
The description of the firewall policy.
- id String
The provider-assigned unique ID for this managed resource.
- region String
See Argument Reference above.
- rules List<String>
The array of one or more firewall rules that comprise the policy.
- Boolean
The sharing status of the firewall policy.
- tenant
Id String See Argument Reference above.
- name String
See Argument Reference above.
- policy
Id String See Argument Reference above.
- audited boolean
The audit status of the firewall policy.
- description string
The description of the firewall policy.
- id string
The provider-assigned unique ID for this managed resource.
- region string
See Argument Reference above.
- rules string[]
The array of one or more firewall rules that comprise the policy.
- boolean
The sharing status of the firewall policy.
- tenant
Id string See Argument Reference above.
- name string
See Argument Reference above.
- policy
Id string See Argument Reference above.
- audited bool
The audit status of the firewall policy.
- description str
The description of the firewall policy.
- id str
The provider-assigned unique ID for this managed resource.
- region str
See Argument Reference above.
- rules Sequence[str]
The array of one or more firewall rules that comprise the policy.
- bool
The sharing status of the firewall policy.
- tenant_
id str See Argument Reference above.
- name str
See Argument Reference above.
- policy_
id str See Argument Reference above.
- audited Boolean
The audit status of the firewall policy.
- description String
The description of the firewall policy.
- id String
The provider-assigned unique ID for this managed resource.
- region String
See Argument Reference above.
- rules List<String>
The array of one or more firewall rules that comprise the policy.
- Boolean
The sharing status of the firewall policy.
- tenant
Id String See Argument Reference above.
- name String
See Argument Reference above.
- policy
Id 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.