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

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

package com.pulumi.aws.codeconnections.kotlin

import com.pulumi.aws.codeconnections.HostArgs.builder
import com.pulumi.aws.codeconnections.kotlin.inputs.HostTimeoutsArgs
import com.pulumi.aws.codeconnections.kotlin.inputs.HostTimeoutsArgsBuilder
import com.pulumi.aws.codeconnections.kotlin.inputs.HostVpcConfigurationArgs
import com.pulumi.aws.codeconnections.kotlin.inputs.HostVpcConfigurationArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS CodeConnections Host.
 * > **NOTE:** The `aws.codeconnections.Host` resource is created in the state `PENDING`. Authentication with the host provider must be completed in the AWS Console. For more information visit [Set up a pending host](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-setup.html).
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.codeconnections.Host("example", {
 *     name: "example-host",
 *     providerEndpoint: "https://example.com",
 *     providerType: "GitHubEnterpriseServer",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.codeconnections.Host("example",
 *     name="example-host",
 *     provider_endpoint="https://example.com",
 *     provider_type="GitHubEnterpriseServer")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.CodeConnections.Host("example", new()
 *     {
 *         Name = "example-host",
 *         ProviderEndpoint = "https://example.com",
 *         ProviderType = "GitHubEnterpriseServer",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codeconnections"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := codeconnections.NewHost(ctx, "example", &codeconnections.HostArgs{
 * 			Name:             pulumi.String("example-host"),
 * 			ProviderEndpoint: pulumi.String("https://example.com"),
 * 			ProviderType:     pulumi.String("GitHubEnterpriseServer"),
 * 		})
 * 		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.codeconnections.Host;
 * import com.pulumi.aws.codeconnections.HostArgs;
 * 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 Host("example", HostArgs.builder()
 *             .name("example-host")
 *             .providerEndpoint("https://example.com")
 *             .providerType("GitHubEnterpriseServer")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:codeconnections:Host
 *     properties:
 *       name: example-host
 *       providerEndpoint: https://example.com
 *       providerType: GitHubEnterpriseServer
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import CodeConnections Host using the ARN. For example:
 * ```sh
 * $ pulumi import aws:codeconnections/host:Host example-host arn:aws:codeconnections:us-west-1:0123456789:host/79d4d357-a2ee-41e4-b350-2fe39ae59448
 * ```
 * @property name The name of the host to be created. The name must be unique in the calling AWS account.
 * @property providerEndpoint The endpoint of the infrastructure to be represented by the host after it is created.
 * @property providerType The name of the external provider where your third-party code repository is configured.
 * @property tags
 * @property timeouts
 * @property vpcConfiguration The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
 */
public data class HostArgs(
    public val name: Output? = null,
    public val providerEndpoint: Output? = null,
    public val providerType: Output? = null,
    public val tags: Output>? = null,
    public val timeouts: Output? = null,
    public val vpcConfiguration: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.codeconnections.HostArgs =
        com.pulumi.aws.codeconnections.HostArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .providerEndpoint(providerEndpoint?.applyValue({ args0 -> args0 }))
            .providerType(providerType?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vpcConfiguration(
                vpcConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [HostArgs].
 */
@PulumiTagMarker
public class HostArgsBuilder internal constructor() {
    private var name: Output? = null

    private var providerEndpoint: Output? = null

    private var providerType: Output? = null

    private var tags: Output>? = null

    private var timeouts: Output? = null

    private var vpcConfiguration: Output? = null

    /**
     * @param value The name of the host to be created. The name must be unique in the calling AWS account.
     */
    @JvmName("tkwqsyemspvoeyqe")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The endpoint of the infrastructure to be represented by the host after it is created.
     */
    @JvmName("uixadjtnipvkifiu")
    public suspend fun providerEndpoint(`value`: Output) {
        this.providerEndpoint = value
    }

    /**
     * @param value The name of the external provider where your third-party code repository is configured.
     */
    @JvmName("lfftotjnktnwcpid")
    public suspend fun providerType(`value`: Output) {
        this.providerType = value
    }

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

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

    /**
     * @param value The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
     */
    @JvmName("arlhaiqdrpbqxymb")
    public suspend fun vpcConfiguration(`value`: Output) {
        this.vpcConfiguration = value
    }

    /**
     * @param value The name of the host to be created. The name must be unique in the calling AWS account.
     */
    @JvmName("vxtpuwjsbyrdltho")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The endpoint of the infrastructure to be represented by the host after it is created.
     */
    @JvmName("lnhwwgllvrdjcrqt")
    public suspend fun providerEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.providerEndpoint = mapped
    }

    /**
     * @param value The name of the external provider where your third-party code repository is configured.
     */
    @JvmName("hfnohywajqsbsoga")
    public suspend fun providerType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.providerType = mapped
    }

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

    /**
     * @param values
     */
    @JvmName("kvjvtuqauicvtlpw")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

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

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

    /**
     * @param value The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
     */
    @JvmName("eyvyqjptdohnksch")
    public suspend fun vpcConfiguration(`value`: HostVpcConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcConfiguration = mapped
    }

    /**
     * @param argument The VPC configuration to be provisioned for the host. A VPC must be configured, and the infrastructure to be represented by the host must already be connected to the VPC.
     */
    @JvmName("mkrrbfqplufonoeo")
    public suspend fun vpcConfiguration(argument: suspend HostVpcConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = HostVpcConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vpcConfiguration = mapped
    }

    internal fun build(): HostArgs = HostArgs(
        name = name,
        providerEndpoint = providerEndpoint,
        providerType = providerType,
        tags = tags,
        timeouts = timeouts,
        vpcConfiguration = vpcConfiguration,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy