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

com.pulumi.gcp.appengine.kotlin.ApplicationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.appengine.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.appengine.ApplicationArgs.builder
import com.pulumi.gcp.appengine.kotlin.inputs.ApplicationFeatureSettingsArgs
import com.pulumi.gcp.appengine.kotlin.inputs.ApplicationFeatureSettingsArgsBuilder
import com.pulumi.gcp.appengine.kotlin.inputs.ApplicationIapArgs
import com.pulumi.gcp.appengine.kotlin.inputs.ApplicationIapArgsBuilder
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.jvm.JvmName

/**
 * Allows creation and management of an App Engine application.
 * > App Engine applications cannot be deleted once they're created; you have to delete the
 *    entire project to delete the application. This provider will report the application has been
 *    successfully deleted; this is a limitation of the provider, and will go away in the future.
 *    This provider is not able to delete App Engine applications.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const myProject = new gcp.organizations.Project("my_project", {
 *     name: "My Project",
 *     projectId: "your-project-id",
 *     orgId: "1234567",
 * });
 * const app = new gcp.appengine.Application("app", {
 *     project: myProject.projectId,
 *     locationId: "us-central",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * my_project = gcp.organizations.Project("my_project",
 *     name="My Project",
 *     project_id="your-project-id",
 *     org_id="1234567")
 * app = gcp.appengine.Application("app",
 *     project=my_project.project_id,
 *     location_id="us-central")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var myProject = new Gcp.Organizations.Project("my_project", new()
 *     {
 *         Name = "My Project",
 *         ProjectId = "your-project-id",
 *         OrgId = "1234567",
 *     });
 *     var app = new Gcp.AppEngine.Application("app", new()
 *     {
 *         Project = myProject.ProjectId,
 *         LocationId = "us-central",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/appengine"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		myProject, err := organizations.NewProject(ctx, "my_project", &organizations.ProjectArgs{
 * 			Name:      pulumi.String("My Project"),
 * 			ProjectId: pulumi.String("your-project-id"),
 * 			OrgId:     pulumi.String("1234567"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appengine.NewApplication(ctx, "app", &appengine.ApplicationArgs{
 * 			Project:    myProject.ProjectId,
 * 			LocationId: pulumi.String("us-central"),
 * 		})
 * 		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.organizations.Project;
 * import com.pulumi.gcp.organizations.ProjectArgs;
 * import com.pulumi.gcp.appengine.Application;
 * import com.pulumi.gcp.appengine.ApplicationArgs;
 * 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 myProject = new Project("myProject", ProjectArgs.builder()
 *             .name("My Project")
 *             .projectId("your-project-id")
 *             .orgId("1234567")
 *             .build());
 *         var app = new Application("app", ApplicationArgs.builder()
 *             .project(myProject.projectId())
 *             .locationId("us-central")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   myProject:
 *     type: gcp:organizations:Project
 *     name: my_project
 *     properties:
 *       name: My Project
 *       projectId: your-project-id
 *       orgId: '1234567'
 *   app:
 *     type: gcp:appengine:Application
 *     properties:
 *       project: ${myProject.projectId}
 *       locationId: us-central
 * ```
 * 
 * ## Import
 * Applications can be imported using the ID of the project the application belongs to, e.g.
 * * `{{project-id}}`
 * When using the `pulumi import` command, Applications can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:appengine/application:Application default {{project-id}}
 * ```
 * @property authDomain The domain to authenticate users with when using App Engine's User API.
 * @property databaseType The type of the Cloud Firestore or Cloud Datastore database associated with this application.
 * Can be `CLOUD_FIRESTORE` or `CLOUD_DATASTORE_COMPATIBILITY` for new
 * instances.  To support old instances, the value `CLOUD_DATASTORE` is accepted by the provider, but will be rejected by the API.
 * To create a Cloud Firestore database without creating an App Engine application, use the
 * `gcp.firestore.Database`
 * resource instead.
 * @property featureSettings A block of optional settings to configure specific App Engine features:
 * @property iap Settings for enabling Cloud Identity Aware Proxy
 * @property locationId The [location](https://cloud.google.com/appengine/docs/locations)
 * to serve the app from.
 * @property project The project ID to create the application under.
 * ~>**NOTE:** GCP only accepts project ID, not project number. If you are using number,
 * you may get a "Permission denied" error.
 * @property servingStatus The serving status of the app.
 */
public data class ApplicationArgs(
    public val authDomain: Output? = null,
    public val databaseType: Output? = null,
    public val featureSettings: Output? = null,
    public val iap: Output? = null,
    public val locationId: Output? = null,
    public val project: Output? = null,
    public val servingStatus: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.appengine.ApplicationArgs =
        com.pulumi.gcp.appengine.ApplicationArgs.builder()
            .authDomain(authDomain?.applyValue({ args0 -> args0 }))
            .databaseType(databaseType?.applyValue({ args0 -> args0 }))
            .featureSettings(featureSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .iap(iap?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .locationId(locationId?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .servingStatus(servingStatus?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApplicationArgs].
 */
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
    private var authDomain: Output? = null

    private var databaseType: Output? = null

    private var featureSettings: Output? = null

    private var iap: Output? = null

    private var locationId: Output? = null

    private var project: Output? = null

    private var servingStatus: Output? = null

    /**
     * @param value The domain to authenticate users with when using App Engine's User API.
     */
    @JvmName("vjdageldlhlevmgj")
    public suspend fun authDomain(`value`: Output) {
        this.authDomain = value
    }

    /**
     * @param value The type of the Cloud Firestore or Cloud Datastore database associated with this application.
     * Can be `CLOUD_FIRESTORE` or `CLOUD_DATASTORE_COMPATIBILITY` for new
     * instances.  To support old instances, the value `CLOUD_DATASTORE` is accepted by the provider, but will be rejected by the API.
     * To create a Cloud Firestore database without creating an App Engine application, use the
     * `gcp.firestore.Database`
     * resource instead.
     */
    @JvmName("swgvsceknoparncj")
    public suspend fun databaseType(`value`: Output) {
        this.databaseType = value
    }

    /**
     * @param value A block of optional settings to configure specific App Engine features:
     */
    @JvmName("xtdmqtggeffoqgfb")
    public suspend fun featureSettings(`value`: Output) {
        this.featureSettings = value
    }

    /**
     * @param value Settings for enabling Cloud Identity Aware Proxy
     */
    @JvmName("kwmvdhhixosmwdjy")
    public suspend fun iap(`value`: Output) {
        this.iap = value
    }

    /**
     * @param value The [location](https://cloud.google.com/appengine/docs/locations)
     * to serve the app from.
     */
    @JvmName("tiabohpueeqphcif")
    public suspend fun locationId(`value`: Output) {
        this.locationId = value
    }

    /**
     * @param value The project ID to create the application under.
     * ~>**NOTE:** GCP only accepts project ID, not project number. If you are using number,
     * you may get a "Permission denied" error.
     */
    @JvmName("hdcyikojclrlbees")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The serving status of the app.
     */
    @JvmName("mexuloivocxgvemc")
    public suspend fun servingStatus(`value`: Output) {
        this.servingStatus = value
    }

    /**
     * @param value The domain to authenticate users with when using App Engine's User API.
     */
    @JvmName("runemvfirfwidmwc")
    public suspend fun authDomain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authDomain = mapped
    }

    /**
     * @param value The type of the Cloud Firestore or Cloud Datastore database associated with this application.
     * Can be `CLOUD_FIRESTORE` or `CLOUD_DATASTORE_COMPATIBILITY` for new
     * instances.  To support old instances, the value `CLOUD_DATASTORE` is accepted by the provider, but will be rejected by the API.
     * To create a Cloud Firestore database without creating an App Engine application, use the
     * `gcp.firestore.Database`
     * resource instead.
     */
    @JvmName("iqwlhiahxwghcjfs")
    public suspend fun databaseType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databaseType = mapped
    }

    /**
     * @param value A block of optional settings to configure specific App Engine features:
     */
    @JvmName("dgabcnqnjpxsjqhh")
    public suspend fun featureSettings(`value`: ApplicationFeatureSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.featureSettings = mapped
    }

    /**
     * @param argument A block of optional settings to configure specific App Engine features:
     */
    @JvmName("wlorujahoobwdqpa")
    public suspend fun featureSettings(argument: suspend ApplicationFeatureSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = ApplicationFeatureSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.featureSettings = mapped
    }

    /**
     * @param value Settings for enabling Cloud Identity Aware Proxy
     */
    @JvmName("iyfcpfjpnkhktpax")
    public suspend fun iap(`value`: ApplicationIapArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iap = mapped
    }

    /**
     * @param argument Settings for enabling Cloud Identity Aware Proxy
     */
    @JvmName("rpkwfmkoifiwswwb")
    public suspend fun iap(argument: suspend ApplicationIapArgsBuilder.() -> Unit) {
        val toBeMapped = ApplicationIapArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.iap = mapped
    }

    /**
     * @param value The [location](https://cloud.google.com/appengine/docs/locations)
     * to serve the app from.
     */
    @JvmName("hqujuqdqfnfebfsu")
    public suspend fun locationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.locationId = mapped
    }

    /**
     * @param value The project ID to create the application under.
     * ~>**NOTE:** GCP only accepts project ID, not project number. If you are using number,
     * you may get a "Permission denied" error.
     */
    @JvmName("anqyyarijqkktduh")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The serving status of the app.
     */
    @JvmName("crfwdarqnjdbwyrr")
    public suspend fun servingStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.servingStatus = mapped
    }

    internal fun build(): ApplicationArgs = ApplicationArgs(
        authDomain = authDomain,
        databaseType = databaseType,
        featureSettings = featureSettings,
        iap = iap,
        locationId = locationId,
        project = project,
        servingStatus = servingStatus,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy