REST Resource: iceberg.v1.restcatalog.v1.projects.catalogs.namespaces.views

資源:HttpBody

代表任意 HTTP 主體的訊息。只有在酬載格式無法以 JSON 表示時 (例如原始二進位檔或 HTML 網頁),才應使用這個欄位。

這則訊息可用於要求和回應中的串流和非串流 API 方法。

這項功能可做為頂層要求欄位,方便使用者將網址或 HTTP 範本中的參數擷取至要求欄位,同時存取原始 HTTP 主體。

範例:

message GetResourceRequest {
  // A unique request id.
  string requestId = 1;

  // The raw HTTP body is bound to this field.
  google.api.HttpBody httpBody = 2;

}

service ResourceService {
  rpc GetResource(GetResourceRequest)
    returns (google.api.HttpBody);
  rpc UpdateResource(google.api.HttpBody)
    returns (google.protobuf.Empty);

}

串流方法範例:

service CaldavService {
  rpc GetCalendar(stream google.api.HttpBody)
    returns (stream google.api.HttpBody);
  rpc UpdateCalendar(stream google.api.HttpBody)
    returns (stream google.api.HttpBody);

}

使用這種類型只會變更要求和回應主體的處理方式,所有其他功能都會維持不變。

JSON 表示法
{
  "contentType": string,
  "data": string,
  "extensions": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
欄位
contentType

string

HTTP Content-Type 標頭值,用於指定內文的內容類型。

data

string (bytes format)

HTTP 要求/回應主體,以原始二進位檔表示。

Base64 編碼字串。

extensions[]

object

應用程式專屬的回應中繼資料。必須在串流 API 的第一個回應中設定。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如 { "id": 1234, "@type": "types.example.com/standard/id" }。

方法

create

在命名空間中建立 Iceberg 檢視表。

delete

刪除命名空間中的檢視表。

get

取得命名空間中的檢視表。
如果檢視表存在,則傳回 204,否則傳回 404。

list

列出命名空間中的清單檢視 ID (而非檢視表)。

updateIcebergView

更新命名空間中的檢視表。