com.pulumi.awsnative.resiliencehub.kotlin.App.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.resiliencehub.kotlin
import com.pulumi.awsnative.resiliencehub.kotlin.enums.AppAssessmentSchedule
import com.pulumi.awsnative.resiliencehub.kotlin.enums.AppDriftStatus
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppEventSubscription
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppPermissionModel
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppResourceMapping
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 kotlin.collections.Map
import com.pulumi.awsnative.resiliencehub.kotlin.enums.AppAssessmentSchedule.Companion.toKotlin as appAssessmentScheduleToKotlin
import com.pulumi.awsnative.resiliencehub.kotlin.enums.AppDriftStatus.Companion.toKotlin as appDriftStatusToKotlin
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppEventSubscription.Companion.toKotlin as appEventSubscriptionToKotlin
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppPermissionModel.Companion.toKotlin as appPermissionModelToKotlin
import com.pulumi.awsnative.resiliencehub.kotlin.outputs.AppResourceMapping.Companion.toKotlin as appResourceMappingToKotlin
/**
* Builder for [App].
*/
@PulumiTagMarker
public class AppResourceBuilder internal constructor() {
public var name: String? = null
public var args: AppArgs = AppArgs()
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 AppArgsBuilder.() -> Unit) {
val builder = AppArgsBuilder()
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(): App {
val builtJavaResource = com.pulumi.awsnative.resiliencehub.App(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return App(builtJavaResource)
}
}
/**
* Resource Type Definition for AWS::ResilienceHub::App.
*/
public class App internal constructor(
override val javaResource: com.pulumi.awsnative.resiliencehub.App,
) : KotlinCustomResource(javaResource, AppMapper) {
/**
* Amazon Resource Name (ARN) of the App.
*/
public val appArn: Output
get() = javaResource.appArn().applyValue({ args0 -> args0 })
/**
* Assessment execution schedule.
*/
public val appAssessmentSchedule: Output?
get() = javaResource.appAssessmentSchedule().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> appAssessmentScheduleToKotlin(args0) })
}).orElse(null)
})
/**
* A string containing full ResilienceHub app template body.
*/
public val appTemplateBody: Output
get() = javaResource.appTemplateBody().applyValue({ args0 -> args0 })
/**
* App description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Indicates if compliance drifts (deviations) were detected while running an assessment for your application.
*/
public val driftStatus: Output
get() = javaResource.driftStatus().applyValue({ args0 ->
args0.let({ args0 ->
appDriftStatusToKotlin(args0)
})
})
/**
* The list of events you would like to subscribe and get notification for.
*/
public val eventSubscriptions: Output>?
get() = javaResource.eventSubscriptions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
appEventSubscriptionToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Name of the app.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
*/
public val permissionModel: Output?
get() = javaResource.permissionModel().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> appPermissionModelToKotlin(args0) })
}).orElse(null)
})
/**
* Amazon Resource Name (ARN) of the Resiliency Policy.
*/
public val resiliencyPolicyArn: Output?
get() = javaResource.resiliencyPolicyArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of ResourceMapping objects.
*/
public val resourceMappings: Output>
get() = javaResource.resourceMappings().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> appResourceMappingToKotlin(args0) })
})
})
/**
* Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
*/
public val tags: Output