com.pulumi.aws.appsync.kotlin.SourceApiAssociation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.appsync.kotlin
import com.pulumi.aws.appsync.kotlin.outputs.SourceApiAssociationSourceApiAssociationConfig
import com.pulumi.aws.appsync.kotlin.outputs.SourceApiAssociationTimeouts
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 kotlin.collections.List
import com.pulumi.aws.appsync.kotlin.outputs.SourceApiAssociationSourceApiAssociationConfig.Companion.toKotlin as sourceApiAssociationSourceApiAssociationConfigToKotlin
import com.pulumi.aws.appsync.kotlin.outputs.SourceApiAssociationTimeouts.Companion.toKotlin as sourceApiAssociationTimeoutsToKotlin
/**
* 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.aws.appsync.SourceApiAssociation(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SourceApiAssociation(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class SourceApiAssociation internal constructor(
override val javaResource: com.pulumi.aws.appsync.SourceApiAssociation,
) : KotlinCustomResource(javaResource, SourceApiAssociationMapper) {
/**
* ARN of the Source Api Association.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* ID of the Source Api Association.
*/
public val associationId: Output
get() = javaResource.associationId().applyValue({ args0 -> args0 })
/**
* Description of the source API being merged.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* ARN of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
*/
public val mergedApiArn: Output
get() = javaResource.mergedApiArn().applyValue({ args0 -> args0 })
/**
* ID of the merged API. One of `merged_api_arn` or `merged_api_id` must be specified.
*/
public val mergedApiId: Output
get() = javaResource.mergedApiId().applyValue({ args0 -> args0 })
/**
* ARN of the source API. One of `source_api_arn` or `source_api_id` must be specified.
*/
public val sourceApiArn: Output
get() = javaResource.sourceApiArn().applyValue({ args0 -> args0 })
public val sourceApiAssociationConfigs:
Output>
get() = javaResource.sourceApiAssociationConfigs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> sourceApiAssociationSourceApiAssociationConfigToKotlin(args0) })
})
})
/**
* ID of the source API. One of `source_api_arn` or `source_api_id` must be specified.
*/
public val sourceApiId: Output
get() = javaResource.sourceApiId().applyValue({ args0 -> args0 })
public val timeouts: Output?
get() = javaResource.timeouts().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
sourceApiAssociationTimeoutsToKotlin(args0)
})
}).orElse(null)
})
}
public object SourceApiAssociationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.appsync.SourceApiAssociation::class == javaResource::class
override fun map(javaResource: Resource): SourceApiAssociation = SourceApiAssociation(
javaResource
as com.pulumi.aws.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 - 2024 Weber Informatics LLC | Privacy Policy