FunctionBuilder class

サイン:

export declare class FunctionBuilder 

コンストラクター

コンストラクタ修飾子説明
(コンストラクター)(オプション) FunctionBuilderクラスの新しいインスタンスを構築します。

プロパティ

財産修飾子タイプ説明
分析{ イベント: (analyticsEventType: string) => Analytics.AnalyticsEventBuilder ; }
認証{ user: (userOptions?: auth.UserOptions ) => auth.UserBuilder ; }
データベース{ インスタンス: (インスタンス: 文字列) =>データベース.InstanceBuilder ; ref: <Ref は文字列を拡張します>(パス: Ref) => database.RefBuilder <参照>; }
消防署{ document: <パスは文字列を拡張します>(パス: パス) => firestore.DocumentBuilder <パス>;名前空間: (名前空間: 文字列) => firestore.NamespaceBuilder ;データベース: (データベース: 文字列) => firestore.DatabaseBuilder ; }
https { onRequest: (handler: (req: https.Request, resp:express.Response) => void | Promise<void>) => import("./cloud-functions")。 Https関数; onCall: (ハンドラー: (データ: 任意、コンテキスト: https.CallableContext ) => 任意 | Promise<any>) => import("./cloud-functions")。 HttpsFunction & import("./cloud-functions")。実行可能<任意>; }
パブサブ{ トピック: (トピック: 文字列) => pubsub.TopicBuilder ;スケジュール: (スケジュール: 文字列) => pubsub.ScheduleBuilder ; }
リモート構成{ onUpdate: (ハンドラー: (バージョン: remoteConfig.TemplateVersion 、コンテキスト: EventContext ) => PromiseLike<任意> |任意) => import("./cloud-functions")。クラウドファンクション< remoteConfig.TemplateVersion >; }
ストレージ{ バケット: (バケット?: 文字列) => storage.BucketBuilder ;オブジェクト: () => storage.ObjectBuilder ; }
タスク{ taskQueue: (オプション?: task.TaskQueueOptions ) =>タスク.TaskQueueBuilder ; }
テストラボ{ testMatrix: () => testLab.TestMatrixBuilder ; }

メソッド

方法修飾子説明
地域(地域)関数がデプロイされるリージョンを構成します。
runWith(ランタイムオプション)関数の実行時オプションを構成します。

FunctionBuilder.(コンストラクター)

FunctionBuilderクラスの新しいインスタンスを構築します。

サイン:

constructor(options: DeploymentOptions);

パラメーター

パラメータタイプ説明
オプション導入オプション

FunctionBuilder.analytics

サイン:

get analytics(): {
        event: (analyticsEventType: string) => analytics.AnalyticsEventBuilder;
    };

FunctionBuilder.auth

サイン:

get auth(): {
        user: (userOptions?: auth.UserOptions) => auth.UserBuilder;
    };

FunctionBuilder.データベース

サイン:

get database(): {
        instance: (instance: string) => database.InstanceBuilder;
        ref: <Ref extends string>(path: Ref) => database.RefBuilder<Ref>;
    };

FunctionBuilder.firestore

サイン:

get firestore(): {
        document: <Path extends string>(path: Path) => firestore.DocumentBuilder<Path>;
        namespace: (namespace: string) => firestore.NamespaceBuilder;
        database: (database: string) => firestore.DatabaseBuilder;
    };

FunctionBuilder.https

サイン:

get https(): {
        onRequest: (handler: (req: https.Request, resp: express.Response) => void | Promise<void>) => import("./cloud-functions").HttpsFunction;
        onCall: (handler: (data: any, context: https.CallableContext) => any | Promise<any>) => import("./cloud-functions").HttpsFunction & import("./cloud-functions").Runnable<any>;
    };

FunctionBuilder.pubsub

サイン:

get pubsub(): {
        topic: (topic: string) => pubsub.TopicBuilder;
        schedule: (schedule: string) => pubsub.ScheduleBuilder;
    };

FunctionBuilder.remoteConfig

サイン:

get remoteConfig(): {
        onUpdate: (handler: (version: remoteConfig.TemplateVersion, context: EventContext) => PromiseLike<any> | any) => import("./cloud-functions").CloudFunction<remoteConfig.TemplateVersion>;
    };

FunctionBuilder.ストレージ

サイン:

get storage(): {
        bucket: (bucket?: string) => storage.BucketBuilder;
        object: () => storage.ObjectBuilder;
    };

FunctionBuilder.tasks

サイン:

get tasks(): {
        taskQueue: (options?: tasks.TaskQueueOptions) => tasks.TaskQueueBuilder;
    };

FunctionBuilder.testLab

サイン:

get testLab(): {
        testMatrix: () => testLab.TestMatrixBuilder;
    };

FunctionBuilder.region()

関数がデプロイされるリージョンを構成します。

サイン:

region(...regions: Array<(typeof SUPPORTED_REGIONS)[number] | string | Expression<string> | ResetValue>): FunctionBuilder;

パラメーター

パラメータタイプ説明
地域配列<( SUPPORTED_REGIONSの種類)[数値] |文字列 |表現<文字列> |リセット値> 1 つ以上の地域文字列。

戻り値:

関数ビルダー

例1

関数.region('us-east1')

例 2

関数.region('us-east1', 'us-central1')

FunctionBuilder.runWith()

関数の実行時オプションを構成します。

サイン:

runWith(runtimeOptions: RuntimeOptions): FunctionBuilder;

パラメーター

パラメータタイプ説明
ランタイムオプションランタイムオプションオプションのフィールドを持つオブジェクト: 1. memory : 関数に割り当てるメモリの量。可能な値は次のとおりです: '128MB'、'256MB'、'512MB'、'1GB'、'2GB'、'4GB'、および '8GB' 。 2. timeoutSeconds : 関数のタイムアウト (秒単位)。可能な値は 0 ~ 540 です。 3. failurePolicy : 関数の失敗ポリシー。ブールtrueは、空の再試行オブジェクトを提供するのと同等です。 4. vpcConnector : 同じプロジェクトおよびリージョン内の VPC コネクタの ID 5. vpcConnectorEgressSettings : vpcConnectorが設定されている場合、どの出力トラフィックがvpcConnectorを介して送信されるかを制御します。値は null であってはなりません。

戻り値:

関数ビルダー