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

com.pulumi.gcp.applicationintegration.kotlin.AuthConfigArgs.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.applicationintegration.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.applicationintegration.AuthConfigArgs.builder
import com.pulumi.gcp.applicationintegration.kotlin.inputs.AuthConfigClientCertificateArgs
import com.pulumi.gcp.applicationintegration.kotlin.inputs.AuthConfigClientCertificateArgsBuilder
import com.pulumi.gcp.applicationintegration.kotlin.inputs.AuthConfigDecryptedCredentialArgs
import com.pulumi.gcp.applicationintegration.kotlin.inputs.AuthConfigDecryptedCredentialArgsBuilder
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

/**
 * The AuthConfig resource use to hold channels and connection config data.
 * To get more information about AuthConfig, see:
 * * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.authConfigs)
 * * How-to Guides
 *     * [Manage authentication profiles](https://cloud.google.com/application-integration/docs/configure-authentication-profiles)
 *     * [Official Documentation](https://cloud.google.com/application-integration/docs/overview)
 * ## Example Usage
 * ### Integrations Auth Config Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const client = new gcp.applicationintegration.Client("client", {location: "us-west1"});
 * const basicExample = new gcp.applicationintegration.AuthConfig("basic_example", {
 *     location: "us-west1",
 *     displayName: "test-authconfig",
 *     description: "Test auth config created via terraform",
 *     decryptedCredential: {
 *         credentialType: "USERNAME_AND_PASSWORD",
 *         usernameAndPassword: {
 *             username: "test-username",
 *             password: "test-password",
 *         },
 *     },
 * }, {
 *     dependsOn: [client],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * client = gcp.applicationintegration.Client("client", location="us-west1")
 * basic_example = gcp.applicationintegration.AuthConfig("basic_example",
 *     location="us-west1",
 *     display_name="test-authconfig",
 *     description="Test auth config created via terraform",
 *     decrypted_credential={
 *         "credential_type": "USERNAME_AND_PASSWORD",
 *         "username_and_password": {
 *             "username": "test-username",
 *             "password": "test-password",
 *         },
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[client]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var client = new Gcp.ApplicationIntegration.Client("client", new()
 *     {
 *         Location = "us-west1",
 *     });
 *     var basicExample = new Gcp.ApplicationIntegration.AuthConfig("basic_example", new()
 *     {
 *         Location = "us-west1",
 *         DisplayName = "test-authconfig",
 *         Description = "Test auth config created via terraform",
 *         DecryptedCredential = new Gcp.ApplicationIntegration.Inputs.AuthConfigDecryptedCredentialArgs
 *         {
 *             CredentialType = "USERNAME_AND_PASSWORD",
 *             UsernameAndPassword = new Gcp.ApplicationIntegration.Inputs.AuthConfigDecryptedCredentialUsernameAndPasswordArgs
 *             {
 *                 Username = "test-username",
 *                 Password = "test-password",
 *             },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             client,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/applicationintegration"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		client, err := applicationintegration.NewClient(ctx, "client", &applicationintegration.ClientArgs{
 * 			Location: pulumi.String("us-west1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = applicationintegration.NewAuthConfig(ctx, "basic_example", &applicationintegration.AuthConfigArgs{
 * 			Location:    pulumi.String("us-west1"),
 * 			DisplayName: pulumi.String("test-authconfig"),
 * 			Description: pulumi.String("Test auth config created via terraform"),
 * 			DecryptedCredential: &applicationintegration.AuthConfigDecryptedCredentialArgs{
 * 				CredentialType: pulumi.String("USERNAME_AND_PASSWORD"),
 * 				UsernameAndPassword: &applicationintegration.AuthConfigDecryptedCredentialUsernameAndPasswordArgs{
 * 					Username: pulumi.String("test-username"),
 * 					Password: pulumi.String("test-password"),
 * 				},
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			client,
 * 		}))
 * 		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.applicationintegration.Client;
 * import com.pulumi.gcp.applicationintegration.ClientArgs;
 * import com.pulumi.gcp.applicationintegration.AuthConfig;
 * import com.pulumi.gcp.applicationintegration.AuthConfigArgs;
 * import com.pulumi.gcp.applicationintegration.inputs.AuthConfigDecryptedCredentialArgs;
 * import com.pulumi.gcp.applicationintegration.inputs.AuthConfigDecryptedCredentialUsernameAndPasswordArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 client = new Client("client", ClientArgs.builder()
 *             .location("us-west1")
 *             .build());
 *         var basicExample = new AuthConfig("basicExample", AuthConfigArgs.builder()
 *             .location("us-west1")
 *             .displayName("test-authconfig")
 *             .description("Test auth config created via terraform")
 *             .decryptedCredential(AuthConfigDecryptedCredentialArgs.builder()
 *                 .credentialType("USERNAME_AND_PASSWORD")
 *                 .usernameAndPassword(AuthConfigDecryptedCredentialUsernameAndPasswordArgs.builder()
 *                     .username("test-username")
 *                     .password("test-password")
 *                     .build())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(client)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   client:
 *     type: gcp:applicationintegration:Client
 *     properties:
 *       location: us-west1
 *   basicExample:
 *     type: gcp:applicationintegration:AuthConfig
 *     name: basic_example
 *     properties:
 *       location: us-west1
 *       displayName: test-authconfig
 *       description: Test auth config created via terraform
 *       decryptedCredential:
 *         credentialType: USERNAME_AND_PASSWORD
 *         usernameAndPassword:
 *           username: test-username
 *           password: test-password
 *     options:
 *       dependsOn:
 *         - ${client}
 * ```
 * 
 * ## Import
 * AuthConfig can be imported using any of these accepted formats:
 * * `{{project}}/{{name}}`
 * * `{{project}} {{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, AuthConfig can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default "{{project}} {{name}}"
 * ```
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{name}}
 * ```
 * @property clientCertificate Raw client certificate
 * Structure is documented below.
 * @property decryptedCredential Raw auth credentials.
 * Structure is documented below.
 * @property description A description of the auth config.
 * @property displayName The name of the auth config.
 * @property expiryNotificationDurations User can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
 * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
 * @property location Location in which client needs to be provisioned.
 * - - -
 * @property overrideValidTime User provided expiry time to override. For the example of Salesforce, username/password credentials can be valid for 6 months depending on the instance settings.
 * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property visibility The visibility of the auth config.
 * Possible values are: `PRIVATE`, `CLIENT_VISIBLE`.
 */
