UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

116 lines 4.27 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getFirewallPolicyOutput = exports.getFirewallPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Retrieve information about a firewall policy. * * ## Example Usage * * ### Find firewall policy by name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * name: firewallPolicyName, * }); * ``` * * ### Find firewall policy by ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * arn: firewallPolicyArn, * }); * ``` * * ### Find firewall policy by name and ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * 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`, and `arn` is not specified, the default behavior will return the firewall policy with `name` that was created in the account. */ function getFirewallPolicy(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:networkfirewall/getFirewallPolicy:getFirewallPolicy", { "arn": args.arn, "name": args.name, "region": args.region, "tags": args.tags, }, opts); } exports.getFirewallPolicy = getFirewallPolicy; /** * Retrieve information about a firewall policy. * * ## Example Usage * * ### Find firewall policy by name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * name: firewallPolicyName, * }); * ``` * * ### Find firewall policy by ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * arn: firewallPolicyArn, * }); * ``` * * ### Find firewall policy by name and ARN * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.networkfirewall.getFirewallPolicy({ * 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`, and `arn` is not specified, the default behavior will return the firewall policy with `name` that was created in the account. */ function getFirewallPolicyOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:networkfirewall/getFirewallPolicy:getFirewallPolicy", { "arn": args.arn, "name": args.name, "region": args.region, "tags": args.tags, }, opts); } exports.getFirewallPolicyOutput = getFirewallPolicyOutput; //# sourceMappingURL=getFirewallPolicy.js.map