import * as pulumi from "@pulumi/pulumi"; /** * Manages an AWS Network Security Manager Rule. A rule defines a firewall configuration to enforce, such as an AWS WAF web ACL setting or an AWS WAF rule group. Rules can be grouped into templates and referenced from policies. * * Every change to a rule publishes a new version of the rule. The resource never leaves an unpublished draft version behind. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networksecuritymanager.Rule("example", { * name: "example", * description: "Allow requests that match no other rule", * firewallType: "WAF", * type: "CONFIGURATION", * configuration: JSON.stringify({ * DefaultAction: { * Allow: {}, * }, * }), * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `arn` (String) ARN of the rule. * * Using `pulumi import`, import Network Security Manager Rule using the `arn`. For example: * * ```sh * $ pulumi import aws:networksecuritymanager/rule:Rule example arn:aws:network-security-manager:us-east-1:123456789012:rule:0123456789abcdef * ``` */ export declare class Rule extends pulumi.CustomResource { /** * Get an existing Rule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RuleState, opts?: pulumi.CustomResourceOptions): Rule; /** * Check whether an existing Rule resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: RuleState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Rule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Rule; /** * ARN of the rule. */ readonly arn: pulumi.Output; /** * Firewall configuration of the rule, as a JSON document. The structure depends on `firewallType` and `type`. For an AWS WAF `CONFIGURATION` rule, provide a single web ACL setting, such as `DefaultAction` or `VisibilityConfig`. For an AWS WAF `INSPECTION` rule, provide an AWS WAF rule group. For details, see [Writing rule configurations](https://docs.aws.amazon.com/network-security-manager/latest/devguide/what-is.html) in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. */ readonly configuration: pulumi.Output; /** * Description of the rule. */ readonly description: pulumi.Output; /** * Firewall type of the rule. Valid values: `WAF`. */ readonly firewallType: pulumi.Output; /** * Whether to publish the rule. When `true`, the rule is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published rule, the draft is saved on top of the published version. Defaults to `true`. */ readonly isPublished: pulumi.Output; /** * Name of the rule. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Type of the rule. `CONFIGURATION` rules contain firewall settings and `INSPECTION` rules contain rule groups. Valid values: `CONFIGURATION`, `INSPECTION`. * * The following arguments are optional: */ readonly type: pulumi.Output; /** * Create a Rule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Rule resources. */ export interface RuleState { /** * ARN of the rule. */ arn?: pulumi.Input; /** * Firewall configuration of the rule, as a JSON document. The structure depends on `firewallType` and `type`. For an AWS WAF `CONFIGURATION` rule, provide a single web ACL setting, such as `DefaultAction` or `VisibilityConfig`. For an AWS WAF `INSPECTION` rule, provide an AWS WAF rule group. For details, see [Writing rule configurations](https://docs.aws.amazon.com/network-security-manager/latest/devguide/what-is.html) in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. */ configuration?: pulumi.Input; /** * Description of the rule. */ description?: pulumi.Input; /** * Firewall type of the rule. Valid values: `WAF`. */ firewallType?: pulumi.Input; /** * Whether to publish the rule. When `true`, the rule is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published rule, the draft is saved on top of the published version. Defaults to `true`. */ isPublished?: pulumi.Input; /** * Name of the rule. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Type of the rule. `CONFIGURATION` rules contain firewall settings and `INSPECTION` rules contain rule groups. Valid values: `CONFIGURATION`, `INSPECTION`. * * The following arguments are optional: */ type?: pulumi.Input; } /** * The set of arguments for constructing a Rule resource. */ export interface RuleArgs { /** * Firewall configuration of the rule, as a JSON document. The structure depends on `firewallType` and `type`. For an AWS WAF `CONFIGURATION` rule, provide a single web ACL setting, such as `DefaultAction` or `VisibilityConfig`. For an AWS WAF `INSPECTION` rule, provide an AWS WAF rule group. For details, see [Writing rule configurations](https://docs.aws.amazon.com/network-security-manager/latest/devguide/what-is.html) in the AWS Network Security Manager Developer Guide. Changes made to the configuration outside of Terraform are not detected. */ configuration: pulumi.Input; /** * Description of the rule. */ description?: pulumi.Input; /** * Firewall type of the rule. Valid values: `WAF`. */ firewallType: pulumi.Input; /** * Whether to publish the rule. When `true`, the rule is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published rule, the draft is saved on top of the published version. Defaults to `true`. */ isPublished?: pulumi.Input; /** * Name of the rule. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Type of the rule. `CONFIGURATION` rules contain firewall settings and `INSPECTION` rules contain rule groups. Valid values: `CONFIGURATION`, `INSPECTION`. * * The following arguments are optional: */ type: pulumi.Input; } //# sourceMappingURL=rule.d.ts.map