
com.pulumi.awsnative.cloudwatch.kotlin.MetricStream.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.cloudwatch.kotlin
import com.pulumi.awsnative.cloudwatch.kotlin.outputs.MetricStreamFilter
import com.pulumi.awsnative.cloudwatch.kotlin.outputs.MetricStreamStatisticsConfiguration
import com.pulumi.awsnative.kotlin.outputs.Tag
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.cloudwatch.kotlin.outputs.MetricStreamFilter.Companion.toKotlin as metricStreamFilterToKotlin
import com.pulumi.awsnative.cloudwatch.kotlin.outputs.MetricStreamStatisticsConfiguration.Companion.toKotlin as metricStreamStatisticsConfigurationToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [MetricStream].
*/
@PulumiTagMarker
public class MetricStreamResourceBuilder internal constructor() {
public var name: String? = null
public var args: MetricStreamArgs = MetricStreamArgs()
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 MetricStreamArgsBuilder.() -> Unit) {
val builder = MetricStreamArgsBuilder()
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(): MetricStream {
val builtJavaResource = com.pulumi.awsnative.cloudwatch.MetricStream(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MetricStream(builtJavaResource)
}
}
/**
* Resource Type definition for Metric Stream
* ## Example Usage
* ### Example
* No Java example available.
*/
public class MetricStream internal constructor(
override val javaResource: com.pulumi.awsnative.cloudwatch.MetricStream,
) : KotlinCustomResource(javaResource, MetricStreamMapper) {
/**
* Amazon Resource Name of the metric stream.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The date of creation of the metric stream.
*/
public val creationDate: Output
get() = javaResource.creationDate().applyValue({ args0 -> args0 })
/**
* Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
*/
public val excludeFilters: Output>?
get() = javaResource.excludeFilters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
metricStreamFilterToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The ARN of the Kinesis Firehose where to stream the data.
*/
public val firehoseArn: Output?
get() = javaResource.firehoseArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
*/
public val includeFilters: Output>?
get() = javaResource.includeFilters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
metricStreamFilterToKotlin(args0)
})
})
}).orElse(null)
})
/**
* If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
*/
public val includeLinkedAccountsMetrics: Output?
get() = javaResource.includeLinkedAccountsMetrics().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The date of the last update of the metric stream.
*/
public val lastUpdateDate: Output
get() = javaResource.lastUpdateDate().applyValue({ args0 -> args0 })
/**
* Name of the metric stream.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The output format of the data streamed to the Kinesis Firehose.
*/
public val outputFormat: Output?
get() = javaResource.outputFormat().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN of the role that provides access to the Kinesis Firehose.
*/
public val roleArn: Output?
get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Displays the state of the Metric Stream.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
*/
public val statisticsConfigurations: Output>?
get() = javaResource.statisticsConfigurations().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
metricStreamStatisticsConfigurationToKotlin(args0)
})
})
}).orElse(null)
})
/**
* A set of tags to assign to the delivery stream.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object MetricStreamMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.cloudwatch.MetricStream::class == javaResource::class
override fun map(javaResource: Resource): MetricStream = MetricStream(
javaResource as
com.pulumi.awsnative.cloudwatch.MetricStream,
)
}
/**
* @see [MetricStream].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [MetricStream].
*/
public suspend fun metricStream(
name: String,
block: suspend MetricStreamResourceBuilder.() -> Unit,
): MetricStream {
val builder = MetricStreamResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [MetricStream].
* @param name The _unique_ name of the resulting resource.
*/
public fun metricStream(name: String): MetricStream {
val builder = MetricStreamResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy