com.pulumi.cloudflare.kotlin.ProviderArgs.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.ProviderArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* The provider type for the cloudflare package. By default, resources use package-wide configuration
* settings, however an explicit `Provider` instance may be created and passed during resource
* construction to achieve fine-grained programmatic control over provider settings. See the
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
* @property apiBasePath Configure the base path used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_BASE_PATH`
* environment variable.
* @property apiClientLogging Whether to print logs from the API client (using the default log library logger). Alternatively, can be configured using
* the `CLOUDFLARE_API_CLIENT_LOGGING` environment variable.
* @property apiHostname Configure the hostname used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_HOSTNAME`
* environment variable.
* @property apiKey The API key for operations. Alternatively, can be configured using the `CLOUDFLARE_API_KEY` environment variable. API
* keys are [now considered legacy by
* Cloudflare](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations), API tokens should be used
* instead. Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
* @property apiToken The API Token for operations. Alternatively, can be configured using the `CLOUDFLARE_API_TOKEN` environment variable.
* Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
* @property apiUserServiceKey A special Cloudflare API key good for a restricted set of endpoints. Alternatively, can be configured using the
* `CLOUDFLARE_API_USER_SERVICE_KEY` environment variable. Must provide only one of `api_key`, `api_token`,
* `api_user_service_key`.
* @property email A registered Cloudflare email address. Alternatively, can be configured using the `CLOUDFLARE_EMAIL` environment
* variable. Required when using `api_key`. Conflicts with `api_token`.
* @property maxBackoff Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MAX_BACKOFF` environment variable.
* @property minBackoff Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MIN_BACKOFF` environment variable.
* @property retries Maximum number of retries to perform when an API request fails. Alternatively, can be configured using the
* `CLOUDFLARE_RETRIES` environment variable.
* @property rps RPS limit to apply when making calls to the API. Alternatively, can be configured using the `CLOUDFLARE_RPS` environment
* variable.
* @property userAgentOperatorSuffix
*/
public data class ProviderArgs(
public val apiBasePath: Output? = null,
public val apiClientLogging: Output? = null,
public val apiHostname: Output? = null,
public val apiKey: Output? = null,
public val apiToken: Output? = null,
public val apiUserServiceKey: Output? = null,
public val email: Output? = null,
public val maxBackoff: Output? = null,
public val minBackoff: Output? = null,
public val retries: Output? = null,
public val rps: Output? = null,
public val userAgentOperatorSuffix: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ProviderArgs =
com.pulumi.cloudflare.ProviderArgs.builder()
.apiBasePath(apiBasePath?.applyValue({ args0 -> args0 }))
.apiClientLogging(apiClientLogging?.applyValue({ args0 -> args0 }))
.apiHostname(apiHostname?.applyValue({ args0 -> args0 }))
.apiKey(apiKey?.applyValue({ args0 -> args0 }))
.apiToken(apiToken?.applyValue({ args0 -> args0 }))
.apiUserServiceKey(apiUserServiceKey?.applyValue({ args0 -> args0 }))
.email(email?.applyValue({ args0 -> args0 }))
.maxBackoff(maxBackoff?.applyValue({ args0 -> args0 }))
.minBackoff(minBackoff?.applyValue({ args0 -> args0 }))
.retries(retries?.applyValue({ args0 -> args0 }))
.rps(rps?.applyValue({ args0 -> args0 }))
.userAgentOperatorSuffix(userAgentOperatorSuffix?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ProviderArgs].
*/
@PulumiTagMarker
public class ProviderArgsBuilder internal constructor() {
private var apiBasePath: Output? = null
private var apiClientLogging: Output? = null
private var apiHostname: Output? = null
private var apiKey: Output? = null
private var apiToken: Output? = null
private var apiUserServiceKey: Output? = null
private var email: Output? = null
private var maxBackoff: Output? = null
private var minBackoff: Output? = null
private var retries: Output? = null
private var rps: Output? = null
private var userAgentOperatorSuffix: Output? = null
/**
* @param value Configure the base path used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_BASE_PATH`
* environment variable.
*/
@JvmName("jurwbvwuhuijevij")
public suspend fun apiBasePath(`value`: Output) {
this.apiBasePath = value
}
/**
* @param value Whether to print logs from the API client (using the default log library logger). Alternatively, can be configured using
* the `CLOUDFLARE_API_CLIENT_LOGGING` environment variable.
*/
@JvmName("sijydchdunlptepj")
public suspend fun apiClientLogging(`value`: Output) {
this.apiClientLogging = value
}
/**
* @param value Configure the hostname used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_HOSTNAME`
* environment variable.
*/
@JvmName("xwxmcpglvnjcmqcp")
public suspend fun apiHostname(`value`: Output) {
this.apiHostname = value
}
/**
* @param value The API key for operations. Alternatively, can be configured using the `CLOUDFLARE_API_KEY` environment variable. API
* keys are [now considered legacy by
* Cloudflare](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations), API tokens should be used
* instead. Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
*/
@JvmName("iuljovyrqtbliwmg")
public suspend fun apiKey(`value`: Output) {
this.apiKey = value
}
/**
* @param value The API Token for operations. Alternatively, can be configured using the `CLOUDFLARE_API_TOKEN` environment variable.
* Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
*/
@JvmName("lylfufypslrmnpes")
public suspend fun apiToken(`value`: Output) {
this.apiToken = value
}
/**
* @param value A special Cloudflare API key good for a restricted set of endpoints. Alternatively, can be configured using the
* `CLOUDFLARE_API_USER_SERVICE_KEY` environment variable. Must provide only one of `api_key`, `api_token`,
* `api_user_service_key`.
*/
@JvmName("arcsewvcrddkamge")
public suspend fun apiUserServiceKey(`value`: Output) {
this.apiUserServiceKey = value
}
/**
* @param value A registered Cloudflare email address. Alternatively, can be configured using the `CLOUDFLARE_EMAIL` environment
* variable. Required when using `api_key`. Conflicts with `api_token`.
*/
@JvmName("gsioppevbtabuvrq")
public suspend fun email(`value`: Output) {
this.email = value
}
/**
* @param value Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MAX_BACKOFF` environment variable.
*/
@JvmName("qyaxtfsqmhcfrpas")
public suspend fun maxBackoff(`value`: Output) {
this.maxBackoff = value
}
/**
* @param value Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MIN_BACKOFF` environment variable.
*/
@JvmName("vlohkkavnbsjnnip")
public suspend fun minBackoff(`value`: Output) {
this.minBackoff = value
}
/**
* @param value Maximum number of retries to perform when an API request fails. Alternatively, can be configured using the
* `CLOUDFLARE_RETRIES` environment variable.
*/
@JvmName("rcwmjakrxdoljeop")
public suspend fun retries(`value`: Output) {
this.retries = value
}
/**
* @param value RPS limit to apply when making calls to the API. Alternatively, can be configured using the `CLOUDFLARE_RPS` environment
* variable.
*/
@JvmName("ubxcaanlxprwtwns")
public suspend fun rps(`value`: Output) {
this.rps = value
}
/**
* @param value
*/
@JvmName("kdnjqaakhmjtkuyo")
public suspend fun userAgentOperatorSuffix(`value`: Output) {
this.userAgentOperatorSuffix = value
}
/**
* @param value Configure the base path used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_BASE_PATH`
* environment variable.
*/
@JvmName("yhgsyvdavmgnbgsv")
public suspend fun apiBasePath(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiBasePath = mapped
}
/**
* @param value Whether to print logs from the API client (using the default log library logger). Alternatively, can be configured using
* the `CLOUDFLARE_API_CLIENT_LOGGING` environment variable.
*/
@JvmName("hjnxhrkcnmryifeo")
public suspend fun apiClientLogging(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiClientLogging = mapped
}
/**
* @param value Configure the hostname used by the API client. Alternatively, can be configured using the `CLOUDFLARE_API_HOSTNAME`
* environment variable.
*/
@JvmName("ulslmykpswtwlfyf")
public suspend fun apiHostname(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiHostname = mapped
}
/**
* @param value The API key for operations. Alternatively, can be configured using the `CLOUDFLARE_API_KEY` environment variable. API
* keys are [now considered legacy by
* Cloudflare](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations), API tokens should be used
* instead. Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
*/
@JvmName("mhfuqbwvymkjgwbs")
public suspend fun apiKey(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiKey = mapped
}
/**
* @param value The API Token for operations. Alternatively, can be configured using the `CLOUDFLARE_API_TOKEN` environment variable.
* Must provide only one of `api_key`, `api_token`, `api_user_service_key`.
*/
@JvmName("carlgbfisdcjukse")
public suspend fun apiToken(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiToken = mapped
}
/**
* @param value A special Cloudflare API key good for a restricted set of endpoints. Alternatively, can be configured using the
* `CLOUDFLARE_API_USER_SERVICE_KEY` environment variable. Must provide only one of `api_key`, `api_token`,
* `api_user_service_key`.
*/
@JvmName("breuodxlqqeuyolo")
public suspend fun apiUserServiceKey(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiUserServiceKey = mapped
}
/**
* @param value A registered Cloudflare email address. Alternatively, can be configured using the `CLOUDFLARE_EMAIL` environment
* variable. Required when using `api_key`. Conflicts with `api_token`.
*/
@JvmName("rjalprdkebgoujrr")
public suspend fun email(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.email = mapped
}
/**
* @param value Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MAX_BACKOFF` environment variable.
*/
@JvmName("tfmltyullysttodi")
public suspend fun maxBackoff(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxBackoff = mapped
}
/**
* @param value Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using the
* `CLOUDFLARE_MIN_BACKOFF` environment variable.
*/
@JvmName("ukggquhivxelwfiy")
public suspend fun minBackoff(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minBackoff = mapped
}
/**
* @param value Maximum number of retries to perform when an API request fails. Alternatively, can be configured using the
* `CLOUDFLARE_RETRIES` environment variable.
*/
@JvmName("akxbkkpnuxhuxoid")
public suspend fun retries(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.retries = mapped
}
/**
* @param value RPS limit to apply when making calls to the API. Alternatively, can be configured using the `CLOUDFLARE_RPS` environment
* variable.
*/
@JvmName("xkmljoaibkpcfsri")
public suspend fun rps(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rps = mapped
}
/**
* @param value
*/
@JvmName("mcmvparrbmimmtxr")
public suspend fun userAgentOperatorSuffix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userAgentOperatorSuffix = mapped
}
internal fun build(): ProviderArgs = ProviderArgs(
apiBasePath = apiBasePath,
apiClientLogging = apiClientLogging,
apiHostname = apiHostname,
apiKey = apiKey,
apiToken = apiToken,
apiUserServiceKey = apiUserServiceKey,
email = email,
maxBackoff = maxBackoff,
minBackoff = minBackoff,
retries = retries,
rps = rps,
userAgentOperatorSuffix = userAgentOperatorSuffix,
)
}