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

com.pulumi.cloudflare.kotlin.LogpushJobArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.LogpushJobArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.LogpushJobOutputOptionsArgs
import com.pulumi.cloudflare.kotlin.inputs.LogpushJobOutputOptionsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ## Import
 * Import an account-scoped job.
 * ```sh
 * $ pulumi import cloudflare:index/logpushJob:LogpushJob example account//
 * ```
 * Import a zone-scoped job.
 * ```sh
 * $ pulumi import cloudflare:index/logpushJob:LogpushJob example zone//
 * ```
 * @property accountId The account identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
 * @property dataset The kind of the dataset to use with the logpush job. Available values: `access_requests`, `casb_findings`, `firewall_events`, `http_requests`, `spectrum_events`, `nel_reports`, `audit_logs`, `gateway_dns`, `gateway_http`, `gateway_network`, `dns_logs`, `network_analytics_logs`, `workers_trace_events`, `device_posture_results`, `zero_trust_network_sessions`, `magic_ids_detections`, `page_shield_events`.
 * @property destinationConf Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination).
 * @property enabled Whether to enable the job.
 * @property filter Use filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/logpush-api-configuration/filters/).
 * @property frequency A higher frequency will result in logs being pushed on faster with smaller files. `low` frequency will push logs less often with larger files. Available values: `high`, `low`. Defaults to `high`.
 * @property kind The kind of logpush job to create. Available values: `edge`, `instant-logs`, `""`.
 * @property logpullOptions Configuration string for the Logshare API. It specifies things like requested fields and timestamp formats. See [Logpush options documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#options).
 * @property maxUploadBytes The maximum uncompressed file size of a batch of logs. Value must be between 5MB and 1GB.
 * @property maxUploadIntervalSeconds The maximum interval in seconds for log batches. Value must be between 30 and 300.
 * @property maxUploadRecords The maximum number of log lines per batch. Value must be between 1000 and 1,000,000.
 * @property name The name of the logpush job to create.
 * @property outputOptions Structured replacement for logpull*options. When including this field, the logpull*option field will be ignored.
 * @property ownershipChallenge Ownership challenge token to prove destination ownership, required when destination is Amazon S3, Google Cloud Storage, Microsoft Azure or Sumo Logic. See [Developer documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#usage).
 * @property zoneId The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
 */
public data class LogpushJobArgs(
    public val accountId: Output? = null,
    public val dataset: Output? = null,
    public val destinationConf: Output? = null,
    public val enabled: Output? = null,
    public val filter: Output? = null,
    @Deprecated(
        message = """
  `frequency` has been deprecated in favour of using `max_upload_interval_seconds` instead.
  """,
    )
    public val frequency: Output? = null,
    public val kind: Output? = null,
    public val logpullOptions: Output? = null,
    public val maxUploadBytes: Output? = null,
    public val maxUploadIntervalSeconds: Output? = null,
    public val maxUploadRecords: Output? = null,
    public val name: Output? = null,
    public val outputOptions: Output? = null,
    public val ownershipChallenge: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.LogpushJobArgs =
        com.pulumi.cloudflare.LogpushJobArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .dataset(dataset?.applyValue({ args0 -> args0 }))
            .destinationConf(destinationConf?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .filter(filter?.applyValue({ args0 -> args0 }))
            .frequency(frequency?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .logpullOptions(logpullOptions?.applyValue({ args0 -> args0 }))
            .maxUploadBytes(maxUploadBytes?.applyValue({ args0 -> args0 }))
            .maxUploadIntervalSeconds(maxUploadIntervalSeconds?.applyValue({ args0 -> args0 }))
            .maxUploadRecords(maxUploadRecords?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .outputOptions(outputOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ownershipChallenge(ownershipChallenge?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LogpushJobArgs].
 */
@PulumiTagMarker
public class LogpushJobArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var dataset: Output? = null

    private var destinationConf: Output? = null

    private var enabled: Output? = null

    private var filter: Output? = null

    private var frequency: Output? = null

    private var kind: Output? = null

    private var logpullOptions: Output? = null

    private var maxUploadBytes: Output? = null

    private var maxUploadIntervalSeconds: Output? = null

    private var maxUploadRecords: Output? = null

    private var name: Output? = null

    private var outputOptions: Output? = null

    private var ownershipChallenge: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value The account identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
     */
    @JvmName("bpmednwcrjxltxar")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value The kind of the dataset to use with the logpush job. Available values: `access_requests`, `casb_findings`, `firewall_events`, `http_requests`, `spectrum_events`, `nel_reports`, `audit_logs`, `gateway_dns`, `gateway_http`, `gateway_network`, `dns_logs`, `network_analytics_logs`, `workers_trace_events`, `device_posture_results`, `zero_trust_network_sessions`, `magic_ids_detections`, `page_shield_events`.
     */
    @JvmName("eihgohoyaasyernp")
    public suspend fun dataset(`value`: Output) {
        this.dataset = value
    }

    /**
     * @param value Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination).
     */
    @JvmName("yyhstkaopyrqrgqe")
    public suspend fun destinationConf(`value`: Output) {
        this.destinationConf = value
    }

    /**
     * @param value Whether to enable the job.
     */
    @JvmName("wngbechjnwvxbfty")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Use filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/logpush-api-configuration/filters/).
     */
    @JvmName("jsyfnddocsxtsuuc")
    public suspend fun filter(`value`: Output) {
        this.filter = value
    }

    /**
     * @param value A higher frequency will result in logs being pushed on faster with smaller files. `low` frequency will push logs less often with larger files. Available values: `high`, `low`. Defaults to `high`.
     */
    @Deprecated(
        message = """
  `frequency` has been deprecated in favour of using `max_upload_interval_seconds` instead.
  """,
    )
    @JvmName("unkioqiglddkqteb")
    public suspend fun frequency(`value`: Output) {
        this.frequency = value
    }

    /**
     * @param value The kind of logpush job to create. Available values: `edge`, `instant-logs`, `""`.
     */
    @JvmName("slptmreelpqluohs")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Configuration string for the Logshare API. It specifies things like requested fields and timestamp formats. See [Logpush options documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#options).
     */
    @JvmName("jtyqumyarsnkqksd")
    public suspend fun logpullOptions(`value`: Output) {
        this.logpullOptions = value
    }

    /**
     * @param value The maximum uncompressed file size of a batch of logs. Value must be between 5MB and 1GB.
     */
    @JvmName("tmfavariahfdfgev")
    public suspend fun maxUploadBytes(`value`: Output) {
        this.maxUploadBytes = value
    }

    /**
     * @param value The maximum interval in seconds for log batches. Value must be between 30 and 300.
     */
    @JvmName("yyshjfdkbbbmcplq")
    public suspend fun maxUploadIntervalSeconds(`value`: Output) {
        this.maxUploadIntervalSeconds = value
    }

    /**
     * @param value The maximum number of log lines per batch. Value must be between 1000 and 1,000,000.
     */
    @JvmName("pvnlrjmstifobuki")
    public suspend fun maxUploadRecords(`value`: Output) {
        this.maxUploadRecords = value
    }

    /**
     * @param value The name of the logpush job to create.
     */
    @JvmName("bsmdrkukyyupyidv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Structured replacement for logpull*options. When including this field, the logpull*option field will be ignored.
     */
    @JvmName("yxvnyjrrcrfojuxj")
    public suspend fun outputOptions(`value`: Output) {
        this.outputOptions = value
    }

    /**
     * @param value Ownership challenge token to prove destination ownership, required when destination is Amazon S3, Google Cloud Storage, Microsoft Azure or Sumo Logic. See [Developer documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#usage).
     */
    @JvmName("rxednicyiiujpomi")
    public suspend fun ownershipChallenge(`value`: Output) {
        this.ownershipChallenge = value
    }

    /**
     * @param value The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
     */
    @JvmName("idennuencntohrvy")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value The account identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
     */
    @JvmName("vwbkxneinklrbrap")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value The kind of the dataset to use with the logpush job. Available values: `access_requests`, `casb_findings`, `firewall_events`, `http_requests`, `spectrum_events`, `nel_reports`, `audit_logs`, `gateway_dns`, `gateway_http`, `gateway_network`, `dns_logs`, `network_analytics_logs`, `workers_trace_events`, `device_posture_results`, `zero_trust_network_sessions`, `magic_ids_detections`, `page_shield_events`.
     */
    @JvmName("edqcofnnqrichntr")
    public suspend fun dataset(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataset = mapped
    }

    /**
     * @param value Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination).
     */
    @JvmName("olmamgfkbbgmudfx")
    public suspend fun destinationConf(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationConf = mapped
    }

    /**
     * @param value Whether to enable the job.
     */
    @JvmName("eokplkktckjqqojk")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Use filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/logpush-api-configuration/filters/).
     */
    @JvmName("lngosnldgxiniqpw")
    public suspend fun filter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filter = mapped
    }

    /**
     * @param value A higher frequency will result in logs being pushed on faster with smaller files. `low` frequency will push logs less often with larger files. Available values: `high`, `low`. Defaults to `high`.
     */
    @Deprecated(
        message = """
  `frequency` has been deprecated in favour of using `max_upload_interval_seconds` instead.
  """,
    )
    @JvmName("xpveopidiiqgahqj")
    public suspend fun frequency(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.frequency = mapped
    }

    /**
     * @param value The kind of logpush job to create. Available values: `edge`, `instant-logs`, `""`.
     */
    @JvmName("ixqupppucjrsorbx")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Configuration string for the Logshare API. It specifies things like requested fields and timestamp formats. See [Logpush options documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#options).
     */
    @JvmName("ingnvywuuhwbkhww")
    public suspend fun logpullOptions(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logpullOptions = mapped
    }

    /**
     * @param value The maximum uncompressed file size of a batch of logs. Value must be between 5MB and 1GB.
     */
    @JvmName("erfkoerqpfeniqim")
    public suspend fun maxUploadBytes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxUploadBytes = mapped
    }

    /**
     * @param value The maximum interval in seconds for log batches. Value must be between 30 and 300.
     */
    @JvmName("cdyixcadcsmslxcd")
    public suspend fun maxUploadIntervalSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxUploadIntervalSeconds = mapped
    }

    /**
     * @param value The maximum number of log lines per batch. Value must be between 1000 and 1,000,000.
     */
    @JvmName("wevopyhpvwlilwnv")
    public suspend fun maxUploadRecords(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxUploadRecords = mapped
    }

    /**
     * @param value The name of the logpush job to create.
     */
    @JvmName("kjrlbypbdxdsopng")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Structured replacement for logpull*options. When including this field, the logpull*option field will be ignored.
     */
    @JvmName("jylgslgjoetabkwj")
    public suspend fun outputOptions(`value`: LogpushJobOutputOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputOptions = mapped
    }

    /**
     * @param argument Structured replacement for logpull*options. When including this field, the logpull*option field will be ignored.
     */
    @JvmName("rdtrjnvhskilsrhl")
    public suspend fun outputOptions(argument: suspend LogpushJobOutputOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = LogpushJobOutputOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.outputOptions = mapped
    }

    /**
     * @param value Ownership challenge token to prove destination ownership, required when destination is Amazon S3, Google Cloud Storage, Microsoft Azure or Sumo Logic. See [Developer documentation](https://developers.cloudflare.com/logs/logpush/logpush-configuration-api/understanding-logpush-api/#usage).
     */
    @JvmName("otpvcjifuhtinogb")
    public suspend fun ownershipChallenge(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ownershipChallenge = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
     */
    @JvmName("yotqrsoivxejelop")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): LogpushJobArgs = LogpushJobArgs(
        accountId = accountId,
        dataset = dataset,
        destinationConf = destinationConf,
        enabled = enabled,
        filter = filter,
        frequency = frequency,
        kind = kind,
        logpullOptions = logpullOptions,
        maxUploadBytes = maxUploadBytes,
        maxUploadIntervalSeconds = maxUploadIntervalSeconds,
        maxUploadRecords = maxUploadRecords,
        name = name,
        outputOptions = outputOptions,
        ownershipChallenge = ownershipChallenge,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy