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

com.pulumi.gcp.vmwareengine.kotlin.NetworkArgs.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.vmwareengine.kotlin

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

/**
 * Provides connectivity for VMware Engine private clouds.
 * To get more information about Network, see:
 * * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.vmwareEngineNetworks)
 * ## Example Usage
 * ### Vmware Engine Network Standard
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const vmw_engine_network = new gcp.vmwareengine.Network("vmw-engine-network", {
 *     name: "standard-nw",
 *     location: "global",
 *     type: "STANDARD",
 *     description: "VMwareEngine standard network sample",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * vmw_engine_network = gcp.vmwareengine.Network("vmw-engine-network",
 *     name="standard-nw",
 *     location="global",
 *     type="STANDARD",
 *     description="VMwareEngine standard network sample")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var vmw_engine_network = new Gcp.VMwareEngine.Network("vmw-engine-network", new()
 *     {
 *         Name = "standard-nw",
 *         Location = "global",
 *         Type = "STANDARD",
 *         Description = "VMwareEngine standard network sample",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vmwareengine"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := vmwareengine.NewNetwork(ctx, "vmw-engine-network", &vmwareengine.NetworkArgs{
 * 			Name:        pulumi.String("standard-nw"),
 * 			Location:    pulumi.String("global"),
 * 			Type:        pulumi.String("STANDARD"),
 * 			Description: pulumi.String("VMwareEngine standard network sample"),
 * 		})
 * 		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.vmwareengine.Network;
 * import com.pulumi.gcp.vmwareengine.NetworkArgs;
 * 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 vmw_engine_network = new Network("vmw-engine-network", NetworkArgs.builder()
 *             .name("standard-nw")
 *             .location("global")
 *             .type("STANDARD")
 *             .description("VMwareEngine standard network sample")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   vmw-engine-network:
 *     type: gcp:vmwareengine:Network
 *     properties:
 *       name: standard-nw
 *       location: global
 *       type: STANDARD
 *       description: VMwareEngine standard network sample
 * ```
 * 
 * ### Vmware Engine Network Legacy
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumi/time";
 * // there can be only 1 Legacy network per region for a given project,
 * // so creating new project for isolation in CI.
 * const acceptanceProject = new gcp.organizations.Project("acceptance", {
 *     name: "vmw-proj",
 *     projectId: "vmw-proj",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 * });
 * const acceptance = new gcp.projects.Service("acceptance", {
 *     project: acceptanceProject.projectId,
 *     service: "vmwareengine.googleapis.com",
 * });
 * const vmw_engine_network = new gcp.vmwareengine.Network("vmw-engine-network", {
 *     project: acceptance.project,
 *     name: "us-west1-default",
 *     location: "us-west1",
 *     type: "LEGACY",
 *     description: "VMwareEngine legacy network sample",
 * });
 * const wait60Seconds = new time.index.Sleep("wait_60_seconds", {createDuration: "60s"});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_time as time
 * # there can be only 1 Legacy network per region for a given project,
 * # so creating new project for isolation in CI.
 * acceptance_project = gcp.organizations.Project("acceptance",
 *     name="vmw-proj",
 *     project_id="vmw-proj",
 *     org_id="123456789",
 *     billing_account="000000-0000000-0000000-000000")
 * acceptance = gcp.projects.Service("acceptance",
 *     project=acceptance_project.project_id,
 *     service="vmwareengine.googleapis.com")
 * vmw_engine_network = gcp.vmwareengine.Network("vmw-engine-network",
 *     project=acceptance.project,
 *     name="us-west1-default",
 *     location="us-west1",
 *     type="LEGACY",
 *     description="VMwareEngine legacy network sample")
 * wait60_seconds = time.index.Sleep("wait_60_seconds", create_duration=60s)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Time = Pulumi.Time;
 * return await Deployment.RunAsync(() =>
 * {
 *     // there can be only 1 Legacy network per region for a given project,
 *     // so creating new project for isolation in CI.
 *     var acceptanceProject = new Gcp.Organizations.Project("acceptance", new()
 *     {
 *         Name = "vmw-proj",
 *         ProjectId = "vmw-proj",
 *         OrgId = "123456789",
 *         BillingAccount = "000000-0000000-0000000-000000",
 *     });
 *     var acceptance = new Gcp.Projects.Service("acceptance", new()
 *     {
 *         Project = acceptanceProject.ProjectId,
 *         ServiceName = "vmwareengine.googleapis.com",
 *     });
 *     var vmw_engine_network = new Gcp.VMwareEngine.Network("vmw-engine-network", new()
 *     {
 *         Project = acceptance.Project,
 *         Name = "us-west1-default",
 *         Location = "us-west1",
 *         Type = "LEGACY",
 *         Description = "VMwareEngine legacy network sample",
 *     });
 *     var wait60Seconds = new Time.Index.Sleep("wait_60_seconds", new()
 *     {
 *         CreateDuration = "60s",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vmwareengine"
 * 	"github.com/pulumi/pulumi-time/sdk/go/time"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		// there can be only 1 Legacy network per region for a given project,
 * 		// so creating new project for isolation in CI.
 * 		acceptanceProject, err := organizations.NewProject(ctx, "acceptance", &organizations.ProjectArgs{
 * 			Name:           pulumi.String("vmw-proj"),
 * 			ProjectId:      pulumi.String("vmw-proj"),
 * 			OrgId:          pulumi.String("123456789"),
 * 			BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		acceptance, err := projects.NewService(ctx, "acceptance", &projects.ServiceArgs{
 * 			Project: acceptanceProject.ProjectId,
 * 			Service: pulumi.String("vmwareengine.googleapis.com"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = vmwareengine.NewNetwork(ctx, "vmw-engine-network", &vmwareengine.NetworkArgs{
 * 			Project:     acceptance.Project,
 * 			Name:        pulumi.String("us-west1-default"),
 * 			Location:    pulumi.String("us-west1"),
 * 			Type:        pulumi.String("LEGACY"),
 * 			Description: pulumi.String("VMwareEngine legacy network sample"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = time.NewSleep(ctx, "wait_60_seconds", &time.SleepArgs{
 * 			CreateDuration: "60s",
 * 		})
 * 		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.organizations.Project;
 * import com.pulumi.gcp.organizations.ProjectArgs;
 * import com.pulumi.gcp.projects.Service;
 * import com.pulumi.gcp.projects.ServiceArgs;
 * import com.pulumi.gcp.vmwareengine.Network;
 * import com.pulumi.gcp.vmwareengine.NetworkArgs;
 * import com.pulumi.time.sleep;
 * import com.pulumi.time.SleepArgs;
 * 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) {
 *         // there can be only 1 Legacy network per region for a given project,
 *         // so creating new project for isolation in CI.
 *         var acceptanceProject = new Project("acceptanceProject", ProjectArgs.builder()
 *             .name("vmw-proj")
 *             .projectId("vmw-proj")
 *             .orgId("123456789")
 *             .billingAccount("000000-0000000-0000000-000000")
 *             .build());
 *         var acceptance = new Service("acceptance", ServiceArgs.builder()
 *             .project(acceptanceProject.projectId())
 *             .service("vmwareengine.googleapis.com")
 *             .build());
 *         var vmw_engine_network = new Network("vmw-engine-network", NetworkArgs.builder()
 *             .project(acceptance.project())
 *             .name("us-west1-default")
 *             .location("us-west1")
 *             .type("LEGACY")
 *             .description("VMwareEngine legacy network sample")
 *             .build());
 *         var wait60Seconds = new Sleep("wait60Seconds", SleepArgs.builder()
 *             .createDuration("60s")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   vmw-engine-network:
 *     type: gcp:vmwareengine:Network
 *     properties:
 *       project: ${acceptance.project}
 *       name: us-west1-default
 *       location: us-west1
 *       type: LEGACY
 *       description: VMwareEngine legacy network sample
 *   acceptance:
 *     type: gcp:projects:Service
 *     properties:
 *       project: ${acceptanceProject.projectId}
 *       service: vmwareengine.googleapis.com
 *   # there can be only 1 Legacy network per region for a given project,
 *   # so creating new project for isolation in CI.
 *   acceptanceProject:
 *     type: gcp:organizations:Project
 *     name: acceptance
 *     properties:
 *       name: vmw-proj
 *       projectId: vmw-proj
 *       orgId: '123456789'
 *       billingAccount: 000000-0000000-0000000-000000
 *   wait60Seconds:
 *     type: time:sleep
 *     name: wait_60_seconds
 *     properties:
 *       createDuration: 60s
 * ```
 * 
 * ## Import
 * Network can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/vmwareEngineNetworks/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, Network can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:vmwareengine/network:Network default projects/{{project}}/locations/{{location}}/vmwareEngineNetworks/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:vmwareengine/network:Network default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:vmwareengine/network:Network default {{location}}/{{name}}
 * ```
 * @property description User-provided description for this VMware Engine network.
 * @property location The location where the VMwareEngineNetwork should reside.
 * @property name The ID of the VMwareEngineNetwork.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property type VMware Engine network type.
 * Possible values are: `LEGACY`, `STANDARD`.
 */