public data class AuthConfigArgs(
    public val clientCertificate: Output? = null,
    public val decryptedCredential: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val expiryNotificationDurations: Output>? = null,
    public val location: Output? = null,
    public val overrideValidTime: Output? = null,
    public val project: Output? = null,
    public val visibility: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.applicationintegration.AuthConfigArgs =
        com.pulumi.gcp.applicationintegration.AuthConfigArgs.builder()
            .clientCertificate(clientCertificate?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .decryptedCredential(
                decryptedCredential?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .expiryNotificationDurations(
                expiryNotificationDurations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .overrideValidTime(overrideValidTime?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .visibility(visibility?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AuthConfigArgs].
 */
@PulumiTagMarker
public class AuthConfigArgsBuilder internal constructor() {
    private var clientCertificate: Output? = null

    private var decryptedCredential: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var expiryNotificationDurations: Output>? = null

    private var location: Output? = null

    private var overrideValidTime: Output? = null

    private var project: Output? = null

    private var visibility: Output? = null

    /**
     * @param value Raw client certificate
     * Structure is documented below.
     */
    @JvmName("dtfmcpjpvsytkplc")
    public suspend fun clientCertificate(`value`: Output) {
        this.clientCertificate = value
    }

    /**
     * @param value Raw auth credentials.
     * Structure is documented below.
     */
    @JvmName("lqidgqeshdgleshd")
    public suspend fun decryptedCredential(`value`: Output) {
        this.decryptedCredential = value
    }

    /**
     * @param value A description of the auth config.
     */
    @JvmName("iflualhmsmkcaeyw")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the auth config.
     */
    @JvmName("xcqpcgwbtgpqbplv")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value User can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("enbhgwpbqkpveoer")
    public suspend fun expiryNotificationDurations(`value`: Output>) {
        this.expiryNotificationDurations = value
    }

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

    /**
     * @param values User can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("acvuwqrayypgxdup")
    public suspend fun expiryNotificationDurations(values: List>) {
        this.expiryNotificationDurations = Output.all(values)
    }

    /**
     * @param value Location in which client needs to be provisioned.
     * - - -
     */
    @JvmName("ufwsuowhapapnroc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value User provided expiry time to override. For the example of Salesforce, username/password credentials can be valid for 6 months depending on the instance settings.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
     */
    @JvmName("eflqsfjgbgmqeidd")
    public suspend fun overrideValidTime(`value`: Output) {
        this.overrideValidTime = value
    }

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

    /**
     * @param value The visibility of the auth config.
     * Possible values are: `PRIVATE`, `CLIENT_VISIBLE`.
     */
    @JvmName("qavxqrmpfcndfqfb")
    public suspend fun visibility(`value`: Output) {
        this.visibility = value
    }

    /**
     * @param value Raw client certificate
     * Structure is documented below.
     */
    @JvmName("mkvwwkiahtowcwoa")
    public suspend fun clientCertificate(`value`: AuthConfigClientCertificateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCertificate = mapped
    }

    /**
     * @param argument Raw client certificate
     * Structure is documented below.
     */
    @JvmName("kltkgydvfadaxcru")
    public suspend fun clientCertificate(argument: suspend AuthConfigClientCertificateArgsBuilder.() -> Unit) {
        val toBeMapped = AuthConfigClientCertificateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.clientCertificate = mapped
    }

    /**
     * @param value Raw auth credentials.
     * Structure is documented below.
     */
    @JvmName("ypwbehrywfueyiwq")
    public suspend fun decryptedCredential(`value`: AuthConfigDecryptedCredentialArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.decryptedCredential = mapped
    }

    /**
     * @param argument Raw auth credentials.
     * Structure is documented below.
     */
    @JvmName("yjoylvuwrkssnwsc")
    public suspend fun decryptedCredential(argument: suspend AuthConfigDecryptedCredentialArgsBuilder.() -> Unit) {
        val toBeMapped = AuthConfigDecryptedCredentialArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.decryptedCredential = mapped
    }

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

    /**
     * @param value The name of the auth config.
     */
    @JvmName("jkccoscjoektrtrd")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value User can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("dhcdypjijbaqmtty")
    public suspend fun expiryNotificationDurations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expiryNotificationDurations = mapped
    }

    /**
     * @param values User can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("atkwpfwolvrtuikr")
    public suspend fun expiryNotificationDurations(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.expiryNotificationDurations = mapped
    }

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

    /**
     * @param value User provided expiry time to override. For the example of Salesforce, username/password credentials can be valid for 6 months depending on the instance settings.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
     */
    @JvmName("hlyadbsglfkcyalc")
    public suspend fun overrideValidTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overrideValidTime = mapped
    }

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

    /**
     * @param value The visibility of the auth config.
     * Possible values are: `PRIVATE`, `CLIENT_VISIBLE`.
     */
    @JvmName("aftumdgrqyvppann")
    public suspend fun visibility(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.visibility = mapped
    }

    internal fun build(): AuthConfigArgs = AuthConfigArgs(
        clientCertificate = clientCertificate,
        decryptedCredential = decryptedCredential,
        description = description,
        displayName = displayName,
        expiryNotificationDurations = expiryNotificationDurations,
        location = location,
        overrideValidTime = overrideValidTime,
        project = project,
        visibility = visibility,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy