![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.elasticbeanstalk.kotlin.Environment.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.elasticbeanstalk.kotlin
import com.pulumi.awsnative.elasticbeanstalk.kotlin.outputs.EnvironmentOptionSetting
import com.pulumi.awsnative.elasticbeanstalk.kotlin.outputs.EnvironmentTier
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.elasticbeanstalk.kotlin.outputs.EnvironmentOptionSetting.Companion.toKotlin as environmentOptionSettingToKotlin
import com.pulumi.awsnative.elasticbeanstalk.kotlin.outputs.EnvironmentTier.Companion.toKotlin as environmentTierToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Environment].
*/
@PulumiTagMarker
public class EnvironmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: EnvironmentArgs = EnvironmentArgs()
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 EnvironmentArgsBuilder.() -> Unit) {
val builder = EnvironmentArgsBuilder()
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(): Environment {
val builtJavaResource =
com.pulumi.awsnative.elasticbeanstalk.Environment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Environment(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::ElasticBeanstalk::Environment
*/
public class Environment internal constructor(
override val javaResource: com.pulumi.awsnative.elasticbeanstalk.Environment,
) : KotlinCustomResource(javaResource, EnvironmentMapper) {
/**
* The name of the application that is associated with this environment.
*/
public val applicationName: Output
get() = javaResource.applicationName().applyValue({ args0 -> args0 })
/**
* If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
*/
public val cnamePrefix: Output?
get() = javaResource.cnamePrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Your description for this environment.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* For load-balanced, autoscaling environments, the URL to the load balancer. For single-instance environments, the IP address of the instance.
* Example load balancer URL:
* Example instance IP address:
* `192.0.2.0`
*/
public val endpointUrl: Output
get() = javaResource.endpointUrl().applyValue({ args0 -> args0 })
/**
* A unique name for the environment.
*/
public val environmentName: Output?
get() = javaResource.environmentName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role.
*/
public val operationsRole: Output?
get() = javaResource.operationsRole().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Key-value pairs defining configuration options for this environment, such as the instance type.
*/
public val optionSettings: Output>?
get() = javaResource.optionSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
environmentOptionSettingToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the custom platform to use with the environment.
*/
public val platformArn: Output?
get() = javaResource.platformArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of an Elastic Beanstalk solution stack (platform version) to use with the environment.
*/
public val solutionStackName: Output?
get() = javaResource.solutionStackName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the tags applied to resources in the environment.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The name of the Elastic Beanstalk configuration template to use with the environment.
*/
public val templateName: Output?
get() = javaResource.templateName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.
*/
public val tier: Output?
get() = javaResource.tier().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
environmentTierToKotlin(args0)
})
}).orElse(null)
})
/**
* The name of the application version to deploy.
*/
public val versionLabel: Output?
get() = javaResource.versionLabel().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object EnvironmentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.elasticbeanstalk.Environment::class == javaResource::class
override fun map(javaResource: Resource): Environment = Environment(
javaResource as
com.pulumi.awsnative.elasticbeanstalk.Environment,
)
}
/**
* @see [Environment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Environment].
*/
public suspend fun environment(name: String, block: suspend EnvironmentResourceBuilder.() -> Unit): Environment {
val builder = EnvironmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Environment].
* @param name The _unique_ name of the resulting resource.
*/
public fun environment(name: String): Environment {
val builder = EnvironmentResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy