![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.cloudflare.kotlin.LogpushJob.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.kotlin.outputs.LogpushJobOutputOptions
import com.pulumi.cloudflare.kotlin.outputs.LogpushJobOutputOptions.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [LogpushJob].
*/
@PulumiTagMarker
public class LogpushJobResourceBuilder internal constructor() {
public var name: String? = null
public var args: LogpushJobArgs = LogpushJobArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend LogpushJobArgsBuilder.() -> Unit) {
val builder = LogpushJobArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): LogpushJob {
val builtJavaResource = com.pulumi.cloudflare.LogpushJob(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LogpushJob(builtJavaResource)
}
}
/**
* ## 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//
* ```
*/
public class LogpushJob internal constructor(
override val javaResource: com.pulumi.cloudflare.LogpushJob,
) : KotlinCustomResource(javaResource, LogpushJobMapper) {
/**
* The account identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
*/
public val accountId: Output?
get() = javaResource.accountId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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`.
*/
public val dataset: Output
get() = javaResource.dataset().applyValue({ args0 -> args0 })
/**
* 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).
*/
public val destinationConf: Output
get() = javaResource.destinationConf().applyValue({ args0 -> args0 })
/**
* Whether to enable the job.
*/
public val enabled: Output?
get() = javaResource.enabled().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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/).
*/
public val filter: Output?
get() = javaResource.filter().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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.
""",
)
public val frequency: Output?
get() = javaResource.frequency().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The kind of logpush job to create. Available values: `edge`, `instant-logs`, `""`.
*/
public val kind: Output?
get() = javaResource.kind().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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).
*/
public val logpullOptions: Output?
get() = javaResource.logpullOptions().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The maximum uncompressed file size of a batch of logs. Value must be between 5MB and 1GB.
*/
public val maxUploadBytes: Output?
get() = javaResource.maxUploadBytes().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The maximum interval in seconds for log batches. Value must be between 30 and 300.
*/
public val maxUploadIntervalSeconds: Output?
get() = javaResource.maxUploadIntervalSeconds().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The maximum number of log lines per batch. Value must be between 1000 and 1,000,000.
*/
public val maxUploadRecords: Output?
get() = javaResource.maxUploadRecords().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the logpush job to create.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Structured replacement for logpull*options. When including this field, the logpull*option field will be ignored.
*/
public val outputOptions: Output?
get() = javaResource.outputOptions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
}).orElse(null)
})
/**
* 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).
*/
public val ownershipChallenge: Output?
get() = javaResource.ownershipChallenge().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The zone identifier to target for the resource. Must provide only one of `account_id`, `zone_id`.
*/
public val zoneId: Output?
get() = javaResource.zoneId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object LogpushJobMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.LogpushJob::class == javaResource::class
override fun map(javaResource: Resource): LogpushJob = LogpushJob(
javaResource as
com.pulumi.cloudflare.LogpushJob,
)
}
/**
* @see [LogpushJob].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LogpushJob].
*/
public suspend fun logpushJob(name: String, block: suspend LogpushJobResourceBuilder.() -> Unit): LogpushJob {
val builder = LogpushJobResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LogpushJob].
* @param name The _unique_ name of the resulting resource.
*/
public fun logpushJob(name: String): LogpushJob {
val builder = LogpushJobResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy