
com.pulumi.gcp.tpu.kotlin.V2QueuedResourceArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.tpu.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.tpu.V2QueuedResourceArgs.builder
import com.pulumi.gcp.tpu.kotlin.inputs.V2QueuedResourceTpuArgs
import com.pulumi.gcp.tpu.kotlin.inputs.V2QueuedResourceTpuArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* ## Example Usage
* ### Tpu V2 Queued Resource Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const qr = new gcp.tpu.V2QueuedResource("qr", {
* name: "test-qr",
* zone: "us-central1-c",
* project: "my-project-name",
* tpu: {
* nodeSpecs: [{
* parent: "projects/my-project-name/locations/us-central1-c",
* nodeId: "test-tpu",
* node: {
* runtimeVersion: "tpu-vm-tf-2.13.0",
* acceleratorType: "v2-8",
* description: "Text description of the TPU.",
* },
* }],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* qr = gcp.tpu.V2QueuedResource("qr",
* name="test-qr",
* zone="us-central1-c",
* project="my-project-name",
* tpu={
* "node_specs": [{
* "parent": "projects/my-project-name/locations/us-central1-c",
* "node_id": "test-tpu",
* "node": {
* "runtime_version": "tpu-vm-tf-2.13.0",
* "accelerator_type": "v2-8",
* "description": "Text description of the TPU.",
* },
* }],
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var qr = new Gcp.Tpu.V2QueuedResource("qr", new()
* {
* Name = "test-qr",
* Zone = "us-central1-c",
* Project = "my-project-name",
* Tpu = new Gcp.Tpu.Inputs.V2QueuedResourceTpuArgs
* {
* NodeSpecs = new[]
* {
* new Gcp.Tpu.Inputs.V2QueuedResourceTpuNodeSpecArgs
* {
* Parent = "projects/my-project-name/locations/us-central1-c",
* NodeId = "test-tpu",
* Node = new Gcp.Tpu.Inputs.V2QueuedResourceTpuNodeSpecNodeArgs
* {
* RuntimeVersion = "tpu-vm-tf-2.13.0",
* AcceleratorType = "v2-8",
* Description = "Text description of the TPU.",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/tpu"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := tpu.NewV2QueuedResource(ctx, "qr", &tpu.V2QueuedResourceArgs{
* Name: pulumi.String("test-qr"),
* Zone: pulumi.String("us-central1-c"),
* Project: pulumi.String("my-project-name"),
* Tpu: &tpu.V2QueuedResourceTpuArgs{
* NodeSpecs: tpu.V2QueuedResourceTpuNodeSpecArray{
* &tpu.V2QueuedResourceTpuNodeSpecArgs{
* Parent: pulumi.String("projects/my-project-name/locations/us-central1-c"),
* NodeId: pulumi.String("test-tpu"),
* Node: &tpu.V2QueuedResourceTpuNodeSpecNodeArgs{
* RuntimeVersion: pulumi.String("tpu-vm-tf-2.13.0"),
* AcceleratorType: pulumi.String("v2-8"),
* Description: pulumi.String("Text description of the TPU."),
* },
* },
* },
* },
* })
* 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.tpu.V2QueuedResource;
* import com.pulumi.gcp.tpu.V2QueuedResourceArgs;
* import com.pulumi.gcp.tpu.inputs.V2QueuedResourceTpuArgs;
* 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 qr = new V2QueuedResource("qr", V2QueuedResourceArgs.builder()
* .name("test-qr")
* .zone("us-central1-c")
* .project("my-project-name")
* .tpu(V2QueuedResourceTpuArgs.builder()
* .nodeSpecs(V2QueuedResourceTpuNodeSpecArgs.builder()
* .parent("projects/my-project-name/locations/us-central1-c")
* .nodeId("test-tpu")
* .node(V2QueuedResourceTpuNodeSpecNodeArgs.builder()
* .runtimeVersion("tpu-vm-tf-2.13.0")
* .acceleratorType("v2-8")
* .description("Text description of the TPU.")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* qr:
* type: gcp:tpu:V2QueuedResource
* properties:
* name: test-qr
* zone: us-central1-c
* project: my-project-name
* tpu:
* nodeSpecs:
* - parent: projects/my-project-name/locations/us-central1-c
* nodeId: test-tpu
* node:
* runtimeVersion: tpu-vm-tf-2.13.0
* acceleratorType: v2-8
* description: Text description of the TPU.
* ```
*
* ## Import
* QueuedResource can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{zone}}/queuedResources/{{name}}`
* * `{{project}}/{{zone}}/{{name}}`
* * `{{zone}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, QueuedResource can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:tpu/v2QueuedResource:V2QueuedResource default projects/{{project}}/locations/{{zone}}/queuedResources/{{name}}
* ```
* ```sh
* $ pulumi import gcp:tpu/v2QueuedResource:V2QueuedResource default {{project}}/{{zone}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:tpu/v2QueuedResource:V2QueuedResource default {{zone}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:tpu/v2QueuedResource:V2QueuedResource default {{name}}
* ```
* @property name The immutable name of the Queued Resource.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property tpu Defines a TPU resource.
* Structure is documented below.
* @property zone The GCP location for the Queued Resource. If it is not provided, the provider zone is used.
*/
public data class V2QueuedResourceArgs(
public val name: Output? = null,
public val project: Output? = null,
public val tpu: Output? = null,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.tpu.V2QueuedResourceArgs =
com.pulumi.gcp.tpu.V2QueuedResourceArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.tpu(tpu?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [V2QueuedResourceArgs].
*/
@PulumiTagMarker
public class V2QueuedResourceArgsBuilder internal constructor() {
private var name: Output? = null
private var project: Output? = null
private var tpu: Output? = null
private var zone: Output? = null
/**
* @param value The immutable name of the Queued Resource.
* - - -
*/
@JvmName("avqkfegitmltlgre")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("uxwbyxvlubgrkyqu")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Defines a TPU resource.
* Structure is documented below.
*/
@JvmName("yndqkbemsllvhfug")
public suspend fun tpu(`value`: Output) {
this.tpu = value
}
/**
* @param value The GCP location for the Queued Resource. If it is not provided, the provider zone is used.
*/
@JvmName("ydaupnnqewluvrij")
public suspend fun zone(`value`: Output) {
this.zone = value
}
/**
* @param value The immutable name of the Queued Resource.
* - - -
*/
@JvmName("fabdgmbhpjqnwcad")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("bkkdpestwijrkewx")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Defines a TPU resource.
* Structure is documented below.
*/
@JvmName("npcpmqlcxnktogbn")
public suspend fun tpu(`value`: V2QueuedResourceTpuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tpu = mapped
}
/**
* @param argument Defines a TPU resource.
* Structure is documented below.
*/
@JvmName("auimudrscsctrmqo")
public suspend fun tpu(argument: suspend V2QueuedResourceTpuArgsBuilder.() -> Unit) {
val toBeMapped = V2QueuedResourceTpuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.tpu = mapped
}
/**
* @param value The GCP location for the Queued Resource. If it is not provided, the provider zone is used.
*/
@JvmName("vewlxknojesartad")
public suspend fun zone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zone = mapped
}
internal fun build(): V2QueuedResourceArgs = V2QueuedResourceArgs(
name = name,
project = project,
tpu = tpu,
zone = zone,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy