
com.pulumi.googlenative.logging.v2.kotlin.FolderBucket.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-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.googlenative.logging.v2.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.logging.v2.kotlin.outputs.CmekSettingsResponse
import com.pulumi.googlenative.logging.v2.kotlin.outputs.IndexConfigResponse
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.googlenative.logging.v2.kotlin.outputs.CmekSettingsResponse.Companion.toKotlin as cmekSettingsResponseToKotlin
import com.pulumi.googlenative.logging.v2.kotlin.outputs.IndexConfigResponse.Companion.toKotlin as indexConfigResponseToKotlin
/**
* Builder for [FolderBucket].
*/
@PulumiTagMarker
public class FolderBucketResourceBuilder internal constructor() {
public var name: String? = null
public var args: FolderBucketArgs = FolderBucketArgs()
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 FolderBucketArgsBuilder.() -> Unit) {
val builder = FolderBucketArgsBuilder()
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(): FolderBucket {
val builtJavaResource = com.pulumi.googlenative.logging.v2.FolderBucket(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FolderBucket(builtJavaResource)
}
}
/**
* Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
* Auto-naming is currently not supported for this resource.
*/
public class FolderBucket internal constructor(
override val javaResource: com.pulumi.googlenative.logging.v2.FolderBucket,
) : KotlinCustomResource(javaResource, FolderBucketMapper) {
/**
* Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled.
*/
public val analyticsEnabled: Output
get() = javaResource.analyticsEnabled().applyValue({ args0 -> args0 })
/**
* Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.
*/
public val bucketId: Output
get() = javaResource.bucketId().applyValue({ args0 -> args0 })
/**
* The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.
*/
public val cmekSettings: Output
get() = javaResource.cmekSettings().applyValue({ args0 ->
args0.let({ args0 ->
cmekSettingsResponseToKotlin(args0)
})
})
/**
* The creation timestamp of the bucket. This is not set for any of the default buckets.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* Describes this bucket.
*/
public val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
public val folderId: Output
get() = javaResource.folderId().applyValue({ args0 -> args0 })
/**
* A list of indexed fields and related configuration data.
*/
public val indexConfigs: Output>
get() = javaResource.indexConfigs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
indexConfigResponseToKotlin(args0)
})
})
})
/**
* The bucket lifecycle state.
*/
public val lifecycleState: Output
get() = javaResource.lifecycleState().applyValue({ args0 -> args0 })
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.
*/
public val locked: Output
get() = javaResource.locked().applyValue({ args0 -> args0 })
/**
* The resource name of the bucket.For example:projects/my-project/locations/global/buckets/my-bucketFor a list of supported locations, see Supported Regions (https://cloud.google.com/logging/docs/region-support)For the location of global it is unspecified where log entries are actually stored.After a bucket has been created, the location cannot be changed.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)
*/
public val restrictedFields: Output>
get() = javaResource.restrictedFields().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.
*/
public val retentionDays: Output
get() = javaResource.retentionDays().applyValue({ args0 -> args0 })
/**
* The last update timestamp of the bucket.
*/
public val updateTime: Output
get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}
public object FolderBucketMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.logging.v2.FolderBucket::class == javaResource::class
override fun map(javaResource: Resource): FolderBucket = FolderBucket(
javaResource as
com.pulumi.googlenative.logging.v2.FolderBucket,
)
}
/**
* @see [FolderBucket].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FolderBucket].
*/
public suspend fun folderBucket(
name: String,
block: suspend FolderBucketResourceBuilder.() -> Unit,
): FolderBucket {
val builder = FolderBucketResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FolderBucket].
* @param name The _unique_ name of the resulting resource.
*/
public fun folderBucket(name: String): FolderBucket {
val builder = FolderBucketResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy