targets
Creates, updates, deletes, gets or lists a targets
resource.
Overview
Name | targets |
Type | Resource |
Id | google.clouddeploy.targets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Optional. 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])? |
description | string | Optional. Description of the Target . Max length is 255 characters. |
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. |
createTime | string | Output only. Time at which the Target was created. |
customTarget | object | Information specifying a Custom Target. |
deployParameters | object | Optional. The deploy parameters to use for this target. |
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 | 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. |
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 | Information specifying a multiTarget. |
requireApproval | boolean | Optional. Whether or not the Target requires approval. |
run | object | Information specifying where to deploy a Cloud Run Service. |
targetId | string | Output only. Resource id of the Target . |
uid | string | Output only. Unique identifier of the Target . |
updateTime | string | Output only. Most recent time at which the Target was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, targetsId | Gets details of a single Target. |
list | SELECT | locationsId, projectsId | Lists Targets in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new Target in a given project and location. |
delete | DELETE | locationsId, projectsId, targetsId | Deletes a single Target. |
patch | UPDATE | locationsId, projectsId, targetsId | Updates the parameters of a single Target. |
SELECT
examples
Lists Targets in a given project and location.
SELECT
name,
description,
annotations,
anthosCluster,
createTime,
customTarget,
deployParameters,
etag,
executionConfigs,
gke,
labels,
multiTarget,
requireApproval,
run,
targetId,
uid,
updateTime
FROM google.clouddeploy.targets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new targets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.clouddeploy.targets (
locationsId,
projectsId,
name,
description,
annotations,
labels,
requireApproval,
gke,
anthosCluster,
run,
multiTarget,
customTarget,
etag,
executionConfigs,
deployParameters
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ annotations }}',
'{{ labels }}',
{{ requireApproval }},
'{{ gke }}',
'{{ anthosCluster }}',
'{{ run }}',
'{{ multiTarget }}',
'{{ customTarget }}',
'{{ etag }}',
'{{ executionConfigs }}',
'{{ deployParameters }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: targetId
value: string
- name: uid
value: string
- name: description
value: string
- name: annotations
value: object
- name: labels
value: object
- name: requireApproval
value: boolean
- name: createTime
value: string
- name: updateTime
value: string
- name: gke
value:
- name: cluster
value: string
- name: internalIp
value: boolean
- name: proxyUrl
value: string
- name: anthosCluster
value:
- name: membership
value: string
- name: run
value:
- name: location
value: string
- name: multiTarget
value:
- name: targetIds
value:
- string
- name: customTarget
value:
- name: customTargetType
value: string
- name: etag
value: string
- name: executionConfigs
value:
- - name: usages
value:
- string
- name: defaultPool
value:
- name: serviceAccount
value: string
- name: artifactStorage
value: string
- name: privatePool
value:
- name: workerPool
value: string
- name: serviceAccount
value: string
- name: artifactStorage
value: string
- name: workerPool
value: string
- name: serviceAccount
value: string
- name: artifactStorage
value: string
- name: executionTimeout
value: string
- name: verbose
value: boolean
- name: deployParameters
value: object
UPDATE
example
Updates a targets
resource.
/*+ update */
UPDATE google.clouddeploy.targets
SET
name = '{{ name }}',
description = '{{ description }}',
annotations = '{{ annotations }}',
labels = '{{ labels }}',
requireApproval = true|false,
gke = '{{ gke }}',
anthosCluster = '{{ anthosCluster }}',
run = '{{ run }}',
multiTarget = '{{ multiTarget }}',
customTarget = '{{ customTarget }}',
etag = '{{ etag }}',
executionConfigs = '{{ executionConfigs }}',
deployParameters = '{{ deployParameters }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND targetsId = '{{ targetsId }}';
DELETE
example
Deletes the specified targets
resource.
/*+ delete */
DELETE FROM google.clouddeploy.targets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND targetsId = '{{ targetsId }}';