OpenStack

Pulumi Official
Package maintained by Pulumi
v3.8.0 published on Monday, Feb 7, 2022 by Pulumi

getPolicy

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

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var policy = Output.Create(OpenStack.Firewall.GetPolicy.InvokeAsync(new OpenStack.Firewall.GetPolicyArgs
        {
            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 {
		opt0 := "tf_test_policy"
		_, err := firewall.LookupPolicy(ctx, &firewall.LookupPolicyArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

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 = pulumi.output(openstack.firewall.getPolicy({
    name: "tf_test_policy",
}));

Coming soon!

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.

PolicyId 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.

TenantId string

The owner of the firewall policy.

Name string

The name of the firewall policy.

PolicyId 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.

TenantId string

The owner of the firewall policy.

name String

The name of the firewall policy.

policyId 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.

tenantId String

The owner of the firewall policy.

name string

The name of the firewall policy.

policyId 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.

tenantId 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.

policyId 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.

tenantId 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.

Shared bool

The sharing status of the firewall policy.

TenantId string

See Argument Reference above.

Name string

See Argument Reference above.

PolicyId 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.

Shared bool

The sharing status of the firewall policy.

TenantId string

See Argument Reference above.

Name string

See Argument Reference above.

PolicyId 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.

shared Boolean

The sharing status of the firewall policy.

tenantId String

See Argument Reference above.

name String

See Argument Reference above.

policyId 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.

shared boolean

The sharing status of the firewall policy.

tenantId string

See Argument Reference above.

name string

See Argument Reference above.

policyId 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.

shared 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.

shared Boolean

The sharing status of the firewall policy.

tenantId String

See Argument Reference above.

name String

See Argument Reference above.

policyId String

See Argument Reference above.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes

This Pulumi package is based on the openstack Terraform Provider.