import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS Network Security Manager Policy. A policy combines templates and rules with enforcement settings for a firewall type, such as AWS WAF or AWS Shield Advanced. * * Changes to a policy are published unless `isPublished` is `false`. * * ## Example Usage * * ### AWS WAF Policy * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networksecuritymanager.Policy("example", { * configuration: { * wafConfig: { * conflictResolution: "MERGE_WHERE_APPLICABLE", * existingCustomerWebAclResolution: "RETROFIT", * }, * remediationEnabled: true, * resourcesCleanUp: true, * }, * templateOrRules: [{ * ruleIdentifier: exampleAwsNetworksecuritymanagerRule.arn, * }], * name: "baseline-waf", * firewallType: "WAF", * priority: 1, * }); * ``` * * ### AWS Shield Advanced Policy * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networksecuritymanager.Policy("example", { * configuration: { * remediationEnabled: true, * resourcesCleanUp: true, * }, * name: "baseline-shield", * firewallType: "SHIELD_ADVANCED", * priority: 2, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `arn` (String) ARN of the policy. * * Using `pulumi import`, import Network Security Manager Policy using the `arn`. For example: * * ```sh * $ pulumi import aws:networksecuritymanager/policy:Policy example arn:aws:network-security-manager:us-east-1:123456789012:policy:abcd1234efgh * ``` */ export declare class Policy extends pulumi.CustomResource { /** * Get an existing Policy 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?: PolicyState, opts?: pulumi.CustomResourceOptions): Policy; /** * Check whether an existing Policy 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?: PolicyState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Policy. 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 Policy; /** * ARN of the policy. */ readonly arn: pulumi.Output; /** * Settings that control the policy's behavior. See `configuration` below. */ readonly configuration: pulumi.Output; /** * Description of the policy. */ readonly description: pulumi.Output; /** * Firewall type of the policy. Valid values: `WAF`, `SHIELD_ADVANCED`. Changing this value forces a new resource. */ readonly firewallType: pulumi.Output; /** * Whether to publish the policy. When `true`, the policy is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published policy, the draft is saved on top of the published version. Defaults to `true`. */ readonly isPublished: pulumi.Output; /** * Name of the policy. Changing this value forces a new resource. */ readonly name: pulumi.Output; /** * Priority of the policy. A lower number indicates a higher priority. Minimum value of `1`. Must be unique across policies in the AWS account. * * The following arguments are optional: */ readonly priority: 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 assigned 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; }>; /** * Ordered list of templates and rules to associate with the policy. For `WAF` policies, specify 1 to 100 entries, of which at most 2 can be templates. Must be omitted for `SHIELD_ADVANCED` policies. See `templateOrRule` below. * * > **Note:** A rule or template referenced by a published policy cannot be deleted. Configure `createBeforeDestroy` on referenced rule and template resources so that a replacement is associated with the policy before the old resource is deleted. */ readonly templateOrRules: pulumi.Output; /** * Create a Policy 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: PolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Policy resources. */ export interface PolicyState { /** * ARN of the policy. */ arn?: pulumi.Input; /** * Settings that control the policy's behavior. See `configuration` below. */ configuration?: pulumi.Input; /** * Description of the policy. */ description?: pulumi.Input; /** * Firewall type of the policy. Valid values: `WAF`, `SHIELD_ADVANCED`. Changing this value forces a new resource. */ firewallType?: pulumi.Input; /** * Whether to publish the policy. When `true`, the policy is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published policy, the draft is saved on top of the published version. Defaults to `true`. */ isPublished?: pulumi.Input; /** * Name of the policy. Changing this value forces a new resource. */ name?: pulumi.Input; /** * Priority of the policy. A lower number indicates a higher priority. Minimum value of `1`. Must be unique across policies in the AWS account. * * The following arguments are optional: */ priority?: 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 assigned 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>; /** * Ordered list of templates and rules to associate with the policy. For `WAF` policies, specify 1 to 100 entries, of which at most 2 can be templates. Must be omitted for `SHIELD_ADVANCED` policies. See `templateOrRule` below. * * > **Note:** A rule or template referenced by a published policy cannot be deleted. Configure `createBeforeDestroy` on referenced rule and template resources so that a replacement is associated with the policy before the old resource is deleted. */ templateOrRules?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Policy resource. */ export interface PolicyArgs { /** * Settings that control the policy's behavior. See `configuration` below. */ configuration: pulumi.Input; /** * Description of the policy. */ description?: pulumi.Input; /** * Firewall type of the policy. Valid values: `WAF`, `SHIELD_ADVANCED`. Changing this value forces a new resource. */ firewallType: pulumi.Input; /** * Whether to publish the policy. When `true`, the policy is saved in the published (`ACTIVE`) state. When `false`, it is saved as a draft (`DRAFT`); for a published policy, the draft is saved on top of the published version. Defaults to `true`. */ isPublished?: pulumi.Input; /** * Name of the policy. Changing this value forces a new resource. */ name?: pulumi.Input; /** * Priority of the policy. A lower number indicates a higher priority. Minimum value of `1`. Must be unique across policies in the AWS account. * * The following arguments are optional: */ priority: 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 assigned 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>; /** * Ordered list of templates and rules to associate with the policy. For `WAF` policies, specify 1 to 100 entries, of which at most 2 can be templates. Must be omitted for `SHIELD_ADVANCED` policies. See `templateOrRule` below. * * > **Note:** A rule or template referenced by a published policy cannot be deleted. Configure `createBeforeDestroy` on referenced rule and template resources so that a replacement is associated with the policy before the old resource is deleted. */ templateOrRules?: pulumi.Input[] | undefined>; } //# sourceMappingURL=policy.d.ts.map