Skip to main content

targetservers

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

Overview

Nametargetservers
TypeResource
Idgoogle.apigee.targetservers

Fields

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.
portintegerRequired. 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.
sSLInfoobjectTLS configuration information for virtual hosts and TargetServers.

Methods

NameAccessible byRequired ParamsDescription
organizations_environments_targetservers_getSELECTenvironmentsId, organizationsId, targetserversIdGets a TargetServer resource.
organizations_environments_targetservers_createINSERTenvironmentsId, organizationsIdCreates a TargetServer in the specified environment.
organizations_environments_targetservers_deleteDELETEenvironmentsId, organizationsId, targetserversIdDeletes a TargetServer from an environment. Returns the deleted TargetServer resource.
organizations_environments_targetservers_updateREPLACEenvironmentsId, organizationsId, 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.

SELECT examples

Gets a TargetServer resource.

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

INSERT example

Use the following StackQL query and manifest file to create a new targetservers resource.

/*+ create */
INSERT INTO google.apigee.targetservers (
environmentsId,
organizationsId,
isEnabled,
port,
description,
sSLInfo,
host,
protocol,
name
)
SELECT
'{{ environmentsId }}',
'{{ organizationsId }}',
{{ isEnabled }},
'{{ port }}',
'{{ description }}',
'{{ sSLInfo }}',
'{{ host }}',
'{{ protocol }}',
'{{ name }}'
;

REPLACE example

Replaces all fields in the specified targetservers resource.

/*+ update */
REPLACE google.apigee.targetservers
SET
isEnabled = true|false,
port = '{{ port }}',
description = '{{ description }}',
sSLInfo = '{{ sSLInfo }}',
host = '{{ host }}',
protocol = '{{ protocol }}',
name = '{{ name }}'
WHERE
environmentsId = '{{ environmentsId }}'
AND organizationsId = '{{ organizationsId }}'
AND targetserversId = '{{ targetserversId }}';

DELETE example

Deletes the specified targetservers resource.

/*+ delete */
DELETE FROM google.apigee.targetservers
WHERE environmentsId = '{{ environmentsId }}'
AND organizationsId = '{{ organizationsId }}'
AND targetserversId = '{{ targetserversId }}';