public sealed class CreateFolderRequest : IMessage<CreateFolderRequest>, IEquatable<CreateFolderRequest>, IDeepCloneable<CreateFolderRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Storage v2 API class CreateFolderRequest.
Request message for CreateFolder. This operation is only applicable to a
hierarchical namespace enabled bucket.
Required. Properties of the new folder being created.
The bucket and name of the folder are specified in the parent and folder_id
fields, respectively. Populating those fields in folder will result in an
error.
Required. The full name of a folder, including all its parent folders.
Folders use single '/' characters as a delimiter.
The folder_id must end with a slash.
For example, the folder_id of "books/biographies/" would create a new
"biographies/" folder under the "books/" folder.
[[["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-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eCreateFolderRequest\u003c/code\u003e is a class in the Cloud Storage v2 API used for requesting the creation of a folder within a hierarchical namespace-enabled bucket.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces, with inheritance from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateFolderRequest\u003c/code\u003e class includes properties like \u003ccode\u003eFolder\u003c/code\u003e, \u003ccode\u003eFolderId\u003c/code\u003e, \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003eParentAsBucketName\u003c/code\u003e, \u003ccode\u003eRecursive\u003c/code\u003e, and \u003ccode\u003eRequestId\u003c/code\u003e to configure the folder creation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFolderId\u003c/code\u003e must end with a slash and use single '/' characters to delimit the folder hierarchy, and \u003ccode\u003eParent\u003c/code\u003e specifies the bucket where the folder will be created.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRecursive\u003c/code\u003e property will create any missing parent folders automatically if it is set to true.\u003c/p\u003e\n"]]],[],null,["# Cloud Storage v2 API - Class CreateFolderRequest (1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.CreateFolderRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.3.0/Google.Cloud.Storage.Control.V2.CreateFolderRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.2.0/Google.Cloud.Storage.Control.V2.CreateFolderRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.1.0/Google.Cloud.Storage.Control.V2.CreateFolderRequest)\n- [1.0.1](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.0.1/Google.Cloud.Storage.Control.V2.CreateFolderRequest) \n\n public sealed class CreateFolderRequest : IMessage\u003cCreateFolderRequest\u003e, IEquatable\u003cCreateFolderRequest\u003e, IDeepCloneable\u003cCreateFolderRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Storage v2 API class CreateFolderRequest.\n\nRequest message for CreateFolder. This operation is only applicable to a\nhierarchical namespace enabled bucket. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateFolderRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateFolderRequest](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.CreateFolderRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateFolderRequest](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.CreateFolderRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateFolderRequest](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.CreateFolderRequest), [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.Storage.Control.V2](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Storage.Control.V2.dll\n\nConstructors\n------------\n\n### CreateFolderRequest()\n\n public CreateFolderRequest()\n\n### CreateFolderRequest(CreateFolderRequest)\n\n public CreateFolderRequest(CreateFolderRequest other)\n\nProperties\n----------\n\n### Folder\n\n public Folder Folder { get; set; }\n\nRequired. Properties of the new folder being created.\nThe bucket and name of the folder are specified in the parent and folder_id\nfields, respectively. Populating those fields in `folder` will result in an\nerror.\n\n### FolderId\n\n public string FolderId { get; set; }\n\nRequired. The full name of a folder, including all its parent folders.\nFolders use single '/' characters as a delimiter.\nThe folder_id must end with a slash.\nFor example, the folder_id of \"books/biographies/\" would create a new\n\"biographies/\" folder under the \"books/\" folder.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. Name of the bucket in which the folder will reside. The bucket\nmust be a hierarchical namespace enabled bucket.\n\n### ParentAsBucketName\n\n public BucketName ParentAsBucketName { get; set; }\n\n[BucketName](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.BucketName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.CreateFolderRequest#Google_Cloud_Storage_Control_V2_CreateFolderRequest_Parent) resource name property.\n\n### Recursive\n\n public bool Recursive { get; set; }\n\nOptional. If true, parent folder doesn't have to be present and all missing\nancestor folders will be created atomically.\n\n### RequestId\n\n public string RequestId { get; set; }\n\nOptional. A unique identifier for this request. UUID is the recommended\nformat, but other formats are still accepted."]]