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

com.pulumi.azure.mssql.inputs.ServerSecurityAlertPolicyState 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.azure.mssql.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServerSecurityAlertPolicyState Empty = new ServerSecurityAlertPolicyState();

    /**
     * Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
     * 
     */
    @Import(name="disabledAlerts")
    private @Nullable Output> disabledAlerts;

    /**
     * @return Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
     * 
     */
    public Optional>> disabledAlerts() {
        return Optional.ofNullable(this.disabledAlerts);
    }

    /**
     * Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
     * 
     */
    @Import(name="emailAccountAdmins")
    private @Nullable Output emailAccountAdmins;

    /**
     * @return Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
     * 
     */
    public Optional> emailAccountAdmins() {
        return Optional.ofNullable(this.emailAccountAdmins);
    }

    /**
     * Specifies an array of email addresses to which the alert is sent.
     * 
     */
    @Import(name="emailAddresses")
    private @Nullable Output> emailAddresses;

    /**
     * @return Specifies an array of email addresses to which the alert is sent.
     * 
     */
    public Optional>> emailAddresses() {
        return Optional.ofNullable(this.emailAddresses);
    }

    /**
     * The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output resourceGroupName;

    /**
     * @return The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    public Optional> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
     * 
     */
    @Import(name="retentionDays")
    private @Nullable Output retentionDays;

    /**
     * @return Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
     * 
     */
    public Optional> retentionDays() {
        return Optional.ofNullable(this.retentionDays);
    }

    /**
     * Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="serverName")
    private @Nullable Output serverName;

    /**
     * @return Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    public Optional> serverName() {
        return Optional.ofNullable(this.serverName);
    }

    /**
     * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are `Disabled`, `Enabled` and `New`.
     * 
     */
    @Import(name="state")
    private @Nullable Output state;

    /**
     * @return Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are `Disabled`, `Enabled` and `New`.
     * 
     */
    public Optional> state() {
        return Optional.ofNullable(this.state);
    }

    /**
     * Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storage_endpoint` to specify a storage account blob endpoint.
     * 
     * > **NOTE:**  Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `azure.mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now.
     * 
     */
    @Import(name="storageAccountAccessKey")
    private @Nullable Output storageAccountAccessKey;

    /**
     * @return Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storage_endpoint` to specify a storage account blob endpoint.
     * 
     * > **NOTE:**  Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `azure.mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now.
     * 
     */
    public Optional> storageAccountAccessKey() {
        return Optional.ofNullable(this.storageAccountAccessKey);
    }

    /**
     * Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs.
     * 
     */
    @Import(name="storageEndpoint")
    private @Nullable Output storageEndpoint;

    /**
     * @return Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs.
     * 
     */
    public Optional> storageEndpoint() {
        return Optional.ofNullable(this.storageEndpoint);
    }

    private ServerSecurityAlertPolicyState() {}

    private ServerSecurityAlertPolicyState(ServerSecurityAlertPolicyState $) {
        this.disabledAlerts = $.disabledAlerts;
        this.emailAccountAdmins = $.emailAccountAdmins;
        this.emailAddresses = $.emailAddresses;
        this.resourceGroupName = $.resourceGroupName;
        this.retentionDays = $.retentionDays;
        this.serverName = $.serverName;
        this.state = $.state;
        this.storageAccountAccessKey = $.storageAccountAccessKey;
        this.storageEndpoint = $.storageEndpoint;
    }

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

    public static final class Builder {
        private ServerSecurityAlertPolicyState $;

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

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

        /**
         * @param disabledAlerts Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
         * 
         * @return builder
         * 
         */
        public Builder disabledAlerts(@Nullable Output> disabledAlerts) {
            $.disabledAlerts = disabledAlerts;
            return this;
        }

        /**
         * @param disabledAlerts Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
         * 
         * @return builder
         * 
         */
        public Builder disabledAlerts(List disabledAlerts) {
            return disabledAlerts(Output.of(disabledAlerts));
        }

        /**
         * @param disabledAlerts Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
         * 
         * @return builder
         * 
         */
        public Builder disabledAlerts(String... disabledAlerts) {
            return disabledAlerts(List.of(disabledAlerts));
        }

        /**
         * @param emailAccountAdmins Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder emailAccountAdmins(@Nullable Output emailAccountAdmins) {
            $.emailAccountAdmins = emailAccountAdmins;
            return this;
        }

        /**
         * @param emailAccountAdmins Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder emailAccountAdmins(Boolean emailAccountAdmins) {
            return emailAccountAdmins(Output.of(emailAccountAdmins));
        }

        /**
         * @param emailAddresses Specifies an array of email addresses to which the alert is sent.
         * 
         * @return builder
         * 
         */
        public Builder emailAddresses(@Nullable Output> emailAddresses) {
            $.emailAddresses = emailAddresses;
            return this;
        }

        /**
         * @param emailAddresses Specifies an array of email addresses to which the alert is sent.
         * 
         * @return builder
         * 
         */
        public Builder emailAddresses(List emailAddresses) {
            return emailAddresses(Output.of(emailAddresses));
        }

        /**
         * @param emailAddresses Specifies an array of email addresses to which the alert is sent.
         * 
         * @return builder
         * 
         */
        public Builder emailAddresses(String... emailAddresses) {
            return emailAddresses(List.of(emailAddresses));
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(@Nullable Output retentionDays) {
            $.retentionDays = retentionDays;
            return this;
        }

        /**
         * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(Integer retentionDays) {
            return retentionDays(Output.of(retentionDays));
        }

        /**
         * @param serverName Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverName(@Nullable Output serverName) {
            $.serverName = serverName;
            return this;
        }

        /**
         * @param serverName Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverName(String serverName) {
            return serverName(Output.of(serverName));
        }

        /**
         * @param state Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are `Disabled`, `Enabled` and `New`.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output state) {
            $.state = state;
            return this;
        }

        /**
         * @param state Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are `Disabled`, `Enabled` and `New`.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Output.of(state));
        }

        /**
         * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storage_endpoint` to specify a storage account blob endpoint.
         * 
         * > **NOTE:**  Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `azure.mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(@Nullable Output storageAccountAccessKey) {
            $.storageAccountAccessKey = storageAccountAccessKey;
            return this;
        }

        /**
         * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storage_endpoint` to specify a storage account blob endpoint.
         * 
         * > **NOTE:**  Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `azure.mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(String storageAccountAccessKey) {
            return storageAccountAccessKey(Output.of(storageAccountAccessKey));
        }

        /**
         * @param storageEndpoint Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs.
         * 
         * @return builder
         * 
         */
        public Builder storageEndpoint(@Nullable Output storageEndpoint) {
            $.storageEndpoint = storageEndpoint;
            return this;
        }

        /**
         * @param storageEndpoint Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs.
         * 
         * @return builder
         * 
         */
        public Builder storageEndpoint(String storageEndpoint) {
            return storageEndpoint(Output.of(storageEndpoint));
        }

        public ServerSecurityAlertPolicyState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy