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

com.pulumi.awsnative.appsync.kotlin.SourceApiAssociation.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.appsync.kotlin

import com.pulumi.awsnative.appsync.kotlin.enums.SourceApiAssociationStatus
import com.pulumi.awsnative.appsync.kotlin.outputs.SourceApiAssociationConfig
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.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.appsync.kotlin.enums.SourceApiAssociationStatus.Companion.toKotlin as sourceApiAssociationStatusToKotlin
import com.pulumi.awsnative.appsync.kotlin.outputs.SourceApiAssociationConfig.Companion.toKotlin as sourceApiAssociationConfigToKotlin

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

    public var args: SourceApiAssociationArgs = SourceApiAssociationArgs()

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

/**
 * Resource Type definition for AWS::AppSync::SourceApiAssociation
 */
public class SourceApiAssociation internal constructor(
    override val javaResource: com.pulumi.awsnative.appsync.SourceApiAssociation,
) : KotlinCustomResource(javaResource, SourceApiAssociationMapper) {
    /**
     * ARN of the SourceApiAssociation.
     */
    public val associationArn: Output
        get() = javaResource.associationArn().applyValue({ args0 -> args0 })

    /**
     * Id of the SourceApiAssociation.
     */
    public val associationId: Output
        get() = javaResource.associationId().applyValue({ args0 -> args0 })

    /**
     * Description of the SourceApiAssociation.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Date of last schema successful merge.
     */
    public val lastSuccessfulMergeDate: Output
        get() = javaResource.lastSuccessfulMergeDate().applyValue({ args0 -> args0 })

    /**
     * ARN of the Merged API in the association.
     */
    public val mergedApiArn: Output
        get() = javaResource.mergedApiArn().applyValue({ args0 -> args0 })

    /**
     * GraphQLApiId of the Merged API in the association.
     */
    public val mergedApiId: Output
        get() = javaResource.mergedApiId().applyValue({ args0 -> args0 })

    /**
     * Identifier of the Merged GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
     */
    public val mergedApiIdentifier: Output?
        get() = javaResource.mergedApiIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * ARN of the source API in the association.
     */
    public val sourceApiArn: Output
        get() = javaResource.sourceApiArn().applyValue({ args0 -> args0 })

    /**
     * Customized configuration for SourceApiAssociation.
     */
    public val sourceApiAssociationConfig: Output?
        get() = javaResource.sourceApiAssociationConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> sourceApiAssociationConfigToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Current status of SourceApiAssociation.
     */
    public val sourceApiAssociationStatus: Output
        get() = javaResource.sourceApiAssociationStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                sourceApiAssociationStatusToKotlin(args0)
            })
        })

    /**
     * Current SourceApiAssociation status details.
     */
    public val sourceApiAssociationStatusDetail: Output
        get() = javaResource.sourceApiAssociationStatusDetail().applyValue({ args0 -> args0 })

    /**
     * GraphQLApiId of the source API in the association.
     */
    public val sourceApiId: Output
        get() = javaResource.sourceApiId().applyValue({ args0 -> args0 })

    /**
     * Identifier of the Source GraphQLApi to associate. It could be either GraphQLApi ApiId or ARN
     */
    public val sourceApiIdentifier: Output?
        get() = javaResource.sourceApiIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object SourceApiAssociationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.appsync.SourceApiAssociation::class == javaResource::class

    override fun map(javaResource: Resource): SourceApiAssociation = SourceApiAssociation(
        javaResource
            as com.pulumi.awsnative.appsync.SourceApiAssociation,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy