com.pulumi.gcp.applicationintegration.kotlin.ClientArgs.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.applicationintegration.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.applicationintegration.ClientArgs.builder
import com.pulumi.gcp.applicationintegration.kotlin.inputs.ClientCloudKmsConfigArgs
import com.pulumi.gcp.applicationintegration.kotlin.inputs.ClientCloudKmsConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Application Integration Client.
* To get more information about Client, see:
* * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.clients)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/application-integration/docs/overview)
* * [Set up Application Integration](https://cloud.google.com/application-integration/docs/setup-application-integration)
* ## Example Usage
* ### Integrations Client Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const example = new gcp.applicationintegration.Client("example", {location: "us-central1"});
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* example = gcp.applicationintegration.Client("example", location="us-central1")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var example = new Gcp.ApplicationIntegration.Client("example", new()
* {
* Location = "us-central1",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/applicationintegration"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := applicationintegration.NewClient(ctx, "example", &applicationintegration.ClientArgs{
* Location: pulumi.String("us-central1"),
* })
* 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 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 Client("example", ClientArgs.builder()
* .location("us-central1")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: gcp:applicationintegration:Client
* properties:
* location: us-central1
* ```
*
* ### Integrations Client Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const testProject = gcp.organizations.getProject({});
* const keyring = new gcp.kms.KeyRing("keyring", {
* name: "my-keyring",
* location: "us-east1",
* });
* const cryptokey = new gcp.kms.CryptoKey("cryptokey", {
* name: "crypto-key-example",
* keyRing: keyring.id,
* rotationPeriod: "7776000s",
* });
* const testKey = new gcp.kms.CryptoKeyVersion("test_key", {cryptoKey: cryptokey.id});
* const serviceAccount = new gcp.serviceaccount.Account("service_account", {
* accountId: "service-account-id",
* displayName: "Service Account",
* });
* const example = new gcp.applicationintegration.Client("example", {
* location: "us-east1",
* createSampleIntegrations: true,
* runAsServiceAccount: serviceAccount.email,
* cloudKmsConfig: {
* kmsLocation: "us-east1",
* kmsRing: keyring.id,
* key: cryptokey.id,
* keyVersion: testKey.id,
* kmsProjectId: testProject.then(testProject => testProject.projectId),
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* test_project = gcp.organizations.get_project()
* keyring = gcp.kms.KeyRing("keyring",
* name="my-keyring",
* location="us-east1")
* cryptokey = gcp.kms.CryptoKey("cryptokey",
* name="crypto-key-example",
* key_ring=keyring.id,
* rotation_period="7776000s")
* test_key = gcp.kms.CryptoKeyVersion("test_key", crypto_key=cryptokey.id)
* service_account = gcp.serviceaccount.Account("service_account",
* account_id="service-account-id",
* display_name="Service Account")
* example = gcp.applicationintegration.Client("example",
* location="us-east1",
* create_sample_integrations=True,
* run_as_service_account=service_account.email,
* cloud_kms_config=gcp.applicationintegration.ClientCloudKmsConfigArgs(
* kms_location="us-east1",
* kms_ring=keyring.id,
* key=cryptokey.id,
* key_version=test_key.id,
* kms_project_id=test_project.project_id,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var testProject = Gcp.Organizations.GetProject.Invoke();
* var keyring = new Gcp.Kms.KeyRing("keyring", new()
* {
* Name = "my-keyring",
* Location = "us-east1",
* });
* var cryptokey = new Gcp.Kms.CryptoKey("cryptokey", new()
* {
* Name = "crypto-key-example",
* KeyRing = keyring.Id,
* RotationPeriod = "7776000s",
* });
* var testKey = new Gcp.Kms.CryptoKeyVersion("test_key", new()
* {
* CryptoKey = cryptokey.Id,
* });
* var serviceAccount = new Gcp.ServiceAccount.Account("service_account", new()
* {
* AccountId = "service-account-id",
* DisplayName = "Service Account",
* });
* var example = new Gcp.ApplicationIntegration.Client("example", new()
* {
* Location = "us-east1",
* CreateSampleIntegrations = true,
* RunAsServiceAccount = serviceAccount.Email,
* CloudKmsConfig = new Gcp.ApplicationIntegration.Inputs.ClientCloudKmsConfigArgs
* {
* KmsLocation = "us-east1",
* KmsRing = keyring.Id,
* Key = cryptokey.Id,
* KeyVersion = testKey.Id,
* KmsProjectId = testProject.Apply(getProjectResult => getProjectResult.ProjectId),
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/applicationintegration"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/kms"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceaccount"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* testProject, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* keyring, err := kms.NewKeyRing(ctx, "keyring", &kms.KeyRingArgs{
* Name: pulumi.String("my-keyring"),
* Location: pulumi.String("us-east1"),
* })
* if err != nil {
* return err
* }
* cryptokey, err := kms.NewCryptoKey(ctx, "cryptokey", &kms.CryptoKeyArgs{
* Name: pulumi.String("crypto-key-example"),
* KeyRing: keyring.ID(),
* RotationPeriod: pulumi.String("7776000s"),
* })
* if err != nil {
* return err
* }
* testKey, err := kms.NewCryptoKeyVersion(ctx, "test_key", &kms.CryptoKeyVersionArgs{
* CryptoKey: cryptokey.ID(),
* })
* if err != nil {
* return err
* }
* serviceAccount, err := serviceaccount.NewAccount(ctx, "service_account", &serviceaccount.AccountArgs{
* AccountId: pulumi.String("service-account-id"),
* DisplayName: pulumi.String("Service Account"),
* })
* if err != nil {
* return err
* }
* _, err = applicationintegration.NewClient(ctx, "example", &applicationintegration.ClientArgs{
* Location: pulumi.String("us-east1"),
* CreateSampleIntegrations: pulumi.Bool(true),
* RunAsServiceAccount: serviceAccount.Email,
* CloudKmsConfig: &applicationintegration.ClientCloudKmsConfigArgs{
* KmsLocation: pulumi.String("us-east1"),
* KmsRing: keyring.ID(),
* Key: cryptokey.ID(),
* KeyVersion: testKey.ID(),
* KmsProjectId: pulumi.String(testProject.ProjectId),
* },
* })
* 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.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.kms.KeyRing;
* import com.pulumi.gcp.kms.KeyRingArgs;
* import com.pulumi.gcp.kms.CryptoKey;
* import com.pulumi.gcp.kms.CryptoKeyArgs;
* import com.pulumi.gcp.kms.CryptoKeyVersion;
* import com.pulumi.gcp.kms.CryptoKeyVersionArgs;
* import com.pulumi.gcp.serviceaccount.Account;
* import com.pulumi.gcp.serviceaccount.AccountArgs;
* import com.pulumi.gcp.applicationintegration.Client;
* import com.pulumi.gcp.applicationintegration.ClientArgs;
* import com.pulumi.gcp.applicationintegration.inputs.ClientCloudKmsConfigArgs;
* 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) {
* final var testProject = OrganizationsFunctions.getProject();
* var keyring = new KeyRing("keyring", KeyRingArgs.builder()
* .name("my-keyring")
* .location("us-east1")
* .build());
* var cryptokey = new CryptoKey("cryptokey", CryptoKeyArgs.builder()
* .name("crypto-key-example")
* .keyRing(keyring.id())
* .rotationPeriod("7776000s")
* .build());
* var testKey = new CryptoKeyVersion("testKey", CryptoKeyVersionArgs.builder()
* .cryptoKey(cryptokey.id())
* .build());
* var serviceAccount = new Account("serviceAccount", AccountArgs.builder()
* .accountId("service-account-id")
* .displayName("Service Account")
* .build());
* var example = new Client("example", ClientArgs.builder()
* .location("us-east1")
* .createSampleIntegrations(true)
* .runAsServiceAccount(serviceAccount.email())
* .cloudKmsConfig(ClientCloudKmsConfigArgs.builder()
* .kmsLocation("us-east1")
* .kmsRing(keyring.id())
* .key(cryptokey.id())
* .keyVersion(testKey.id())
* .kmsProjectId(testProject.applyValue(getProjectResult -> getProjectResult.projectId()))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* keyring:
* type: gcp:kms:KeyRing
* properties:
* name: my-keyring
* location: us-east1
* cryptokey:
* type: gcp:kms:CryptoKey
* properties:
* name: crypto-key-example
* keyRing: ${keyring.id}
* rotationPeriod: 7776000s
* testKey:
* type: gcp:kms:CryptoKeyVersion
* name: test_key
* properties:
* cryptoKey: ${cryptokey.id}
* serviceAccount:
* type: gcp:serviceaccount:Account
* name: service_account
* properties:
* accountId: service-account-id
* displayName: Service Account
* example:
* type: gcp:applicationintegration:Client
* properties:
* location: us-east1
* createSampleIntegrations: true
* runAsServiceAccount: ${serviceAccount.email}
* cloudKmsConfig:
* kmsLocation: us-east1
* kmsRing: ${keyring.id}
* key: ${cryptokey.id}
* keyVersion: ${testKey.id}
* kmsProjectId: ${testProject.projectId}
* variables:
* testProject:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ## Import
* Client can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/clients`
* * `{{project}}/{{location}}`
* * `{{location}}`
* When using the `pulumi import` command, Client can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:applicationintegration/client:Client default projects/{{project}}/locations/{{location}}/clients
* ```
* ```sh
* $ pulumi import gcp:applicationintegration/client:Client default {{project}}/{{location}}
* ```
* ```sh
* $ pulumi import gcp:applicationintegration/client:Client default {{location}}
* ```
* @property cloudKmsConfig Cloud KMS config for AuthModule to encrypt/decrypt credentials.
* Structure is documented below.
* @property createSampleIntegrations Indicates if sample integrations should be created along with provisioning.
* @property createSampleWorkflows (Optional, Deprecated)
* Indicates if sample workflow should be created along with provisioning.
* > **Warning:** `create_sample_workflows` is deprecated and will be removed in a future major release. Use `create_sample_integrations` instead.
* @property location Location in which client needs to be provisioned.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property provisionGmek (Optional, Deprecated)
* Indicates provision with GMEK or CMEK.
* > **Warning:** `provision_gmek` is deprecated and will be removed in a future major release. Client would be provisioned as gmek if `cloud_kms_config` is not given.
* @property runAsServiceAccount User input run-as service account, if empty, will bring up a new default service account.
*/
public data class ClientArgs(
public val cloudKmsConfig: Output? = null,
public val createSampleIntegrations: Output? = null,
@Deprecated(
message = """
`create_sample_workflows` is deprecated and will be removed in a future major release. Use
`create_sample_integrations` instead.
""",
)
public val createSampleWorkflows: Output? = null,
public val location: Output? = null,
public val project: Output? = null,
@Deprecated(
message = """
`provision_gmek` is deprecated and will be removed in a future major release. Client would be
provisioned as gmek if `cloud_kms_config` is not given.
""",
)
public val provisionGmek: Output? = null,
public val runAsServiceAccount: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.applicationintegration.ClientArgs =
com.pulumi.gcp.applicationintegration.ClientArgs.builder()
.cloudKmsConfig(cloudKmsConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.createSampleIntegrations(createSampleIntegrations?.applyValue({ args0 -> args0 }))
.createSampleWorkflows(createSampleWorkflows?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.provisionGmek(provisionGmek?.applyValue({ args0 -> args0 }))
.runAsServiceAccount(runAsServiceAccount?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ClientArgs].
*/
@PulumiTagMarker
public class ClientArgsBuilder internal constructor() {
private var cloudKmsConfig: Output? = null
private var createSampleIntegrations: Output? = null
private var createSampleWorkflows: Output? = null
private var location: Output? = null
private var project: Output? = null
private var provisionGmek: Output? = null
private var runAsServiceAccount: Output? = null
/**
* @param value Cloud KMS config for AuthModule to encrypt/decrypt credentials.
* Structure is documented below.
*/
@JvmName("dyiopwnvtifecajj")
public suspend fun cloudKmsConfig(`value`: Output) {
this.cloudKmsConfig = value
}
/**
* @param value Indicates if sample integrations should be created along with provisioning.
*/
@JvmName("hjucpecbdhkrqyqh")
public suspend fun createSampleIntegrations(`value`: Output) {
this.createSampleIntegrations = value
}
/**
* @param value (Optional, Deprecated)
* Indicates if sample workflow should be created along with provisioning.
* > **Warning:** `create_sample_workflows` is deprecated and will be removed in a future major release. Use `create_sample_integrations` instead.
*/
@Deprecated(
message = """
`create_sample_workflows` is deprecated and will be removed in a future major release. Use
`create_sample_integrations` instead.
""",
)
@JvmName("irudapliaasyjmij")
public suspend fun createSampleWorkflows(`value`: Output) {
this.createSampleWorkflows = value
}
/**
* @param value Location in which client needs to be provisioned.
* - - -
*/
@JvmName("iimynkbmcleeadiu")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("nbhgnrnkdnemneea")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value (Optional, Deprecated)
* Indicates provision with GMEK or CMEK.
* > **Warning:** `provision_gmek` is deprecated and will be removed in a future major release. Client would be provisioned as gmek if `cloud_kms_config` is not given.
*/
@Deprecated(
message = """
`provision_gmek` is deprecated and will be removed in a future major release. Client would be
provisioned as gmek if `cloud_kms_config` is not given.
""",
)
@JvmName("miugkwghlijgbfpe")
public suspend fun provisionGmek(`value`: Output) {
this.provisionGmek = value
}
/**
* @param value User input run-as service account, if empty, will bring up a new default service account.
*/
@JvmName("qxuvknyctfkjcgqn")
public suspend fun runAsServiceAccount(`value`: Output) {
this.runAsServiceAccount = value
}
/**
* @param value Cloud KMS config for AuthModule to encrypt/decrypt credentials.
* Structure is documented below.
*/
@JvmName("jwlorfsadegohdep")
public suspend fun cloudKmsConfig(`value`: ClientCloudKmsConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloudKmsConfig = mapped
}
/**
* @param argument Cloud KMS config for AuthModule to encrypt/decrypt credentials.
* Structure is documented below.
*/
@JvmName("trteipqjffhuadvm")
public suspend fun cloudKmsConfig(argument: suspend ClientCloudKmsConfigArgsBuilder.() -> Unit) {
val toBeMapped = ClientCloudKmsConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.cloudKmsConfig = mapped
}
/**
* @param value Indicates if sample integrations should be created along with provisioning.
*/
@JvmName("fxasdexcomuafmpa")
public suspend fun createSampleIntegrations(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.createSampleIntegrations = mapped
}
/**
* @param value (Optional, Deprecated)
* Indicates if sample workflow should be created along with provisioning.
* > **Warning:** `create_sample_workflows` is deprecated and will be removed in a future major release. Use `create_sample_integrations` instead.
*/
@Deprecated(
message = """
`create_sample_workflows` is deprecated and will be removed in a future major release. Use
`create_sample_integrations` instead.
""",
)
@JvmName("scuvbnoeqacksppv")
public suspend fun createSampleWorkflows(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.createSampleWorkflows = mapped
}
/**
* @param value Location in which client needs to be provisioned.
* - - -
*/
@JvmName("aiohaqkqohgrcjxo")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("byecfgtjoekxuytv")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value (Optional, Deprecated)
* Indicates provision with GMEK or CMEK.
* > **Warning:** `provision_gmek` is deprecated and will be removed in a future major release. Client would be provisioned as gmek if `cloud_kms_config` is not given.
*/
@Deprecated(
message = """
`provision_gmek` is deprecated and will be removed in a future major release. Client would be
provisioned as gmek if `cloud_kms_config` is not given.
""",
)
@JvmName("wtfcyfeexifjwlrg")
public suspend fun provisionGmek(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.provisionGmek = mapped
}
/**
* @param value User input run-as service account, if empty, will bring up a new default service account.
*/
@JvmName("oxduxmutpimesaug")
public suspend fun runAsServiceAccount(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.runAsServiceAccount = mapped
}
internal fun build(): ClientArgs = ClientArgs(
cloudKmsConfig = cloudKmsConfig,
createSampleIntegrations = createSampleIntegrations,
createSampleWorkflows = createSampleWorkflows,
location = location,
project = project,
provisionGmek = provisionGmek,
runAsServiceAccount = runAsServiceAccount,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy