com.pulumi.gcp.apphub.kotlin.ApplicationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.apphub.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.apphub.ApplicationArgs.builder
import com.pulumi.gcp.apphub.kotlin.inputs.ApplicationAttributesArgs
import com.pulumi.gcp.apphub.kotlin.inputs.ApplicationAttributesArgsBuilder
import com.pulumi.gcp.apphub.kotlin.inputs.ApplicationScopeArgs
import com.pulumi.gcp.apphub.kotlin.inputs.ApplicationScopeArgsBuilder
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
/**
* Application is a functional grouping of Services and Workloads that helps achieve a desired end-to-end business functionality. Services and Workloads are owned by the Application.
* ## Example Usage
* ### Application Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const example = new gcp.apphub.Application("example", {
* location: "us-east1",
* applicationId: "example-application",
* scope: {
* type: "REGIONAL",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* example = gcp.apphub.Application("example",
* location="us-east1",
* application_id="example-application",
* scope=gcp.apphub.ApplicationScopeArgs(
* type="REGIONAL",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var example = new Gcp.Apphub.Application("example", new()
* {
* Location = "us-east1",
* ApplicationId = "example-application",
* Scope = new Gcp.Apphub.Inputs.ApplicationScopeArgs
* {
* Type = "REGIONAL",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apphub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apphub.NewApplication(ctx, "example", &apphub.ApplicationArgs{
* Location: pulumi.String("us-east1"),
* ApplicationId: pulumi.String("example-application"),
* Scope: &apphub.ApplicationScopeArgs{
* Type: pulumi.String("REGIONAL"),
* },
* })
* 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.apphub.Application;
* import com.pulumi.gcp.apphub.ApplicationArgs;
* import com.pulumi.gcp.apphub.inputs.ApplicationScopeArgs;
* 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 Application("example", ApplicationArgs.builder()
* .location("us-east1")
* .applicationId("example-application")
* .scope(ApplicationScopeArgs.builder()
* .type("REGIONAL")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: gcp:apphub:Application
* properties:
* location: us-east1
* applicationId: example-application
* scope:
* type: REGIONAL
* ```
*
* ### Application Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const example2 = new gcp.apphub.Application("example2", {
* location: "us-east1",
* applicationId: "example-application",
* displayName: "Application Full",
* scope: {
* type: "REGIONAL",
* },
* description: "Application for testing",
* attributes: {
* environment: {
* type: "STAGING",
* },
* criticality: {
* type: "MISSION_CRITICAL",
* },
* businessOwners: [{
* displayName: "Alice",
* email: "[email protected]",
* }],
* developerOwners: [{
* displayName: "Bob",
* email: "[email protected]",
* }],
* operatorOwners: [{
* displayName: "Charlie",
* email: "[email protected]",
* }],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* example2 = gcp.apphub.Application("example2",
* location="us-east1",
* application_id="example-application",
* display_name="Application Full",
* scope=gcp.apphub.ApplicationScopeArgs(
* type="REGIONAL",
* ),
* description="Application for testing",
* attributes=gcp.apphub.ApplicationAttributesArgs(
* environment=gcp.apphub.ApplicationAttributesEnvironmentArgs(
* type="STAGING",
* ),
* criticality=gcp.apphub.ApplicationAttributesCriticalityArgs(
* type="MISSION_CRITICAL",
* ),
* business_owners=[gcp.apphub.ApplicationAttributesBusinessOwnerArgs(
* display_name="Alice",
* email="[email protected]",
* )],
* developer_owners=[gcp.apphub.ApplicationAttributesDeveloperOwnerArgs(
* display_name="Bob",
* email="[email protected]",
* )],
* operator_owners=[gcp.apphub.ApplicationAttributesOperatorOwnerArgs(
* display_name="Charlie",
* email="[email protected]",
* )],
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var example2 = new Gcp.Apphub.Application("example2", new()
* {
* Location = "us-east1",
* ApplicationId = "example-application",
* DisplayName = "Application Full",
* Scope = new Gcp.Apphub.Inputs.ApplicationScopeArgs
* {
* Type = "REGIONAL",
* },
* Description = "Application for testing",
* Attributes = new Gcp.Apphub.Inputs.ApplicationAttributesArgs
* {
* Environment = new Gcp.Apphub.Inputs.ApplicationAttributesEnvironmentArgs
* {
* Type = "STAGING",
* },
* Criticality = new Gcp.Apphub.Inputs.ApplicationAttributesCriticalityArgs
* {
* Type = "MISSION_CRITICAL",
* },
* BusinessOwners = new[]
* {
* new Gcp.Apphub.Inputs.ApplicationAttributesBusinessOwnerArgs
* {
* DisplayName = "Alice",
* Email = "[email protected]",
* },
* },
* DeveloperOwners = new[]
* {
* new Gcp.Apphub.Inputs.ApplicationAttributesDeveloperOwnerArgs
* {
* DisplayName = "Bob",
* Email = "[email protected]",
* },
* },
* OperatorOwners = new[]
* {
* new Gcp.Apphub.Inputs.ApplicationAttributesOperatorOwnerArgs
* {
* DisplayName = "Charlie",
* Email = "[email protected]",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apphub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apphub.NewApplication(ctx, "example2", &apphub.ApplicationArgs{
* Location: pulumi.String("us-east1"),
* ApplicationId: pulumi.String("example-application"),
* DisplayName: pulumi.String("Application Full"),
* Scope: &apphub.ApplicationScopeArgs{
* Type: pulumi.String("REGIONAL"),
* },
* Description: pulumi.String("Application for testing"),
* Attributes: &apphub.ApplicationAttributesArgs{
* Environment: &apphub.ApplicationAttributesEnvironmentArgs{
* Type: pulumi.String("STAGING"),
* },
* Criticality: &apphub.ApplicationAttributesCriticalityArgs{
* Type: pulumi.String("MISSION_CRITICAL"),
* },
* BusinessOwners: apphub.ApplicationAttributesBusinessOwnerArray{
* &apphub.ApplicationAttributesBusinessOwnerArgs{
* DisplayName: pulumi.String("Alice"),
* Email: pulumi.String("[email protected]"),
* },
* },
* DeveloperOwners: apphub.ApplicationAttributesDeveloperOwnerArray{
* &apphub.ApplicationAttributesDeveloperOwnerArgs{
* DisplayName: pulumi.String("Bob"),
* Email: pulumi.String("[email protected]"),
* },
* },
* OperatorOwners: apphub.ApplicationAttributesOperatorOwnerArray{
* &apphub.ApplicationAttributesOperatorOwnerArgs{
* DisplayName: pulumi.String("Charlie"),
* Email: pulumi.String("[email protected]"),
* },
* },
* },
* })
* 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.apphub.Application;
* import com.pulumi.gcp.apphub.ApplicationArgs;
* import com.pulumi.gcp.apphub.inputs.ApplicationScopeArgs;
* import com.pulumi.gcp.apphub.inputs.ApplicationAttributesArgs;
* import com.pulumi.gcp.apphub.inputs.ApplicationAttributesEnvironmentArgs;
* import com.pulumi.gcp.apphub.inputs.ApplicationAttributesCriticalityArgs;
* 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 example2 = new Application("example2", ApplicationArgs.builder()
* .location("us-east1")
* .applicationId("example-application")
* .displayName("Application Full")
* .scope(ApplicationScopeArgs.builder()
* .type("REGIONAL")
* .build())
* .description("Application for testing")
* .attributes(ApplicationAttributesArgs.builder()
* .environment(ApplicationAttributesEnvironmentArgs.builder()
* .type("STAGING")
* .build())
* .criticality(ApplicationAttributesCriticalityArgs.builder()
* .type("MISSION_CRITICAL")
* .build())
* .businessOwners(ApplicationAttributesBusinessOwnerArgs.builder()
* .displayName("Alice")
* .email("[email protected]")
* .build())
* .developerOwners(ApplicationAttributesDeveloperOwnerArgs.builder()
* .displayName("Bob")
* .email("[email protected]")
* .build())
* .operatorOwners(ApplicationAttributesOperatorOwnerArgs.builder()
* .displayName("Charlie")
* .email("[email protected]")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example2:
* type: gcp:apphub:Application
* properties:
* location: us-east1
* applicationId: example-application
* displayName: Application Full
* scope:
* type: REGIONAL
* description: Application for testing
* attributes:
* environment:
* type: STAGING
* criticality:
* type: MISSION_CRITICAL
* businessOwners:
* - displayName: Alice
* email: [email protected]
* developerOwners:
* - displayName: Bob
* email: [email protected]
* operatorOwners:
* - displayName: Charlie
* email: [email protected]
* ```
*
* ## Import
* Application can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/applications/{{application_id}}`
* * `{{project}}/{{location}}/{{application_id}}`
* * `{{location}}/{{application_id}}`
* When using the `pulumi import` command, Application can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apphub/application:Application default projects/{{project}}/locations/{{location}}/applications/{{application_id}}
* ```
* ```sh
* $ pulumi import gcp:apphub/application:Application default {{project}}/{{location}}/{{application_id}}
* ```
* ```sh
* $ pulumi import gcp:apphub/application:Application default {{location}}/{{application_id}}
* ```
* @property applicationId Required. The Application identifier.
* @property attributes Consumer provided attributes.
* @property description Optional. User-defined description of an Application.
* @property displayName Optional. User-defined name for the Application.
* @property location Part of `parent`. See documentation of `projectsId`.
* @property project
* @property scope Scope of an application.
* Structure is documented below.
*/
public data class ApplicationArgs(
public val applicationId: Output? = null,
public val attributes: Output? = null,
public val description: Output? = null,
public val displayName: Output? = null,
public val location: Output? = null,
public val project: Output? = null,
public val scope: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.apphub.ApplicationArgs =
com.pulumi.gcp.apphub.ApplicationArgs.builder()
.applicationId(applicationId?.applyValue({ args0 -> args0 }))
.attributes(attributes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.description(description?.applyValue({ args0 -> args0 }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [ApplicationArgs].
*/
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
private var applicationId: Output? = null
private var attributes: Output? = null
private var description: Output? = null
private var displayName: Output? = null
private var location: Output? = null
private var project: Output? = null
private var scope: Output? = null
/**
* @param value Required. The Application identifier.
*/
@JvmName("euvusqbqcteihrdn")
public suspend fun applicationId(`value`: Output) {
this.applicationId = value
}
/**
* @param value Consumer provided attributes.
*/
@JvmName("ixsvmrvamghgvyce")
public suspend fun attributes(`value`: Output) {
this.attributes = value
}
/**
* @param value Optional. User-defined description of an Application.
*/
@JvmName("vhvahiibcpuspomw")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Optional. User-defined name for the Application.
*/
@JvmName("pdnnslufyogopgov")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Part of `parent`. See documentation of `projectsId`.
*/
@JvmName("drvhnwulqtpybpqm")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value
*/
@JvmName("bknmraofbwcusmty")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Scope of an application.
* Structure is documented below.
*/
@JvmName("svvkviomcdtnwrvn")
public suspend fun scope(`value`: Output) {
this.scope = value
}
/**
* @param value Required. The Application identifier.
*/
@JvmName("ddhgugpuwywrybnv")
public suspend fun applicationId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applicationId = mapped
}
/**
* @param value Consumer provided attributes.
*/
@JvmName("fcueiugffyapnvqs")
public suspend fun attributes(`value`: ApplicationAttributesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.attributes = mapped
}
/**
* @param argument Consumer provided attributes.
*/
@JvmName("eanmdxrhqxporxsb")
public suspend fun attributes(argument: suspend ApplicationAttributesArgsBuilder.() -> Unit) {
val toBeMapped = ApplicationAttributesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.attributes = mapped
}
/**
* @param value Optional. User-defined description of an Application.
*/
@JvmName("yfgkneytvakiunew")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Optional. User-defined name for the Application.
*/
@JvmName("lcdgsfvmmhxafohn")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value Part of `parent`. See documentation of `projectsId`.
*/
@JvmName("bxhjkvvyeqmquxho")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value
*/
@JvmName("aeotqcpfvpcgsetj")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Scope of an application.
* Structure is documented below.
*/
@JvmName("nlaofngaqyokmeyf")
public suspend fun scope(`value`: ApplicationScopeArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scope = mapped
}
/**
* @param argument Scope of an application.
* Structure is documented below.
*/
@JvmName("aqkckvsdckjhercq")
public suspend fun scope(argument: suspend ApplicationScopeArgsBuilder.() -> Unit) {
val toBeMapped = ApplicationScopeArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.scope = mapped
}
internal fun build(): ApplicationArgs = ApplicationArgs(
applicationId = applicationId,
attributes = attributes,
description = description,
displayName = displayName,
location = location,
project = project,
scope = scope,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy