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

com.pulumi.gcp.dataflow.kotlin.FlexTemplateJobArgs.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.dataflow.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataflow.FlexTemplateJobArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const bigDataJob = new gcp.dataflow.FlexTemplateJob("big_data_job", {
 *     name: "dataflow-flextemplates-job",
 *     containerSpecGcsPath: "gs://my-bucket/templates/template.json",
 *     parameters: {
 *         inputSubscription: "messages",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * big_data_job = gcp.dataflow.FlexTemplateJob("big_data_job",
 *     name="dataflow-flextemplates-job",
 *     container_spec_gcs_path="gs://my-bucket/templates/template.json",
 *     parameters={
 *         "inputSubscription": "messages",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var bigDataJob = new Gcp.Dataflow.FlexTemplateJob("big_data_job", new()
 *     {
 *         Name = "dataflow-flextemplates-job",
 *         ContainerSpecGcsPath = "gs://my-bucket/templates/template.json",
 *         Parameters =
 *         {
 *             { "inputSubscription", "messages" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataflow"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := dataflow.NewFlexTemplateJob(ctx, "big_data_job", &dataflow.FlexTemplateJobArgs{
 * 			Name:                 pulumi.String("dataflow-flextemplates-job"),
 * 			ContainerSpecGcsPath: pulumi.String("gs://my-bucket/templates/template.json"),
 * 			Parameters: pulumi.Map{
 * 				"inputSubscription": pulumi.Any("messages"),
 * 			},
 * 		})
 * 		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.dataflow.FlexTemplateJob;
 * import com.pulumi.gcp.dataflow.FlexTemplateJobArgs;
 * 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 bigDataJob = new FlexTemplateJob("bigDataJob", FlexTemplateJobArgs.builder()
 *             .name("dataflow-flextemplates-job")
 *             .containerSpecGcsPath("gs://my-bucket/templates/template.json")
 *             .parameters(Map.of("inputSubscription", "messages"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   bigDataJob:
 *     type: gcp:dataflow:FlexTemplateJob
 *     name: big_data_job
 *     properties:
 *       name: dataflow-flextemplates-job
 *       containerSpecGcsPath: gs://my-bucket/templates/template.json
 *       parameters:
 *         inputSubscription: messages
 * ```
 * 
 * ## Note on "destroy" / "apply"
 * There are many types of Dataflow jobs.  Some Dataflow jobs run constantly,
 * getting new data from (e.g.) a GCS bucket, and outputting data continuously.
 * Some jobs process a set amount of data then terminate. All jobs can fail while
 * running due to programming errors or other issues. In this way, Dataflow jobs
 * are different from most other provider / Google resources.
 * The Dataflow resource is considered 'existing' while it is in a nonterminal
 * state.  If it reaches a terminal state (e.g. 'FAILED', 'COMPLETE',
 * 'CANCELLED'), it will be recreated on the next 'apply'.  This is as expected for
 * jobs which run continuously, but may surprise users who use this resource for
 * other kinds of Dataflow jobs.
 * A Dataflow job which is 'destroyed' may be "cancelled" or "drained".  If
 * "cancelled", the job terminates - any data written remains where it is, but no
 * new data will be processed.  If "drained", no new data will enter the pipeline,
 * but any data currently in the pipeline will finish being processed.  The default
 * is "cancelled", but if a user sets `on_delete` to `"drain"` in the
 * configuration, you may experience a long wait for your `pulumi destroy` to
 * complete.
 * You can potentially short-circuit the wait by setting `skip_wait_on_job_termination`
 * to `true`, but beware that unless you take active steps to ensure that the job
 * `name` parameter changes between instances, the name will conflict and the launch
 * of the new job will fail. One way to do this is with a
 * random_id
 * resource, for example:
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 * const config = new pulumi.Config();
 * const bigDataJobSubscriptionId = config.get("bigDataJobSubscriptionId") || "projects/myproject/subscriptions/messages";
 * const bigDataJobNameSuffix = new random.RandomId("big_data_job_name_suffix", {
 *     byteLength: 4,
 *     keepers: {
 *         region: region,
 *         subscription_id: bigDataJobSubscriptionId,
 *     },
 * });
 * const bigDataJob = new gcp.dataflow.FlexTemplateJob("big_data_job", {
 *     name: pulumi.interpolate`dataflow-flextemplates-job-${bigDataJobNameSuffix.dec}`,
 *     region: region,
 *     containerSpecGcsPath: "gs://my-bucket/templates/template.json",
 *     skipWaitOnJobTermination: true,
 *     parameters: {
 *         inputSubscription: bigDataJobSubscriptionId,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_random as random
 * config = pulumi.Config()
 * big_data_job_subscription_id = config.get("bigDataJobSubscriptionId")
 * if big_data_job_subscription_id is None:
 *     big_data_job_subscription_id = "projects/myproject/subscriptions/messages"
 * big_data_job_name_suffix = random.RandomId("big_data_job_name_suffix",
 *     byte_length=4,
 *     keepers={
 *         "region": region,
 *         "subscription_id": big_data_job_subscription_id,
 *     })
 * big_data_job = gcp.dataflow.FlexTemplateJob("big_data_job",
 *     name=big_data_job_name_suffix.dec.apply(lambda dec: f"dataflow-flextemplates-job-{dec}"),
 *     region=region,
 *     container_spec_gcs_path="gs://my-bucket/templates/template.json",
 *     skip_wait_on_job_termination=True,
 *     parameters={
 *         "inputSubscription": big_data_job_subscription_id,
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Random = Pulumi.Random;
 * return await Deployment.RunAsync(() =>
 * {
 *     var config = new Config();
 *     var bigDataJobSubscriptionId = config.Get("bigDataJobSubscriptionId") ?? "projects/myproject/subscriptions/messages";
 *     var bigDataJobNameSuffix = new Random.RandomId("big_data_job_name_suffix", new()
 *     {
 *         ByteLength = 4,
 *         Keepers =
 *         {
 *             { "region", region },
 *             { "subscription_id", bigDataJobSubscriptionId },
 *         },
 *     });
 *     var bigDataJob = new Gcp.Dataflow.FlexTemplateJob("big_data_job", new()
 *     {
 *         Name = bigDataJobNameSuffix.Dec.Apply(dec => $"dataflow-flextemplates-job-{dec}"),
 *         Region = region,
 *         ContainerSpecGcsPath = "gs://my-bucket/templates/template.json",
 *         SkipWaitOnJobTermination = true,
 *         Parameters =
 *         {
 *             { "inputSubscription", bigDataJobSubscriptionId },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataflow"
 * 	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		cfg := config.New(ctx, "")
 * 		bigDataJobSubscriptionId := "projects/myproject/subscriptions/messages"
 * 		if param := cfg.Get("bigDataJobSubscriptionId"); param != "" {
 * 			bigDataJobSubscriptionId = param
 * 		}
 * 		bigDataJobNameSuffix, err := random.NewRandomId(ctx, "big_data_job_name_suffix", &random.RandomIdArgs{
 * 			ByteLength: pulumi.Int(4),
 * 			Keepers: pulumi.StringMap{
 * 				"region":          pulumi.Any(region),
 * 				"subscription_id": pulumi.String(bigDataJobSubscriptionId),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = dataflow.NewFlexTemplateJob(ctx, "big_data_job", &dataflow.FlexTemplateJobArgs{
 * 			Name: bigDataJobNameSuffix.Dec.ApplyT(func(dec string) (string, error) {
 * 				return fmt.Sprintf("dataflow-flextemplates-job-%v", dec), nil
 * 			}).(pulumi.StringOutput),
 * 			Region:                   pulumi.Any(region),
 * 			ContainerSpecGcsPath:     pulumi.String("gs://my-bucket/templates/template.json"),
 * 			SkipWaitOnJobTermination: pulumi.Bool(true),
 * 			Parameters: pulumi.Map{
 * 				"inputSubscription": pulumi.String(bigDataJobSubscriptionId),
 * 			},
 * 		})
 * 		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.random.RandomId;
 * import com.pulumi.random.RandomIdArgs;
 * import com.pulumi.gcp.dataflow.FlexTemplateJob;
 * import com.pulumi.gcp.dataflow.FlexTemplateJobArgs;
 * 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 config = ctx.config();
 *         final var bigDataJobSubscriptionId = config.get("bigDataJobSubscriptionId").orElse("projects/myproject/subscriptions/messages");
 *         var bigDataJobNameSuffix = new RandomId("bigDataJobNameSuffix", RandomIdArgs.builder()
 *             .byteLength(4)
 *             .keepers(Map.ofEntries(
 *                 Map.entry("region", region),
 *                 Map.entry("subscription_id", bigDataJobSubscriptionId)
 *             ))
 *             .build());
 *         var bigDataJob = new FlexTemplateJob("bigDataJob", FlexTemplateJobArgs.builder()
 *             .name(bigDataJobNameSuffix.dec().applyValue(dec -> String.format("dataflow-flextemplates-job-%s", dec)))
 *             .region(region)
 *             .containerSpecGcsPath("gs://my-bucket/templates/template.json")
 *             .skipWaitOnJobTermination(true)
 *             .parameters(Map.of("inputSubscription", bigDataJobSubscriptionId))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * configuration:
 *   bigDataJobSubscriptionId:
 *     type: string
 *     default: projects/myproject/subscriptions/messages
 * resources:
 *   bigDataJobNameSuffix:
 *     type: random:RandomId
 *     name: big_data_job_name_suffix
 *     properties:
 *       byteLength: 4
 *       keepers:
 *         region: ${region}
 *         subscription_id: ${bigDataJobSubscriptionId}
 *   bigDataJob:
 *     type: gcp:dataflow:FlexTemplateJob
 *     name: big_data_job
 *     properties:
 *       name: dataflow-flextemplates-job-${bigDataJobNameSuffix.dec}
 *       region: ${region}
 *       containerSpecGcsPath: gs://my-bucket/templates/template.json
 *       skipWaitOnJobTermination: true
 *       parameters:
 *         inputSubscription: ${bigDataJobSubscriptionId}
 * ```
 * 
 * ## Import
 * This resource does not support import.
 * @property additionalExperiments List of experiments that should be used by the job. An example value is `["enable_stackdriver_agent_metrics"]`.
 * @property autoscalingAlgorithm The algorithm to use for autoscaling.
 * @property containerSpecGcsPath The GCS path to the Dataflow job Flex
 * Template.
 * - - -
 * @property enableStreamingEngine Immutable. Indicates if the job should use the streaming engine feature.
 * @property ipConfiguration The configuration for VM IPs.  Options are `"WORKER_IP_PUBLIC"` or `"WORKER_IP_PRIVATE"`.
 * @property kmsKeyName The name for the Cloud KMS key for the job. Key format is: `projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY`
 * @property labels User labels to be specified for the job. Keys and values
 * should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
 * page. **Note**: This field is marked as deprecated as the API does not currently
 * support adding labels.
 * **NOTE**: Google-provided Dataflow templates often provide default labels
 * that begin with `goog-dataflow-provided`. Unless explicitly set in config, these
 * labels will be ignored to prevent diffs on re-apply.
 * @property launcherMachineType The machine type to use for launching the job. The default is n1-standard-1.
 * @property machineType The machine type to use for the job.
 * @property maxWorkers Immutable. The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
 * @property name Immutable. A unique name for the resource, required by Dataflow.
 * @property network The network to which VMs will be assigned. If it is not provided, "default" will be used.
 * @property numWorkers Immutable. The initial number of Google Compute Engine instances for the job.
 * @property onDelete One of "drain" or "cancel". Specifies behavior of
 * deletion during `pulumi destroy`.  See above note.
 * @property parameters **Template specific** Key/Value pairs to be forwarded to the pipeline's options; keys are
 * case-sensitive based on the language on which the pipeline is coded, mostly Java.
 * **Note**: do not configure Dataflow options here in parameters.
 * @property project The project in which the resource belongs. If it is not
 * provided, the provider project is used.
 * @property region Immutable. The region in which the created job should run.
 * @property sdkContainerImage Docker registry location of container image to use for the 'worker harness. Default is the container for the version of the SDK. Note this field is only valid for portable pipelines.
 * @property serviceAccountEmail Service account email to run the workers as. This should be just an email e.g. `[email protected]`. Do not include any `serviceAccount:` or other prefix.
 * @property skipWaitOnJobTermination
 * @property stagingLocation The Cloud Storage path to use for staging files. Must be a valid Cloud Storage URL, beginning with gs://.
 * @property subnetwork The subnetwork to which VMs will be assigned. Should be of the form "regions/REGION/subnetworks/SUBNETWORK".
 * @property tempLocation The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with gs://.
 * @property transformNameMapping Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.
 */
public data class FlexTemplateJobArgs(
    public val additionalExperiments: Output>? = null,
    public val autoscalingAlgorithm: Output? = null,
    public val containerSpecGcsPath: Output? = null,
    public val enableStreamingEngine: Output? = null,
    public val ipConfiguration: Output? = null,
    public val kmsKeyName: Output? = null,
    public val labels: Output>? = null,
    public val launcherMachineType: Output? = null,
    public val machineType: Output? = null,
    public val maxWorkers: Output? = null,
    public val name: Output? = null,
    public val network: Output? = null,
    public val numWorkers: Output? = null,
    public val onDelete: Output? = null,
    public val parameters: Output>? = null,
    public val project: Output? = null,
    public val region: Output? = null,
    public val sdkContainerImage: Output? = null,
    public val serviceAccountEmail: Output? = null,
    public val skipWaitOnJobTermination: Output? = null,
    public val stagingLocation: Output? = null,
    public val subnetwork: Output? = null,
    public val tempLocation: Output? = null,
    public val transformNameMapping: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataflow.FlexTemplateJobArgs =
        com.pulumi.gcp.dataflow.FlexTemplateJobArgs.builder()
            .additionalExperiments(additionalExperiments?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .autoscalingAlgorithm(autoscalingAlgorithm?.applyValue({ args0 -> args0 }))
            .containerSpecGcsPath(containerSpecGcsPath?.applyValue({ args0 -> args0 }))
            .enableStreamingEngine(enableStreamingEngine?.applyValue({ args0 -> args0 }))
            .ipConfiguration(ipConfiguration?.applyValue({ args0 -> args0 }))
            .kmsKeyName(kmsKeyName?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .launcherMachineType(launcherMachineType?.applyValue({ args0 -> args0 }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .maxWorkers(maxWorkers?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .network(network?.applyValue({ args0 -> args0 }))
            .numWorkers(numWorkers?.applyValue({ args0 -> args0 }))
            .onDelete(onDelete?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 }))
            .sdkContainerImage(sdkContainerImage?.applyValue({ args0 -> args0 }))
            .serviceAccountEmail(serviceAccountEmail?.applyValue({ args0 -> args0 }))
            .skipWaitOnJobTermination(skipWaitOnJobTermination?.applyValue({ args0 -> args0 }))
            .stagingLocation(stagingLocation?.applyValue({ args0 -> args0 }))
            .subnetwork(subnetwork?.applyValue({ args0 -> args0 }))
            .tempLocation(tempLocation?.applyValue({ args0 -> args0 }))
            .transformNameMapping(
                transformNameMapping?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var autoscalingAlgorithm: Output? = null

    private var containerSpecGcsPath: Output? = null

    private var enableStreamingEngine: Output? = null

    private var ipConfiguration: Output? = null

    private var kmsKeyName: Output? = null

    private var labels: Output>? = null

    private var launcherMachineType: Output? = null

    private var machineType: Output? = null

    private var maxWorkers: Output? = null

    private var name: Output? = null

    private var network: Output? = null

    private var numWorkers: Output? = null

    private var onDelete: Output? = null

    private var parameters: Output>? = null

    private var project: Output? = null

    private var region: Output? = null

    private var sdkContainerImage: Output? = null

    private var serviceAccountEmail: Output? = null

    private var skipWaitOnJobTermination: Output? = null

    private var stagingLocation: Output? = null

    private var subnetwork: Output? = null

    private var tempLocation: Output? = null

    private var transformNameMapping: Output>? = null

    /**
     * @param value List of experiments that should be used by the job. An example value is `["enable_stackdriver_agent_metrics"]`.
     */
    @JvmName("jqhgnwophlojpuhe")
    public suspend fun additionalExperiments(`value`: Output>) {
        this.additionalExperiments = value
    }

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

    /**
     * @param values List of experiments that should be used by the job. An example value is `["enable_stackdriver_agent_metrics"]`.
     */
    @JvmName("tktjumjsiuinnbbv")
    public suspend fun additionalExperiments(values: List>) {
        this.additionalExperiments = Output.all(values)
    }

    /**
     * @param value The algorithm to use for autoscaling.
     */
    @JvmName("vvwjiyfgfytqmktp")
    public suspend fun autoscalingAlgorithm(`value`: Output) {
        this.autoscalingAlgorithm = value
    }

    /**
     * @param value The GCS path to the Dataflow job Flex
     * Template.
     * - - -
     */
    @JvmName("ldxnxlbfysokxtul")
    public suspend fun containerSpecGcsPath(`value`: Output) {
        this.containerSpecGcsPath = value
    }

    /**
     * @param value Immutable. Indicates if the job should use the streaming engine feature.
     */
    @JvmName("dgborahgadcjacna")
    public suspend fun enableStreamingEngine(`value`: Output) {
        this.enableStreamingEngine = value
    }

    /**
     * @param value The configuration for VM IPs.  Options are `"WORKER_IP_PUBLIC"` or `"WORKER_IP_PRIVATE"`.
     */
    @JvmName("lqfbhhefwogntbix")
    public suspend fun ipConfiguration(`value`: Output) {
        this.ipConfiguration = value
    }

    /**
     * @param value The name for the Cloud KMS key for the job. Key format is: `projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY`
     */
    @JvmName("uxewakacemhyvqmp")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value User labels to be specified for the job. Keys and values
     * should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page. **Note**: This field is marked as deprecated as the API does not currently
     * support adding labels.
     * **NOTE**: Google-provided Dataflow templates often provide default labels
     * that begin with `goog-dataflow-provided`. Unless explicitly set in config, these
     * labels will be ignored to prevent diffs on re-apply.
     */
    @JvmName("tsaqtpqnlrhujskc")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The machine type to use for launching the job. The default is n1-standard-1.
     */
    @JvmName("narcfawajqsigvdm")
    public suspend fun launcherMachineType(`value`: Output) {
        this.launcherMachineType = value
    }

    /**
     * @param value The machine type to use for the job.
     */
    @JvmName("esvxgsibrgdxkhtp")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value Immutable. The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
     */
    @JvmName("pyqebsxydsexwfdo")
    public suspend fun maxWorkers(`value`: Output) {
        this.maxWorkers = value
    }

    /**
     * @param value Immutable. A unique name for the resource, required by Dataflow.
     */
    @JvmName("wnboifkyifxtdxui")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The network to which VMs will be assigned. If it is not provided, "default" will be used.
     */
    @JvmName("oinhkfquxhntgsrm")
    public suspend fun network(`value`: Output) {
        this.network = value
    }

    /**
     * @param value Immutable. The initial number of Google Compute Engine instances for the job.
     */
    @JvmName("abnhfybsvcryools")
    public suspend fun numWorkers(`value`: Output) {
        this.numWorkers = value
    }

    /**
     * @param value One of "drain" or "cancel". Specifies behavior of
     * deletion during `pulumi destroy`.  See above note.
     */
    @JvmName("xrjxnkiafiiajfaj")
    public suspend fun onDelete(`value`: Output) {
        this.onDelete = value
    }

    /**
     * @param value **Template specific** Key/Value pairs to be forwarded to the pipeline's options; keys are
     * case-sensitive based on the language on which the pipeline is coded, mostly Java.
     * **Note**: do not configure Dataflow options here in parameters.
     */
    @JvmName("elykvbocjxwbnuwt")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param value Immutable. The region in which the created job should run.
     */
    @JvmName("pwtrbwtmbtqqojop")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value Docker registry location of container image to use for the 'worker harness. Default is the container for the version of the SDK. Note this field is only valid for portable pipelines.
     */
    @JvmName("ebknntdqenvhoqom")
    public suspend fun sdkContainerImage(`value`: Output) {
        this.sdkContainerImage = value
    }

    /**
     * @param value Service account email to run the workers as. This should be just an email e.g. `[email protected]`. Do not include any `serviceAccount:` or other prefix.
     */
    @JvmName("kbwxjnejaackcedi")
    public suspend fun serviceAccountEmail(`value`: Output) {
        this.serviceAccountEmail = value
    }

    /**
     * @param value
     */
    @JvmName("yifsnaqetxjqsgpm")
    public suspend fun skipWaitOnJobTermination(`value`: Output) {
        this.skipWaitOnJobTermination = value
    }

    /**
     * @param value The Cloud Storage path to use for staging files. Must be a valid Cloud Storage URL, beginning with gs://.
     */
    @JvmName("swtnrbtedfrpbmlb")
    public suspend fun stagingLocation(`value`: Output) {
        this.stagingLocation = value
    }

    /**
     * @param value The subnetwork to which VMs will be assigned. Should be of the form "regions/REGION/subnetworks/SUBNETWORK".
     */
    @JvmName("khlvivmjbsyihjwq")
    public suspend fun subnetwork(`value`: Output) {
        this.subnetwork = value
    }

    /**
     * @param value The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with gs://.
     */
    @JvmName("uihtfmblwyfjjwuu")
    public suspend fun tempLocation(`value`: Output) {
        this.tempLocation = value
    }

    /**
     * @param value Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.
     */
    @JvmName("lbfbyjcfldacppra")
    public suspend fun transformNameMapping(`value`: Output>) {
        this.transformNameMapping = value
    }

    /**
     * @param value List of experiments that should be used by the job. An example value is `["enable_stackdriver_agent_metrics"]`.
     */
    @JvmName("qpxcggafoiakojyx")
    public suspend fun additionalExperiments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalExperiments = mapped
    }

    /**
     * @param values List of experiments that should be used by the job. An example value is `["enable_stackdriver_agent_metrics"]`.
     */
    @JvmName("dejoilliyyuuogty")
    public suspend fun additionalExperiments(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalExperiments = mapped
    }

    /**
     * @param value The algorithm to use for autoscaling.
     */
    @JvmName("xhtrwegiripibgfv")
    public suspend fun autoscalingAlgorithm(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingAlgorithm = mapped
    }

    /**
     * @param value The GCS path to the Dataflow job Flex
     * Template.
     * - - -
     */
    @JvmName("smhwgheivuyvejfv")
    public suspend fun containerSpecGcsPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerSpecGcsPath = mapped
    }

    /**
     * @param value Immutable. Indicates if the job should use the streaming engine feature.
     */
    @JvmName("qffbrbwtcbeipjar")
    public suspend fun enableStreamingEngine(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableStreamingEngine = mapped
    }

    /**
     * @param value The configuration for VM IPs.  Options are `"WORKER_IP_PUBLIC"` or `"WORKER_IP_PRIVATE"`.
     */
    @JvmName("assujsafipecqcng")
    public suspend fun ipConfiguration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipConfiguration = mapped
    }

    /**
     * @param value The name for the Cloud KMS key for the job. Key format is: `projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY`
     */
    @JvmName("nccipawfflfoybif")
    public suspend fun kmsKeyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    /**
     * @param value User labels to be specified for the job. Keys and values
     * should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page. **Note**: This field is marked as deprecated as the API does not currently
     * support adding labels.
     * **NOTE**: Google-provided Dataflow templates often provide default labels
     * that begin with `goog-dataflow-provided`. Unless explicitly set in config, these
     * labels will be ignored to prevent diffs on re-apply.
     */
    @JvmName("pgtlcpgsuxxciasr")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values User labels to be specified for the job. Keys and values
     * should follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page. **Note**: This field is marked as deprecated as the API does not currently
     * support adding labels.
     * **NOTE**: Google-provided Dataflow templates often provide default labels
     * that begin with `goog-dataflow-provided`. Unless explicitly set in config, these
     * labels will be ignored to prevent diffs on re-apply.
     */
    @JvmName("egvdwrllmgcobvyb")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The machine type to use for launching the job. The default is n1-standard-1.
     */
    @JvmName("hovokuutwdsjwvvf")
    public suspend fun launcherMachineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launcherMachineType = mapped
    }

    /**
     * @param value The machine type to use for the job.
     */
    @JvmName("wwmguxilfyufqvpa")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value Immutable. The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000.
     */
    @JvmName("kwkjkjtsshevbyco")
    public suspend fun maxWorkers(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxWorkers = mapped
    }

    /**
     * @param value Immutable. A unique name for the resource, required by Dataflow.
     */
    @JvmName("jrifgngkfrlsobkw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The network to which VMs will be assigned. If it is not provided, "default" will be used.
     */
    @JvmName("eusdcxrwnvbqmqtg")
    public suspend fun network(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.network = mapped
    }

    /**
     * @param value Immutable. The initial number of Google Compute Engine instances for the job.
     */
    @JvmName("sosvncwjnntfshhk")
    public suspend fun numWorkers(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numWorkers = mapped
    }

    /**
     * @param value One of "drain" or "cancel". Specifies behavior of
     * deletion during `pulumi destroy`.  See above note.
     */
    @JvmName("equcrnxrntpcfbly")
    public suspend fun onDelete(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onDelete = mapped
    }

    /**
     * @param value **Template specific** Key/Value pairs to be forwarded to the pipeline's options; keys are
     * case-sensitive based on the language on which the pipeline is coded, mostly Java.
     * **Note**: do not configure Dataflow options here in parameters.
     */
    @JvmName("gfcjhervdukdhrqp")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values **Template specific** Key/Value pairs to be forwarded to the pipeline's options; keys are
     * case-sensitive based on the language on which the pipeline is coded, mostly Java.
     * **Note**: do not configure Dataflow options here in parameters.
     */
    @JvmName("mghorhriamtijecd")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

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

    /**
     * @param value Immutable. The region in which the created job should run.
     */
    @JvmName("mtwdwwhkmawfjlgk")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value Docker registry location of container image to use for the 'worker harness. Default is the container for the version of the SDK. Note this field is only valid for portable pipelines.
     */
    @JvmName("wwjssyjfqynoiqtu")
    public suspend fun sdkContainerImage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sdkContainerImage = mapped
    }

    /**
     * @param value Service account email to run the workers as. This should be just an email e.g. `[email protected]`. Do not include any `serviceAccount:` or other prefix.
     */
    @JvmName("bcqxmlqvmiuiygev")
    public suspend fun serviceAccountEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountEmail = mapped
    }

    /**
     * @param value
     */
    @JvmName("btfcngcygvfiynqc")
    public suspend fun skipWaitOnJobTermination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skipWaitOnJobTermination = mapped
    }

    /**
     * @param value The Cloud Storage path to use for staging files. Must be a valid Cloud Storage URL, beginning with gs://.
     */
    @JvmName("mtamybaelieumael")
    public suspend fun stagingLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stagingLocation = mapped
    }

    /**
     * @param value The subnetwork to which VMs will be assigned. Should be of the form "regions/REGION/subnetworks/SUBNETWORK".
     */
    @JvmName("rxjesxhqxtxdwvdw")
    public suspend fun subnetwork(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetwork = mapped
    }

    /**
     * @param value The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with gs://.
     */
    @JvmName("ncmilnchnffidtad")
    public suspend fun tempLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tempLocation = mapped
    }

    /**
     * @param value Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.
     */
    @JvmName("kaijkhbufheuxbsv")
    public suspend fun transformNameMapping(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transformNameMapping = mapped
    }

    /**
     * @param values Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.Only applicable when updating a pipeline. Map of transform name prefixes of the job to be replaced with the corresponding name prefixes of the new job.
     */
    @JvmName("clvatuprqyfsnbqn")
    public fun transformNameMapping(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transformNameMapping = mapped
    }

    internal fun build(): FlexTemplateJobArgs = FlexTemplateJobArgs(
        additionalExperiments = additionalExperiments,
        autoscalingAlgorithm = autoscalingAlgorithm,
        containerSpecGcsPath = containerSpecGcsPath,
        enableStreamingEngine = enableStreamingEngine,
        ipConfiguration = ipConfiguration,
        kmsKeyName = kmsKeyName,
        labels = labels,
        launcherMachineType = launcherMachineType,
        machineType = machineType,
        maxWorkers = maxWorkers,
        name = name,
        network = network,
        numWorkers = numWorkers,
        onDelete = onDelete,
        parameters = parameters,
        project = project,
        region = region,
        sdkContainerImage = sdkContainerImage,
        serviceAccountEmail = serviceAccountEmail,
        skipWaitOnJobTermination = skipWaitOnJobTermination,
        stagingLocation = stagingLocation,
        subnetwork = subnetwork,
        tempLocation = tempLocation,
        transformNameMapping = transformNameMapping,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy