Skip to main content

targetservers

Creates, updates, deletes, gets or lists a targetservers resource.

Overview

Nametargetservers
TypeResource
Idgoogle.apigee.targetservers

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. The resource id of this target server. Values must match the regular expression
descriptionstringOptional. A human-readable description of this TargetServer.
hoststringRequired. The host name this target connects to. Value must be a valid hostname as described by RFC-1123.
isEnabledbooleanOptional. 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.
portinteger (int32)Required. The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive.
protocolstringImmutable. The protocol used by this TargetServer.
sSLInfoobjectOptional. 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. (id: GoogleCloudApigeeV1TlsInfo)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_targetservers_getselectorganizationsId, environmentsId, targetserversIdGets a TargetServer resource.
organizations_environments_targetservers_createinsertorganizationsId, environmentsIdnameCreates a TargetServer in the specified environment.
organizations_environments_targetservers_updatereplaceorganizationsId, environmentsId, targetserversIdUpdates an existing TargetServer. Note that this operation has PUT semantics; it will replace the entirety of the existing TargetServer with the resource in the request body.
organizations_environments_targetservers_deletedeleteorganizationsId, environmentsId, targetserversIdDeletes a TargetServer from an environment. Returns the deleted TargetServer resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
organizationsIdstring
targetserversIdstring
namestring

SELECT examples

Gets a TargetServer resource.

SELECT
name,
description,
host,
isEnabled,
port,
protocol,
sSLInfo
FROM google.apigee.targetservers
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND targetserversId = '{{ targetserversId }}' -- required;

INSERT examples

Creates a TargetServer in the specified environment.

INSERT INTO google.apigee.targetservers (
data__name,
data__description,
data__host,
data__port,
data__isEnabled,
data__sSLInfo,
data__protocol,
organizationsId,
environmentsId,
name
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ host }}',
{{ port }},
{{ isEnabled }},
'{{ sSLInfo }}',
'{{ protocol }}',
'{{ organizationsId }}',
'{{ environmentsId }}',
'{{ name }}'
RETURNING
name,
description,
host,
isEnabled,
port,
protocol,
sSLInfo
;

REPLACE examples

Updates an existing TargetServer. Note that this operation has PUT semantics; it will replace the entirety of the existing TargetServer with the resource in the request body.

REPLACE google.apigee.targetservers
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__host = '{{ host }}',
data__port = {{ port }},
data__isEnabled = {{ isEnabled }},
data__sSLInfo = '{{ sSLInfo }}',
data__protocol = '{{ protocol }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND targetserversId = '{{ targetserversId }}' --required
RETURNING
name,
description,
host,
isEnabled,
port,
protocol,
sSLInfo;

DELETE examples

Deletes a TargetServer from an environment. Returns the deleted TargetServer resource.

DELETE FROM google.apigee.targetservers
WHERE organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND targetserversId = '{{ targetserversId }}' --required;