com.pulumi.awsnative.codeguruprofiler.kotlin.ProfilingGroup.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.codeguruprofiler.kotlin
import com.pulumi.awsnative.codeguruprofiler.kotlin.enums.ProfilingGroupComputePlatform
import com.pulumi.awsnative.codeguruprofiler.kotlin.outputs.AgentPermissionsProperties
import com.pulumi.awsnative.codeguruprofiler.kotlin.outputs.ProfilingGroupChannel
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.codeguruprofiler.kotlin.enums.ProfilingGroupComputePlatform.Companion.toKotlin as profilingGroupComputePlatformToKotlin
import com.pulumi.awsnative.codeguruprofiler.kotlin.outputs.AgentPermissionsProperties.Companion.toKotlin as agentPermissionsPropertiesToKotlin
import com.pulumi.awsnative.codeguruprofiler.kotlin.outputs.ProfilingGroupChannel.Companion.toKotlin as profilingGroupChannelToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [ProfilingGroup].
*/
@PulumiTagMarker
public class ProfilingGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: ProfilingGroupArgs = ProfilingGroupArgs()
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 ProfilingGroupArgsBuilder.() -> Unit) {
val builder = ProfilingGroupArgsBuilder()
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(): ProfilingGroup {
val builtJavaResource =
com.pulumi.awsnative.codeguruprofiler.ProfilingGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ProfilingGroup(builtJavaResource)
}
}
/**
* This resource schema represents the Profiling Group resource in the Amazon CodeGuru Profiler service.
*/
public class ProfilingGroup internal constructor(
override val javaResource: com.pulumi.awsnative.codeguruprofiler.ProfilingGroup,
) : KotlinCustomResource(javaResource, ProfilingGroupMapper) {
/**
* The agent permissions attached to this profiling group.
*/
public val agentPermissions: Output?
get() = javaResource.agentPermissions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> agentPermissionsPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* Configuration for Notification Channels for Anomaly Detection feature in CodeGuru Profiler which enables customers to detect anomalies in the application profile for those methods that represent the highest proportion of CPU time or latency
*/
public val anomalyDetectionNotificationConfiguration: Output>?
get() = javaResource.anomalyDetectionNotificationConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
profilingGroupChannelToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the specified profiling group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The compute platform of the profiling group.
*/
public val computePlatform: Output?
get() = javaResource.computePlatform().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> profilingGroupComputePlatformToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the profiling group.
*/
public val profilingGroupName: Output
get() = javaResource.profilingGroupName().applyValue({ args0 -> args0 })
/**
* The tags associated with a profiling group.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ProfilingGroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.codeguruprofiler.ProfilingGroup::class == javaResource::class
override fun map(javaResource: Resource): ProfilingGroup = ProfilingGroup(
javaResource as
com.pulumi.awsnative.codeguruprofiler.ProfilingGroup,
)
}
/**
* @see [ProfilingGroup].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ProfilingGroup].
*/
public suspend fun profilingGroup(
name: String,
block: suspend ProfilingGroupResourceBuilder.() -> Unit,
): ProfilingGroup {
val builder = ProfilingGroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ProfilingGroup].
* @param name The _unique_ name of the resulting resource.
*/
public fun profilingGroup(name: String): ProfilingGroup {
val builder = ProfilingGroupResourceBuilder()
builder.name(name)
return builder.build()
}