Please wait. This can take some minutes ...
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.
com.pulumi.gcp.apigee.kotlin.EnvGroupArgs.kt Maven / Gradle / Ivy
@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.EnvGroupArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* An `Environment group` in Apigee.
* To get more information about Envgroup, see:
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.envgroups/create)
* * How-to Guides
* * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment)
* ## Example Usage
* ### Apigee Environment Group 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,
* }, {
* dependsOn: [apigeeVpcConnection],
* });
* const envGrp = new gcp.apigee.EnvGroup("env_grp", {
* name: "my-envgroup",
* hostnames: ["abc.foo.com"],
* 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,
* opts = pulumi.ResourceOptions(depends_on=[apigee_vpc_connection]))
* env_grp = gcp.apigee.EnvGroup("env_grp",
* name="my-envgroup",
* hostnames=["abc.foo.com"],
* 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,
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* apigeeVpcConnection,
* },
* });
* var envGrp = new Gcp.Apigee.EnvGroup("env_grp", new()
* {
* Name = "my-envgroup",
* Hostnames = new[]
* {
* "abc.foo.com",
* },
* 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
* }
* apigeeVpcConnection, 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(),
* }, pulumi.DependsOn([]pulumi.Resource{
* apigeeVpcConnection,
* }))
* if err != nil {
* return err
* }
* _, err = apigee.NewEnvGroup(ctx, "env_grp", &apigee.EnvGroupArgs{
* Name: pulumi.String("my-envgroup"),
* Hostnames: pulumi.StringArray{
* pulumi.String("abc.foo.com"),
* },
* 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.EnvGroup;
* import com.pulumi.gcp.apigee.EnvGroupArgs;
* import com.pulumi.resources.CustomResourceOptions;
* 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(), CustomResourceOptions.builder()
* .dependsOn(apigeeVpcConnection)
* .build());
* var envGrp = new EnvGroup("envGrp", EnvGroupArgs.builder()
* .name("my-envgroup")
* .hostnames("abc.foo.com")
* .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}
* options:
* dependson:
* - ${apigeeVpcConnection}
* envGrp:
* type: gcp:apigee:EnvGroup
* name: env_grp
* properties:
* name: my-envgroup
* hostnames:
* - abc.foo.com
* orgId: ${apigeeOrg.id}
* variables:
* current:
* fn::invoke:
* Function: gcp:organizations:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* Envgroup can be imported using any of these accepted formats:
* * `{{org_id}}/envgroups/{{name}}`
* * `{{org_id}}/{{name}}`
* When using the `pulumi import` command, Envgroup can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigee/envGroup:EnvGroup default {{org_id}}/envgroups/{{name}}
* ```
* ```sh
* $ pulumi import gcp:apigee/envGroup:EnvGroup default {{org_id}}/{{name}}
* ```
* @property hostnames Hostnames of the environment group.
* @property name The resource ID of the environment group.
* @property orgId The Apigee Organization associated with the Apigee environment group,
* in the format `organizations/{{org_name}}`.
* - - -
*/
public data class EnvGroupArgs(
public val hostnames: Output>? = null,
public val name: Output? = null,
public val orgId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.apigee.EnvGroupArgs =
com.pulumi.gcp.apigee.EnvGroupArgs.builder()
.hostnames(hostnames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.name(name?.applyValue({ args0 -> args0 }))
.orgId(orgId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EnvGroupArgs].
*/
@PulumiTagMarker
public class EnvGroupArgsBuilder internal constructor() {
private var hostnames: Output>? = null
private var name: Output? = null
private var orgId: Output? = null
/**
* @param value Hostnames of the environment group.
*/
@JvmName("ugtfmqoxualfinco")
public suspend fun hostnames(`value`: Output>) {
this.hostnames = value
}
@JvmName("stymbhckdaqmdwyr")
public suspend fun hostnames(vararg values: Output) {
this.hostnames = Output.all(values.asList())
}
/**
* @param values Hostnames of the environment group.
*/
@JvmName("atuujqehtugeqjid")
public suspend fun hostnames(values: List>) {
this.hostnames = Output.all(values)
}
/**
* @param value The resource ID of the environment group.
*/
@JvmName("omdkwvexkuvrhpei")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The Apigee Organization associated with the Apigee environment group,
* in the format `organizations/{{org_name}}`.
* - - -
*/
@JvmName("djabvgaopcwjoqir")
public suspend fun orgId(`value`: Output) {
this.orgId = value
}
/**
* @param value Hostnames of the environment group.
*/
@JvmName("qhiwmjwflfcwiddg")
public suspend fun hostnames(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostnames = mapped
}
/**
* @param values Hostnames of the environment group.
*/
@JvmName("hqqnaaloymwncpbo")
public suspend fun hostnames(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hostnames = mapped
}
/**
* @param value The resource ID of the environment group.
*/
@JvmName("tswertpqjoahkvtf")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The Apigee Organization associated with the Apigee environment group,
* in the format `organizations/{{org_name}}`.
* - - -
*/
@JvmName("xrejxxpvrjvwacav")
public suspend fun orgId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.orgId = mapped
}
internal fun build(): EnvGroupArgs = EnvGroupArgs(
hostnames = hostnames,
name = name,
orgId = orgId,
)
}