
com.pulumi.googlenative.servicedirectory.v1beta1.kotlin.Service.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.servicedirectory.v1beta1.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.servicedirectory.v1beta1.kotlin.outputs.EndpointResponse
import com.pulumi.googlenative.servicedirectory.v1beta1.kotlin.outputs.EndpointResponse.Companion.toKotlin
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
/**
* Builder for [Service].
*/
@PulumiTagMarker
public class ServiceResourceBuilder internal constructor() {
public var name: String? = null
public var args: ServiceArgs = ServiceArgs()
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 ServiceArgsBuilder.() -> Unit) {
val builder = ServiceArgsBuilder()
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(): Service {
val builtJavaResource =
com.pulumi.googlenative.servicedirectory.v1beta1.Service(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Service(builtJavaResource)
}
}
/**
* Creates a service, and returns the new service.
*/
public class Service internal constructor(
override val javaResource: com.pulumi.googlenative.servicedirectory.v1beta1.Service,
) : KotlinCustomResource(javaResource, ServiceMapper) {
/**
* The timestamp when the service was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* Endpoints associated with this service. Returned on LookupService.ResolveService. Control plane clients should use RegistrationService.ListEndpoints.
*/
public val endpoints: Output>
get() = javaResource.endpoints().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
})
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.
*/
public val metadata: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy