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

com.pulumi.aws.appsync.kotlin.SourceApiAssociationArgs.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: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.appsync.kotlin

import com.pulumi.aws.appsync.SourceApiAssociationArgs.builder
import com.pulumi.aws.appsync.kotlin.inputs.SourceApiAssociationSourceApiAssociationConfigArgs
import com.pulumi.aws.appsync.kotlin.inputs.SourceApiAssociationSourceApiAssociationConfigArgsBuilder
import com.pulumi.aws.appsync.kotlin.inputs.SourceApiAssociationTimeoutsArgs
import com.pulumi.aws.appsync.kotlin.inputs.SourceApiAssociationTimeoutsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS AppSync Source Api Association.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.appsync.SourceApiAssociation("test", {
 *     description: "My source API Merged",
 *     mergedApiId: "gzos6bteufdunffzzifiowisoe",
 *     sourceApiId: "fzzifiowisoegzos6bteufdunf",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.appsync.SourceApiAssociation("test",
 *     description="My source API Merged",
 *     merged_api_id="gzos6bteufdunffzzifiowisoe",
 *     source_api_id="fzzifiowisoegzos6bteufdunf")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.AppSync.SourceApiAssociation("test", new()
 *     {
 *         Description = "My source API Merged",
 *         MergedApiId = "gzos6bteufdunffzzifiowisoe",
 *         SourceApiId = "fzzifiowisoegzos6bteufdunf",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := appsync.NewSourceApiAssociation(ctx, "test", &appsync.SourceApiAssociationArgs{
 * 			Description: pulumi.String("My source API Merged"),
 * 			MergedApiId: pulumi.String("gzos6bteufdunffzzifiowisoe"),
 * 			SourceApiId: pulumi.String("fzzifiowisoegzos6bteufdunf"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.appsync.SourceApiAssociation;
 * import com.pulumi.aws.appsync.SourceApiAssociationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var test = new SourceApiAssociation("test", SourceApiAssociationArgs.builder()
 *             .description("My source API Merged")
 *             .mergedApiId("gzos6bteufdunffzzifiowisoe")
 *             .sourceApiId("fzzifiowisoegzos6bteufdunf")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:appsync:SourceApiAssociation
 *     properties:
 *       description: My source API Merged
 *       mergedApiId: gzos6bteufdunffzzifiowisoe
 *       sourceApiId: fzzifiowisoegzos6bteufdunf
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import AppSync Source Api Association using the `gzos6bteufdunffzzifiowisoe,243685a0-9347-4a1a-89c1-9b57dea01e31`. For example:
 * ```sh
 * $ pulumi import aws:appsync/sourceApiAssociation:SourceApiAssociation example gzos6bteufdunffzzifiowisoe,243685a0-9347-4a1a-89c1-9b57dea01e31
 * ```
 * @property description Description of the source API being merged.
 * @property mergedApiArn ARN of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
 * @property mergedApiId ID of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
 * @property sourceApiArn ARN of the source API. One of `source_api_arn` or `source_api_id` must be specified.
 * @property sourceApiAssociationConfigs
 * @property sourceApiId ID of the source API. One of `source_api_arn` or `source_api_id` must be specified.
 * @property timeouts
 */
public data class SourceApiAssociationArgs(
    public val description: Output? = null,
    public val mergedApiArn: Output? = null,
    public val mergedApiId: Output? = null,
    public val sourceApiArn: Output? = null,
    public val sourceApiAssociationConfigs: Output>? = null,
    public val sourceApiId: Output? = null,
    public val timeouts: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.appsync.SourceApiAssociationArgs =
        com.pulumi.aws.appsync.SourceApiAssociationArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .mergedApiArn(mergedApiArn?.applyValue({ args0 -> args0 }))
            .mergedApiId(mergedApiId?.applyValue({ args0 -> args0 }))
            .sourceApiArn(sourceApiArn?.applyValue({ args0 -> args0 }))
            .sourceApiAssociationConfigs(
                sourceApiAssociationConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .sourceApiId(sourceApiId?.applyValue({ args0 -> args0 }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [SourceApiAssociationArgs].
 */
@PulumiTagMarker
public class SourceApiAssociationArgsBuilder internal constructor() {
    private var description: Output? = null

    private var mergedApiArn: Output? = null

    private var mergedApiId: Output? = null

    private var sourceApiArn: Output? = null

    private var sourceApiAssociationConfigs:
        Output>? = null

    private var sourceApiId: Output? = null

    private var timeouts: Output? = null

    /**
     * @param value Description of the source API being merged.
     */
    @JvmName("fvpbcqcrvcqimxup")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value ARN of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
     */
    @JvmName("jtdqcrimestgfxxw")
    public suspend fun mergedApiArn(`value`: Output) {
        this.mergedApiArn = value
    }

    /**
     * @param value ID of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
     */
    @JvmName("vaaprryhagnqmijh")
    public suspend fun mergedApiId(`value`: Output) {
        this.mergedApiId = value
    }

    /**
     * @param value ARN of the source API. One of `source_api_arn` or `source_api_id` must be specified.
     */
    @JvmName("mhwbjqxljlmescrq")
    public suspend fun sourceApiArn(`value`: Output) {
        this.sourceApiArn = value
    }

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

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

    /**
     * @param values
     */
    @JvmName("swxrfmmaxlgcnrud")
    public suspend fun sourceApiAssociationConfigs(values: List>) {
        this.sourceApiAssociationConfigs = Output.all(values)
    }

    /**
     * @param value ID of the source API. One of `source_api_arn` or `source_api_id` must be specified.
     */
    @JvmName("koxibugrxfonlwfk")
    public suspend fun sourceApiId(`value`: Output) {
        this.sourceApiId = value
    }

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

    /**
     * @param value Description of the source API being merged.
     */
    @JvmName("kobogkiogbmyakpl")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value ARN of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
     */
    @JvmName("fnnutfpvgdpujhfg")
    public suspend fun mergedApiArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergedApiArn = mapped
    }

    /**
     * @param value ID of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
     */
    @JvmName("xlyhsymjeucxvfjm")
    public suspend fun mergedApiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergedApiId = mapped
    }

    /**
     * @param value ARN of the source API. One of `source_api_arn` or `source_api_id` must be specified.
     */
    @JvmName("prgpihgrjnbyreut")
    public suspend fun sourceApiArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceApiArn = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("ajhaxgqcjqpvgmlk")
    public suspend fun sourceApiAssociationConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SourceApiAssociationSourceApiAssociationConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sourceApiAssociationConfigs = mapped
    }

    /**
     * @param argument
     */
    @JvmName("dxygcabosixtyroi")
    public suspend fun sourceApiAssociationConfigs(vararg argument: suspend SourceApiAssociationSourceApiAssociationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SourceApiAssociationSourceApiAssociationConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sourceApiAssociationConfigs = mapped
    }

    /**
     * @param argument
     */
    @JvmName("teicnrbwxpceyfwm")
    public suspend fun sourceApiAssociationConfigs(argument: suspend SourceApiAssociationSourceApiAssociationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SourceApiAssociationSourceApiAssociationConfigArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.sourceApiAssociationConfigs = mapped
    }

    /**
     * @param values
     */
    @JvmName("xtkvhwfonopcchrr")
    public suspend fun sourceApiAssociationConfigs(vararg values: SourceApiAssociationSourceApiAssociationConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceApiAssociationConfigs = mapped
    }

    /**
     * @param value ID of the source API. One of `source_api_arn` or `source_api_id` must be specified.
     */
    @JvmName("ciohcdgucajslokh")
    public suspend fun sourceApiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceApiId = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("lyhwsynjcdknxmna")
    public suspend fun timeouts(argument: suspend SourceApiAssociationTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = SourceApiAssociationTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    internal fun build(): SourceApiAssociationArgs = SourceApiAssociationArgs(
        description = description,
        mergedApiArn = mergedApiArn,
        mergedApiId = mergedApiId,
        sourceApiArn = sourceApiArn,
        sourceApiAssociationConfigs = sourceApiAssociationConfigs,
        sourceApiId = sourceApiId,
        timeouts = timeouts,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy