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

com.pulumi.awsnative.redshift.kotlin.EndpointAuthorization.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.redshift.kotlin

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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [EndpointAuthorization].
 */
@PulumiTagMarker
public class EndpointAuthorizationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: EndpointAuthorizationArgs = EndpointAuthorizationArgs()

    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 EndpointAuthorizationArgsBuilder.() -> Unit) {
        val builder = EndpointAuthorizationArgsBuilder()
        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(): EndpointAuthorization {
        val builtJavaResource =
            com.pulumi.awsnative.redshift.EndpointAuthorization(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return EndpointAuthorization(builtJavaResource)
    }
}

/**
 * Describes an endpoint authorization for authorizing Redshift-managed VPC endpoint access to a cluster across AWS accounts.
 */
public class EndpointAuthorization internal constructor(
    override val javaResource: com.pulumi.awsnative.redshift.EndpointAuthorization,
) : KotlinCustomResource(javaResource, EndpointAuthorizationMapper) {
    /**
     * The target AWS account ID to grant or revoke access for.
     */
    public val account: Output
        get() = javaResource.account().applyValue({ args0 -> args0 })

    /**
     * Indicates whether all VPCs in the grantee account are allowed access to the cluster.
     */
    public val allowedAllVpcs: Output
        get() = javaResource.allowedAllVpcs().applyValue({ args0 -> args0 })

    /**
     * The VPCs allowed access to the cluster.
     */
    public val allowedVpcs: Output>
        get() = javaResource.allowedVpcs().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

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

    /**
     * The cluster identifier.
     */
    public val clusterIdentifier: Output
        get() = javaResource.clusterIdentifier().applyValue({ args0 -> args0 })

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

    /**
     * The number of Redshift-managed VPC endpoints created for the authorization.
     */
    public val endpointCount: Output
        get() = javaResource.endpointCount().applyValue({ args0 -> args0 })

    /**
     *  Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.
     */
    public val force: Output?
        get() = javaResource.force().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The AWS account ID of the grantee of the cluster.
     */
    public val grantee: Output
        get() = javaResource.grantee().applyValue({ args0 -> args0 })

    /**
     * The AWS account ID of the cluster owner.
     */
    public val grantor: Output
        get() = javaResource.grantor().applyValue({ args0 -> args0 })

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

    /**
     * The virtual private cloud (VPC) identifiers to grant or revoke access to.
     */
    public val vpcIds: Output>?
        get() = javaResource.vpcIds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }).orElse(null)
        })
}

public object EndpointAuthorizationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.redshift.EndpointAuthorization::class == javaResource::class

    override fun map(javaResource: Resource): EndpointAuthorization =
        EndpointAuthorization(javaResource as com.pulumi.awsnative.redshift.EndpointAuthorization)
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy