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
| 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 | 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 | 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. |
| 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 | 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 | 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 | filter, orderBy, pageSize, pageToken | Lists Targets in a given project and location. |
create | insert | projectsId, locationsId | requestId, targetId, validateOnly | Creates a new Target in a given project and location. |
patch | update | projectsId, locationsId, targetsId | allowMissing, requestId, updateMask, validateOnly | Updates the parameters of a single Target. |
delete | delete | projectsId, locationsId, targetsId | allowMissing, etag, requestId, validateOnly | 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 filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new Target in a given project and location.
INSERT INTO google.clouddeploy.targets (
data__annotations,
data__anthosCluster,
data__associatedEntities,
data__customTarget,
data__deployParameters,
data__description,
data__etag,
data__executionConfigs,
data__gke,
data__labels,
data__multiTarget,
data__name,
data__requireApproval,
data__run,
projectsId,
locationsId,
requestId,
targetId,
validateOnly
)
SELECT
'{{ annotations }}',
'{{ anthosCluster }}',
'{{ associatedEntities }}',
'{{ customTarget }}',
'{{ deployParameters }}',
'{{ description }}',
'{{ etag }}',
'{{ executionConfigs }}',
'{{ gke }}',
'{{ labels }}',
'{{ multiTarget }}',
'{{ name }}',
{{ requireApproval }},
'{{ run }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ targetId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: targets
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the targets resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the targets resource.
- name: annotations
value: "{{ annotations }}"
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: anthosCluster
description: |
Information specifying an Anthos Cluster.
value:
membership: "{{ membership }}"
- name: associatedEntities
value: "{{ associatedEntities }}"
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: customTarget
description: |
Optional. Information specifying a Custom Target.
value:
customTargetType: "{{ customTargetType }}"
- name: deployParameters
value: "{{ deployParameters }}"
description: |
Optional. The deploy parameters to use for this target.
- name: description
value: "{{ description }}"
description: |
Optional. Description of the `Target`. Max length is 255 characters.
- name: etag
value: "{{ etag }}"
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
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`.
value:
- artifactStorage: "{{ artifactStorage }}"
defaultPool:
artifactStorage: "{{ artifactStorage }}"
serviceAccount: "{{ serviceAccount }}"
executionTimeout: "{{ executionTimeout }}"
privatePool:
artifactStorage: "{{ artifactStorage }}"
serviceAccount: "{{ serviceAccount }}"
workerPool: "{{ workerPool }}"
serviceAccount: "{{ serviceAccount }}"
usages: "{{ usages }}"
verbose: {{ verbose }}
workerPool: "{{ workerPool }}"
- name: gke
description: |
Information specifying a GKE Cluster.
value:
cluster: "{{ cluster }}"
dnsEndpoint: {{ dnsEndpoint }}
internalIp: {{ internalIp }}
proxyUrl: "{{ proxyUrl }}"
- name: labels
value: "{{ labels }}"
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: multiTarget
description: |
Optional. Information specifying a multiTarget.
value:
targetIds:
- "{{ targetIds }}"
- name: name
value: "{{ name }}"
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: requireApproval
value: {{ requireApproval }}
description: |
Optional. Whether or not the `Target` requires approval.
- name: run
description: |
Optional. Information specifying a Cloud Run deployment target.
value:
location: "{{ location }}"
- name: requestId
value: "{{ requestId }}"
- name: targetId
value: "{{ targetId }}"
- name: validateOnly
value: {{ validateOnly }}
UPDATE examples
- patch
Updates the parameters of a single Target.
UPDATE google.clouddeploy.targets
SET
data__annotations = '{{ annotations }}',
data__anthosCluster = '{{ anthosCluster }}',
data__associatedEntities = '{{ associatedEntities }}',
data__customTarget = '{{ customTarget }}',
data__deployParameters = '{{ deployParameters }}',
data__description = '{{ description }}',
data__etag = '{{ etag }}',
data__executionConfigs = '{{ executionConfigs }}',
data__gke = '{{ gke }}',
data__labels = '{{ labels }}',
data__multiTarget = '{{ multiTarget }}',
data__name = '{{ name }}',
data__requireApproval = {{ requireApproval }},
data__run = '{{ run }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND targetsId = '{{ targetsId }}' --required
AND allowMissing = {{ allowMissing}}
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
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 allowMissing = '{{ allowMissing }}'
AND etag = '{{ etag }}'
AND requestId = '{{ requestId }}'
AND validateOnly = '{{ validateOnly }}'
;