![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.logs.kotlin.DeliveryDestination.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.logs.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.logs.kotlin.outputs.DeliveryDestinationDestinationPolicy
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
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.DeliveryDestinationDestinationPolicy.Companion.toKotlin as deliveryDestinationDestinationPolicyToKotlin
/**
* Builder for [DeliveryDestination].
*/
@PulumiTagMarker
public class DeliveryDestinationResourceBuilder internal constructor() {
public var name: String? = null
public var args: DeliveryDestinationArgs = DeliveryDestinationArgs()
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 DeliveryDestinationArgsBuilder.() -> Unit) {
val builder = DeliveryDestinationArgsBuilder()
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(): DeliveryDestination {
val builtJavaResource = com.pulumi.awsnative.logs.DeliveryDestination(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DeliveryDestination(builtJavaResource)
}
}
/**
* This structure contains information about one delivery destination in your account.
* A delivery destination is an AWS resource that represents an AWS service that logs can be sent to CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations.
*/
public class DeliveryDestination internal constructor(
override val javaResource: com.pulumi.awsnative.logs.DeliveryDestination,
) : KotlinCustomResource(javaResource, DeliveryDestinationMapper) {
/**
* The Amazon Resource Name (ARN) that uniquely identifies this delivery destination.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.
* The policy must be in JSON string format.
* Length Constraints: Maximum length of 51200
*/
public val deliveryDestinationPolicy: Output>?
get() = javaResource.deliveryDestinationPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
deliveryDestinationDestinationPolicyToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Displays whether this delivery destination is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
*/
public val deliveryDestinationType: Output
get() = javaResource.deliveryDestinationType().applyValue({ args0 -> args0 })
/**
* The ARN of the Amazon Web Services destination that this delivery destination represents. That Amazon Web Services destination can be a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose.
*/
public val destinationResourceArn: Output?
get() = javaResource.destinationResourceArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of this delivery destination.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The tags that have been assigned to this delivery destination.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object DeliveryDestinationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.logs.DeliveryDestination::class == javaResource::class
override fun map(javaResource: Resource): DeliveryDestination = DeliveryDestination(
javaResource
as com.pulumi.awsnative.logs.DeliveryDestination,
)
}
/**
* @see [DeliveryDestination].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DeliveryDestination].
*/
public suspend fun deliveryDestination(
name: String,
block: suspend DeliveryDestinationResourceBuilder.() -> Unit,
): DeliveryDestination {
val builder = DeliveryDestinationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DeliveryDestination].
* @param name The _unique_ name of the resulting resource.
*/
public fun deliveryDestination(name: String): DeliveryDestination {
val builder = DeliveryDestinationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy