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

com.pulumi.azure.mssql.ServerExtendedAuditingPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 ServerExtendedAuditingPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerExtendedAuditingPolicyArgs Empty = new ServerExtendedAuditingPolicyArgs();

    /**
     * A list of Actions-Groups and Actions to audit.
     * 
     */
    @Import(name="auditActionsAndGroups")
    private @Nullable Output> auditActionsAndGroups;

    /**
     * @return A list of Actions-Groups and Actions to audit.
     * 
     */
    public Optional>> auditActionsAndGroups() {
        return Optional.ofNullable(this.auditActionsAndGroups);
    }

    /**
     * Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
     * 
     * ->**NOTE:**  If `enabled` is `true`, `storage_endpoint` or `log_monitoring_enabled` are required.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
     * 
     * ->**NOTE:**  If `enabled` is `true`, `storage_endpoint` or `log_monitoring_enabled` are required.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
     * 
     */
    @Import(name="logMonitoringEnabled")
    private @Nullable Output logMonitoringEnabled;

    /**
     * @return Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
     * 
     */
    public Optional> logMonitoringEnabled() {
        return Optional.ofNullable(this.logMonitoringEnabled);
    }

    /**
     * Specifies condition of where clause when creating an audit.
     * 
     */
    @Import(name="predicateExpression")
    private @Nullable Output predicateExpression;

    /**
     * @return Specifies condition of where clause when creating an audit.
     * 
     */
    public Optional> predicateExpression() {
        return Optional.ofNullable(this.predicateExpression);
    }

    /**
     * The number of days to retain logs for in the storage account. Defaults to `0`.
     * 
     */
    @Import(name="retentionInDays")
    private @Nullable Output retentionInDays;

    /**
     * @return The number of days to retain logs for in the storage account. Defaults to `0`.
     * 
     */
    public Optional> retentionInDays() {
        return Optional.ofNullable(this.retentionInDays);
    }

    /**
     * The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="serverId", required=true)
    private Output serverId;

    /**
     * @return The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
     * 
     */
    public Output serverId() {
        return this.serverId;
    }

    /**
     * The access key to use for the auditing storage account.
     * 
     */
    @Import(name="storageAccountAccessKey")
    private @Nullable Output storageAccountAccessKey;

    /**
     * @return The access key to use for the auditing storage account.
     * 
     */
    public Optional> storageAccountAccessKey() {
        return Optional.ofNullable(this.storageAccountAccessKey);
    }

    /**
     * Is `storage_account_access_key` value the storage's secondary key?
     * 
     */
    @Import(name="storageAccountAccessKeyIsSecondary")
    private @Nullable Output storageAccountAccessKeyIsSecondary;

    /**
     * @return Is `storage_account_access_key` value the storage's secondary key?
     * 
     */
    public Optional> storageAccountAccessKeyIsSecondary() {
        return Optional.ofNullable(this.storageAccountAccessKeyIsSecondary);
    }

    /**
     * The ID of the Subscription containing the Storage Account.
     * 
     */
    @Import(name="storageAccountSubscriptionId")
    private @Nullable Output storageAccountSubscriptionId;

    /**
     * @return The ID of the Subscription containing the Storage Account.
     * 
     */
    public Optional> storageAccountSubscriptionId() {
        return Optional.ofNullable(this.storageAccountSubscriptionId);
    }

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

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

    private ServerExtendedAuditingPolicyArgs() {}

    private ServerExtendedAuditingPolicyArgs(ServerExtendedAuditingPolicyArgs $) {
        this.auditActionsAndGroups = $.auditActionsAndGroups;
        this.enabled = $.enabled;
        this.logMonitoringEnabled = $.logMonitoringEnabled;
        this.predicateExpression = $.predicateExpression;
        this.retentionInDays = $.retentionInDays;
        this.serverId = $.serverId;
        this.storageAccountAccessKey = $.storageAccountAccessKey;
        this.storageAccountAccessKeyIsSecondary = $.storageAccountAccessKeyIsSecondary;
        this.storageAccountSubscriptionId = $.storageAccountSubscriptionId;
        this.storageEndpoint = $.storageEndpoint;
    }

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

    public static final class Builder {
        private ServerExtendedAuditingPolicyArgs $;

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

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

        /**
         * @param auditActionsAndGroups A list of Actions-Groups and Actions to audit.
         * 
         * @return builder
         * 
         */
        public Builder auditActionsAndGroups(@Nullable Output> auditActionsAndGroups) {
            $.auditActionsAndGroups = auditActionsAndGroups;
            return this;
        }

        /**
         * @param auditActionsAndGroups A list of Actions-Groups and Actions to audit.
         * 
         * @return builder
         * 
         */
        public Builder auditActionsAndGroups(List auditActionsAndGroups) {
            return auditActionsAndGroups(Output.of(auditActionsAndGroups));
        }

        /**
         * @param auditActionsAndGroups A list of Actions-Groups and Actions to audit.
         * 
         * @return builder
         * 
         */
        public Builder auditActionsAndGroups(String... auditActionsAndGroups) {
            return auditActionsAndGroups(List.of(auditActionsAndGroups));
        }

        /**
         * @param enabled Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
         * 
         * ->**NOTE:**  If `enabled` is `true`, `storage_endpoint` or `log_monitoring_enabled` are required.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
         * 
         * ->**NOTE:**  If `enabled` is `true`, `storage_endpoint` or `log_monitoring_enabled` are required.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param logMonitoringEnabled Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder logMonitoringEnabled(@Nullable Output logMonitoringEnabled) {
            $.logMonitoringEnabled = logMonitoringEnabled;
            return this;
        }

        /**
         * @param logMonitoringEnabled Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder logMonitoringEnabled(Boolean logMonitoringEnabled) {
            return logMonitoringEnabled(Output.of(logMonitoringEnabled));
        }

        /**
         * @param predicateExpression Specifies condition of where clause when creating an audit.
         * 
         * @return builder
         * 
         */
        public Builder predicateExpression(@Nullable Output predicateExpression) {
            $.predicateExpression = predicateExpression;
            return this;
        }

        /**
         * @param predicateExpression Specifies condition of where clause when creating an audit.
         * 
         * @return builder
         * 
         */
        public Builder predicateExpression(String predicateExpression) {
            return predicateExpression(Output.of(predicateExpression));
        }

        /**
         * @param retentionInDays The number of days to retain logs for in the storage account. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder retentionInDays(@Nullable Output retentionInDays) {
            $.retentionInDays = retentionInDays;
            return this;
        }

        /**
         * @param retentionInDays The number of days to retain logs for in the storage account. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder retentionInDays(Integer retentionInDays) {
            return retentionInDays(Output.of(retentionInDays));
        }

        /**
         * @param serverId The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverId(Output serverId) {
            $.serverId = serverId;
            return this;
        }

        /**
         * @param serverId The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverId(String serverId) {
            return serverId(Output.of(serverId));
        }

        /**
         * @param storageAccountAccessKey The access key to use for the auditing storage account.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(@Nullable Output storageAccountAccessKey) {
            $.storageAccountAccessKey = storageAccountAccessKey;
            return this;
        }

        /**
         * @param storageAccountAccessKey The access key to use for the auditing storage account.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(String storageAccountAccessKey) {
            return storageAccountAccessKey(Output.of(storageAccountAccessKey));
        }

        /**
         * @param storageAccountAccessKeyIsSecondary Is `storage_account_access_key` value the storage's secondary key?
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKeyIsSecondary(@Nullable Output storageAccountAccessKeyIsSecondary) {
            $.storageAccountAccessKeyIsSecondary = storageAccountAccessKeyIsSecondary;
            return this;
        }

        /**
         * @param storageAccountAccessKeyIsSecondary Is `storage_account_access_key` value the storage's secondary key?
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKeyIsSecondary(Boolean storageAccountAccessKeyIsSecondary) {
            return storageAccountAccessKeyIsSecondary(Output.of(storageAccountAccessKeyIsSecondary));
        }

        /**
         * @param storageAccountSubscriptionId The ID of the Subscription containing the Storage Account.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountSubscriptionId(@Nullable Output storageAccountSubscriptionId) {
            $.storageAccountSubscriptionId = storageAccountSubscriptionId;
            return this;
        }

        /**
         * @param storageAccountSubscriptionId The ID of the Subscription containing the Storage Account.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountSubscriptionId(String storageAccountSubscriptionId) {
            return storageAccountSubscriptionId(Output.of(storageAccountSubscriptionId));
        }

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

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

        public ServerExtendedAuditingPolicyArgs build() {
            if ($.serverId == null) {
                throw new MissingRequiredPropertyException("ServerExtendedAuditingPolicyArgs", "serverId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy