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

com.pulumi.googlenative.gkehub.v1beta1.kotlin.MembershipArgs.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.gkehub.v1beta1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.gkehub.v1beta1.MembershipArgs.builder
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.enums.MembershipInfrastructureType
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.AuthorityArgs
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.AuthorityArgsBuilder
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.MembershipEndpointArgs
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.MembershipEndpointArgsBuilder
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.MonitoringConfigArgs
import com.pulumi.googlenative.gkehub.v1beta1.kotlin.inputs.MonitoringConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new Membership. **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
 * Auto-naming is currently not supported for this resource.
 * @property authority Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
 * @property description Optional. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*`
 * @property endpoint Optional. Endpoint information to reach this member.
 * @property externalId Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.
 * @property infrastructureType Optional. The infrastructure type this Membership is running on.
 * @property labels Optional. GCP labels for this membership.
 * @property location
 * @property membershipId Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
 * @property monitoringConfig Optional. The monitoring config information for this membership.
 * @property project
 * @property requestId Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
 */
public data class MembershipArgs(
    public val authority: Output? = null,
    public val description: Output? = null,
    public val endpoint: Output? = null,
    public val externalId: Output? = null,
    public val infrastructureType: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val membershipId: Output? = null,
    public val monitoringConfig: Output? = null,
    public val project: Output? = null,
    public val requestId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.gkehub.v1beta1.MembershipArgs =
        com.pulumi.googlenative.gkehub.v1beta1.MembershipArgs.builder()
            .authority(authority?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .endpoint(endpoint?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .externalId(externalId?.applyValue({ args0 -> args0 }))
            .infrastructureType(
                infrastructureType?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .membershipId(membershipId?.applyValue({ args0 -> args0 }))
            .monitoringConfig(monitoringConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .requestId(requestId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MembershipArgs].
 */
@PulumiTagMarker
public class MembershipArgsBuilder internal constructor() {
    private var authority: Output? = null

    private var description: Output? = null

    private var endpoint: Output? = null

    private var externalId: Output? = null

    private var infrastructureType: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var membershipId: Output? = null

    private var monitoringConfig: Output? = null

    private var project: Output? = null

    private var requestId: Output? = null

    /**
     * @param value Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
     */
    @JvmName("qdrlrjxbxkhspgli")
    public suspend fun authority(`value`: Output) {
        this.authority = value
    }

    /**
     * @param value Optional. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*`
     */
    @JvmName("mmiocvknkqeapvau")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Optional. Endpoint information to reach this member.
     */
    @JvmName("ymqyymqenhsbpayo")
    public suspend fun endpoint(`value`: Output) {
        this.endpoint = value
    }

    /**
     * @param value Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.
     */
    @JvmName("tfsanlrkxatqximi")
    public suspend fun externalId(`value`: Output) {
        this.externalId = value
    }

    /**
     * @param value Optional. The infrastructure type this Membership is running on.
     */
    @JvmName("easjmaqksesufkel")
    public suspend fun infrastructureType(`value`: Output) {
        this.infrastructureType = value
    }

    /**
     * @param value Optional. GCP labels for this membership.
     */
    @JvmName("fmuflkhjpwjxlkqf")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value
     */
    @JvmName("kttieijdapwxctwn")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
     */
    @JvmName("oiycqtwonbavddkx")
    public suspend fun membershipId(`value`: Output) {
        this.membershipId = value
    }

    /**
     * @param value Optional. The monitoring config information for this membership.
     */
    @JvmName("eibhuqsgbmufxqnx")
    public suspend fun monitoringConfig(`value`: Output) {
        this.monitoringConfig = value
    }

    /**
     * @param value
     */
    @JvmName("abdlqyxrctwifhwd")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
     */
    @JvmName("bggqebxgcenogdpu")
    public suspend fun requestId(`value`: Output) {
        this.requestId = value
    }

    /**
     * @param value Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
     */
    @JvmName("oarlykrwkkodyyki")
    public suspend fun authority(`value`: AuthorityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authority = mapped
    }

    /**
     * @param argument Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
     */
    @JvmName("meqcbxohutctxphw")
    public suspend fun authority(argument: suspend AuthorityArgsBuilder.() -> Unit) {
        val toBeMapped = AuthorityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authority = mapped
    }

    /**
     * @param value Optional. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*`
     */
    @JvmName("fvieigfpbmasvkuw")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Optional. Endpoint information to reach this member.
     */
    @JvmName("xgrtjhcqcnqdgrvr")
    public suspend fun endpoint(`value`: MembershipEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpoint = mapped
    }

    /**
     * @param argument Optional. Endpoint information to reach this member.
     */
    @JvmName("hjctcvgixopbanen")
    public suspend fun endpoint(argument: suspend MembershipEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = MembershipEndpointArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.endpoint = mapped
    }

    /**
     * @param value Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.
     */
    @JvmName("hwakiaibhnlpntql")
    public suspend fun externalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalId = mapped
    }

    /**
     * @param value Optional. The infrastructure type this Membership is running on.
     */
    @JvmName("kovmtwvecyhnmxna")
    public suspend fun infrastructureType(`value`: MembershipInfrastructureType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.infrastructureType = mapped
    }

    /**
     * @param value Optional. GCP labels for this membership.
     */
    @JvmName("pwkyluqmhskmttng")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. GCP labels for this membership.
     */
    @JvmName("quvjiekdorgixbse")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value
     */
    @JvmName("sywmgnychtylgwuu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
     */
    @JvmName("bkecypiismshrllf")
    public suspend fun membershipId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.membershipId = mapped
    }

    /**
     * @param value Optional. The monitoring config information for this membership.
     */
    @JvmName("eitpcpbxwipuhfvj")
    public suspend fun monitoringConfig(`value`: MonitoringConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitoringConfig = mapped
    }

    /**
     * @param argument Optional. The monitoring config information for this membership.
     */
    @JvmName("hxgpsnydptpmforg")
    public suspend fun monitoringConfig(argument: suspend MonitoringConfigArgsBuilder.() -> Unit) {
        val toBeMapped = MonitoringConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.monitoringConfig = mapped
    }

    /**
     * @param value
     */
    @JvmName("jmkrihegcvlkmopa")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
     */
    @JvmName("eqptoiifsykyugpl")
    public suspend fun requestId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestId = mapped
    }

    internal fun build(): MembershipArgs = MembershipArgs(
        authority = authority,
        description = description,
        endpoint = endpoint,
        externalId = externalId,
        infrastructureType = infrastructureType,
        labels = labels,
        location = location,
        membershipId = membershipId,
        monitoringConfig = monitoringConfig,
        project = project,
        requestId = requestId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy