Reference documentation and code samples for the Cloud Functions V2 API module Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel.
Available security level settings.
This enforces security protocol on function URL.
Security level is only configurable for 1st Gen functions, If unspecified,
SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.
Constants
SECURITY_LEVEL_UNSPECIFIED
value: 0 Unspecified.
SECURE_ALWAYS
value: 1 Requests for a URL that match this handler that do not use HTTPS are
automatically redirected to the HTTPS URL with the same path. Query
parameters are reserved for the redirect.
SECURE_OPTIONAL
value: 2 Both HTTP and HTTPS requests with URLs that match the handler succeed
without redirects. The application can examine the request to determine
which protocol was used and respond accordingly.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Functions V2 API - Module Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-functions-v2/latest/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [1.0.2](/ruby/docs/reference/google-cloud-functions-v2/1.0.2/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.10.0](/ruby/docs/reference/google-cloud-functions-v2/0.10.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.9.0](/ruby/docs/reference/google-cloud-functions-v2/0.9.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.8.1](/ruby/docs/reference/google-cloud-functions-v2/0.8.1/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.7.0](/ruby/docs/reference/google-cloud-functions-v2/0.7.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.6.2](/ruby/docs/reference/google-cloud-functions-v2/0.6.2/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.5.0](/ruby/docs/reference/google-cloud-functions-v2/0.5.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.4.1](/ruby/docs/reference/google-cloud-functions-v2/0.4.1/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.3.0](/ruby/docs/reference/google-cloud-functions-v2/0.3.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.2.0](/ruby/docs/reference/google-cloud-functions-v2/0.2.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel)\n- [0.1.0](/ruby/docs/reference/google-cloud-functions-v2/0.1.0/Google-Cloud-Functions-V2-ServiceConfig-SecurityLevel) \nReference documentation and code samples for the Cloud Functions V2 API module Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel.\n\nAvailable security level settings.\n\n\nThis enforces security protocol on function URL.\n\n\u003cbr /\u003e\n\nSecurity level is only configurable for 1st Gen functions, If unspecified,\nSECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.\n\nConstants\n---------\n\n### SECURITY_LEVEL_UNSPECIFIED\n\n**value:** 0 \nUnspecified.\n\n### SECURE_ALWAYS\n\n**value:** 1 \nRequests for a URL that match this handler that do not use HTTPS are\nautomatically redirected to the HTTPS URL with the same path. Query\nparameters are reserved for the redirect.\n\n### SECURE_OPTIONAL\n\n**value:** 2 \nBoth HTTP and HTTPS requests with URLs that match the handler succeed\nwithout redirects. The application can examine the request to determine\nwhich protocol was used and respond accordingly."]]