Method: projects.versions.create
根据模型创建项目版本,并触发到指定发布渠道的部署(如果已指定)。
HTTP 请求
POST https://actions.googleapis.com/v2/{parent=projects/*}/versions:create
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。父级资源名称,格式为 projects/{project} 。{project} 是与项目关联的 Cloud 项目 ID。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"files": {
object (Files )
},
"releaseChannel": string
} |
字段 |
files |
object (Files )
必需。每次发送到服务器的文件列表。这是配置文件或数据文件的列表。1. 第一个请求必须是 ConfigFiles。2. 第一个请求必须具有含“settings”的 ConfigFile。3. 第一个请求必须具有含“manifest”的 ConfigFile。4. 与内嵌 Cloud Functions 函数对应的 webhook ConfigFile 必须在与其源代码对应的 DataFile 之前进行流式传输。
|
releaseChannel |
string
可选。用于部署版本的发布渠道(如果已指定)。支持的内置发布渠道包括 actions.channels.Production、actions.channels.ClosedBeta、actions.channels.Alpha。.
|
响应正文
如果成功,则响应正文包含一个 Version
实例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-22。
[null,null,["最后更新时间 (UTC):2024-08-22。"],[[["Creates a new project version and optionally deploys it to a specified release channel."],["Requires a POST request to the provided URL with project ID in the path."],["The request body must include necessary configuration and data files, with specific requirements for the initial request."],["Optionally, specify the release channel for deployment within the request body."],["A successful response returns details about the created version."]]],["This outlines the process to create a project version and deploy it. A `POST` request is sent to `https://actions.googleapis.com/v2/{parent=projects/*}/versions:create`, with the `parent` path parameter specifying the project ID. The request body requires a JSON structure that includes a list of `files`, such as config and data files, and an optional `releaseChannel` to direct the deployment. A successful request returns a `Version` instance in the response body.\n"]]