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

com.pulumi.gcp.compute.kotlin.inputs.InstanceTemplateServiceAccountArgs.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.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property email The service account e-mail address. If not given, the
 * default Google Compute Engine service account is used.
 * @property scopes A list of service scopes. Both OAuth2 URLs and gcloud
 * short names are supported. To allow full access to all Cloud APIs, use the
 * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
 * The [service accounts documentation](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
 * explains that access scopes are the legacy method of specifying permissions for your instance.
 * To follow best practices you should create a dedicated service account with the minimum permissions the VM requires.
 * To use a dedicated service account this field should be configured as a list containing the `cloud-platform` scope.
 * See [Authenticate workloads using service accounts best practices](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices)
 * and [Best practices for using service accounts](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose).
 */
public data class InstanceTemplateServiceAccountArgs(
    public val email: Output? = null,
    public val scopes: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs =
        com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs.builder()
            .email(email?.applyValue({ args0 -> args0 }))
            .scopes(scopes.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [InstanceTemplateServiceAccountArgs].
 */
@PulumiTagMarker
public class InstanceTemplateServiceAccountArgsBuilder internal constructor() {
    private var email: Output? = null

    private var scopes: Output>? = null

    /**
     * @param value The service account e-mail address. If not given, the
     * default Google Compute Engine service account is used.
     */
    @JvmName("wryyuyqqqqjyauva")
    public suspend fun email(`value`: Output) {
        this.email = value
    }

    /**
     * @param value A list of service scopes. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * The [service accounts documentation](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * explains that access scopes are the legacy method of specifying permissions for your instance.
     * To follow best practices you should create a dedicated service account with the minimum permissions the VM requires.
     * To use a dedicated service account this field should be configured as a list containing the `cloud-platform` scope.
     * See [Authenticate workloads using service accounts best practices](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices)
     * and [Best practices for using service accounts](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose).
     */
    @JvmName("gemcytxxtkawhcqr")
    public suspend fun scopes(`value`: Output>) {
        this.scopes = value
    }

    @JvmName("cqotbcdbrlgttbwa")
    public suspend fun scopes(vararg values: Output) {
        this.scopes = Output.all(values.asList())
    }

    /**
     * @param values A list of service scopes. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * The [service accounts documentation](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * explains that access scopes are the legacy method of specifying permissions for your instance.
     * To follow best practices you should create a dedicated service account with the minimum permissions the VM requires.
     * To use a dedicated service account this field should be configured as a list containing the `cloud-platform` scope.
     * See [Authenticate workloads using service accounts best practices](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices)
     * and [Best practices for using service accounts](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose).
     */
    @JvmName("sokadvbrarutiksb")
    public suspend fun scopes(values: List>) {
        this.scopes = Output.all(values)
    }

    /**
     * @param value The service account e-mail address. If not given, the
     * default Google Compute Engine service account is used.
     */
    @JvmName("aexyqyrwobqeuldv")
    public suspend fun email(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.email = mapped
    }

    /**
     * @param value A list of service scopes. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * The [service accounts documentation](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * explains that access scopes are the legacy method of specifying permissions for your instance.
     * To follow best practices you should create a dedicated service account with the minimum permissions the VM requires.
     * To use a dedicated service account this field should be configured as a list containing the `cloud-platform` scope.
     * See [Authenticate workloads using service accounts best practices](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices)
     * and [Best practices for using service accounts](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose).
     */
    @JvmName("trstapvleiaooqfr")
    public suspend fun scopes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    /**
     * @param values A list of service scopes. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * The [service accounts documentation](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * explains that access scopes are the legacy method of specifying permissions for your instance.
     * To follow best practices you should create a dedicated service account with the minimum permissions the VM requires.
     * To use a dedicated service account this field should be configured as a list containing the `cloud-platform` scope.
     * See [Authenticate workloads using service accounts best practices](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices)
     * and [Best practices for using service accounts](https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose).
     */
    @JvmName("eaajiohbqwagfotn")
    public suspend fun scopes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    internal fun build(): InstanceTemplateServiceAccountArgs = InstanceTemplateServiceAccountArgs(
        email = email,
        scopes = scopes ?: throw PulumiNullFieldException("scopes"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy