
com.pulumi.awsnative.iot.kotlin.FleetMetric.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.iot.kotlin
import com.pulumi.awsnative.iot.kotlin.outputs.FleetMetricAggregationType
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.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.iot.kotlin.outputs.FleetMetricAggregationType.Companion.toKotlin as fleetMetricAggregationTypeToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [FleetMetric].
*/
@PulumiTagMarker
public class FleetMetricResourceBuilder internal constructor() {
public var name: String? = null
public var args: FleetMetricArgs = FleetMetricArgs()
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 FleetMetricArgsBuilder.() -> Unit) {
val builder = FleetMetricArgsBuilder()
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(): FleetMetric {
val builtJavaResource = com.pulumi.awsnative.iot.FleetMetric(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FleetMetric(builtJavaResource)
}
}
/**
* An aggregated metric of certain devices in your fleet
*/
public class FleetMetric internal constructor(
override val javaResource: com.pulumi.awsnative.iot.FleetMetric,
) : KotlinCustomResource(javaResource, FleetMetricMapper) {
/**
* The aggregation field to perform aggregation and metric emission
*/
public val aggregationField: Output?
get() = javaResource.aggregationField().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The type of the aggregation query.
*/
public val aggregationType: Output?
get() = javaResource.aggregationType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> fleetMetricAggregationTypeToKotlin(args0) })
}).orElse(null)
})
/**
* The creation date of a fleet metric
*/
public val creationDate: Output
get() = javaResource.creationDate().applyValue({ args0 -> args0 })
/**
* The description of a fleet metric
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The index name of a fleet metric
*/
public val indexName: Output?
get() = javaResource.indexName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The last modified date of a fleet metric
*/
public val lastModifiedDate: Output
get() = javaResource.lastModifiedDate().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Number (ARN) of a fleet metric metric
*/
public val metricArn: Output
get() = javaResource.metricArn().applyValue({ args0 -> args0 })
/**
* The name of the fleet metric
*/
public val metricName: Output
get() = javaResource.metricName().applyValue({ args0 -> args0 })
/**
* The period of metric emission in seconds
*/
public val period: Output?
get() = javaResource.period().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The Fleet Indexing query used by a fleet metric
*/
public val queryString: Output?
get() = javaResource.queryString().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The version of a Fleet Indexing query used by a fleet metric
*/
public val queryVersion: Output?
get() = javaResource.queryVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of key-value pairs to apply to this resource
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The unit of data points emitted by a fleet metric
*/
public val unit: Output?
get() = javaResource.unit().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The version of a fleet metric
*/
public val version: Output
get() = javaResource.version().applyValue({ args0 -> args0 })
}
public object FleetMetricMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.iot.FleetMetric::class == javaResource::class
override fun map(javaResource: Resource): FleetMetric = FleetMetric(
javaResource as
com.pulumi.awsnative.iot.FleetMetric,
)
}
/**
* @see [FleetMetric].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FleetMetric].
*/
public suspend fun fleetMetric(name: String, block: suspend FleetMetricResourceBuilder.() -> Unit): FleetMetric {
val builder = FleetMetricResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FleetMetric].
* @param name The _unique_ name of the resulting resource.
*/
public fun fleetMetric(name: String): FleetMetric {
val builder = FleetMetricResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy