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). GCF will
delegate access to the Google Storage service account in the internal
project.
[[["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."],[[["\u003cp\u003eThe \u003ccode\u003eGenerateUploadUrlRequest\u003c/code\u003e class is used to request a source upload URL in the Cloud Functions v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, facilitating various functionalities like message handling, equality checks, and deep cloning.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerateUploadUrlRequest\u003c/code\u003e class allows specifying a KMS crypto key for encrypting/decrypting function source code via the \u003ccode\u003eKmsKeyName\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eParent\u003c/code\u003e property of the \u003ccode\u003eGenerateUploadUrlRequest\u003c/code\u003e class defines the project and location where the signed Google Cloud Storage URL will be generated.\u003c/p\u003e\n"],["\u003cp\u003eThe page provides access to documentation for different versions of the class, ranging from version 1.1.0 all the way to the most recent version of 2.7.0.\u003c/p\u003e\n"]]],[],null,["# Cloud Functions v1 API - Class GenerateUploadUrlRequest (2.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.7.0 (latest)](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.6.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.5.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.4.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.3.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.2.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.1.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.0.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.3.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.2.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.1.0/Google.Cloud.Functions.V1.GenerateUploadUrlRequest) \n\n public sealed class GenerateUploadUrlRequest : IMessage\u003cGenerateUploadUrlRequest\u003e, IEquatable\u003cGenerateUploadUrlRequest\u003e, IDeepCloneable\u003cGenerateUploadUrlRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Functions v1 API class GenerateUploadUrlRequest.\n\nRequest of `GenerateSourceUploadUrl` method. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GenerateUploadUrlRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateUploadUrlRequest](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.GenerateUploadUrlRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateUploadUrlRequest](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.GenerateUploadUrlRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateUploadUrlRequest](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.GenerateUploadUrlRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Functions.V1](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Functions.V1.dll\n\nConstructors\n------------\n\n### GenerateUploadUrlRequest()\n\n public GenerateUploadUrlRequest()\n\n### GenerateUploadUrlRequest(GenerateUploadUrlRequest)\n\n public GenerateUploadUrlRequest(GenerateUploadUrlRequest other)\n\nProperties\n----------\n\n### KmsKeyName\n\n public string KmsKeyName { get; set; }\n\nResource name of a KMS crypto key (managed by the user) used to\nencrypt/decrypt function source code objects in intermediate Cloud Storage\nbuckets. When you generate an upload url and upload your source code, it\ngets copied to an intermediate Cloud Storage bucket. The source code is\nthen copied to a versioned directory in the sources bucket in the consumer\nproject during the function deployment.\n\nIt must match the pattern\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\nThe Google Cloud Functions service account\n(service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be\ngranted the role 'Cloud KMS CryptoKey Encrypter/Decrypter\n(roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the\nKey/KeyRing/Project/Organization (least access preferred). GCF will\ndelegate access to the Google Storage service account in the internal\nproject.\n\n### KmsKeyNameAsCryptoKeyName\n\n public CryptoKeyName KmsKeyNameAsCryptoKeyName { get; set; }\n\n[CryptoKeyName](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.CryptoKeyName)-typed view over the [KmsKeyName](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.GenerateUploadUrlRequest#Google_Cloud_Functions_V1_GenerateUploadUrlRequest_KmsKeyName) resource name property.\n\n### Parent\n\n public string Parent { get; set; }\n\nThe project and location in which the Google Cloud Storage signed URL\nshould be generated, specified in the format `projects/*/locations/*`."]]