TargetServerArgs

data class TargetServerArgs(val description: Output<String>? = null, val envId: Output<String>? = null, val host: Output<String>? = null, val isEnabled: Output<Boolean>? = null, val name: Output<String>? = null, val port: Output<Int>? = null, val protocol: Output<String>? = null, val sSlInfo: Output<TargetServerSSlInfoArgs>? = null) : ConvertibleToJava<TargetServerArgs>

TargetServer configuration. TargetServers are used to decouple a proxy TargetEndpoint HTTPTargetConnections from concrete URLs for backend services. To get more information about TargetServer, see:

Example Usage

Apigee Target Server Test Basic

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.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 com.pulumi.gcp.apigee.TargetServer;
import com.pulumi.gcp.apigee.TargetServerArgs;
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) {
var project = new Project("project", ProjectArgs.builder()
.projectId("my-project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.build());
var apigee = new Service("apigee", ServiceArgs.builder()
.project(project.projectId())
.service("apigee.googleapis.com")
.build());
var servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
.project(project.projectId())
.service("servicenetworking.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(apigee)
.build());
var compute = new Service("compute", ServiceArgs.builder()
.project(project.projectId())
.service("compute.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
.project(project.projectId())
.build(), CustomResourceOptions.builder()
.dependsOn(compute)
.build());
var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(apigeeNetwork.id())
.project(project.projectId())
.build());
var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
.network(apigeeNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(apigeeRange.name())
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
.analyticsRegion("us-central1")
.projectId(project.projectId())
.authorizedNetwork(apigeeNetwork.id())
.build(), CustomResourceOptions.builder()
.dependsOn(
apigeeVpcConnection,
apigee)
.build());
var apigeeEnvironment = new Environment("apigeeEnvironment", EnvironmentArgs.builder()
.orgId(apigeeOrg.id())
.description("Apigee Environment")
.displayName("environment-1")
.build());
var apigeeTargetServer = new TargetServer("apigeeTargetServer", TargetServerArgs.builder()
.description("Apigee Target Server")
.protocol("HTTP")
.host("abc.foo.com")
.port(8080)
.envId(apigeeEnvironment.id())
.build());
}
}

Import

TargetServer can be imported using any of these accepted formats

$ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/targetservers/{{name}}
$ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/{{name}}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, envId: Output<String>? = null, host: Output<String>? = null, isEnabled: Output<Boolean>? = null, name: Output<String>? = null, port: Output<Int>? = null, protocol: Output<String>? = null, sSlInfo: Output<TargetServerSSlInfoArgs>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

A human-readable description of this TargetServer.

Link copied to clipboard
val envId: Output<String>? = null

The Apigee environment group associated with the Apigee environment, in the format organizations/{{org_name}}/environments/{{env_name}}.

Link copied to clipboard
val host: Output<String>? = null

The host name this target connects to. Value must be a valid hostname as described by RFC-1123.

Link copied to clipboard
val isEnabled: Output<Boolean>? = null

Enabling/disabling a TargetServer is useful when TargetServers are used in load balancing configurations, and one or more TargetServers need to taken out of rotation periodically. Defaults to true.

Link copied to clipboard
val name: Output<String>? = null

The resource id of this reference. Values must match the regular expression \w\s-.+.

Link copied to clipboard
val port: Output<Int>? = null

The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive.

Link copied to clipboard
val protocol: Output<String>? = null

Immutable. The protocol used by this TargetServer. Possible values are: HTTP, HTTP2, GRPC_TARGET, GRPC, EXTERNAL_CALLOUT.

Link copied to clipboard
val sSlInfo: Output<TargetServerSSlInfoArgs>? = null

Specifies TLS configuration info for this TargetServer. The JSON name is sSLInfo for legacy/backwards compatibility reasons -- Edge originally supported SSL, and the name is still used for TLS configuration. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): TargetServerArgs