storage.StorageOptions interface

StorageOptions 使用值區名稱擴充 EventHandlerOptions

簽名:

export interface StorageOptions extends options.EventHandlerOptions 

擴充: options.EventHandlerOptions

屬性

屬性 類型 說明
值區 字串 |運算式<字串> 包含此物件的值區名稱。
並行 數字 |運算式<數字>|重設值 函式可同時提供的要求數量。
CPU 數字 |「gcf_gen1」 要分配給函式的 CPU 數量 (以比例為單位)。
ingressSettings options.IngressSetting |重設值 輸入設定,控管可以從何處呼叫這個函式。
標籤 錄音<字串, 字串> 要在函式上設定的使用者標籤。
maxInstances 數字 |運算式<數字>|重設值 同時執行的執行個體數量上限。
記憶體 options.MemoryOption |運算式<數字>|重設值 要分配給函式的記憶體量。
minInstances 數字 |運算式<數字>|重設值 在指定時間運作的實際執行個體數量下限。
省略 布林值 |運算式<boolean> 若為 true,請勿部署或模擬此函式。
region [區域] options.supportedRegion |字串 |運算式<字串>|重設值 應部署函式的區域。
重試 布林值 |運算式<boolean>|重設值 是否應再次傳送失敗的執行作業。
秘密 (字串 | SecretParam)[]
serviceAccount 字串 |運算式<字串>|重設值 要做為函式執行的特定服務帳戶。
逾時秒數 數字 |運算式<數字>|重設值 函式的逾時時間 (以秒為單位),可能的值為 0 到 540。HTTPS 函式可以指定較長的逾時時間。
vpcConnector 字串 |運算式<字串>|重設值 將 Cloud 函式連線至指定的虛擬私有雲連接器。
vpcConnectoregressSettings options.VpcegressSetting |重設值 虛擬私有雲連接器的輸出設定。

storage.StorageOptions.bucket

包含此物件的值區名稱。

簽名:

bucket?: string | Expression<string>;

storage.StorageOptions.concurrency

函式可同時提供的要求數量。

只能套用至在 Cloud Functions v2 上執行的函式。值為空值會還原預設並行 (CPU >= 1 時為 80,否則為 1)。如果 cpu 小於 1,並行就無法設為 1 以外的任何值。並行的最大值為 1,000。

簽名:

concurrency?: number | Expression<number> | ResetValue;

storage.StorageOptions.cpu

要分配給函式的 CPU 數量 (以比例為單位)。

如果函式中的 RAM = 2 GB,預設值為 1;記憶體容量越大,則會增加。這與使用 gcloud 公用程式時的預設值不同,與 Google Cloud Functions 第 1 代指派的固定金額不同。如要還原為 gcloud 或 Cloud Functions 第 1 代使用的 CPU 數量,請將這個值設為「gcf_gen1」

簽名:

cpu?: number | "gcf_gen1";

storage.StorageOptions.ingressSettings

輸入設定,控管可以從何處呼叫這個函式。

簽名:

ingressSettings?: options.IngressSetting | ResetValue;

storage.StorageOptions.labels

要在函式上設定的使用者標籤。

簽名:

labels?: Record<string, string>;

storage.StorageOptions.maxInstances

同時執行的執行個體數量上限。

簽名:

maxInstances?: number | Expression<number> | ResetValue;

storage.StorageOptions.memory

要分配給函式的記憶體量。

簽名:

memory?: options.MemoryOption | Expression<number> | ResetValue;

storage.StorageOptions.minInstances

在指定時間運作的實際執行個體數量下限。

系統會在執行個體閒置時收取記憶體分配費用和 10% 的 CPU 分配費用。

簽名:

minInstances?: number | Expression<number> | ResetValue;

storage.StorageOptions.omit

若為 true,請勿部署或模擬此函式。

簽名:

omit?: boolean | Expression<boolean>;

storage.StorageOptions.region

應部署函式的區域。

簽名:

region?: options.SupportedRegion | string | Expression<string> | ResetValue;

storage.StorageOptions.retry

是否應再次傳送失敗的執行作業。

簽名:

retry?: boolean | Expression<boolean> | ResetValue;

storage.StorageOptions.secrets

簽名:

secrets?: (string | SecretParam)[];

storage.StorageOptions.serviceAccount

要做為函式執行的特定服務帳戶。

簽名:

serviceAccount?: string | Expression<string> | ResetValue;

storage.StorageOptions.timeoutSeconds

函式的逾時時間 (以秒為單位),可能的值為 0 到 540。HTTPS 函式可以指定較長的逾時時間。

第 2 代函式的逾時時間下限為 1 秒。函式的逾時時間上限取決於函式類型:事件處理函式的逾時時間上限為 540 秒 (9 分鐘),HTTPS 和可呼叫函式的逾時時間上限為 36,00 秒 (1 小時)。工作佇列函式的逾時時間上限為 1,800 秒 (30 分鐘)

簽名:

timeoutSeconds?: number | Expression<number> | ResetValue;

storage.StorageOptions.vpcConnector

將 Cloud 函式連線至指定的虛擬私有雲連接器。

簽名:

vpcConnector?: string | Expression<string> | ResetValue;

storage.StorageOptions.vpcConnectoregressSettings

虛擬私有雲連接器的輸出設定。

簽名:

vpcConnectorEgressSettings?: options.VpcEgressSetting | ResetValue;