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

com.pulumi.gcp.bigquery.kotlin.ReservationAssignmentArgs.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.bigquery.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigquery.ReservationAssignmentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The BigqueryReservation Assignment resource
 * ## Example Usage
 * ### Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basic = new gcp.bigquery.Reservation("basic", {
 *     name: "tf-test-my-reservation",
 *     project: "my-project-name",
 *     location: "us-central1",
 *     slotCapacity: 0,
 *     ignoreIdleSlots: false,
 * });
 * const primary = new gcp.bigquery.ReservationAssignment("primary", {
 *     assignee: "projects/my-project-name",
 *     jobType: "PIPELINE",
 *     reservation: basic.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic = gcp.bigquery.Reservation("basic",
 *     name="tf-test-my-reservation",
 *     project="my-project-name",
 *     location="us-central1",
 *     slot_capacity=0,
 *     ignore_idle_slots=False)
 * primary = gcp.bigquery.ReservationAssignment("primary",
 *     assignee="projects/my-project-name",
 *     job_type="PIPELINE",
 *     reservation=basic.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basic = new Gcp.BigQuery.Reservation("basic", new()
 *     {
 *         Name = "tf-test-my-reservation",
 *         Project = "my-project-name",
 *         Location = "us-central1",
 *         SlotCapacity = 0,
 *         IgnoreIdleSlots = false,
 *     });
 *     var primary = new Gcp.BigQuery.ReservationAssignment("primary", new()
 *     {
 *         Assignee = "projects/my-project-name",
 *         JobType = "PIPELINE",
 *         Reservation = basic.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		basic, err := bigquery.NewReservation(ctx, "basic", &bigquery.ReservationArgs{
 * 			Name:            pulumi.String("tf-test-my-reservation"),
 * 			Project:         pulumi.String("my-project-name"),
 * 			Location:        pulumi.String("us-central1"),
 * 			SlotCapacity:    pulumi.Int(0),
 * 			IgnoreIdleSlots: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = bigquery.NewReservationAssignment(ctx, "primary", &bigquery.ReservationAssignmentArgs{
 * 			Assignee:    pulumi.String("projects/my-project-name"),
 * 			JobType:     pulumi.String("PIPELINE"),
 * 			Reservation: basic.ID(),
 * 		})
 * 		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.bigquery.Reservation;
 * import com.pulumi.gcp.bigquery.ReservationArgs;
 * import com.pulumi.gcp.bigquery.ReservationAssignment;
 * import com.pulumi.gcp.bigquery.ReservationAssignmentArgs;
 * 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 basic = new Reservation("basic", ReservationArgs.builder()
 *             .name("tf-test-my-reservation")
 *             .project("my-project-name")
 *             .location("us-central1")
 *             .slotCapacity(0)
 *             .ignoreIdleSlots(false)
 *             .build());
 *         var primary = new ReservationAssignment("primary", ReservationAssignmentArgs.builder()
 *             .assignee("projects/my-project-name")
 *             .jobType("PIPELINE")
 *             .reservation(basic.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basic:
 *     type: gcp:bigquery:Reservation
 *     properties:
 *       name: tf-test-my-reservation
 *       project: my-project-name
 *       location: us-central1
 *       slotCapacity: 0
 *       ignoreIdleSlots: false
 *   primary:
 *     type: gcp:bigquery:ReservationAssignment
 *     properties:
 *       assignee: projects/my-project-name
 *       jobType: PIPELINE
 *       reservation: ${basic.id}
 * ```
 * 
 * ## Import
 * Assignment can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}`
 * * `{{project}}/{{location}}/{{reservation}}/{{name}}`
 * * `{{location}}/{{reservation}}/{{name}}`
 * When using the `pulumi import` command, Assignment can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{project}}/{{location}}/{{reservation}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{location}}/{{reservation}}/{{name}}
 * ```
 * @property assignee The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
 * @property jobType Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
 * @property location The location for the resource
 * @property project The project for the resource
 * @property reservation The reservation for the resource
 * - - -
 */
public data class ReservationAssignmentArgs(
    public val assignee: Output? = null,
    public val jobType: Output? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val reservation: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigquery.ReservationAssignmentArgs =
        com.pulumi.gcp.bigquery.ReservationAssignmentArgs.builder()
            .assignee(assignee?.applyValue({ args0 -> args0 }))
            .jobType(jobType?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .reservation(reservation?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ReservationAssignmentArgs].
 */
@PulumiTagMarker
public class ReservationAssignmentArgsBuilder internal constructor() {
    private var assignee: Output? = null

    private var jobType: Output? = null

    private var location: Output? = null

    private var project: Output? = null

    private var reservation: Output? = null

    /**
     * @param value The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
     */
    @JvmName("fijtaaemhuklrqlq")
    public suspend fun assignee(`value`: Output) {
        this.assignee = value
    }

    /**
     * @param value Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
     */
    @JvmName("gadboeprkbtrfouk")
    public suspend fun jobType(`value`: Output) {
        this.jobType = value
    }

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

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

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

    /**
     * @param value The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
     */
    @JvmName("qeujddwmgdfrvchy")
    public suspend fun assignee(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assignee = mapped
    }

    /**
     * @param value Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
     */
    @JvmName("uwtnswcxpdgbybfw")
    public suspend fun jobType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobType = mapped
    }

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

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

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

    internal fun build(): ReservationAssignmentArgs = ReservationAssignmentArgs(
        assignee = assignee,
        jobType = jobType,
        location = location,
        project = project,
        reservation = reservation,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy