Method: sites.versions.clone

使用指定版本的內容在指定目標網站上建立新版本。

HTTP請求

POST https://firebasehosting.googleapis.com/v1beta1/{parent=sites/*}/versions:clone

URL 使用gRPC 轉碼語法。

路徑參數

參數
parent

string

必需的。複製版本的目標站點,格式為:

sites/ SITE_ID

請求正文

請求正文包含具有以下結構的資料:

JSON 表示
{
  "sourceVersion": string,
  "finalize": boolean,

  // Union field filter can be only one of the following:
  "include": {
    object (PathFilter)
  },
  "exclude": {
    object (PathFilter)
  }
  // End of list of possible types for union field filter.
}
領域
sourceVersion

string

必需的。要複製的版本的唯一標識符,格式為:

sites/ SITE_ID /versions/ VERSION_ID

finalize

boolean

如果為 true,則在複製完成後,對versions.clone呼叫會立即決定版本。

如果為 false,則複製版本的狀態將為CREATED 。使用versions.patch將版本的狀態設定為FINALIZED

聯合字段filter

filter只能是以下之一:

include

object ( PathFilter )

如果提供,則只有與此清單中的一個或多個 RegEx 值相符的路徑才會包含在新版本中。

exclude

object ( PathFilter )

如果提供,則只有與此清單中的任何正規表示式值都不符合的路徑才會包含在新版本中。

響應體

如果成功,回應正文將包含一個Operation實例。

授權範圍

需要以下 OAuth 範圍之一:

  • https://www.googleapis.com/auth/firebase.hosting
  • https://www.googleapis.com/auth/firebase
  • https://www.googleapis.com/auth/cloud-platform

有關詳細信息,請參閱身份驗證概述

路徑過濾器

過濾器路徑的表示。

JSON 表示
{
  "regexes": [
    string
  ]
}
領域
regexes[]

string

用於篩選的 RegEx 值陣列。