(::Google::Cloud::Functions::V2::Environment) — The function environment the generated upload url will be used for.
The upload url for 2nd Gen functions can also be used for 1st gen
functions, but not vice versa. If not specified, 2nd generation-style
upload URLs are generated.
value (::Google::Cloud::Functions::V2::Environment) — The function environment the generated upload url will be used for.
The upload url for 2nd Gen functions can also be used for 1st gen
functions, but not vice versa. If not specified, 2nd generation-style
upload URLs are generated.
Returns
(::Google::Cloud::Functions::V2::Environment) — The function environment the generated upload url will be used for.
The upload url for 2nd Gen functions can also be used for 1st gen
functions, but not vice versa. If not specified, 2nd generation-style
upload URLs are generated.
#kms_key_name
defkms_key_name()->::String
Returns
(::String) — Resource name of a KMS crypto key (managed by the user) used to
encrypt/decrypt function source code objects in intermediate Cloud Storage
buckets. When you generate an upload url and upload your source code, it
gets copied to an intermediate Cloud Storage bucket. The source code is
then copied to a versioned directory in the sources bucket in the consumer
project during the function deployment.
It must match the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
The Google Cloud Functions service account
(service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
(roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
Key/KeyRing/Project/Organization (least access preferred).
#kms_key_name=
defkms_key_name=(value)->::String
Parameter
value (::String) — Resource name of a KMS crypto key (managed by the user) used to
encrypt/decrypt function source code objects in intermediate Cloud Storage
buckets. When you generate an upload url and upload your source code, it
gets copied to an intermediate Cloud Storage bucket. The source code is
then copied to a versioned directory in the sources bucket in the consumer
project during the function deployment.
It must match the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
The Google Cloud Functions service account
(service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
(roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
Key/KeyRing/Project/Organization (least access preferred).
Returns
(::String) — Resource name of a KMS crypto key (managed by the user) used to
encrypt/decrypt function source code objects in intermediate Cloud Storage
buckets. When you generate an upload url and upload your source code, it
gets copied to an intermediate Cloud Storage bucket. The source code is
then copied to a versioned directory in the sources bucket in the consumer
project during the function deployment.
It must match the pattern
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
The Google Cloud Functions service account
(service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
(roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
Key/KeyRing/Project/Organization (least access preferred).
#parent
defparent()->::String
Returns
(::String) — Required. The project and location in which the Google Cloud Storage signed
URL should be generated, specified in the format projects/*/locations/*.
#parent=
defparent=(value)->::String
Parameter
value (::String) — Required. The project and location in which the Google Cloud Storage signed
URL should be generated, specified in the format projects/*/locations/*.
Returns
(::String) — Required. The project and location in which the Google Cloud Storage signed
URL should be generated, specified in the format projects/*/locations/*.
[[["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 - Class Google::Cloud::Functions::V2::GenerateUploadUrlRequest (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-GenerateUploadUrlRequest)\n- [1.0.2](/ruby/docs/reference/google-cloud-functions-v2/1.0.2/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.10.0](/ruby/docs/reference/google-cloud-functions-v2/0.10.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.9.0](/ruby/docs/reference/google-cloud-functions-v2/0.9.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.8.1](/ruby/docs/reference/google-cloud-functions-v2/0.8.1/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.7.0](/ruby/docs/reference/google-cloud-functions-v2/0.7.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.6.2](/ruby/docs/reference/google-cloud-functions-v2/0.6.2/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.5.0](/ruby/docs/reference/google-cloud-functions-v2/0.5.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.4.1](/ruby/docs/reference/google-cloud-functions-v2/0.4.1/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.3.0](/ruby/docs/reference/google-cloud-functions-v2/0.3.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.2.0](/ruby/docs/reference/google-cloud-functions-v2/0.2.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest)\n- [0.1.0](/ruby/docs/reference/google-cloud-functions-v2/0.1.0/Google-Cloud-Functions-V2-GenerateUploadUrlRequest) \nReference documentation and code samples for the Cloud Functions V2 API class Google::Cloud::Functions::V2::GenerateUploadUrlRequest.\n\nRequest of `GenerateSourceUploadUrl` method. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #environment\n\n def environment() -\u003e ::Google::Cloud::Functions::V2::Environment\n\n**Returns**\n\n- ([::Google::Cloud::Functions::V2::Environment](./Google-Cloud-Functions-V2-Environment)) --- The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated.\n\n### #environment=\n\n def environment=(value) -\u003e ::Google::Cloud::Functions::V2::Environment\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Functions::V2::Environment](./Google-Cloud-Functions-V2-Environment)) --- The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated. \n**Returns**\n\n- ([::Google::Cloud::Functions::V2::Environment](./Google-Cloud-Functions-V2-Environment)) --- The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated.\n\n### #kms_key_name\n\n def kms_key_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment.\n\n It must match the pattern\n `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n The Google Cloud Functions service account\n (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be\n granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter\n (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the\n Key/KeyRing/Project/Organization (least access preferred).\n\n### #kms_key_name=\n\n def kms_key_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment.\n\n\n It must match the pattern\n `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n The Google Cloud Functions service account\n (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be\n granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter\n (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the\nKey/KeyRing/Project/Organization (least access preferred). \n**Returns**\n\n- (::String) --- Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment.\n\n It must match the pattern\n `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n The Google Cloud Functions service account\n (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be\n granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter\n (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the\n Key/KeyRing/Project/Organization (least access preferred).\n\n### #parent\n\n def parent() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.\n\n### #parent=\n\n def parent=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`. \n**Returns**\n\n- (::String) --- Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`."]]