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

com.pulumi.aws.vpclattice.kotlin.ServiceNetworkServiceAssociationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.vpclattice.kotlin

import com.pulumi.aws.vpclattice.ServiceNetworkServiceAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS VPC Lattice Service Network Service Association.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.vpclattice.ServiceNetworkServiceAssociation("example", {
 *     serviceIdentifier: exampleAwsVpclatticeService.id,
 *     serviceNetworkIdentifier: exampleAwsVpclatticeServiceNetwork.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.vpclattice.ServiceNetworkServiceAssociation("example",
 *     service_identifier=example_aws_vpclattice_service["id"],
 *     service_network_identifier=example_aws_vpclattice_service_network["id"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.VpcLattice.ServiceNetworkServiceAssociation("example", new()
 *     {
 *         ServiceIdentifier = exampleAwsVpclatticeService.Id,
 *         ServiceNetworkIdentifier = exampleAwsVpclatticeServiceNetwork.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := vpclattice.NewServiceNetworkServiceAssociation(ctx, "example", &vpclattice.ServiceNetworkServiceAssociationArgs{
 * 			ServiceIdentifier:        pulumi.Any(exampleAwsVpclatticeService.Id),
 * 			ServiceNetworkIdentifier: pulumi.Any(exampleAwsVpclatticeServiceNetwork.Id),
 * 		})
 * 		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.vpclattice.ServiceNetworkServiceAssociation;
 * import com.pulumi.aws.vpclattice.ServiceNetworkServiceAssociationArgs;
 * 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 example = new ServiceNetworkServiceAssociation("example", ServiceNetworkServiceAssociationArgs.builder()
 *             .serviceIdentifier(exampleAwsVpclatticeService.id())
 *             .serviceNetworkIdentifier(exampleAwsVpclatticeServiceNetwork.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:vpclattice:ServiceNetworkServiceAssociation
 *     properties:
 *       serviceIdentifier: ${exampleAwsVpclatticeService.id}
 *       serviceNetworkIdentifier: ${exampleAwsVpclatticeServiceNetwork.id}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import VPC Lattice Service Network Service Association using the `id`. For example:
 * ```sh
 * $ pulumi import aws:vpclattice/serviceNetworkServiceAssociation:ServiceNetworkServiceAssociation example snsa-05e2474658a88f6ba
 * ```
 * @property serviceIdentifier The ID or Amazon Resource Identifier (ARN) of the service.
 * @property serviceNetworkIdentifier The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.
 * The following arguments are optional:
 * @property tags Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class ServiceNetworkServiceAssociationArgs(
    public val serviceIdentifier: Output? = null,
    public val serviceNetworkIdentifier: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.vpclattice.ServiceNetworkServiceAssociationArgs =
        com.pulumi.aws.vpclattice.ServiceNetworkServiceAssociationArgs.builder()
            .serviceIdentifier(serviceIdentifier?.applyValue({ args0 -> args0 }))
            .serviceNetworkIdentifier(serviceNetworkIdentifier?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ServiceNetworkServiceAssociationArgs].
 */
@PulumiTagMarker
public class ServiceNetworkServiceAssociationArgsBuilder internal constructor() {
    private var serviceIdentifier: Output? = null

    private var serviceNetworkIdentifier: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The ID or Amazon Resource Identifier (ARN) of the service.
     */
    @JvmName("anpednghorlyybpr")
    public suspend fun serviceIdentifier(`value`: Output) {
        this.serviceIdentifier = value
    }

    /**
     * @param value The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.
     * The following arguments are optional:
     */
    @JvmName("exyfdtjncmcwbaac")
    public suspend fun serviceNetworkIdentifier(`value`: Output) {
        this.serviceNetworkIdentifier = value
    }

    /**
     * @param value Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ymwickjdaexjtqbq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID or Amazon Resource Identifier (ARN) of the service.
     */
    @JvmName("bqkdkksscgjnwyyj")
    public suspend fun serviceIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceIdentifier = mapped
    }

    /**
     * @param value The ID or Amazon Resource Identifier (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.
     * The following arguments are optional:
     */
    @JvmName("kjbskytyjkschiav")
    public suspend fun serviceNetworkIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceNetworkIdentifier = mapped
    }

    /**
     * @param value Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("taxdjtdjqkhycgyv")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("oplvugfviviuwtrd")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ServiceNetworkServiceAssociationArgs = ServiceNetworkServiceAssociationArgs(
        serviceIdentifier = serviceIdentifier,
        serviceNetworkIdentifier = serviceNetworkIdentifier,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy