github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/fms/policy.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package fms
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a resource to create an AWS Firewall Manager policy. You need to be using AWS organizations and have enabled the Firewall Manager administrator account.
    16  //
    17  // > **NOTE:** Due to limitations with testing, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.
    18  //
    19  // ## Example Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"encoding/json"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/fms"
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			exampleRuleGroup, err := wafregional.NewRuleGroup(ctx, "example", &wafregional.RuleGroupArgs{
    38  //				MetricName: pulumi.String("WAFRuleGroupExample"),
    39  //				Name:       pulumi.String("WAF-Rule-Group-Example"),
    40  //			})
    41  //			if err != nil {
    42  //				return err
    43  //			}
    44  //			_, err = fms.NewPolicy(ctx, "example", &fms.PolicyArgs{
    45  //				Name:                pulumi.String("FMS-Policy-Example"),
    46  //				ExcludeResourceTags: pulumi.Bool(false),
    47  //				RemediationEnabled:  pulumi.Bool(false),
    48  //				ResourceType:        pulumi.String("AWS::ElasticLoadBalancingV2::LoadBalancer"),
    49  //				SecurityServicePolicyData: &fms.PolicySecurityServicePolicyDataArgs{
    50  //					Type: pulumi.String("WAF"),
    51  //					ManagedServiceData: exampleRuleGroup.ID().ApplyT(func(id string) (pulumi.String, error) {
    52  //						var _zero pulumi.String
    53  //						tmpJSON0, err := json.Marshal(map[string]interface{}{
    54  //							"type": "WAF",
    55  //							"ruleGroups": []map[string]interface{}{
    56  //								map[string]interface{}{
    57  //									"id": id,
    58  //									"overrideAction": map[string]interface{}{
    59  //										"type": "COUNT",
    60  //									},
    61  //								},
    62  //							},
    63  //							"defaultAction": map[string]interface{}{
    64  //								"type": "BLOCK",
    65  //							},
    66  //							"overrideCustomerWebACLAssociation": false,
    67  //						})
    68  //						if err != nil {
    69  //							return _zero, err
    70  //						}
    71  //						json0 := string(tmpJSON0)
    72  //						return pulumi.String(json0), nil
    73  //					}).(pulumi.StringOutput),
    74  //				},
    75  //				Tags: pulumi.StringMap{
    76  //					"Name": pulumi.String("example-fms-policy"),
    77  //				},
    78  //			})
    79  //			if err != nil {
    80  //				return err
    81  //			}
    82  //			return nil
    83  //		})
    84  //	}
    85  //
    86  // ```
    87  // <!--End PulumiCodeChooser -->
    88  //
    89  // ## Import
    90  //
    91  // Using `pulumi import`, import Firewall Manager policies using the policy ID. For example:
    92  //
    93  // ```sh
    94  // $ pulumi import aws:fms/policy:Policy example 5be49585-a7e3-4c49-dde1-a179fe4a619a
    95  // ```
    96  type Policy struct {
    97  	pulumi.CustomResourceState
    98  
    99  	Arn pulumi.StringOutput `pulumi:"arn"`
   100  	// If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   101  	DeleteAllPolicyResources pulumi.BoolPtrOutput `pulumi:"deleteAllPolicyResources"`
   102  	// If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   103  	DeleteUnusedFmManagedResources pulumi.BoolPtrOutput `pulumi:"deleteUnusedFmManagedResources"`
   104  	// The description of the AWS Network Firewall firewall policy.
   105  	Description pulumi.StringPtrOutput `pulumi:"description"`
   106  	// A map of lists of accounts and OU's to exclude from the policy.
   107  	ExcludeMap PolicyExcludeMapPtrOutput `pulumi:"excludeMap"`
   108  	// A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   109  	ExcludeResourceTags pulumi.BoolOutput `pulumi:"excludeResourceTags"`
   110  	// A map of lists of accounts and OU's to include in the policy.
   111  	IncludeMap PolicyIncludeMapPtrOutput `pulumi:"includeMap"`
   112  	// The friendly name of the AWS Firewall Manager Policy.
   113  	Name pulumi.StringOutput `pulumi:"name"`
   114  	// A unique identifier for each update to the policy.
   115  	PolicyUpdateToken pulumi.StringOutput `pulumi:"policyUpdateToken"`
   116  	// A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   117  	RemediationEnabled pulumi.BoolPtrOutput `pulumi:"remediationEnabled"`
   118  	// A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   119  	ResourceTags pulumi.StringMapOutput `pulumi:"resourceTags"`
   120  	// A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   121  	ResourceType pulumi.StringOutput `pulumi:"resourceType"`
   122  	// A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   123  	ResourceTypeLists pulumi.StringArrayOutput `pulumi:"resourceTypeLists"`
   124  	// The objects to include in Security Service Policy Data. Documented below.
   125  	SecurityServicePolicyData PolicySecurityServicePolicyDataOutput `pulumi:"securityServicePolicyData"`
   126  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   127  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   128  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   129  	//
   130  	// Deprecated: Please use `tags` instead.
   131  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   132  }
   133  
   134  // NewPolicy registers a new resource with the given unique name, arguments, and options.
   135  func NewPolicy(ctx *pulumi.Context,
   136  	name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error) {
   137  	if args == nil {
   138  		return nil, errors.New("missing one or more required arguments")
   139  	}
   140  
   141  	if args.ExcludeResourceTags == nil {
   142  		return nil, errors.New("invalid value for required argument 'ExcludeResourceTags'")
   143  	}
   144  	if args.SecurityServicePolicyData == nil {
   145  		return nil, errors.New("invalid value for required argument 'SecurityServicePolicyData'")
   146  	}
   147  	opts = internal.PkgResourceDefaultOpts(opts)
   148  	var resource Policy
   149  	err := ctx.RegisterResource("aws:fms/policy:Policy", name, args, &resource, opts...)
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return &resource, nil
   154  }
   155  
   156  // GetPolicy gets an existing Policy resource's state with the given name, ID, and optional
   157  // state properties that are used to uniquely qualify the lookup (nil if not required).
   158  func GetPolicy(ctx *pulumi.Context,
   159  	name string, id pulumi.IDInput, state *PolicyState, opts ...pulumi.ResourceOption) (*Policy, error) {
   160  	var resource Policy
   161  	err := ctx.ReadResource("aws:fms/policy:Policy", name, id, state, &resource, opts...)
   162  	if err != nil {
   163  		return nil, err
   164  	}
   165  	return &resource, nil
   166  }
   167  
   168  // Input properties used for looking up and filtering Policy resources.
   169  type policyState struct {
   170  	Arn *string `pulumi:"arn"`
   171  	// If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   172  	DeleteAllPolicyResources *bool `pulumi:"deleteAllPolicyResources"`
   173  	// If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   174  	DeleteUnusedFmManagedResources *bool `pulumi:"deleteUnusedFmManagedResources"`
   175  	// The description of the AWS Network Firewall firewall policy.
   176  	Description *string `pulumi:"description"`
   177  	// A map of lists of accounts and OU's to exclude from the policy.
   178  	ExcludeMap *PolicyExcludeMap `pulumi:"excludeMap"`
   179  	// A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   180  	ExcludeResourceTags *bool `pulumi:"excludeResourceTags"`
   181  	// A map of lists of accounts and OU's to include in the policy.
   182  	IncludeMap *PolicyIncludeMap `pulumi:"includeMap"`
   183  	// The friendly name of the AWS Firewall Manager Policy.
   184  	Name *string `pulumi:"name"`
   185  	// A unique identifier for each update to the policy.
   186  	PolicyUpdateToken *string `pulumi:"policyUpdateToken"`
   187  	// A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   188  	RemediationEnabled *bool `pulumi:"remediationEnabled"`
   189  	// A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   190  	ResourceTags map[string]string `pulumi:"resourceTags"`
   191  	// A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   192  	ResourceType *string `pulumi:"resourceType"`
   193  	// A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   194  	ResourceTypeLists []string `pulumi:"resourceTypeLists"`
   195  	// The objects to include in Security Service Policy Data. Documented below.
   196  	SecurityServicePolicyData *PolicySecurityServicePolicyData `pulumi:"securityServicePolicyData"`
   197  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   198  	Tags map[string]string `pulumi:"tags"`
   199  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   200  	//
   201  	// Deprecated: Please use `tags` instead.
   202  	TagsAll map[string]string `pulumi:"tagsAll"`
   203  }
   204  
   205  type PolicyState struct {
   206  	Arn pulumi.StringPtrInput
   207  	// If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   208  	DeleteAllPolicyResources pulumi.BoolPtrInput
   209  	// If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   210  	DeleteUnusedFmManagedResources pulumi.BoolPtrInput
   211  	// The description of the AWS Network Firewall firewall policy.
   212  	Description pulumi.StringPtrInput
   213  	// A map of lists of accounts and OU's to exclude from the policy.
   214  	ExcludeMap PolicyExcludeMapPtrInput
   215  	// A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   216  	ExcludeResourceTags pulumi.BoolPtrInput
   217  	// A map of lists of accounts and OU's to include in the policy.
   218  	IncludeMap PolicyIncludeMapPtrInput
   219  	// The friendly name of the AWS Firewall Manager Policy.
   220  	Name pulumi.StringPtrInput
   221  	// A unique identifier for each update to the policy.
   222  	PolicyUpdateToken pulumi.StringPtrInput
   223  	// A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   224  	RemediationEnabled pulumi.BoolPtrInput
   225  	// A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   226  	ResourceTags pulumi.StringMapInput
   227  	// A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   228  	ResourceType pulumi.StringPtrInput
   229  	// A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   230  	ResourceTypeLists pulumi.StringArrayInput
   231  	// The objects to include in Security Service Policy Data. Documented below.
   232  	SecurityServicePolicyData PolicySecurityServicePolicyDataPtrInput
   233  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   234  	Tags pulumi.StringMapInput
   235  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   236  	//
   237  	// Deprecated: Please use `tags` instead.
   238  	TagsAll pulumi.StringMapInput
   239  }
   240  
   241  func (PolicyState) ElementType() reflect.Type {
   242  	return reflect.TypeOf((*policyState)(nil)).Elem()
   243  }
   244  
   245  type policyArgs struct {
   246  	// If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   247  	DeleteAllPolicyResources *bool `pulumi:"deleteAllPolicyResources"`
   248  	// If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   249  	DeleteUnusedFmManagedResources *bool `pulumi:"deleteUnusedFmManagedResources"`
   250  	// The description of the AWS Network Firewall firewall policy.
   251  	Description *string `pulumi:"description"`
   252  	// A map of lists of accounts and OU's to exclude from the policy.
   253  	ExcludeMap *PolicyExcludeMap `pulumi:"excludeMap"`
   254  	// A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   255  	ExcludeResourceTags bool `pulumi:"excludeResourceTags"`
   256  	// A map of lists of accounts and OU's to include in the policy.
   257  	IncludeMap *PolicyIncludeMap `pulumi:"includeMap"`
   258  	// The friendly name of the AWS Firewall Manager Policy.
   259  	Name *string `pulumi:"name"`
   260  	// A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   261  	RemediationEnabled *bool `pulumi:"remediationEnabled"`
   262  	// A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   263  	ResourceTags map[string]string `pulumi:"resourceTags"`
   264  	// A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   265  	ResourceType *string `pulumi:"resourceType"`
   266  	// A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   267  	ResourceTypeLists []string `pulumi:"resourceTypeLists"`
   268  	// The objects to include in Security Service Policy Data. Documented below.
   269  	SecurityServicePolicyData PolicySecurityServicePolicyData `pulumi:"securityServicePolicyData"`
   270  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   271  	Tags map[string]string `pulumi:"tags"`
   272  }
   273  
   274  // The set of arguments for constructing a Policy resource.
   275  type PolicyArgs struct {
   276  	// If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   277  	DeleteAllPolicyResources pulumi.BoolPtrInput
   278  	// If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   279  	DeleteUnusedFmManagedResources pulumi.BoolPtrInput
   280  	// The description of the AWS Network Firewall firewall policy.
   281  	Description pulumi.StringPtrInput
   282  	// A map of lists of accounts and OU's to exclude from the policy.
   283  	ExcludeMap PolicyExcludeMapPtrInput
   284  	// A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   285  	ExcludeResourceTags pulumi.BoolInput
   286  	// A map of lists of accounts and OU's to include in the policy.
   287  	IncludeMap PolicyIncludeMapPtrInput
   288  	// The friendly name of the AWS Firewall Manager Policy.
   289  	Name pulumi.StringPtrInput
   290  	// A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   291  	RemediationEnabled pulumi.BoolPtrInput
   292  	// A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   293  	ResourceTags pulumi.StringMapInput
   294  	// A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   295  	ResourceType pulumi.StringPtrInput
   296  	// A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   297  	ResourceTypeLists pulumi.StringArrayInput
   298  	// The objects to include in Security Service Policy Data. Documented below.
   299  	SecurityServicePolicyData PolicySecurityServicePolicyDataInput
   300  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   301  	Tags pulumi.StringMapInput
   302  }
   303  
   304  func (PolicyArgs) ElementType() reflect.Type {
   305  	return reflect.TypeOf((*policyArgs)(nil)).Elem()
   306  }
   307  
   308  type PolicyInput interface {
   309  	pulumi.Input
   310  
   311  	ToPolicyOutput() PolicyOutput
   312  	ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
   313  }
   314  
   315  func (*Policy) ElementType() reflect.Type {
   316  	return reflect.TypeOf((**Policy)(nil)).Elem()
   317  }
   318  
   319  func (i *Policy) ToPolicyOutput() PolicyOutput {
   320  	return i.ToPolicyOutputWithContext(context.Background())
   321  }
   322  
   323  func (i *Policy) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
   324  	return pulumi.ToOutputWithContext(ctx, i).(PolicyOutput)
   325  }
   326  
   327  // PolicyArrayInput is an input type that accepts PolicyArray and PolicyArrayOutput values.
   328  // You can construct a concrete instance of `PolicyArrayInput` via:
   329  //
   330  //	PolicyArray{ PolicyArgs{...} }
   331  type PolicyArrayInput interface {
   332  	pulumi.Input
   333  
   334  	ToPolicyArrayOutput() PolicyArrayOutput
   335  	ToPolicyArrayOutputWithContext(context.Context) PolicyArrayOutput
   336  }
   337  
   338  type PolicyArray []PolicyInput
   339  
   340  func (PolicyArray) ElementType() reflect.Type {
   341  	return reflect.TypeOf((*[]*Policy)(nil)).Elem()
   342  }
   343  
   344  func (i PolicyArray) ToPolicyArrayOutput() PolicyArrayOutput {
   345  	return i.ToPolicyArrayOutputWithContext(context.Background())
   346  }
   347  
   348  func (i PolicyArray) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput {
   349  	return pulumi.ToOutputWithContext(ctx, i).(PolicyArrayOutput)
   350  }
   351  
   352  // PolicyMapInput is an input type that accepts PolicyMap and PolicyMapOutput values.
   353  // You can construct a concrete instance of `PolicyMapInput` via:
   354  //
   355  //	PolicyMap{ "key": PolicyArgs{...} }
   356  type PolicyMapInput interface {
   357  	pulumi.Input
   358  
   359  	ToPolicyMapOutput() PolicyMapOutput
   360  	ToPolicyMapOutputWithContext(context.Context) PolicyMapOutput
   361  }
   362  
   363  type PolicyMap map[string]PolicyInput
   364  
   365  func (PolicyMap) ElementType() reflect.Type {
   366  	return reflect.TypeOf((*map[string]*Policy)(nil)).Elem()
   367  }
   368  
   369  func (i PolicyMap) ToPolicyMapOutput() PolicyMapOutput {
   370  	return i.ToPolicyMapOutputWithContext(context.Background())
   371  }
   372  
   373  func (i PolicyMap) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput {
   374  	return pulumi.ToOutputWithContext(ctx, i).(PolicyMapOutput)
   375  }
   376  
   377  type PolicyOutput struct{ *pulumi.OutputState }
   378  
   379  func (PolicyOutput) ElementType() reflect.Type {
   380  	return reflect.TypeOf((**Policy)(nil)).Elem()
   381  }
   382  
   383  func (o PolicyOutput) ToPolicyOutput() PolicyOutput {
   384  	return o
   385  }
   386  
   387  func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
   388  	return o
   389  }
   390  
   391  func (o PolicyOutput) Arn() pulumi.StringOutput {
   392  	return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   393  }
   394  
   395  // If true, the request will also perform a clean-up process. Defaults to `true`. More information can be found here [AWS Firewall Manager delete policy](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_DeletePolicy.html)
   396  func (o PolicyOutput) DeleteAllPolicyResources() pulumi.BoolPtrOutput {
   397  	return o.ApplyT(func(v *Policy) pulumi.BoolPtrOutput { return v.DeleteAllPolicyResources }).(pulumi.BoolPtrOutput)
   398  }
   399  
   400  // If true, Firewall Manager will automatically remove protections from resources that leave the policy scope. Defaults to `false`. More information can be found here [AWS Firewall Manager policy contents](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html)
   401  func (o PolicyOutput) DeleteUnusedFmManagedResources() pulumi.BoolPtrOutput {
   402  	return o.ApplyT(func(v *Policy) pulumi.BoolPtrOutput { return v.DeleteUnusedFmManagedResources }).(pulumi.BoolPtrOutput)
   403  }
   404  
   405  // The description of the AWS Network Firewall firewall policy.
   406  func (o PolicyOutput) Description() pulumi.StringPtrOutput {
   407  	return o.ApplyT(func(v *Policy) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   408  }
   409  
   410  // A map of lists of accounts and OU's to exclude from the policy.
   411  func (o PolicyOutput) ExcludeMap() PolicyExcludeMapPtrOutput {
   412  	return o.ApplyT(func(v *Policy) PolicyExcludeMapPtrOutput { return v.ExcludeMap }).(PolicyExcludeMapPtrOutput)
   413  }
   414  
   415  // A boolean value, if true the tags that are specified in the `resourceTags` are not protected by this policy. If set to false and resourceTags are populated, resources that contain tags will be protected by this policy.
   416  func (o PolicyOutput) ExcludeResourceTags() pulumi.BoolOutput {
   417  	return o.ApplyT(func(v *Policy) pulumi.BoolOutput { return v.ExcludeResourceTags }).(pulumi.BoolOutput)
   418  }
   419  
   420  // A map of lists of accounts and OU's to include in the policy.
   421  func (o PolicyOutput) IncludeMap() PolicyIncludeMapPtrOutput {
   422  	return o.ApplyT(func(v *Policy) PolicyIncludeMapPtrOutput { return v.IncludeMap }).(PolicyIncludeMapPtrOutput)
   423  }
   424  
   425  // The friendly name of the AWS Firewall Manager Policy.
   426  func (o PolicyOutput) Name() pulumi.StringOutput {
   427  	return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   428  }
   429  
   430  // A unique identifier for each update to the policy.
   431  func (o PolicyOutput) PolicyUpdateToken() pulumi.StringOutput {
   432  	return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.PolicyUpdateToken }).(pulumi.StringOutput)
   433  }
   434  
   435  // A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
   436  func (o PolicyOutput) RemediationEnabled() pulumi.BoolPtrOutput {
   437  	return o.ApplyT(func(v *Policy) pulumi.BoolPtrOutput { return v.RemediationEnabled }).(pulumi.BoolPtrOutput)
   438  }
   439  
   440  // A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
   441  func (o PolicyOutput) ResourceTags() pulumi.StringMapOutput {
   442  	return o.ApplyT(func(v *Policy) pulumi.StringMapOutput { return v.ResourceTags }).(pulumi.StringMapOutput)
   443  }
   444  
   445  // A resource type to protect. Conflicts with `resourceTypeList`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values.
   446  func (o PolicyOutput) ResourceType() pulumi.StringOutput {
   447  	return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.ResourceType }).(pulumi.StringOutput)
   448  }
   449  
   450  // A list of resource types to protect. Conflicts with `resourceType`. See the [FMS API Reference](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_Policy.html#fms-Type-Policy-ResourceType) for more information about supported values. Lists with only one element are not supported, instead use `resourceType`.
   451  func (o PolicyOutput) ResourceTypeLists() pulumi.StringArrayOutput {
   452  	return o.ApplyT(func(v *Policy) pulumi.StringArrayOutput { return v.ResourceTypeLists }).(pulumi.StringArrayOutput)
   453  }
   454  
   455  // The objects to include in Security Service Policy Data. Documented below.
   456  func (o PolicyOutput) SecurityServicePolicyData() PolicySecurityServicePolicyDataOutput {
   457  	return o.ApplyT(func(v *Policy) PolicySecurityServicePolicyDataOutput { return v.SecurityServicePolicyData }).(PolicySecurityServicePolicyDataOutput)
   458  }
   459  
   460  // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
   461  func (o PolicyOutput) Tags() pulumi.StringMapOutput {
   462  	return o.ApplyT(func(v *Policy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   463  }
   464  
   465  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   466  //
   467  // Deprecated: Please use `tags` instead.
   468  func (o PolicyOutput) TagsAll() pulumi.StringMapOutput {
   469  	return o.ApplyT(func(v *Policy) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   470  }
   471  
   472  type PolicyArrayOutput struct{ *pulumi.OutputState }
   473  
   474  func (PolicyArrayOutput) ElementType() reflect.Type {
   475  	return reflect.TypeOf((*[]*Policy)(nil)).Elem()
   476  }
   477  
   478  func (o PolicyArrayOutput) ToPolicyArrayOutput() PolicyArrayOutput {
   479  	return o
   480  }
   481  
   482  func (o PolicyArrayOutput) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput {
   483  	return o
   484  }
   485  
   486  func (o PolicyArrayOutput) Index(i pulumi.IntInput) PolicyOutput {
   487  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Policy {
   488  		return vs[0].([]*Policy)[vs[1].(int)]
   489  	}).(PolicyOutput)
   490  }
   491  
   492  type PolicyMapOutput struct{ *pulumi.OutputState }
   493  
   494  func (PolicyMapOutput) ElementType() reflect.Type {
   495  	return reflect.TypeOf((*map[string]*Policy)(nil)).Elem()
   496  }
   497  
   498  func (o PolicyMapOutput) ToPolicyMapOutput() PolicyMapOutput {
   499  	return o
   500  }
   501  
   502  func (o PolicyMapOutput) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput {
   503  	return o
   504  }
   505  
   506  func (o PolicyMapOutput) MapIndex(k pulumi.StringInput) PolicyOutput {
   507  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Policy {
   508  		return vs[0].(map[string]*Policy)[vs[1].(string)]
   509  	}).(PolicyOutput)
   510  }
   511  
   512  func init() {
   513  	pulumi.RegisterInputType(reflect.TypeOf((*PolicyInput)(nil)).Elem(), &Policy{})
   514  	pulumi.RegisterInputType(reflect.TypeOf((*PolicyArrayInput)(nil)).Elem(), PolicyArray{})
   515  	pulumi.RegisterInputType(reflect.TypeOf((*PolicyMapInput)(nil)).Elem(), PolicyMap{})
   516  	pulumi.RegisterOutputType(PolicyOutput{})
   517  	pulumi.RegisterOutputType(PolicyArrayOutput{})
   518  	pulumi.RegisterOutputType(PolicyMapOutput{})
   519  }