public data class NetworkArgs(
    public val description: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.vmwareengine.NetworkArgs =
        com.pulumi.gcp.vmwareengine.NetworkArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NetworkArgs].
 */
@PulumiTagMarker
public class NetworkArgsBuilder internal constructor() {
    private var description: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var type: Output? = null

    /**
     * @param value User-provided description for this VMware Engine network.
     */
    @JvmName("amegjdivjgdcvpho")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The location where the VMwareEngineNetwork should reside.
     */
    @JvmName("mdklpqyoevrlpbrj")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the VMwareEngineNetwork.
     * - - -
     */
    @JvmName("pjkumodtmxaustqt")
    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("mvjktlifyulpxpow")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value VMware Engine network type.
     * Possible values are: `LEGACY`, `STANDARD`.
     */
    @JvmName("fqwmscoepjrarqip")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value User-provided description for this VMware Engine network.
     */
    @JvmName("liqckyeootfxqulk")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

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

    /**
     * @param value The ID of the VMwareEngineNetwork.
     * - - -
     */
    @JvmName("ngsaaypgjpsmwbdt")
    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("guuqhuoggxqlnmrb")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value VMware Engine network type.
     * Possible values are: `LEGACY`, `STANDARD`.
     */
    @JvmName("gtcbfftynnqwaaqn")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): NetworkArgs = NetworkArgs(
        description = description,
        location = location,
        name = name,
        project = project,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy