targets
Creates, updates, deletes, gets or lists a targets
resource.
Overview
Name | targets |
Type | Resource |
Id | google.clouddeploy.targets |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the Target . Format is projects/{project}/locations/{location}/targets/{target} . The target component must match [a-z]([a-z0-9-]{0,61}[a-z0-9])? |
annotations | object | Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. |
anthosCluster | object | Optional. Information specifying an Anthos Cluster. (id: AnthosCluster) |
associatedEntities | object | Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$ . |
createTime | string (google-datetime) | Output only. Time at which the Target was created. |
customTarget | object | Optional. Information specifying a Custom Target. (id: CustomTarget) |
deployParameters | object | Optional. The deploy parameters to use for this target. |
description | string | Optional. Description of the Target . Max length is 255 characters. |
etag | string | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
executionConfigs | array | Optional. Configurations for all execution that relates to this Target . Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool . |
gke | object | Optional. Information specifying a GKE Cluster. (id: GkeCluster) |
labels | object | Optional. Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes. |
multiTarget | object | Optional. Information specifying a multiTarget. (id: MultiTarget) |
requireApproval | boolean | Optional. Whether or not the Target requires approval. |
run | object | Optional. Information specifying a Cloud Run deployment target. (id: CloudRunLocation) |
targetId | string | Output only. Resource id of the Target . |
uid | string | Output only. Unique identifier of the Target . |
updateTime | string (google-datetime) | Output only. Most recent time at which the Target was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the Target . Format is projects/{project}/locations/{location}/targets/{target} . The target component must match [a-z]([a-z0-9-]{0,61}[a-z0-9])? |
annotations | object | Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. |
anthosCluster | object | Optional. Information specifying an Anthos Cluster. (id: AnthosCluster) |
associatedEntities | object | Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$ . |
createTime | string (google-datetime) | Output only. Time at which the Target was created. |
customTarget | object | Optional. Information specifying a Custom Target. (id: CustomTarget) |
deployParameters | object | Optional. The deploy parameters to use for this target. |
description | string | Optional. Description of the Target . Max length is 255 characters. |
etag | string | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
executionConfigs | array | Optional. Configurations for all execution that relates to this Target . Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool . |
gke | object | Optional. Information specifying a GKE Cluster. (id: GkeCluster) |
labels | object | Optional. Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes. |
multiTarget | object | Optional. Information specifying a multiTarget. (id: MultiTarget) |
requireApproval | boolean | Optional. Whether or not the Target requires approval. |
run | object | Optional. Information specifying a Cloud Run deployment target. (id: CloudRunLocation) |
targetId | string | Output only. Resource id of the Target . |
uid | string | Output only. Unique identifier of the Target . |
updateTime | string (google-datetime) | Output only. Most recent time at which the Target was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , targetsId | Gets details of a single Target. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists Targets in a given project and location. |
create | insert | projectsId , locationsId | targetId , requestId , validateOnly | Creates a new Target in a given project and location. |
patch | update | projectsId , locationsId , targetsId | updateMask , requestId , allowMissing , validateOnly | Updates the parameters of a single Target. |
delete | delete | projectsId , locationsId , targetsId | requestId , allowMissing , validateOnly , etag | Deletes a single Target. |
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 |
---|---|---|
locationsId | string | |
projectsId | string | |
targetsId | string | |
allowMissing | boolean | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
targetId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
Gets details of a single Target.
SELECT
name,
annotations,
anthosCluster,
associatedEntities,
createTime,
customTarget,
deployParameters,
description,
etag,
executionConfigs,
gke,
labels,
multiTarget,
requireApproval,
run,
targetId,
uid,
updateTime
FROM google.clouddeploy.targets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND targetsId = '{{ targetsId }}' -- required;
Lists Targets in a given project and location.
SELECT
name,
annotations,
anthosCluster,
associatedEntities,
createTime,
customTarget,
deployParameters,
description,
etag,
executionConfigs,
gke,
labels,
multiTarget,
requireApproval,
run,
targetId,
uid,
updateTime
FROM google.clouddeploy.targets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Target in a given project and location.
INSERT INTO google.clouddeploy.targets (
data__name,
data__description,
data__annotations,
data__labels,
data__requireApproval,
data__gke,
data__anthosCluster,
data__run,
data__multiTarget,
data__customTarget,
data__associatedEntities,
data__etag,
data__executionConfigs,
data__deployParameters,
projectsId,
locationsId,
targetId,
requestId,
validateOnly
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ annotations }}',
'{{ labels }}',
{{ requireApproval }},
'{{ gke }}',
'{{ anthosCluster }}',
'{{ run }}',
'{{ multiTarget }}',
'{{ customTarget }}',
'{{ associatedEntities }}',
'{{ etag }}',
'{{ executionConfigs }}',
'{{ deployParameters }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ targetId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: targets
props:
- name: projectsId
value: string
description: Required parameter for the targets resource.
- name: locationsId
value: string
description: Required parameter for the targets resource.
- name: name
value: string
description: >
Identifier. Name of the `Target`. Format is `projects/{project}/locations/{location}/targets/{target}`. The `target` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`
- name: description
value: string
description: >
Optional. Description of the `Target`. Max length is 255 characters.
- name: annotations
value: object
description: >
Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
- name: labels
value: object
description: >
Optional. Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
- name: requireApproval
value: boolean
description: >
Optional. Whether or not the `Target` requires approval.
- name: gke
value: object
description: >
Optional. Information specifying a GKE Cluster.
- name: anthosCluster
value: object
description: >
Optional. Information specifying an Anthos Cluster.
- name: run
value: object
description: >
Optional. Information specifying a Cloud Run deployment target.
- name: multiTarget
value: object
description: >
Optional. Information specifying a multiTarget.
- name: customTarget
value: object
description: >
Optional. Information specifying a Custom Target.
- name: associatedEntities
value: object
description: >
Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
- name: etag
value: string
description: >
Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- name: executionConfigs
value: array
description: >
Optional. Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.
- name: deployParameters
value: object
description: >
Optional. The deploy parameters to use for this target.
- name: targetId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
Updates the parameters of a single Target.
UPDATE google.clouddeploy.targets
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__annotations = '{{ annotations }}',
data__labels = '{{ labels }}',
data__requireApproval = {{ requireApproval }},
data__gke = '{{ gke }}',
data__anthosCluster = '{{ anthosCluster }}',
data__run = '{{ run }}',
data__multiTarget = '{{ multiTarget }}',
data__customTarget = '{{ customTarget }}',
data__associatedEntities = '{{ associatedEntities }}',
data__etag = '{{ etag }}',
data__executionConfigs = '{{ executionConfigs }}',
data__deployParameters = '{{ deployParameters }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND targetsId = '{{ targetsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single Target.
DELETE FROM google.clouddeploy.targets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND targetsId = '{{ targetsId }}' --required
AND requestId = '{{ requestId }}'
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}';