REST Resource: projects.locations.customTargetTypes

资源:CustomTargetType

Cloud Deploy API 中的 CustomTargetType 资源。

CustomTargetType 定义了一种可在 Target 中引用的自定义目标,以便部署到除支持的运行时之外的其他系统。

JSON 表示法
{
  "name": string,
  "customTargetTypeId": string,
  "uid": string,
  "description": string,
  "annotations": {
    string: string,
    ...
  },
  "labels": {
    string: string,
    ...
  },
  "createTime": string,
  "updateTime": string,
  "etag": string,

  // Union field definition can be only one of the following:
  "customActions": {
    object (CustomTargetSkaffoldActions)
  }
  // End of list of possible types for union field definition.
}
字段
name

string

可选。CustomTargetType 的名称。格式为 projects/{project}/locations/{location}/customTargetTypes/{customTargetType}customTargetType 组成部分必须与 [a-z]([a-z0-9-]{0,61}[a-z0-9])? 匹配

customTargetTypeId

string

仅限输出。CustomTargetType 的资源 ID。

uid

string

仅限输出。CustomTargetType 的唯一标识符。

description

string

可选。CustomTargetType 的说明。长度上限为 255 个字符。

annotations

map (key: string, value: string)

可选。用户注释。这些属性只能由用户设置和使用,而不能由 Cloud Deploy 设置和使用。如需了解详情(例如格式和大小限制),请参阅 https://google.aip.dev/128#annotations

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

labels

map (key: string, value: string)

可选。标签是用户可以和 Cloud Deploy 设置和使用的属性。标签必须符合以下限制条件:

  • 键和值只能包含小写字母、数字字符、下划线和短划线。
  • 所有字符都必须使用 UTF-8 编码,允许使用国际字符。
  • 键必须以小写字母或国际字符开头。
  • 每项资源最多只能包含 64 个标签。

键和值还限制为 <= 128 个字节。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

createTime

string (Timestamp format)

仅限输出。CustomTargetType 的创建时间。

时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

updateTime

string (Timestamp format)

仅限输出。CustomTargetType 的最近更新时间。

时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

etag

string

可选。该校验和由服务器根据其他字段的值计算,并且可能会在更新和删除请求时发送,以确保客户端在继续操作之前具有最新的值。

联合字段 definition。定义 CustomTargetType 渲染程序和部署者。definition 只能是下列其中一项:
customActions

object (CustomTargetSkaffoldActions)

使用 Skaffold 自定义操作为 CustomTargetType 配置渲染和部署。

CustomTargetSkaffoldActions

CustomTargetSkaffoldActions 表示使用 Skaffold 自定义操作的 CustomTargetType 配置。

JSON 表示法
{
  "renderAction": string,
  "deployAction": string,
  "includeSkaffoldModules": [
    {
      object (SkaffoldModules)
    }
  ]
}
字段
renderAction

string

可选。负责渲染操作的 Skaffold 自定义操作。如果未提供,Cloud Deploy 将通过 skaffold render 执行渲染操作。

deployAction

string

必需。负责部署操作的 Skaffold 自定义操作。

includeSkaffoldModules[]

object (SkaffoldModules)

可选。在执行诊断之前,Cloud Deploy 将根据需要包含在 Skaffold 配置中的 Skaffold 模块列表。

SkaffoldModules

Skaffold 配置模块及其远程来源。

JSON 表示法
{
  "configs": [
    string
  ],

  // Union field source can be only one of the following:
  "git": {
    object (SkaffoldGitSource)
  },
  "googleCloudStorage": {
    object (SkaffoldGCSSource)
  },
  "googleCloudBuildRepo": {
    object (SkaffoldGCBRepoSource)
  }
  // End of list of possible types for union field source.
}
字段
configs[]

string

可选。指定来源中要使用的 Skaffold 配置模块。

联合字段 source。包含 Skaffold 配置模块的来源。source 只能是下列其中一项:
git

object (SkaffoldGitSource)

包含 Skaffold 配置模块的远程 Git 代码库。

googleCloudStorage

object (SkaffoldGCSSource)

包含 Skaffold 配置模块的 Cloud Storage 存储桶。

googleCloudBuildRepo

object (SkaffoldGCBRepoSource)

包含 Skaffold 配置模块的 Cloud Build V2 代码库。

SkaffoldGitSource

包含 Skaffold 配置模块的 Git 代码库。

JSON 表示法
{
  "repo": string,
  "path": string,
  "ref": string
}
字段
repo

string

必需。应从中克隆该软件包的 Git 代码库。

path

string

可选。从代码库根目录到 Skaffold 文件的相对路径。

ref

string

可选。克隆代码库时要使用的 Git 分支或标记。

SkaffoldGCSSource

包含 Skaffold 配置模块的 Cloud Storage 存储桶。

JSON 表示法
{
  "source": string,
  "path": string
}
字段
source

string

必需。要以递归方式复制的 Cloud Storage 源路径。例如,提供“gs://my-bucket/dir/configs/*”将导致 Skaffold 复制存储桶“my-bucket”中“dir/configs”目录内的所有文件。

path

string

可选。从来源到 Skaffold 文件的相对路径。

SkaffoldGCBRepoSource

包含 Skaffold 配置的 Cloud Build V2 代码库。

JSON 表示法
{
  "repository": string,
  "path": string,
  "ref": string
}
字段
repository

string

必需。Cloud Build V2 代码库的名称。格式为 projects/{项目}/locations/{location}/connections/{connection}/repositories/{存储库}。

path

string

可选。从代码库根目录到 Skaffold 配置文件的相对路径。

ref

string

可选。克隆代码库时要使用的分支或标记。

方法

create

在指定的项目和位置中创建一个新的 CustomTargetType。

delete

删除单个 CustomTargetType。

get

获取单个 CustomTargetType 的详细信息。

getIamPolicy

获取资源的访问权限控制政策。

list

列出给定项目和位置中的 CustomTargetType。

patch

更新单个 CustomTargetType。

setIamPolicy

设置对指定资源的访问权限控制政策。