All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.googlenative.metastore.v1.kotlin.Service.kt Maven / Gradle / Ivy

Go to download

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.metastore.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.EncryptionConfigResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.HiveMetastoreConfigResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.MaintenanceWindowResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.MetadataManagementActivityResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.NetworkConfigResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.ScalingConfigResponse
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.TelemetryConfigResponse
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.EncryptionConfigResponse.Companion.toKotlin as encryptionConfigResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.HiveMetastoreConfigResponse.Companion.toKotlin as hiveMetastoreConfigResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.MaintenanceWindowResponse.Companion.toKotlin as maintenanceWindowResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.MetadataManagementActivityResponse.Companion.toKotlin as metadataManagementActivityResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.NetworkConfigResponse.Companion.toKotlin as networkConfigResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.ScalingConfigResponse.Companion.toKotlin as scalingConfigResponseToKotlin
import com.pulumi.googlenative.metastore.v1.kotlin.outputs.TelemetryConfigResponse.Companion.toKotlin as telemetryConfigResponseToKotlin

/**
 * 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.metastore.v1.Service(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Service(builtJavaResource)
    }
}

/**
 * Creates a metastore service in a project and location.
 */
public class Service internal constructor(
    override val javaResource: com.pulumi.googlenative.metastore.v1.Service,
) : KotlinCustomResource(javaResource, ServiceMapper) {
    /**
     * A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.
     */
    public val artifactGcsUri: Output
        get() = javaResource.artifactGcsUri().applyValue({ args0 -> args0 })

    /**
     * The time when the metastore service was created.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Immutable. The database type that the Metastore service stores its data.
     */
    public val databaseType: Output
        get() = javaResource.databaseType().applyValue({ args0 -> args0 })

    /**
     * Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated.
     */
    public val encryptionConfig: Output
        get() = javaResource.encryptionConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                encryptionConfigResponseToKotlin(args0)
            })
        })

    /**
     * The URI of the endpoint used to access the metastore service.
     */
    public val endpointUri: Output
        get() = javaResource.endpointUri().applyValue({ args0 -> args0 })

    /**
     * Configuration information specific to running Hive metastore software as the metastore service.
     */
    public val hiveMetastoreConfig: Output
        get() = javaResource.hiveMetastoreConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                hiveMetastoreConfigResponseToKotlin(args0)
            })
        })

    /**
     * User-defined labels for the metastore service.
     */
    public val labels: Output>
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type.
     */
    public val maintenanceWindow: Output
        get() = javaResource.maintenanceWindow().applyValue({ args0 ->
            args0.let({ args0 ->
                maintenanceWindowResponseToKotlin(args0)
            })
        })

    /**
     * The metadata management activities of the metastore service.
     */
    public val metadataManagementActivity: Output
        get() = javaResource.metadataManagementActivity().applyValue({ args0 ->
            args0.let({ args0 ->
                metadataManagementActivityResponseToKotlin(args0)
            })
        })

    /**
     * Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.
     */
    public val network: Output
        get() = javaResource.network().applyValue({ args0 -> args0 })

    /**
     * The configuration specifying the network settings for the Dataproc Metastore service.
     */
    public val networkConfig: Output
        get() = javaResource.networkConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                networkConfigResponseToKotlin(args0)
            })
        })

    /**
     * The TCP port at which the metastore service is reached. Default: 9083.
     */
    public val port: Output
        get() = javaResource.port().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * Immutable. The release channel of the service. If unspecified, defaults to STABLE.
     */
    public val releaseChannel: Output
        get() = javaResource.releaseChannel().applyValue({ args0 -> args0 })

    /**
     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
     */
    public val requestId: Output?
        get() = javaResource.requestId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Scaling configuration of the metastore service.
     */
    public val scalingConfig: Output
        get() = javaResource.scalingConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                scalingConfigResponseToKotlin(args0)
            })
        })

    /**
     * Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
     */
    public val serviceId: Output
        get() = javaResource.serviceId().applyValue({ args0 -> args0 })

    /**
     * The current state of the metastore service.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

    /**
     * Additional information about the current state of the metastore service, if available.
     */
    public val stateMessage: Output
        get() = javaResource.stateMessage().applyValue({ args0 -> args0 })

    /**
     * The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON.
     */
    public val telemetryConfig: Output
        get() = javaResource.telemetryConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                telemetryConfigResponseToKotlin(args0)
            })
        })

    /**
     * The tier of the service.
     */
    public val tier: Output
        get() = javaResource.tier().applyValue({ args0 -> args0 })

    /**
     * The globally unique resource identifier of the metastore service.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The time when the metastore service was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object ServiceMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.metastore.v1.Service::class == javaResource::class

    override fun map(javaResource: Resource): Service = Service(
        javaResource as
            com.pulumi.googlenative.metastore.v1.Service,
    )
}

/**
 * @see [Service].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Service].
 */
public suspend fun service(name: String, block: suspend ServiceResourceBuilder.() -> Unit): Service {
    val builder = ServiceResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Service].
 * @param name The _unique_ name of the resulting resource.
 */
public fun service(name: String): Service {
    val builder = ServiceResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy