All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.fms.PolicyArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.fms;

import com.pulumi.aws.fms.inputs.PolicyExcludeMapArgs;
import com.pulumi.aws.fms.inputs.PolicyIncludeMapArgs;
import com.pulumi.aws.fms.inputs.PolicySecurityServicePolicyDataArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class PolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final PolicyArgs Empty = new PolicyArgs();

    /**
     * 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)
     * 
     */
    @Import(name="deleteAllPolicyResources")
    private @Nullable Output deleteAllPolicyResources;

    /**
     * @return 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)
     * 
     */
    public Optional> deleteAllPolicyResources() {
        return Optional.ofNullable(this.deleteAllPolicyResources);
    }

    /**
     * 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)
     * 
     */
    @Import(name="deleteUnusedFmManagedResources")
    private @Nullable Output deleteUnusedFmManagedResources;

    /**
     * @return 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)
     * 
     */
    public Optional> deleteUnusedFmManagedResources() {
        return Optional.ofNullable(this.deleteUnusedFmManagedResources);
    }

    /**
     * The description of the AWS Network Firewall firewall policy.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return The description of the AWS Network Firewall firewall policy.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * A map of lists of accounts and OU's to exclude from the policy.
     * 
     */
    @Import(name="excludeMap")
    private @Nullable Output excludeMap;

    /**
     * @return A map of lists of accounts and OU's to exclude from the policy.
     * 
     */
    public Optional> excludeMap() {
        return Optional.ofNullable(this.excludeMap);
    }

    /**
     * A boolean value, if true the tags that are specified in the `resource_tags` are not protected by this policy. If set to false and resource_tags are populated, resources that contain tags will be protected by this policy.
     * 
     */
    @Import(name="excludeResourceTags", required=true)
    private Output excludeResourceTags;

    /**
     * @return A boolean value, if true the tags that are specified in the `resource_tags` are not protected by this policy. If set to false and resource_tags are populated, resources that contain tags will be protected by this policy.
     * 
     */
    public Output excludeResourceTags() {
        return this.excludeResourceTags;
    }

    /**
     * A map of lists of accounts and OU's to include in the policy.
     * 
     */
    @Import(name="includeMap")
    private @Nullable Output includeMap;

    /**
     * @return A map of lists of accounts and OU's to include in the policy.
     * 
     */
    public Optional> includeMap() {
        return Optional.ofNullable(this.includeMap);
    }

    /**
     * The friendly name of the AWS Firewall Manager Policy.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The friendly name of the AWS Firewall Manager Policy.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
     * 
     */
    @Import(name="remediationEnabled")
    private @Nullable Output remediationEnabled;

    /**
     * @return A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
     * 
     */
    public Optional> remediationEnabled() {
        return Optional.ofNullable(this.remediationEnabled);
    }

    @Import(name="resourceSetIds")
    private @Nullable Output> resourceSetIds;

    public Optional>> resourceSetIds() {
        return Optional.ofNullable(this.resourceSetIds);
    }

    /**
     * A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
     * 
     */
    @Import(name="resourceTags")
    private @Nullable Output> resourceTags;

    /**
     * @return A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
     * 
     */
    public Optional>> resourceTags() {
        return Optional.ofNullable(this.resourceTags);
    }

    /**
     * A resource type to protect. Conflicts with `resource_type_list`. 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.
     * 
     */
    @Import(name="resourceType")
    private @Nullable Output resourceType;

    /**
     * @return A resource type to protect. Conflicts with `resource_type_list`. 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.
     * 
     */
    public Optional> resourceType() {
        return Optional.ofNullable(this.resourceType);
    }

    /**
     * A list of resource types to protect. Conflicts with `resource_type`. 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 `resource_type`.
     * 
     */
    @Import(name="resourceTypeLists")
    private @Nullable Output> resourceTypeLists;

    /**
     * @return A list of resource types to protect. Conflicts with `resource_type`. 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 `resource_type`.
     * 
     */
    public Optional>> resourceTypeLists() {
        return Optional.ofNullable(this.resourceTypeLists);
    }

    /**
     * The objects to include in Security Service Policy Data. Documented below.
     * 
     */
    @Import(name="securityServicePolicyData", required=true)
    private Output securityServicePolicyData;

    /**
     * @return The objects to include in Security Service Policy Data. Documented below.
     * 
     */
    public Output securityServicePolicyData() {
        return this.securityServicePolicyData;
    }

    /**
     * Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private PolicyArgs() {}

    private PolicyArgs(PolicyArgs $) {
        this.deleteAllPolicyResources = $.deleteAllPolicyResources;
        this.deleteUnusedFmManagedResources = $.deleteUnusedFmManagedResources;
        this.description = $.description;
        this.excludeMap = $.excludeMap;
        this.excludeResourceTags = $.excludeResourceTags;
        this.includeMap = $.includeMap;
        this.name = $.name;
        this.remediationEnabled = $.remediationEnabled;
        this.resourceSetIds = $.resourceSetIds;
        this.resourceTags = $.resourceTags;
        this.resourceType = $.resourceType;
        this.resourceTypeLists = $.resourceTypeLists;
        this.securityServicePolicyData = $.securityServicePolicyData;
        this.tags = $.tags;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(PolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private PolicyArgs $;

        public Builder() {
            $ = new PolicyArgs();
        }

        public Builder(PolicyArgs defaults) {
            $ = new PolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param deleteAllPolicyResources 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)
         * 
         * @return builder
         * 
         */
        public Builder deleteAllPolicyResources(@Nullable Output deleteAllPolicyResources) {
            $.deleteAllPolicyResources = deleteAllPolicyResources;
            return this;
        }

        /**
         * @param deleteAllPolicyResources 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)
         * 
         * @return builder
         * 
         */
        public Builder deleteAllPolicyResources(Boolean deleteAllPolicyResources) {
            return deleteAllPolicyResources(Output.of(deleteAllPolicyResources));
        }

        /**
         * @param deleteUnusedFmManagedResources 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)
         * 
         * @return builder
         * 
         */
        public Builder deleteUnusedFmManagedResources(@Nullable Output deleteUnusedFmManagedResources) {
            $.deleteUnusedFmManagedResources = deleteUnusedFmManagedResources;
            return this;
        }

        /**
         * @param deleteUnusedFmManagedResources 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)
         * 
         * @return builder
         * 
         */
        public Builder deleteUnusedFmManagedResources(Boolean deleteUnusedFmManagedResources) {
            return deleteUnusedFmManagedResources(Output.of(deleteUnusedFmManagedResources));
        }

        /**
         * @param description The description of the AWS Network Firewall firewall policy.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description The description of the AWS Network Firewall firewall policy.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param excludeMap A map of lists of accounts and OU's to exclude from the policy.
         * 
         * @return builder
         * 
         */
        public Builder excludeMap(@Nullable Output excludeMap) {
            $.excludeMap = excludeMap;
            return this;
        }

        /**
         * @param excludeMap A map of lists of accounts and OU's to exclude from the policy.
         * 
         * @return builder
         * 
         */
        public Builder excludeMap(PolicyExcludeMapArgs excludeMap) {
            return excludeMap(Output.of(excludeMap));
        }

        /**
         * @param excludeResourceTags A boolean value, if true the tags that are specified in the `resource_tags` are not protected by this policy. If set to false and resource_tags are populated, resources that contain tags will be protected by this policy.
         * 
         * @return builder
         * 
         */
        public Builder excludeResourceTags(Output excludeResourceTags) {
            $.excludeResourceTags = excludeResourceTags;
            return this;
        }

        /**
         * @param excludeResourceTags A boolean value, if true the tags that are specified in the `resource_tags` are not protected by this policy. If set to false and resource_tags are populated, resources that contain tags will be protected by this policy.
         * 
         * @return builder
         * 
         */
        public Builder excludeResourceTags(Boolean excludeResourceTags) {
            return excludeResourceTags(Output.of(excludeResourceTags));
        }

        /**
         * @param includeMap A map of lists of accounts and OU's to include in the policy.
         * 
         * @return builder
         * 
         */
        public Builder includeMap(@Nullable Output includeMap) {
            $.includeMap = includeMap;
            return this;
        }

        /**
         * @param includeMap A map of lists of accounts and OU's to include in the policy.
         * 
         * @return builder
         * 
         */
        public Builder includeMap(PolicyIncludeMapArgs includeMap) {
            return includeMap(Output.of(includeMap));
        }

        /**
         * @param name The friendly name of the AWS Firewall Manager Policy.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The friendly name of the AWS Firewall Manager Policy.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param remediationEnabled A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
         * 
         * @return builder
         * 
         */
        public Builder remediationEnabled(@Nullable Output remediationEnabled) {
            $.remediationEnabled = remediationEnabled;
            return this;
        }

        /**
         * @param remediationEnabled A boolean value, indicates if the policy should automatically applied to resources that already exist in the account.
         * 
         * @return builder
         * 
         */
        public Builder remediationEnabled(Boolean remediationEnabled) {
            return remediationEnabled(Output.of(remediationEnabled));
        }

        public Builder resourceSetIds(@Nullable Output> resourceSetIds) {
            $.resourceSetIds = resourceSetIds;
            return this;
        }

        public Builder resourceSetIds(List resourceSetIds) {
            return resourceSetIds(Output.of(resourceSetIds));
        }

        public Builder resourceSetIds(String... resourceSetIds) {
            return resourceSetIds(List.of(resourceSetIds));
        }

        /**
         * @param resourceTags A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
         * 
         * @return builder
         * 
         */
        public Builder resourceTags(@Nullable Output> resourceTags) {
            $.resourceTags = resourceTags;
            return this;
        }

        /**
         * @param resourceTags A map of resource tags, that if present will filter protections on resources based on the exclude_resource_tags.
         * 
         * @return builder
         * 
         */
        public Builder resourceTags(Map resourceTags) {
            return resourceTags(Output.of(resourceTags));
        }

        /**
         * @param resourceType A resource type to protect. Conflicts with `resource_type_list`. 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.
         * 
         * @return builder
         * 
         */
        public Builder resourceType(@Nullable Output resourceType) {
            $.resourceType = resourceType;
            return this;
        }

        /**
         * @param resourceType A resource type to protect. Conflicts with `resource_type_list`. 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.
         * 
         * @return builder
         * 
         */
        public Builder resourceType(String resourceType) {
            return resourceType(Output.of(resourceType));
        }

        /**
         * @param resourceTypeLists A list of resource types to protect. Conflicts with `resource_type`. 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 `resource_type`.
         * 
         * @return builder
         * 
         */
        public Builder resourceTypeLists(@Nullable Output> resourceTypeLists) {
            $.resourceTypeLists = resourceTypeLists;
            return this;
        }

        /**
         * @param resourceTypeLists A list of resource types to protect. Conflicts with `resource_type`. 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 `resource_type`.
         * 
         * @return builder
         * 
         */
        public Builder resourceTypeLists(List resourceTypeLists) {
            return resourceTypeLists(Output.of(resourceTypeLists));
        }

        /**
         * @param resourceTypeLists A list of resource types to protect. Conflicts with `resource_type`. 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 `resource_type`.
         * 
         * @return builder
         * 
         */
        public Builder resourceTypeLists(String... resourceTypeLists) {
            return resourceTypeLists(List.of(resourceTypeLists));
        }

        /**
         * @param securityServicePolicyData The objects to include in Security Service Policy Data. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder securityServicePolicyData(Output securityServicePolicyData) {
            $.securityServicePolicyData = securityServicePolicyData;
            return this;
        }

        /**
         * @param securityServicePolicyData The objects to include in Security Service Policy Data. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder securityServicePolicyData(PolicySecurityServicePolicyDataArgs securityServicePolicyData) {
            return securityServicePolicyData(Output.of(securityServicePolicyData));
        }

        /**
         * @param tags Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public PolicyArgs build() {
            if ($.excludeResourceTags == null) {
                throw new MissingRequiredPropertyException("PolicyArgs", "excludeResourceTags");
            }
            if ($.securityServicePolicyData == null) {
                throw new MissingRequiredPropertyException("PolicyArgs", "securityServicePolicyData");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy