Try AWS Native preview for resources not in the classic version.
aws.networkfirewall.getFirewallPolicy
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Retrieve information about a firewall policy.
Example Usage
Find firewall policy by name
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.networkfirewall.getFirewallPolicy({
name: firewallPolicyName,
});
import pulumi
import pulumi_aws as aws
example = aws.networkfirewall.get_firewall_policy(name=firewall_policy_name)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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(firewallPolicyName),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
{
Name = firewallPolicyName,
});
});
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(firewallPolicyName)
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:networkfirewall:getFirewallPolicy
Arguments:
name: ${firewallPolicyName}
Find firewall policy by ARN
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.networkfirewall.getFirewallPolicy({
arn: firewallPolicyArn,
});
import pulumi
import pulumi_aws as aws
example = aws.networkfirewall.get_firewall_policy(arn=firewall_policy_arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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(firewallPolicyArn),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
{
Arn = firewallPolicyArn,
});
});
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(firewallPolicyArn)
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:networkfirewall:getFirewallPolicy
Arguments:
arn: ${firewallPolicyArn}
Find firewall policy by name and ARN
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.networkfirewall.getFirewallPolicy({
arn: firewallPolicyArn,
name: firewallPolicyName,
});
import pulumi
import pulumi_aws as aws
example = aws.networkfirewall.get_firewall_policy(arn=firewall_policy_arn,
name=firewall_policy_name)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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(firewallPolicyArn),
Name: pulumi.StringRef(firewallPolicyName),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.NetworkFirewall.GetFirewallPolicy.Invoke(new()
{
Arn = firewallPolicyArn,
Name = firewallPolicyName,
});
});
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(firewallPolicyArn)
.name(firewallPolicyName)
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:networkfirewall:getFirewallPolicy
Arguments:
arn: ${firewallPolicyArn}
name: ${firewallPolicyName}
AWS Network Firewall does not allow multiple firewall policies with the same name to be created in an account. It is possible, however, to have multiple firewall policies available in a single account with identical name
values but distinct arn
values, e.g. firewall policies shared via a [Resource Access Manager (RAM) share][1]. In that case specifying arn
, or name
and arn
, is recommended.
Note: If there are multiple firewall policies in an account with the same
name
, andarn
is not specified, the default behavior will return the firewall policy withname
that was created in the account.
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:
getFirewallPolicy Result
The following output properties are available:
- Description string
- Description of the firewall policy.
- Firewall
Policies List<GetFirewall Policy Firewall Policy> - The [policy][2] for the specified firewall policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- Key-value tags for the firewall policy.
- Update
Token string - Token used for optimistic locking.
- Arn string
- Name string
- Description string
- Description of the firewall policy.
- Firewall
Policies []GetFirewall Policy Firewall Policy - The [policy][2] for the specified firewall policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- Key-value tags for the firewall policy.
- Update
Token string - Token used for optimistic locking.
- Arn string
- Name string
- description String
- Description of the firewall policy.
- firewall
Policies List<GetFirewall Policy Firewall Policy> - The [policy][2] for the specified firewall policy.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- Key-value tags for the firewall policy.
- update
Token String - Token used for optimistic locking.
- arn String
- name String
- description string
- Description of the firewall policy.
- firewall
Policies GetFirewall Policy Firewall Policy[] - The [policy][2] for the specified firewall policy.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- Key-value tags for the firewall policy.
- update
Token string - Token used for optimistic locking.
- arn string
- name string
- description str
- Description of the firewall policy.
- firewall_
policies Sequence[GetFirewall Policy Firewall Policy] - The [policy][2] for the specified firewall policy.
- id str
- The provider-assigned unique ID for this managed resource.
- 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.
- firewall
Policies List<Property Map> - The [policy][2] for the specified firewall policy.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- Key-value tags for the firewall policy.
- update
Token String - Token used for optimistic locking.
- arn String
- name String
Supporting Types
GetFirewallPolicyFirewallPolicy
- Stateful
Default List<string>Actions - Stateful
Engine List<GetOptions Firewall Policy Firewall Policy Stateful Engine Option> - Stateful
Rule List<GetGroup References Firewall Policy Firewall Policy Stateful Rule Group Reference> - Stateless
Custom List<GetActions Firewall Policy Firewall Policy Stateless Custom Action> - Stateless
Default List<string>Actions - Stateless
Fragment List<string>Default Actions - Stateless
Rule List<GetGroup References Firewall Policy Firewall Policy Stateless Rule Group Reference> - Tls
Inspection stringConfiguration Arn
- Stateful
Default []stringActions - Stateful
Engine []GetOptions Firewall Policy Firewall Policy Stateful Engine Option - Stateful
Rule []GetGroup References Firewall Policy Firewall Policy Stateful Rule Group Reference - Stateless
Custom []GetActions Firewall Policy Firewall Policy Stateless Custom Action - Stateless
Default []stringActions - Stateless
Fragment []stringDefault Actions - Stateless
Rule []GetGroup References Firewall Policy Firewall Policy Stateless Rule Group Reference - Tls
Inspection stringConfiguration Arn
- stateful
Default List<String>Actions - stateful
Engine List<GetOptions Firewall Policy Firewall Policy Stateful Engine Option> - stateful
Rule List<GetGroup References Firewall Policy Firewall Policy Stateful Rule Group Reference> - stateless
Custom List<GetActions Firewall Policy Firewall Policy Stateless Custom Action> - stateless
Default List<String>Actions - stateless
Fragment List<String>Default Actions - stateless
Rule List<GetGroup References Firewall Policy Firewall Policy Stateless Rule Group Reference> - tls
Inspection StringConfiguration Arn
- stateful
Default string[]Actions - stateful
Engine GetOptions Firewall Policy Firewall Policy Stateful Engine Option[] - stateful
Rule GetGroup References Firewall Policy Firewall Policy Stateful Rule Group Reference[] - stateless
Custom GetActions Firewall Policy Firewall Policy Stateless Custom Action[] - stateless
Default string[]Actions - stateless
Fragment string[]Default Actions - stateless
Rule GetGroup References Firewall Policy Firewall Policy Stateless Rule Group Reference[] - tls
Inspection stringConfiguration Arn
- stateful_
default_ Sequence[str]actions - stateful_
engine_ Sequence[Getoptions Firewall Policy Firewall Policy Stateful Engine Option] - stateful_
rule_ Sequence[Getgroup_ references Firewall Policy Firewall Policy Stateful Rule Group Reference] - stateless_
custom_ Sequence[Getactions Firewall Policy Firewall Policy Stateless Custom Action] - stateless_
default_ Sequence[str]actions - stateless_
fragment_ Sequence[str]default_ actions - stateless_
rule_ Sequence[Getgroup_ references Firewall Policy Firewall Policy Stateless Rule Group Reference] - tls_
inspection_ strconfiguration_ arn
- stateful
Default List<String>Actions - stateful
Engine List<Property Map>Options - stateful
Rule List<Property Map>Group References - stateless
Custom List<Property Map>Actions - stateless
Default List<String>Actions - stateless
Fragment List<String>Default Actions - stateless
Rule List<Property Map>Group References - tls
Inspection StringConfiguration Arn
GetFirewallPolicyFirewallPolicyStatefulEngineOption
- Rule
Order string - Stream
Exception stringPolicy
- Rule
Order string - Stream
Exception stringPolicy
- rule
Order String - stream
Exception StringPolicy
- rule
Order string - stream
Exception stringPolicy
- rule
Order String - stream
Exception StringPolicy
GetFirewallPolicyFirewallPolicyStatefulRuleGroupReference
- priority Number
- resource
Arn String - overrides List<Property Map>
GetFirewallPolicyFirewallPolicyStatefulRuleGroupReferenceOverride
- Action string
- Action string
- action String
- action string
- action str
- action String
GetFirewallPolicyFirewallPolicyStatelessCustomAction
GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinition
GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricAction
GetFirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricActionDimension
- Value string
- Value string
- value String
- value string
- value str
- value String
GetFirewallPolicyFirewallPolicyStatelessRuleGroupReference
- Priority int
- Resource
Arn string
- Priority int
- Resource
Arn string
- priority Integer
- resource
Arn String
- priority number
- resource
Arn string
- priority int
- resource_
arn str
- priority Number
- resource
Arn String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.