targetservers
Creates, updates, deletes, gets or lists a targetservers
resource.
Overview
Name | targetservers |
Type | Resource |
Id | google.apigee.targetservers |
Fields
The following fields are returned by SELECT
queries:
- organizations_environments_targetservers_get
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The resource id of this target server. Values must match the regular expression |
description | string | Optional. A human-readable description of this TargetServer. |
host | string | Required. The host name this target connects to. Value must be a valid hostname as described by RFC-1123. |
isEnabled | boolean | Optional. 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. |
port | integer (int32) | Required. The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive. |
protocol | string | Immutable. The protocol used by this TargetServer. |
sSLInfo | object | Optional. 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_environments_targetservers_get | select | organizationsId , environmentsId , targetserversId | Gets a TargetServer resource. | |
organizations_environments_targetservers_create | insert | organizationsId , environmentsId | name | Creates a TargetServer in the specified environment. |
organizations_environments_targetservers_update | replace | organizationsId , environmentsId , targetserversId | 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. | |
organizations_environments_targetservers_delete | delete | organizationsId , environmentsId , targetserversId | Deletes 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.
Name | Datatype | Description |
---|---|---|
environmentsId | string | |
organizationsId | string | |
targetserversId | string | |
name | string |
SELECT
examples
- organizations_environments_targetservers_get
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
- organizations_environments_targetservers_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: targetservers
props:
- name: organizationsId
value: string
description: Required parameter for the targetservers resource.
- name: environmentsId
value: string
description: Required parameter for the targetservers resource.
- name: name
value: string
description: >
Required. The resource id of this target server. Values must match the regular expression
- name: description
value: string
description: >
Optional. A human-readable description of this TargetServer.
- name: host
value: string
description: >
Required. The host name this target connects to. Value must be a valid hostname as described by RFC-1123.
- name: port
value: integer
description: >
Required. The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive.
- name: isEnabled
value: boolean
description: >
Optional. 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.
- name: sSLInfo
value: object
description: >
Optional. 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.
- name: protocol
value: string
description: >
Immutable. The protocol used by this TargetServer.
valid_values: ['PROTOCOL_UNSPECIFIED', 'HTTP', 'HTTP2', 'GRPC_TARGET', 'GRPC', 'EXTERNAL_CALLOUT']
- name: name
value: string
REPLACE
examples
- organizations_environments_targetservers_update
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
- organizations_environments_targetservers_delete
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;