com.pulumi.gcp.apigee.kotlin.EnvironmentArgs.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.apigee.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.apigee.EnvironmentArgs.builder
import com.pulumi.gcp.apigee.kotlin.inputs.EnvironmentNodeConfigArgs
import com.pulumi.gcp.apigee.kotlin.inputs.EnvironmentNodeConfigArgsBuilder
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
/**
* An `Environment` in Apigee.
* To get more information about Environment, see:
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments/create)
* * How-to Guides
* * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment)
* ## Example Usage
* ### Apigee Environment Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const current = gcp.organizations.getClientConfig({});
* const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"});
* const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", {
* name: "apigee-range",
* purpose: "VPC_PEERING",
* addressType: "INTERNAL",
* prefixLength: 16,
* network: apigeeNetwork.id,
* });
* const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", {
* network: apigeeNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [apigeeRange.name],
* });
* const apigeeOrg = new gcp.apigee.Organization("apigee_org", {
* analyticsRegion: "us-central1",
* projectId: current.then(current => current.project),
* authorizedNetwork: apigeeNetwork.id,
* });
* const env = new gcp.apigee.Environment("env", {
* name: "my-environment",
* description: "Apigee Environment",
* displayName: "environment-1",
* orgId: apigeeOrg.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* current = gcp.organizations.get_client_config()
* apigee_network = gcp.compute.Network("apigee_network", name="apigee-network")
* apigee_range = gcp.compute.GlobalAddress("apigee_range",
* name="apigee-range",
* purpose="VPC_PEERING",
* address_type="INTERNAL",
* prefix_length=16,
* network=apigee_network.id)
* apigee_vpc_connection = gcp.servicenetworking.Connection("apigee_vpc_connection",
* network=apigee_network.id,
* service="servicenetworking.googleapis.com",
* reserved_peering_ranges=[apigee_range.name])
* apigee_org = gcp.apigee.Organization("apigee_org",
* analytics_region="us-central1",
* project_id=current.project,
* authorized_network=apigee_network.id)
* env = gcp.apigee.Environment("env",
* name="my-environment",
* description="Apigee Environment",
* display_name="environment-1",
* org_id=apigee_org.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var current = Gcp.Organizations.GetClientConfig.Invoke();
* var apigeeNetwork = new Gcp.Compute.Network("apigee_network", new()
* {
* Name = "apigee-network",
* });
* var apigeeRange = new Gcp.Compute.GlobalAddress("apigee_range", new()
* {
* Name = "apigee-range",
* Purpose = "VPC_PEERING",
* AddressType = "INTERNAL",
* PrefixLength = 16,
* Network = apigeeNetwork.Id,
* });
* var apigeeVpcConnection = new Gcp.ServiceNetworking.Connection("apigee_vpc_connection", new()
* {
* Network = apigeeNetwork.Id,
* Service = "servicenetworking.googleapis.com",
* ReservedPeeringRanges = new[]
* {
* apigeeRange.Name,
* },
* });
* var apigeeOrg = new Gcp.Apigee.Organization("apigee_org", new()
* {
* AnalyticsRegion = "us-central1",
* ProjectId = current.Apply(getClientConfigResult => getClientConfigResult.Project),
* AuthorizedNetwork = apigeeNetwork.Id,
* });
* var env = new Gcp.Apigee.Environment("env", new()
* {
* Name = "my-environment",
* Description = "Apigee Environment",
* DisplayName = "environment-1",
* OrgId = apigeeOrg.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apigee"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* current, err := organizations.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* apigeeNetwork, err := compute.NewNetwork(ctx, "apigee_network", &compute.NetworkArgs{
* Name: pulumi.String("apigee-network"),
* })
* if err != nil {
* return err
* }
* apigeeRange, err := compute.NewGlobalAddress(ctx, "apigee_range", &compute.GlobalAddressArgs{
* Name: pulumi.String("apigee-range"),
* Purpose: pulumi.String("VPC_PEERING"),
* AddressType: pulumi.String("INTERNAL"),
* PrefixLength: pulumi.Int(16),
* Network: apigeeNetwork.ID(),
* })
* if err != nil {
* return err
* }
* _, err = servicenetworking.NewConnection(ctx, "apigee_vpc_connection", &servicenetworking.ConnectionArgs{
* Network: apigeeNetwork.ID(),
* Service: pulumi.String("servicenetworking.googleapis.com"),
* ReservedPeeringRanges: pulumi.StringArray{
* apigeeRange.Name,
* },
* })
* if err != nil {
* return err
* }
* apigeeOrg, err := apigee.NewOrganization(ctx, "apigee_org", &apigee.OrganizationArgs{
* AnalyticsRegion: pulumi.String("us-central1"),
* ProjectId: pulumi.String(current.Project),
* AuthorizedNetwork: apigeeNetwork.ID(),
* })
* if err != nil {
* return err
* }
* _, err = apigee.NewEnvironment(ctx, "env", &apigee.EnvironmentArgs{
* Name: pulumi.String("my-environment"),
* Description: pulumi.String("Apigee Environment"),
* DisplayName: pulumi.String("environment-1"),
* OrgId: apigeeOrg.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.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.GlobalAddress;
* import com.pulumi.gcp.compute.GlobalAddressArgs;
* import com.pulumi.gcp.servicenetworking.Connection;
* import com.pulumi.gcp.servicenetworking.ConnectionArgs;
* import com.pulumi.gcp.apigee.Organization;
* import com.pulumi.gcp.apigee.OrganizationArgs;
* import com.pulumi.gcp.apigee.Environment;
* import com.pulumi.gcp.apigee.EnvironmentArgs;
* 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 current = OrganizationsFunctions.getClientConfig();
* var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
* .name("apigee-network")
* .build());
* var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
* .name("apigee-range")
* .purpose("VPC_PEERING")
* .addressType("INTERNAL")
* .prefixLength(16)
* .network(apigeeNetwork.id())
* .build());
* var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
* .network(apigeeNetwork.id())
* .service("servicenetworking.googleapis.com")
* .reservedPeeringRanges(apigeeRange.name())
* .build());
* var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
* .analyticsRegion("us-central1")
* .projectId(current.applyValue(getClientConfigResult -> getClientConfigResult.project()))
* .authorizedNetwork(apigeeNetwork.id())
* .build());
* var env = new Environment("env", EnvironmentArgs.builder()
* .name("my-environment")
* .description("Apigee Environment")
* .displayName("environment-1")
* .orgId(apigeeOrg.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* apigeeNetwork:
* type: gcp:compute:Network
* name: apigee_network
* properties:
* name: apigee-network
* apigeeRange:
* type: gcp:compute:GlobalAddress
* name: apigee_range
* properties:
* name: apigee-range
* purpose: VPC_PEERING
* addressType: INTERNAL
* prefixLength: 16
* network: ${apigeeNetwork.id}
* apigeeVpcConnection:
* type: gcp:servicenetworking:Connection
* name: apigee_vpc_connection
* properties:
* network: ${apigeeNetwork.id}
* service: servicenetworking.googleapis.com
* reservedPeeringRanges:
* - ${apigeeRange.name}
* apigeeOrg:
* type: gcp:apigee:Organization
* name: apigee_org
* properties:
* analyticsRegion: us-central1
* projectId: ${current.project}
* authorizedNetwork: ${apigeeNetwork.id}
* env:
* type: gcp:apigee:Environment
* properties:
* name: my-environment
* description: Apigee Environment
* displayName: environment-1
* orgId: ${apigeeOrg.id}
* variables:
* current:
* fn::invoke:
* Function: gcp:organizations:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* Environment can be imported using any of these accepted formats:
* * `{{org_id}}/environments/{{name}}`
* * `{{org_id}}/{{name}}`
* When using the `pulumi import` command, Environment can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigee/environment:Environment default {{org_id}}/environments/{{name}}
* ```
* ```sh
* $ pulumi import gcp:apigee/environment:Environment default {{org_id}}/{{name}}
* ```
* @property apiProxyType Optional. API Proxy type supported by the environment. The type can be set when creating
* the Environment and cannot be changed.
* Possible values are: `API_PROXY_TYPE_UNSPECIFIED`, `PROGRAMMABLE`, `CONFIGURABLE`.
* @property deploymentType Optional. Deployment type supported by the environment. The deployment type can be
* set when creating the environment and cannot be changed. When you enable archive
* deployment, you will be prevented from performing a subset of actions within the
* environment, including:
* Managing the deployment of API proxy or shared flow revisions;
* Creating, updating, or deleting resource files;
* Creating, updating, or deleting target servers.
* Possible values are: `DEPLOYMENT_TYPE_UNSPECIFIED`, `PROXY`, `ARCHIVE`.
* @property description Description of the environment.
* @property displayName Display name of the environment.
* @property forwardProxyUri Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied.
* @property name The resource ID of the environment.
* @property nodeConfig NodeConfig for setting the min/max number of nodes associated with the environment.
* Structure is documented below.
* @property orgId The Apigee Organization associated with the Apigee environment,
* in the format `organizations/{{org_name}}`.
* - - -
* @property type Types that can be selected for an Environment. Each of the types are
* limited by capability and capacity. Refer to Apigee's public documentation
* to understand about each of these types in details.
* An Apigee org can support heterogeneous Environments.
* Possible values are: `ENVIRONMENT_TYPE_UNSPECIFIED`, `BASE`, `INTERMEDIATE`, `COMPREHENSIVE`.
*/
public data class EnvironmentArgs(
public val apiProxyType: Output? = null,
public val deploymentType: Output? = null,
public val description: Output? = null,
public val displayName: Output? = null,
public val forwardProxyUri: Output? = null,
public val name: Output? = null,
public val nodeConfig: Output? = null,
public val orgId: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.apigee.EnvironmentArgs =
com.pulumi.gcp.apigee.EnvironmentArgs.builder()
.apiProxyType(apiProxyType?.applyValue({ args0 -> args0 }))
.deploymentType(deploymentType?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.forwardProxyUri(forwardProxyUri?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.nodeConfig(nodeConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.orgId(orgId?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EnvironmentArgs].
*/
@PulumiTagMarker
public class EnvironmentArgsBuilder internal constructor() {
private var apiProxyType: Output? = null
private var deploymentType: Output? = null
private var description: Output? = null
private var displayName: Output? = null
private var forwardProxyUri: Output? = null
private var name: Output? = null
private var nodeConfig: Output? = null
private var orgId: Output? = null
private var type: Output? = null
/**
* @param value Optional. API Proxy type supported by the environment. The type can be set when creating
* the Environment and cannot be changed.
* Possible values are: `API_PROXY_TYPE_UNSPECIFIED`, `PROGRAMMABLE`, `CONFIGURABLE`.
*/
@JvmName("uqgwpvvqjajnkpyb")
public suspend fun apiProxyType(`value`: Output) {
this.apiProxyType = value
}
/**
* @param value Optional. Deployment type supported by the environment. The deployment type can be
* set when creating the environment and cannot be changed. When you enable archive
* deployment, you will be prevented from performing a subset of actions within the
* environment, including:
* Managing the deployment of API proxy or shared flow revisions;
* Creating, updating, or deleting resource files;
* Creating, updating, or deleting target servers.
* Possible values are: `DEPLOYMENT_TYPE_UNSPECIFIED`, `PROXY`, `ARCHIVE`.
*/
@JvmName("vrqiumiyuiwdcetg")
public suspend fun deploymentType(`value`: Output) {
this.deploymentType = value
}
/**
* @param value Description of the environment.
*/
@JvmName("dsadgipdutbhupmm")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Display name of the environment.
*/
@JvmName("yymilcnvphuturfc")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied.
*/
@JvmName("hmmchnpaxbbqcmbw")
public suspend fun forwardProxyUri(`value`: Output) {
this.forwardProxyUri = value
}
/**
* @param value The resource ID of the environment.
*/
@JvmName("jjeqvfepbjrsmwmj")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value NodeConfig for setting the min/max number of nodes associated with the environment.
* Structure is documented below.
*/
@JvmName("wnhjhiuhjysugjyi")
public suspend fun nodeConfig(`value`: Output) {
this.nodeConfig = value
}
/**
* @param value The Apigee Organization associated with the Apigee environment,
* in the format `organizations/{{org_name}}`.
* - - -
*/
@JvmName("stmmmlkelqdjnsxw")
public suspend fun orgId(`value`: Output) {
this.orgId = value
}
/**
* @param value Types that can be selected for an Environment. Each of the types are
* limited by capability and capacity. Refer to Apigee's public documentation
* to understand about each of these types in details.
* An Apigee org can support heterogeneous Environments.
* Possible values are: `ENVIRONMENT_TYPE_UNSPECIFIED`, `BASE`, `INTERMEDIATE`, `COMPREHENSIVE`.
*/
@JvmName("tioqlgbqxvabthmd")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value Optional. API Proxy type supported by the environment. The type can be set when creating
* the Environment and cannot be changed.
* Possible values are: `API_PROXY_TYPE_UNSPECIFIED`, `PROGRAMMABLE`, `CONFIGURABLE`.
*/
@JvmName("nnirnbedunulmbeb")
public suspend fun apiProxyType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiProxyType = mapped
}
/**
* @param value Optional. Deployment type supported by the environment. The deployment type can be
* set when creating the environment and cannot be changed. When you enable archive
* deployment, you will be prevented from performing a subset of actions within the
* environment, including:
* Managing the deployment of API proxy or shared flow revisions;
* Creating, updating, or deleting resource files;
* Creating, updating, or deleting target servers.
* Possible values are: `DEPLOYMENT_TYPE_UNSPECIFIED`, `PROXY`, `ARCHIVE`.
*/
@JvmName("dopkilnlcvbdnrnm")
public suspend fun deploymentType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deploymentType = mapped
}
/**
* @param value Description of the environment.
*/
@JvmName("iairmgbiaelwcjgw")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Display name of the environment.
*/
@JvmName("vlrcqphfptoephbv")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied.
*/
@JvmName("ifrwffjwaxefdaqn")
public suspend fun forwardProxyUri(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.forwardProxyUri = mapped
}
/**
* @param value The resource ID of the environment.
*/
@JvmName("ibkmjalepfejvbwh")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value NodeConfig for setting the min/max number of nodes associated with the environment.
* Structure is documented below.
*/
@JvmName("tqxakthvahidkqfk")
public suspend fun nodeConfig(`value`: EnvironmentNodeConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.nodeConfig = mapped
}
/**
* @param argument NodeConfig for setting the min/max number of nodes associated with the environment.
* Structure is documented below.
*/
@JvmName("bqkdehdusniglkgn")
public suspend fun nodeConfig(argument: suspend EnvironmentNodeConfigArgsBuilder.() -> Unit) {
val toBeMapped = EnvironmentNodeConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.nodeConfig = mapped
}
/**
* @param value The Apigee Organization associated with the Apigee environment,
* in the format `organizations/{{org_name}}`.
* - - -
*/
@JvmName("odcwrbxnqrblabgg")
public suspend fun orgId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.orgId = mapped
}
/**
* @param value Types that can be selected for an Environment. Each of the types are
* limited by capability and capacity. Refer to Apigee's public documentation
* to understand about each of these types in details.
* An Apigee org can support heterogeneous Environments.
* Possible values are: `ENVIRONMENT_TYPE_UNSPECIFIED`, `BASE`, `INTERMEDIATE`, `COMPREHENSIVE`.
*/
@JvmName("tuicmiptbafuwnim")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): EnvironmentArgs = EnvironmentArgs(
apiProxyType = apiProxyType,
deploymentType = deploymentType,
description = description,
displayName = displayName,
forwardProxyUri = forwardProxyUri,
name = name,
nodeConfig = nodeConfig,
orgId = orgId,
type = type,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy