# Cloud Functions v2beta API - Class GenerateUploadUrlRequest (1.0.0-beta08)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest)
- [1.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/1.0.0-beta07/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest)

    public sealed class GenerateUploadUrlRequest : IMessage<GenerateUploadUrlRequest>, IEquatable<GenerateUploadUrlRequest>, IDeepCloneable<GenerateUploadUrlRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Functions v2beta API class GenerateUploadUrlRequest.

Request of `GenerateSourceUploadUrl` method.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GenerateUploadUrlRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateUploadUrlRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateUploadUrlRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateUploadUrlRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Functions.V2Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta)

## Assembly

Google.Cloud.Functions.V2Beta.dll

## Constructors

### GenerateUploadUrlRequest()

    public GenerateUploadUrlRequest()

### GenerateUploadUrlRequest(GenerateUploadUrlRequest)

    public GenerateUploadUrlRequest(GenerateUploadUrlRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest` |

## Properties

### Environment

    public Environment Environment { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.Environment` |   |

### KmsKeyName

    public string KmsKeyName { get; set; }

\[Preview\] 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).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyNameAsCryptoKeyName

    public CryptoKeyName KmsKeyNameAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.CryptoKeyName)-typed view over the [KmsKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest#Google_Cloud_Functions_V2Beta_GenerateUploadUrlRequest_KmsKeyName) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.CryptoKeyName` |   |

### Parent

    public string Parent { get; set; }

Required. The project and location in which the Google Cloud Storage signed
URL should be generated, specified in the format `projects/*/locations/*`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ParentAsLocationName

    public LocationName ParentAsLocationName { get; set; }

[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.GenerateUploadUrlRequest#Google_Cloud_Functions_V2Beta_GenerateUploadUrlRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |   |