AWS Classic

v5.16.0 published on Saturday, Sep 24, 2022 by Pulumi

getFirewallPolicy

Retrieve information about a firewall policy.

Example Usage

Find firewall policy by name

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
    {
        Name = @var.Firewall_policy_name,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.LookupFirewallPolicy(ctx, &networkfirewall.LookupFirewallPolicyArgs{
			Name: pulumi.StringRef(_var.Firewall_policy_name),
		}, 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.aws.networkfirewall.NetworkfirewallFunctions;
import com.pulumi.aws.networkfirewall.inputs.GetFirewallPolicyArgs;
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 example = NetworkfirewallFunctions.getFirewallPolicy(GetFirewallPolicyArgs.builder()
            .name(var_.firewall_policy_name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.get_firewall_policy(name=var["firewall_policy_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkfirewall.getFirewallPolicy({
    name: _var.firewall_policy_name,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkfirewall:getFirewallPolicy
      Arguments:
        name: ${var.firewall_policy_name}

Find firewall policy by ARN

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
    {
        Arn = @var.Firewall_policy_arn,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.LookupFirewallPolicy(ctx, &networkfirewall.LookupFirewallPolicyArgs{
			Arn: pulumi.StringRef(_var.Firewall_policy_arn),
		}, 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.aws.networkfirewall.NetworkfirewallFunctions;
import com.pulumi.aws.networkfirewall.inputs.GetFirewallPolicyArgs;
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 example = NetworkfirewallFunctions.getFirewallPolicy(GetFirewallPolicyArgs.builder()
            .arn(var_.firewall_policy_arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.get_firewall_policy(arn=var["firewall_policy_arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkfirewall.getFirewallPolicy({
    arn: _var.firewall_policy_arn,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkfirewall:getFirewallPolicy
      Arguments:
        arn: ${var.firewall_policy_arn}

Find firewall policy by name and ARN

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
    {
        Arn = @var.Firewall_policy_arn,
        Name = @var.Firewall_policy_name,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.LookupFirewallPolicy(ctx, &networkfirewall.LookupFirewallPolicyArgs{
			Arn:  pulumi.StringRef(_var.Firewall_policy_arn),
			Name: pulumi.StringRef(_var.Firewall_policy_name),
		}, 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.aws.networkfirewall.NetworkfirewallFunctions;
import com.pulumi.aws.networkfirewall.inputs.GetFirewallPolicyArgs;
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 example = NetworkfirewallFunctions.getFirewallPolicy(GetFirewallPolicyArgs.builder()
            .arn(var_.firewall_policy_arn())
            .name(var_.firewall_policy_name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.get_firewall_policy(arn=var["firewall_policy_arn"],
    name=var["firewall_policy_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkfirewall.getFirewallPolicy({
    arn: _var.firewall_policy_arn,
    name: _var.firewall_policy_name,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkfirewall:getFirewallPolicy
      Arguments:
        arn: ${var.firewall_policy_arn}
        name: ${var.firewall_policy_name}

Using getFirewallPolicy

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 getFirewallPolicy(args: GetFirewallPolicyArgs, opts?: InvokeOptions): Promise<GetFirewallPolicyResult>
function getFirewallPolicyOutput(args: GetFirewallPolicyOutputArgs, opts?: InvokeOptions): Output<GetFirewallPolicyResult>
def get_firewall_policy(arn: Optional[str] = None,
                        name: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetFirewallPolicyResult
def get_firewall_policy_output(arn: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetFirewallPolicyResult]
func LookupFirewallPolicy(ctx *Context, args *LookupFirewallPolicyArgs, opts ...InvokeOption) (*LookupFirewallPolicyResult, error)
func LookupFirewallPolicyOutput(ctx *Context, args *LookupFirewallPolicyOutputArgs, opts ...InvokeOption) LookupFirewallPolicyResultOutput

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

public static class GetFirewallPolicy 
{
    public static Task<GetFirewallPolicyResult> InvokeAsync(GetFirewallPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetFirewallPolicyResult> Invoke(GetFirewallPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFirewallPolicyResult> getFirewallPolicy(GetFirewallPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:networkfirewall/getFirewallPolicy:getFirewallPolicy
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Arn string

ARN of the firewall policy.

Name string

Descriptive name of the firewall policy.

Tags Dictionary<string, string>

Key-value tags for the firewall policy.

Arn string

ARN of the firewall policy.

Name string

Descriptive name of the firewall policy.

Tags map[string]string

Key-value tags for the firewall policy.

arn String

ARN of the firewall policy.

name String

Descriptive name of the firewall policy.

tags Map<String,String>

Key-value tags for the firewall policy.

arn string

ARN of the firewall policy.

name string

Descriptive name of the firewall policy.

tags {[key: string]: string}

Key-value tags for the firewall policy.

arn str

ARN of the firewall policy.

name str

Descriptive name of the firewall policy.

tags Mapping[str, str]

Key-value tags for the firewall policy.

arn String

ARN of the firewall policy.

name String

Descriptive name of the firewall policy.

tags Map<String>

Key-value tags for the firewall policy.

getFirewallPolicy Result

The following output properties are available:

Description string

Description of the firewall policy.

FirewallPolicies List<GetFirewallPolicyFirewallPolicy>

The policy for the specified firewall policy.

Id string

The provider-assigned unique ID for this managed resource.

Tags Dictionary<string, string>

Key-value tags for the firewall policy.

UpdateToken string

Token used for optimistic locking.

Arn string
Name string
Description string

Description of the firewall policy.

FirewallPolicies []GetFirewallPolicyFirewallPolicy

The policy for the specified firewall policy.

Id string

The provider-assigned unique ID for this managed resource.

Tags map[string]string

Key-value tags for the firewall policy.

UpdateToken string

Token used for optimistic locking.

Arn string
Name string
description String

Description of the firewall policy.

firewallPolicies List<GetFirewallPolicyFirewallPolicy>

The policy for the specified firewall policy.

id String

The provider-assigned unique ID for this managed resource.

tags Map<String,String>

Key-value tags for the firewall policy.

updateToken String

Token used for optimistic locking.

arn String
name String
description string

Description of the firewall policy.

firewallPolicies GetFirewallPolicyFirewallPolicy[]

The policy for the specified firewall policy.

id string

The provider-assigned unique ID for this managed resource.

tags {[key: string]: string}

Key-value tags for the firewall policy.

updateToken string

Token used for optimistic locking.

arn string
name string
description str

Description of the firewall policy.

firewall_policies Sequence[GetFirewallPolicyFirewallPolicy]

The policy for the specified firewall policy.

id str

The provider-assigned unique ID for this managed resource.

tags Mapping[str, str]

Key-value tags for the firewall policy.

update_token str

Token used for optimistic locking.

arn str
name str
description String

Description of the firewall policy.

firewallPolicies List<Property Map>

The policy for the specified firewall policy.

id String

The provider-assigned unique ID for this managed resource.

tags Map<String>

Key-value tags for the firewall policy.

updateToken String

Token used for optimistic locking.

arn String
name String

Supporting Types

GetFirewallPolicyFirewallPolicy

GetFirewallPolicyFirewallPolicyStatefulEngineOption

RuleOrder string
RuleOrder string
ruleOrder String
ruleOrder string
ruleOrder String

GetFirewallPolicyFirewallPolicyStatefulRuleGroupReference

priority Integer
resourceArn String
priority number
resourceArn string
priority Number
resourceArn String

GetFirewallPolicyFirewallPolicyStatelessCustomAction

GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinition

GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricAction

GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricActionDimension

Value string
Value string
value String
value string
value str
value String

GetFirewallPolicyFirewallPolicyStatelessRuleGroupReference

priority Integer
resourceArn String
priority number
resourceArn string
priority Number
resourceArn String

Package Details

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

This Pulumi package is based on the aws Terraform Provider.