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

com.pulumi.gcp.clouddeploy.kotlin.TargetArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.clouddeploy.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.clouddeploy.TargetArgs.builder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetAnthosClusterArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetAnthosClusterArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetCustomTargetArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetCustomTargetArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetExecutionConfigArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetExecutionConfigArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetGkeArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetGkeArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetMultiTargetArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetMultiTargetArgsBuilder
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetRunArgs
import com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetRunArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The Cloud Deploy `Target` resource
 * ## Example Usage
 * ### Multi_target
 * tests creating and updating a multi-target
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const primary = new gcp.clouddeploy.Target("primary", {
 *     location: "us-west1",
 *     name: "target",
 *     deployParameters: {},
 *     description: "multi-target description",
 *     executionConfigs: [{
 *         usages: [
 *             "RENDER",
 *             "DEPLOY",
 *         ],
 *         executionTimeout: "3600s",
 *     }],
 *     multiTarget: {
 *         targetIds: [
 *             "1",
 *             "2",
 *         ],
 *     },
 *     project: "my-project-name",
 *     requireApproval: false,
 *     annotations: {
 *         my_first_annotation: "example-annotation-1",
 *         my_second_annotation: "example-annotation-2",
 *     },
 *     labels: {
 *         my_first_label: "example-label-1",
 *         my_second_label: "example-label-2",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * primary = gcp.clouddeploy.Target("primary",
 *     location="us-west1",
 *     name="target",
 *     deploy_parameters={},
 *     description="multi-target description",
 *     execution_configs=[gcp.clouddeploy.TargetExecutionConfigArgs(
 *         usages=[
 *             "RENDER",
 *             "DEPLOY",
 *         ],
 *         execution_timeout="3600s",
 *     )],
 *     multi_target=gcp.clouddeploy.TargetMultiTargetArgs(
 *         target_ids=[
 *             "1",
 *             "2",
 *         ],
 *     ),
 *     project="my-project-name",
 *     require_approval=False,
 *     annotations={
 *         "my_first_annotation": "example-annotation-1",
 *         "my_second_annotation": "example-annotation-2",
 *     },
 *     labels={
 *         "my_first_label": "example-label-1",
 *         "my_second_label": "example-label-2",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var primary = new Gcp.CloudDeploy.Target("primary", new()
 *     {
 *         Location = "us-west1",
 *         Name = "target",
 *         DeployParameters = null,
 *         Description = "multi-target description",
 *         ExecutionConfigs = new[]
 *         {
 *             new Gcp.CloudDeploy.Inputs.TargetExecutionConfigArgs
 *             {
 *                 Usages = new[]
 *                 {
 *                     "RENDER",
 *                     "DEPLOY",
 *                 },
 *                 ExecutionTimeout = "3600s",
 *             },
 *         },
 *         MultiTarget = new Gcp.CloudDeploy.Inputs.TargetMultiTargetArgs
 *         {
 *             TargetIds = new[]
 *             {
 *                 "1",
 *                 "2",
 *             },
 *         },
 *         Project = "my-project-name",
 *         RequireApproval = false,
 *         Annotations =
 *         {
 *             { "my_first_annotation", "example-annotation-1" },
 *             { "my_second_annotation", "example-annotation-2" },
 *         },
 *         Labels =
 *         {
 *             { "my_first_label", "example-label-1" },
 *             { "my_second_label", "example-label-2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := clouddeploy.NewTarget(ctx, "primary", &clouddeploy.TargetArgs{
 * 			Location:         pulumi.String("us-west1"),
 * 			Name:             pulumi.String("target"),
 * 			DeployParameters: nil,
 * 			Description:      pulumi.String("multi-target description"),
 * 			ExecutionConfigs: clouddeploy.TargetExecutionConfigArray{
 * 				&clouddeploy.TargetExecutionConfigArgs{
 * 					Usages: pulumi.StringArray{
 * 						pulumi.String("RENDER"),
 * 						pulumi.String("DEPLOY"),
 * 					},
 * 					ExecutionTimeout: pulumi.String("3600s"),
 * 				},
 * 			},
 * 			MultiTarget: &clouddeploy.TargetMultiTargetArgs{
 * 				TargetIds: pulumi.StringArray{
 * 					pulumi.String("1"),
 * 					pulumi.String("2"),
 * 				},
 * 			},
 * 			Project:         pulumi.String("my-project-name"),
 * 			RequireApproval: pulumi.Bool(false),
 * 			Annotations: pulumi.StringMap{
 * 				"my_first_annotation":  pulumi.String("example-annotation-1"),
 * 				"my_second_annotation": pulumi.String("example-annotation-2"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"my_first_label":  pulumi.String("example-label-1"),
 * 				"my_second_label": pulumi.String("example-label-2"),
 * 			},
 * 		})
 * 		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.clouddeploy.Target;
 * import com.pulumi.gcp.clouddeploy.TargetArgs;
 * import com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs;
 * import com.pulumi.gcp.clouddeploy.inputs.TargetMultiTargetArgs;
 * 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 primary = new Target("primary", TargetArgs.builder()
 *             .location("us-west1")
 *             .name("target")
 *             .deployParameters()
 *             .description("multi-target description")
 *             .executionConfigs(TargetExecutionConfigArgs.builder()
 *                 .usages(
 *                     "RENDER",
 *                     "DEPLOY")
 *                 .executionTimeout("3600s")
 *                 .build())
 *             .multiTarget(TargetMultiTargetArgs.builder()
 *                 .targetIds(
 *                     "1",
 *                     "2")
 *                 .build())
 *             .project("my-project-name")
 *             .requireApproval(false)
 *             .annotations(Map.ofEntries(
 *                 Map.entry("my_first_annotation", "example-annotation-1"),
 *                 Map.entry("my_second_annotation", "example-annotation-2")
 *             ))
 *             .labels(Map.ofEntries(
 *                 Map.entry("my_first_label", "example-label-1"),
 *                 Map.entry("my_second_label", "example-label-2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   primary:
 *     type: gcp:clouddeploy:Target
 *     properties:
 *       location: us-west1
 *       name: target
 *       deployParameters: {}
 *       description: multi-target description
 *       executionConfigs:
 *         - usages:
 *             - RENDER
 *             - DEPLOY
 *           executionTimeout: 3600s
 *       multiTarget:
 *         targetIds:
 *           - '1'
 *           - '2'
 *       project: my-project-name
 *       requireApproval: false
 *       annotations:
 *         my_first_annotation: example-annotation-1
 *         my_second_annotation: example-annotation-2
 *       labels:
 *         my_first_label: example-label-1
 *         my_second_label: example-label-2
 * ```
 * 
 * ### Run_target
 * tests creating and updating a cloud run target
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const primary = new gcp.clouddeploy.Target("primary", {
 *     location: "us-west1",
 *     name: "target",
 *     deployParameters: {},
 *     description: "basic description",
 *     executionConfigs: [{
 *         usages: [
 *             "RENDER",
 *             "DEPLOY",
 *         ],
 *         executionTimeout: "3600s",
 *     }],
 *     project: "my-project-name",
 *     requireApproval: false,
 *     run: {
 *         location: "projects/my-project-name/locations/us-west1",
 *     },
 *     annotations: {
 *         my_first_annotation: "example-annotation-1",
 *         my_second_annotation: "example-annotation-2",
 *     },
 *     labels: {
 *         my_first_label: "example-label-1",
 *         my_second_label: "example-label-2",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * primary = gcp.clouddeploy.Target("primary",
 *     location="us-west1",
 *     name="target",
 *     deploy_parameters={},
 *     description="basic description",
 *     execution_configs=[gcp.clouddeploy.TargetExecutionConfigArgs(
 *         usages=[
 *             "RENDER",
 *             "DEPLOY",
 *         ],
 *         execution_timeout="3600s",
 *     )],
 *     project="my-project-name",
 *     require_approval=False,
 *     run=gcp.clouddeploy.TargetRunArgs(
 *         location="projects/my-project-name/locations/us-west1",
 *     ),
 *     annotations={
 *         "my_first_annotation": "example-annotation-1",
 *         "my_second_annotation": "example-annotation-2",
 *     },
 *     labels={
 *         "my_first_label": "example-label-1",
 *         "my_second_label": "example-label-2",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var primary = new Gcp.CloudDeploy.Target("primary", new()
 *     {
 *         Location = "us-west1",
 *         Name = "target",
 *         DeployParameters = null,
 *         Description = "basic description",
 *         ExecutionConfigs = new[]
 *         {
 *             new Gcp.CloudDeploy.Inputs.TargetExecutionConfigArgs
 *             {
 *                 Usages = new[]
 *                 {
 *                     "RENDER",
 *                     "DEPLOY",
 *                 },
 *                 ExecutionTimeout = "3600s",
 *             },
 *         },
 *         Project = "my-project-name",
 *         RequireApproval = false,
 *         Run = new Gcp.CloudDeploy.Inputs.TargetRunArgs
 *         {
 *             Location = "projects/my-project-name/locations/us-west1",
 *         },
 *         Annotations =
 *         {
 *             { "my_first_annotation", "example-annotation-1" },
 *             { "my_second_annotation", "example-annotation-2" },
 *         },
 *         Labels =
 *         {
 *             { "my_first_label", "example-label-1" },
 *             { "my_second_label", "example-label-2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := clouddeploy.NewTarget(ctx, "primary", &clouddeploy.TargetArgs{
 * 			Location:         pulumi.String("us-west1"),
 * 			Name:             pulumi.String("target"),
 * 			DeployParameters: nil,
 * 			Description:      pulumi.String("basic description"),
 * 			ExecutionConfigs: clouddeploy.TargetExecutionConfigArray{
 * 				&clouddeploy.TargetExecutionConfigArgs{
 * 					Usages: pulumi.StringArray{
 * 						pulumi.String("RENDER"),
 * 						pulumi.String("DEPLOY"),
 * 					},
 * 					ExecutionTimeout: pulumi.String("3600s"),
 * 				},
 * 			},
 * 			Project:         pulumi.String("my-project-name"),
 * 			RequireApproval: pulumi.Bool(false),
 * 			Run: &clouddeploy.TargetRunArgs{
 * 				Location: pulumi.String("projects/my-project-name/locations/us-west1"),
 * 			},
 * 			Annotations: pulumi.StringMap{
 * 				"my_first_annotation":  pulumi.String("example-annotation-1"),
 * 				"my_second_annotation": pulumi.String("example-annotation-2"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"my_first_label":  pulumi.String("example-label-1"),
 * 				"my_second_label": pulumi.String("example-label-2"),
 * 			},
 * 		})
 * 		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.clouddeploy.Target;
 * import com.pulumi.gcp.clouddeploy.TargetArgs;
 * import com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs;
 * import com.pulumi.gcp.clouddeploy.inputs.TargetRunArgs;
 * 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 primary = new Target("primary", TargetArgs.builder()
 *             .location("us-west1")
 *             .name("target")
 *             .deployParameters()
 *             .description("basic description")
 *             .executionConfigs(TargetExecutionConfigArgs.builder()
 *                 .usages(
 *                     "RENDER",
 *                     "DEPLOY")
 *                 .executionTimeout("3600s")
 *                 .build())
 *             .project("my-project-name")
 *             .requireApproval(false)
 *             .run(TargetRunArgs.builder()
 *                 .location("projects/my-project-name/locations/us-west1")
 *                 .build())
 *             .annotations(Map.ofEntries(
 *                 Map.entry("my_first_annotation", "example-annotation-1"),
 *                 Map.entry("my_second_annotation", "example-annotation-2")
 *             ))
 *             .labels(Map.ofEntries(
 *                 Map.entry("my_first_label", "example-label-1"),
 *                 Map.entry("my_second_label", "example-label-2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   primary:
 *     type: gcp:clouddeploy:Target
 *     properties:
 *       location: us-west1
 *       name: target
 *       deployParameters: {}
 *       description: basic description
 *       executionConfigs:
 *         - usages:
 *             - RENDER
 *             - DEPLOY
 *           executionTimeout: 3600s
 *       project: my-project-name
 *       requireApproval: false
 *       run:
 *         location: projects/my-project-name/locations/us-west1
 *       annotations:
 *         my_first_annotation: example-annotation-1
 *         my_second_annotation: example-annotation-2
 *       labels:
 *         my_first_label: example-label-1
 *         my_second_label: example-label-2
 * ```
 * 
 * ### Target
 * Creates a basic Cloud Deploy target
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const primary = new gcp.clouddeploy.Target("primary", {
 *     location: "us-west1",
 *     name: "target",
 *     deployParameters: {
 *         deployParameterKey: "deployParameterValue",
 *     },
 *     description: "basic description",
 *     gke: {
 *         cluster: "projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
 *     },
 *     project: "my-project-name",
 *     requireApproval: false,
 *     annotations: {
 *         my_first_annotation: "example-annotation-1",
 *         my_second_annotation: "example-annotation-2",
 *     },
 *     labels: {
 *         my_first_label: "example-label-1",
 *         my_second_label: "example-label-2",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * primary = gcp.clouddeploy.Target("primary",
 *     location="us-west1",
 *     name="target",
 *     deploy_parameters={
 *         "deployParameterKey": "deployParameterValue",
 *     },
 *     description="basic description",
 *     gke=gcp.clouddeploy.TargetGkeArgs(
 *         cluster="projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
 *     ),
 *     project="my-project-name",
 *     require_approval=False,
 *     annotations={
 *         "my_first_annotation": "example-annotation-1",
 *         "my_second_annotation": "example-annotation-2",
 *     },
 *     labels={
 *         "my_first_label": "example-label-1",
 *         "my_second_label": "example-label-2",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var primary = new Gcp.CloudDeploy.Target("primary", new()
 *     {
 *         Location = "us-west1",
 *         Name = "target",
 *         DeployParameters =
 *         {
 *             { "deployParameterKey", "deployParameterValue" },
 *         },
 *         Description = "basic description",
 *         Gke = new Gcp.CloudDeploy.Inputs.TargetGkeArgs
 *         {
 *             Cluster = "projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
 *         },
 *         Project = "my-project-name",
 *         RequireApproval = false,
 *         Annotations =
 *         {
 *             { "my_first_annotation", "example-annotation-1" },
 *             { "my_second_annotation", "example-annotation-2" },
 *         },
 *         Labels =
 *         {
 *             { "my_first_label", "example-label-1" },
 *             { "my_second_label", "example-label-2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := clouddeploy.NewTarget(ctx, "primary", &clouddeploy.TargetArgs{
 * 			Location: pulumi.String("us-west1"),
 * 			Name:     pulumi.String("target"),
 * 			DeployParameters: pulumi.StringMap{
 * 				"deployParameterKey": pulumi.String("deployParameterValue"),
 * 			},
 * 			Description: pulumi.String("basic description"),
 * 			Gke: &clouddeploy.TargetGkeArgs{
 * 				Cluster: pulumi.String("projects/my-project-name/locations/us-west1/clusters/example-cluster-name"),
 * 			},
 * 			Project:         pulumi.String("my-project-name"),
 * 			RequireApproval: pulumi.Bool(false),
 * 			Annotations: pulumi.StringMap{
 * 				"my_first_annotation":  pulumi.String("example-annotation-1"),
 * 				"my_second_annotation": pulumi.String("example-annotation-2"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"my_first_label":  pulumi.String("example-label-1"),
 * 				"my_second_label": pulumi.String("example-label-2"),
 * 			},
 * 		})
 * 		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.clouddeploy.Target;
 * import com.pulumi.gcp.clouddeploy.TargetArgs;
 * import com.pulumi.gcp.clouddeploy.inputs.TargetGkeArgs;
 * 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 primary = new Target("primary", TargetArgs.builder()
 *             .location("us-west1")
 *             .name("target")
 *             .deployParameters(Map.of("deployParameterKey", "deployParameterValue"))
 *             .description("basic description")
 *             .gke(TargetGkeArgs.builder()
 *                 .cluster("projects/my-project-name/locations/us-west1/clusters/example-cluster-name")
 *                 .build())
 *             .project("my-project-name")
 *             .requireApproval(false)
 *             .annotations(Map.ofEntries(
 *                 Map.entry("my_first_annotation", "example-annotation-1"),
 *                 Map.entry("my_second_annotation", "example-annotation-2")
 *             ))
 *             .labels(Map.ofEntries(
 *                 Map.entry("my_first_label", "example-label-1"),
 *                 Map.entry("my_second_label", "example-label-2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   primary:
 *     type: gcp:clouddeploy:Target
 *     properties:
 *       location: us-west1
 *       name: target
 *       deployParameters:
 *         deployParameterKey: deployParameterValue
 *       description: basic description
 *       gke:
 *         cluster: projects/my-project-name/locations/us-west1/clusters/example-cluster-name
 *       project: my-project-name
 *       requireApproval: false
 *       annotations:
 *         my_first_annotation: example-annotation-1
 *         my_second_annotation: example-annotation-2
 *       labels:
 *         my_first_label: example-label-1
 *         my_second_label: example-label-2
 * ```
 * 
 * ## Import
 * Target can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/targets/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, Target can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:clouddeploy/target:Target default projects/{{project}}/locations/{{location}}/targets/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:clouddeploy/target:Target default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:clouddeploy/target:Target default {{location}}/{{name}}
 * ```
 * @property annotations Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
 * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
 * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
 * @property anthosCluster Information specifying an Anthos Cluster.
 * @property customTarget Optional. Information specifying a Custom Target.
 * @property deployParameters Optional. The deploy parameters to use for this target.
 * @property description Optional. Description of the `Target`. Max length is 255 characters.
 * @property executionConfigs Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
 * @property gke Information specifying a GKE Cluster.
 * @property labels Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property location The location for the resource
 * @property multiTarget Information specifying a multiTarget.
 * @property name Name of the `Target`. Format is `a-z?`.
 * - - -
 * @property project The project for the resource
 * @property requireApproval Optional. Whether or not the `Target` requires approval.
 * @property run Information specifying a Cloud Run deployment target.
 */
public data class TargetArgs(
    public val annotations: Output>? = null,
    public val anthosCluster: Output? = null,
    public val customTarget: Output? = null,
    public val deployParameters: Output>? = null,
    public val description: Output? = null,
    public val executionConfigs: Output>? = null,
    public val gke: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val multiTarget: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val requireApproval: Output? = null,
    public val run: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.clouddeploy.TargetArgs =
        com.pulumi.gcp.clouddeploy.TargetArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .anthosCluster(anthosCluster?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customTarget(customTarget?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .deployParameters(
                deployParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .executionConfigs(
                executionConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .gke(gke?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .multiTarget(multiTarget?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .requireApproval(requireApproval?.applyValue({ args0 -> args0 }))
            .run(run?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [TargetArgs].
 */
@PulumiTagMarker
public class TargetArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var anthosCluster: Output? = null

    private var customTarget: Output? = null

    private var deployParameters: Output>? = null

    private var description: Output? = null

    private var executionConfigs: Output>? = null

    private var gke: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var multiTarget: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var requireApproval: Output? = null

    private var run: Output? = null

    /**
     * @param value Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("tefxpcgfmldlwajo")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value Information specifying an Anthos Cluster.
     */
    @JvmName("umlulbvbquglngrl")
    public suspend fun anthosCluster(`value`: Output) {
        this.anthosCluster = value
    }

    /**
     * @param value Optional. Information specifying a Custom Target.
     */
    @JvmName("ntlrysrevikjloud")
    public suspend fun customTarget(`value`: Output) {
        this.customTarget = value
    }

    /**
     * @param value Optional. The deploy parameters to use for this target.
     */
    @JvmName("uxkedbqcxmuauouh")
    public suspend fun deployParameters(`value`: Output>) {
        this.deployParameters = value
    }

    /**
     * @param value Optional. Description of the `Target`. Max length is 255 characters.
     */
    @JvmName("mdiypdtywbauufbb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("bdekrktjarnptogw")
    public suspend fun executionConfigs(`value`: Output>) {
        this.executionConfigs = value
    }

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

    /**
     * @param values Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("ltrycumfuuhheogk")
    public suspend fun executionConfigs(values: List>) {
        this.executionConfigs = Output.all(values)
    }

    /**
     * @param value Information specifying a GKE Cluster.
     */
    @JvmName("qxckrncqqudrtwyy")
    public suspend fun gke(`value`: Output) {
        this.gke = value
    }

    /**
     * @param value Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("wyqeocevbntqmdiv")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The location for the resource
     */
    @JvmName("kuybflwdisarvhbe")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Information specifying a multiTarget.
     */
    @JvmName("burcrbiqblmrtiiy")
    public suspend fun multiTarget(`value`: Output) {
        this.multiTarget = value
    }

    /**
     * @param value Name of the `Target`. Format is `a-z?`.
     * - - -
     */
    @JvmName("nevgmphonbcutbix")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The project for the resource
     */
    @JvmName("amnigcunbsdvibvu")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. Whether or not the `Target` requires approval.
     */
    @JvmName("gbxodvwiekbrniek")
    public suspend fun requireApproval(`value`: Output) {
        this.requireApproval = value
    }

    /**
     * @param value Information specifying a Cloud Run deployment target.
     */
    @JvmName("tskbdgbyfpxmkwnx")
    public suspend fun run(`value`: Output) {
        this.run = value
    }

    /**
     * @param value Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("kbkerkosnixrlaxb")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("cunnkfchnuusmfvf")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Information specifying an Anthos Cluster.
     */
    @JvmName("cirbuhsisociwijv")
    public suspend fun anthosCluster(`value`: TargetAnthosClusterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.anthosCluster = mapped
    }

    /**
     * @param argument Information specifying an Anthos Cluster.
     */
    @JvmName("nqdofnevxkgpcxgl")
    public suspend fun anthosCluster(argument: suspend TargetAnthosClusterArgsBuilder.() -> Unit) {
        val toBeMapped = TargetAnthosClusterArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.anthosCluster = mapped
    }

    /**
     * @param value Optional. Information specifying a Custom Target.
     */
    @JvmName("jxvojpuucligarbu")
    public suspend fun customTarget(`value`: TargetCustomTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customTarget = mapped
    }

    /**
     * @param argument Optional. Information specifying a Custom Target.
     */
    @JvmName("lfaiqlywscafmdvj")
    public suspend fun customTarget(argument: suspend TargetCustomTargetArgsBuilder.() -> Unit) {
        val toBeMapped = TargetCustomTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customTarget = mapped
    }

    /**
     * @param value Optional. The deploy parameters to use for this target.
     */
    @JvmName("ngdtbtcmurbfhbpl")
    public suspend fun deployParameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deployParameters = mapped
    }

    /**
     * @param values Optional. The deploy parameters to use for this target.
     */
    @JvmName("myyhuwavxxxudbmd")
    public fun deployParameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deployParameters = mapped
    }

    /**
     * @param value Optional. Description of the `Target`. Max length is 255 characters.
     */
    @JvmName("cghoflvxuygdvxyo")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("hpiychslxqasaaec")
    public suspend fun executionConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionConfigs = mapped
    }

    /**
     * @param argument Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("ckdqborlicapetde")
    public suspend fun executionConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TargetExecutionConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.executionConfigs = mapped
    }

    /**
     * @param argument Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("ekrasvrgucpcbnhj")
    public suspend fun executionConfigs(vararg argument: suspend TargetExecutionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TargetExecutionConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.executionConfigs = mapped
    }

    /**
     * @param argument Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("gewsidnpcfmjadkm")
    public suspend fun executionConfigs(argument: suspend TargetExecutionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TargetExecutionConfigArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.executionConfigs = mapped
    }

    /**
     * @param values Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
     */
    @JvmName("ntpmbxqgfnhvrswf")
    public suspend fun executionConfigs(vararg values: TargetExecutionConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.executionConfigs = mapped
    }

    /**
     * @param value Information specifying a GKE Cluster.
     */
    @JvmName("rhxighgmufhbjjpq")
    public suspend fun gke(`value`: TargetGkeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gke = mapped
    }

    /**
     * @param argument Information specifying a GKE Cluster.
     */
    @JvmName("iynnjvabxcnahkri")
    public suspend fun gke(argument: suspend TargetGkeArgsBuilder.() -> Unit) {
        val toBeMapped = TargetGkeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gke = mapped
    }

    /**
     * @param value Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("wdtbfapgmssdhjpd")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("cqiqltpnmqxfbplm")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The location for the resource
     */
    @JvmName("disyxvrcswefhisr")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Information specifying a multiTarget.
     */
    @JvmName("hgltmubcymqphvqu")
    public suspend fun multiTarget(`value`: TargetMultiTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.multiTarget = mapped
    }

    /**
     * @param argument Information specifying a multiTarget.
     */
    @JvmName("vbeayilhxrqsvljt")
    public suspend fun multiTarget(argument: suspend TargetMultiTargetArgsBuilder.() -> Unit) {
        val toBeMapped = TargetMultiTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.multiTarget = mapped
    }

    /**
     * @param value Name of the `Target`. Format is `a-z?`.
     * - - -
     */
    @JvmName("adtmdgmvkdgglguo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The project for the resource
     */
    @JvmName("lakmmqnknpxdnwki")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. Whether or not the `Target` requires approval.
     */
    @JvmName("geovnifnwraqueoh")
    public suspend fun requireApproval(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireApproval = mapped
    }

    /**
     * @param value Information specifying a Cloud Run deployment target.
     */
    @JvmName("vlkqomdchiwtfmfh")
    public suspend fun run(`value`: TargetRunArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.run = mapped
    }

    /**
     * @param argument Information specifying a Cloud Run deployment target.
     */
    @JvmName("hdnmoxludmydqbnt")
    public suspend fun run(argument: suspend TargetRunArgsBuilder.() -> Unit) {
        val toBeMapped = TargetRunArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.run = mapped
    }

    internal fun build(): TargetArgs = TargetArgs(
        annotations = annotations,
        anthosCluster = anthosCluster,
        customTarget = customTarget,
        deployParameters = deployParameters,
        description = description,
        executionConfigs = executionConfigs,
        gke = gke,
        labels = labels,
        location = location,
        multiTarget = multiTarget,
        name = name,
        project = project,
        requireApproval = requireApproval,
        run = run,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy