Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.InstanceSettingsArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceSettingsMetadataArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceSettingsMetadataArgsBuilder
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
/**
* Represents an Instance Settings resource. Instance settings are centralized configuration parameters that allow users to configure the default values for specific VM parameters that are normally set using GCE instance API methods.
* To get more information about InstanceSettings, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/instanceSettings)
* * How-to Guides
* * [Update Instance Settings](https://cloud.google.com/compute/docs/metadata/setting-custom-metadata#set-custom-project-zonal-metadata)
* ## Example Usage
* ### Instance Settings Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const gceInstanceSettings = new gcp.compute.InstanceSettings("gce_instance_settings", {
* zone: "us-east7-b",
* metadata: {
* items: {
* foo: "baz",
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* gce_instance_settings = gcp.compute.InstanceSettings("gce_instance_settings",
* zone="us-east7-b",
* metadata={
* "items": {
* "foo": "baz",
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var gceInstanceSettings = new Gcp.Compute.InstanceSettings("gce_instance_settings", new()
* {
* Zone = "us-east7-b",
* Metadata = new Gcp.Compute.Inputs.InstanceSettingsMetadataArgs
* {
* Items =
* {
* { "foo", "baz" },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewInstanceSettings(ctx, "gce_instance_settings", &compute.InstanceSettingsArgs{
* Zone: pulumi.String("us-east7-b"),
* Metadata: &compute.InstanceSettingsMetadataArgs{
* Items: pulumi.StringMap{
* "foo": pulumi.String("baz"),
* },
* },
* })
* 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.compute.InstanceSettings;
* import com.pulumi.gcp.compute.InstanceSettingsArgs;
* import com.pulumi.gcp.compute.inputs.InstanceSettingsMetadataArgs;
* 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 gceInstanceSettings = new InstanceSettings("gceInstanceSettings", InstanceSettingsArgs.builder()
* .zone("us-east7-b")
* .metadata(InstanceSettingsMetadataArgs.builder()
* .items(Map.of("foo", "baz"))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* gceInstanceSettings:
* type: gcp:compute:InstanceSettings
* name: gce_instance_settings
* properties:
* zone: us-east7-b
* metadata:
* items:
* foo: baz
* ```
*
* ## Import
* InstanceSettings can be imported using any of these accepted formats:
* * `projects/{{project}}/zones/{{zone}}/instanceSettings`
* * `{{project}}/{{zone}}`
* * `{{zone}}`
* When using the `pulumi import` command, InstanceSettings can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/instanceSettings:InstanceSettings default projects/{{project}}/zones/{{zone}}/instanceSettings
* ```
* ```sh
* $ pulumi import gcp:compute/instanceSettings:InstanceSettings default {{project}}/{{zone}}
* ```
* ```sh
* $ pulumi import gcp:compute/instanceSettings:InstanceSettings default {{zone}}
* ```
* @property metadata The metadata key/value pairs assigned to all the instances in the corresponding scope.
* Structure is documented below.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property zone A reference to the zone where the machine resides.
* - - -
*/
public data class InstanceSettingsArgs(
public val metadata: Output? = null,
public val project: Output? = null,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.InstanceSettingsArgs =
com.pulumi.gcp.compute.InstanceSettingsArgs.builder()
.metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.project(project?.applyValue({ args0 -> args0 }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [InstanceSettingsArgs].
*/
@PulumiTagMarker
public class InstanceSettingsArgsBuilder internal constructor() {
private var metadata: Output? = null
private var project: Output? = null
private var zone: Output? = null
/**
* @param value The metadata key/value pairs assigned to all the instances in the corresponding scope.
* Structure is documented below.
*/
@JvmName("pglwyickimhsphwf")
public suspend fun metadata(`value`: Output) {
this.metadata = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rmbheovjoxkjmoqb")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value A reference to the zone where the machine resides.
* - - -
*/
@JvmName("alfwfluguwcnjogd")
public suspend fun zone(`value`: Output) {
this.zone = value
}
/**
* @param value The metadata key/value pairs assigned to all the instances in the corresponding scope.
* Structure is documented below.
*/
@JvmName("yuynjiogimlyewfr")
public suspend fun metadata(`value`: InstanceSettingsMetadataArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param argument The metadata key/value pairs assigned to all the instances in the corresponding scope.
* Structure is documented below.
*/
@JvmName("kyhxqxyfmivulgny")
public suspend fun metadata(argument: suspend InstanceSettingsMetadataArgsBuilder.() -> Unit) {
val toBeMapped = InstanceSettingsMetadataArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.metadata = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("eyyieymmbnbxkyjl")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value A reference to the zone where the machine resides.
* - - -
*/
@JvmName("exlcqjmqawxudjtm")
public suspend fun zone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zone = mapped
}
internal fun build(): InstanceSettingsArgs = InstanceSettingsArgs(
metadata = metadata,
project = project,
zone = zone,
)
}