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

com.pulumi.awsnative.vpclattice.kotlin.AccessLogSubscription.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.vpclattice.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [AccessLogSubscription].
 */
@PulumiTagMarker
public class AccessLogSubscriptionResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: AccessLogSubscriptionArgs = AccessLogSubscriptionArgs()

    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 AccessLogSubscriptionArgsBuilder.() -> Unit) {
        val builder = AccessLogSubscriptionArgsBuilder()
        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(): AccessLogSubscription {
        val builtJavaResource =
            com.pulumi.awsnative.vpclattice.AccessLogSubscription(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return AccessLogSubscription(builtJavaResource)
    }
}

/**
 * Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner will only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network.
 */
public class AccessLogSubscription internal constructor(
    override val javaResource: com.pulumi.awsnative.vpclattice.AccessLogSubscription,
) : KotlinCustomResource(javaResource, AccessLogSubscriptionMapper) {
    /**
     * The Amazon Resource Name (ARN) of the access log subscription.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The ID of the access log subscription.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the destination. The supported destination types are CloudWatch Log groups, Kinesis Data Firehose delivery streams, and Amazon S3 buckets.
     */
    public val destinationArn: Output
        get() = javaResource.destinationArn().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the access log subscription.
     */
    public val resourceArn: Output
        get() = javaResource.resourceArn().applyValue({ args0 -> args0 })

    /**
     * The ID of the service network or service.
     */
    public val resourceId: Output
        get() = javaResource.resourceId().applyValue({ args0 -> args0 })

    /**
     * The ID or Amazon Resource Name (ARN) of the service network or service.
     */
    public val resourceIdentifier: Output?
        get() = javaResource.resourceIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The tags for the access log subscription.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object AccessLogSubscriptionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.vpclattice.AccessLogSubscription::class == javaResource::class

    override fun map(javaResource: Resource): AccessLogSubscription =
        AccessLogSubscription(javaResource as com.pulumi.awsnative.vpclattice.AccessLogSubscription)
}

/**
 * @see [AccessLogSubscription].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [AccessLogSubscription].
 */
public suspend fun accessLogSubscription(
    name: String,
    block: suspend AccessLogSubscriptionResourceBuilder.() -> Unit,
): AccessLogSubscription {
    val builder = AccessLogSubscriptionResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [AccessLogSubscription].
 * @param name The _unique_ name of the resulting resource.
 */
public fun accessLogSubscription(name: String): AccessLogSubscription {
    val builder = AccessLogSubscriptionResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy