Cloud Functions へリクエストする際に OIDC を使用して認証する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
URL を指定した後、ワークフロー定義の Args セクションに Auth セクションを追加することで、OIDC を使用して HTTP リクエストを行います。
もっと見る
このコードサンプルを含む詳細なドキュメントについては、以下をご覧ください。
コードサンプル
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],[],[],[],null,["# Use OIDC to authenticate when making a request to Cloud Functions\n\nMakes an HTTP request using OIDC by adding an auth section to the args section of the workflow's definition, after specifying the URL.\n\nExplore further\n---------------\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [Make an HTTP request](/workflows/docs/http-requests)\n\nCode sample\n-----------\n\n### YAML\n\n - call_my_function:\n call: http.post\n args:\n url: https://us-central1-myproject123.cloudfunctions.net/myfunc1\n auth:\n type: OIDC\n body:\n some_val: \"Hello World\"\n another_val: 123\n result: the_message\n - return_value:\n return: ${the_message.body}\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=workflows)."]]