database.ReferenceOptions interface

ReferenceOptions 使用提供的 ref 和可選實例擴充 EventHandlerOptions

簽名:

export interface ReferenceOptions<Ref extends string = string> extends options.EventHandlerOptions 

擴充: options.EventHandlerOptions

特性

財產類型描述
並發性數量 |表達<數字> |重置值函數一次可以處理的請求數。
中央處理器數量 | “gcf_gen1”分配給函數的 CPU 分數。
入口設置選項.IngressSetting |重置值控制從何處呼叫此函數的入口設定。
實例細繩指定要在資料庫執行個體上觸發的處理程序。如果存在,該值可以是單一實例或模式。範例:「my-instance-1」、「my-instance-*」 注意:擷取語法不能用於「instance」。
標籤記錄<字串,字串>在函數上設定的使用者標籤。
最大實例數數量 |表達<數字> |重置值並行運行的最大實例數。
記憶選項.MemoryOption |表達<數字> |重置值分配給函數的記憶體量。
最小實例數數量 |表達<數字> |重置值在給定時間運行的最小實際實例數。
忽略布爾 |表達<布林值>如果為 true,則不要部署或模擬此功能。
參考參考號指定在資料庫參考上觸發的處理程序。該值可以是單一引用或模式。例:'/foo/bar'、'/foo/ {酒吧} '
地區選項.SupportedRegion |字串|表達<字串> |重置值需要部署功能的區域。
重試布爾 |表達<布林值> |重置值是否應再次交付失敗的執行。
秘密(字串 | SecretParam)[]
服務帳戶字串|表達<字串> |重置值執行該函數的特定服務帳戶。
超時秒數數量 |表達<數字> |重置值函數的超時時間(以秒為單位),可能的值為 0 到 540。HTTPS 函數可以指定更高的超時時間。
vpc連接器字串|表達<字串> |重置值將雲端功能連接到指定的VPC連接器。
vpcConnectorEgressSettings選項.VpcEgressSetting |重置值VPC 連接器的出口設定。

資料庫.ReferenceOptions.concurrency

函數一次可以處理的請求數。

僅適用於在 Cloud Functions v2 上執行的函數。 null 值恢復預設並發性(當 CPU > 時為 80) = 1, 1 否則)。如果cpu小於 1,則並發數不能設定為 1 以外的任何值。並發數的最大值為 1,000。

簽名:

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

資料庫.ReferenceOptions.cpu

分配給函數的 CPU 分數。

對於帶有 < 的函數,預設為 1 = 2GB RAM 並增加更大的記憶體大小。這與使用gcloud 實用程式時的預設值不同,也與Google Cloud Functions 第1 代中分配的固定數量不同。要恢復為gcloud 或Cloud Functions 第1 代中使用的CPU 數量,請將其設為值“ gcf_gen1”

簽名:

cpu?: number | "gcf_gen1";

資料庫.ReferenceOptions.ingressSettings

控制從何處呼叫此函數的入口設定。

簽名:

ingressSettings?: options.IngressSetting | ResetValue;

資料庫.ReferenceOptions.instance

指定要在資料庫執行個體上觸發的處理程序。如果存在,該值可以是單一實例或模式。範例:「my-instance-1」、「my-instance-*」 注意:擷取語法不能用於「instance」。

簽名:

instance?: string;

資料庫.ReferenceOptions.labels

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

簽名:

labels?: Record<string, string>;

資料庫.ReferenceOptions.maxInstances

並行運行的最大實例數。

簽名:

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

資料庫.ReferenceOptions.內存

分配給函數的記憶體量。

簽名:

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

資料庫.ReferenceOptions.minInstances

在給定時間運行的最小實際實例數。

實例將根據空閒時的記憶體分配和 10% 的 CPU 分配進行計費。

簽名:

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

資料庫.ReferenceOptions.omit

如果為 true,則不要部署或模擬此功能。

簽名:

omit?: boolean | Expression<boolean>;

資料庫.ReferenceOptions.ref

指定在資料庫參考上觸發的處理程序。該值可以是單一引用或模式。例:'/foo/bar'、'/foo/ {酒吧} '

簽名:

ref: Ref;

資料庫.ReferenceOptions.region

需要部署功能的區域。

簽名:

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

資料庫.ReferenceOptions.retry

是否應再次交付失敗的執行。

簽名:

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

資料庫.ReferenceOptions.secrets

簽名:

secrets?: (string | SecretParam)[];

資料庫.ReferenceOptions.serviceAccount

執行該函數的特定服務帳戶。

簽名:

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

資料庫.ReferenceOptions.timeoutSeconds

函數的超時時間(以秒為單位),可能的值為 0 到 540。HTTPS 函數可以指定更高的超時時間。

第 2 代函數的最小逾時為 1 秒。函數的最大逾時取決於函數的類型: 事件處理函數的最大逾時為 540 秒(9 分鐘)。 HTTPS 和可呼叫函數的最大逾時為 3,600 秒(1 小時)。任務佇列函數的最大逾時時間為 1,800 秒(30 分鐘)

簽名:

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

資料庫.ReferenceOptions.vpcConnector

將雲端功能連接到指定的VPC連接器。

簽名:

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

資料庫.ReferenceOptions.vpcConnectorEgressSettings

VPC 連接器的出口設定。

簽名:

vpcConnectorEgressSettings?: options.VpcEgressSetting | ResetValue;