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

com.pulumi.gcp.integrationconnectors.kotlin.EndpointAttachmentArgs.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: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.integrationconnectors.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.integrationconnectors.EndpointAttachmentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * An Integration connectors Endpoint Attachment.
 * To get more information about EndpointAttachment, see:
 * * [API documentation](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.endpointAttachments)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/integration-connectors/docs/create-endpoint-attachment)
 * ## Example Usage
 * ### Integration Connectors Endpoint Attachment
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const sampleendpointattachment = new gcp.integrationconnectors.EndpointAttachment("sampleendpointattachment", {
 *     name: "test-endpoint-attachment",
 *     location: "us-central1",
 *     description: "tf created description",
 *     serviceAttachment: "projects/connectors-example/regions/us-central1/serviceAttachments/test",
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * sampleendpointattachment = gcp.integrationconnectors.EndpointAttachment("sampleendpointattachment",
 *     name="test-endpoint-attachment",
 *     location="us-central1",
 *     description="tf created description",
 *     service_attachment="projects/connectors-example/regions/us-central1/serviceAttachments/test",
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var sampleendpointattachment = new Gcp.IntegrationConnectors.EndpointAttachment("sampleendpointattachment", new()
 *     {
 *         Name = "test-endpoint-attachment",
 *         Location = "us-central1",
 *         Description = "tf created description",
 *         ServiceAttachment = "projects/connectors-example/regions/us-central1/serviceAttachments/test",
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/integrationconnectors"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := integrationconnectors.NewEndpointAttachment(ctx, "sampleendpointattachment", &integrationconnectors.EndpointAttachmentArgs{
 * 			Name:              pulumi.String("test-endpoint-attachment"),
 * 			Location:          pulumi.String("us-central1"),
 * 			Description:       pulumi.String("tf created description"),
 * 			ServiceAttachment: pulumi.String("projects/connectors-example/regions/us-central1/serviceAttachments/test"),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		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.gcp.integrationconnectors.EndpointAttachment;
 * import com.pulumi.gcp.integrationconnectors.EndpointAttachmentArgs;
 * 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 sampleendpointattachment = new EndpointAttachment("sampleendpointattachment", EndpointAttachmentArgs.builder()
 *             .name("test-endpoint-attachment")
 *             .location("us-central1")
 *             .description("tf created description")
 *             .serviceAttachment("projects/connectors-example/regions/us-central1/serviceAttachments/test")
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   sampleendpointattachment:
 *     type: gcp:integrationconnectors:EndpointAttachment
 *     properties:
 *       name: test-endpoint-attachment
 *       location: us-central1
 *       description: tf created description
 *       serviceAttachment: projects/connectors-example/regions/us-central1/serviceAttachments/test
 *       labels:
 *         foo: bar
 * ```
 * 
 * ## Import
 * EndpointAttachment can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/endpointAttachments/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, EndpointAttachment can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:integrationconnectors/endpointAttachment:EndpointAttachment default projects/{{project}}/locations/{{location}}/endpointAttachments/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:integrationconnectors/endpointAttachment:EndpointAttachment default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:integrationconnectors/endpointAttachment:EndpointAttachment default {{location}}/{{name}}
 * ```
 * @property description Description of the resource.
 * @property endpointGlobalAccess Enable global access for endpoint attachment.
 * @property labels Resource labels to represent user provided metadata.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property location Location in which Endpoint Attachment needs to be created.
 * @property name Name of Endpoint Attachment needs to be created.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property serviceAttachment The path of the service attachment.
 */
public data class EndpointAttachmentArgs(
    public val description: Output? = null,
    public val endpointGlobalAccess: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val serviceAttachment: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.integrationconnectors.EndpointAttachmentArgs =
        com.pulumi.gcp.integrationconnectors.EndpointAttachmentArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .endpointGlobalAccess(endpointGlobalAccess?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .serviceAttachment(serviceAttachment?.applyValue({ args0 -> args0 })).build()
}

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

    private var endpointGlobalAccess: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var serviceAttachment: Output? = null

    /**
     * @param value Description of the resource.
     */
    @JvmName("qnmqrxdxerouykhn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Enable global access for endpoint attachment.
     */
    @JvmName("uafjktnkfjnkvmof")
    public suspend fun endpointGlobalAccess(`value`: Output) {
        this.endpointGlobalAccess = value
    }

    /**
     * @param value Resource labels to represent user provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("ifpplynnxibdubeu")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Location in which Endpoint Attachment needs to be created.
     */
    @JvmName("pjxoiwfphrkdnqcd")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of Endpoint Attachment needs to be created.
     * - - -
     */
    @JvmName("odgapkwrqhykflxm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("fcgsfuajsltkeqrb")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The path of the service attachment.
     */
    @JvmName("reratgdnweevixyr")
    public suspend fun serviceAttachment(`value`: Output) {
        this.serviceAttachment = value
    }

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

    /**
     * @param value Enable global access for endpoint attachment.
     */
    @JvmName("pqjpdyxoduqjjuxs")
    public suspend fun endpointGlobalAccess(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpointGlobalAccess = mapped
    }

    /**
     * @param value Resource labels to represent user provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("uxadinnrdnmxpybw")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Resource labels to represent user provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("yxiormwtyruuddxw")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Location in which Endpoint Attachment needs to be created.
     */
    @JvmName("eoaqjslltioduhfh")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of Endpoint Attachment needs to be created.
     * - - -
     */
    @JvmName("gekmtbfsxoqcrgyt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("siclohexsfhqaech")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The path of the service attachment.
     */
    @JvmName("drgfhdyfdyppfbvd")
    public suspend fun serviceAttachment(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAttachment = mapped
    }

    internal fun build(): EndpointAttachmentArgs = EndpointAttachmentArgs(
        description = description,
        endpointGlobalAccess = endpointGlobalAccess,
        labels = labels,
        location = location,
        name = name,
        project = project,
        serviceAttachment = serviceAttachment,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy