public sealed class CreateMembershipRequest : IMessage<CreateMembershipRequest>, IEquatable<CreateMembershipRequest>, IDeepCloneable<CreateMembershipRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the GKE Hub v1 API class CreateMembershipRequest.
Request message for the GkeHub.CreateMembership method.
Optional. A request ID to identify requests. Specify a unique request ID
so that if you must retry your request, the server will know to ignore
the request if it has already been completed. The server will guarantee
that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and
the request times out. If you make the request again with the same request
ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents
clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is
not supported (00000000-0000-0000-0000-000000000000).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eCreateMembershipRequest\u003c/code\u003e class within the Google GKE Hub v1 API, specifically for .NET.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateMembershipRequest\u003c/code\u003e is a request message used in the \u003ccode\u003eGkeHub.CreateMembership\u003c/code\u003e method, and it's the core element for creating a new membership.\u003c/p\u003e\n"],["\u003cp\u003eThe class has properties such as \u003ccode\u003eMembershipId\u003c/code\u003e, \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003eParentAsLocationName\u003c/code\u003e, \u003ccode\u003eRequestId\u003c/code\u003e, and \u003ccode\u003eResource\u003c/code\u003e, each serving a specific purpose in defining the membership creation request.\u003c/p\u003e\n"],["\u003cp\u003eThe document includes information on inheritance and implemented interfaces of the \u003ccode\u003eCreateMembershipRequest\u003c/code\u003e class, and it also provides details on the constructors available for creating instances of this class.\u003c/p\u003e\n"],["\u003cp\u003eThere are several versions of this document available, ranging from version 1.0.0 up to the most recent version of 2.5.0, for the dotnet reference documentation of the \u003ccode\u003eCreateMembershipRequest\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GKE Hub v1 API - Class CreateMembershipRequest (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.4.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.3.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.2.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.1.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.0.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.2.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.1.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.0.0/Google.Cloud.GkeHub.V1.CreateMembershipRequest) \n\n public sealed class CreateMembershipRequest : IMessage\u003cCreateMembershipRequest\u003e, IEquatable\u003cCreateMembershipRequest\u003e, IDeepCloneable\u003cCreateMembershipRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the GKE Hub v1 API class CreateMembershipRequest.\n\nRequest message for the `GkeHub.CreateMembership` method. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateMembershipRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateMembershipRequest](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.CreateMembershipRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateMembershipRequest](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.CreateMembershipRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateMembershipRequest](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.CreateMembershipRequest), [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.GkeHub.V1](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.GkeHub.V1.dll\n\nConstructors\n------------\n\n### CreateMembershipRequest()\n\n public CreateMembershipRequest()\n\n### CreateMembershipRequest(CreateMembershipRequest)\n\n public CreateMembershipRequest(CreateMembershipRequest other)\n\nProperties\n----------\n\n### MembershipId\n\n public string MembershipId { get; set; }\n\nRequired. Client chosen ID for the membership. `membership_id` must be a\nvalid RFC 1123 compliant DNS label:\n\n1. At most 63 characters in length\n2. It must consist of lower case alphanumeric characters or `-`\n3. It must start and end with an alphanumeric character\n\nWhich can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`,\nwith a maximum length of 63 characters.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The parent (project and location) where the Memberships will be\ncreated. Specified in the format `projects/*/locations/*`.\n\n### ParentAsLocationName\n\n public LocationName ParentAsLocationName { get; set; }\n\n[LocationName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/ResourceNames/LocationName.cs)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.CreateMembershipRequest#Google_Cloud_GkeHub_V1_CreateMembershipRequest_Parent) resource name property.\n\n### RequestId\n\n public string RequestId { get; set; }\n\nOptional. A request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore\nthe request if it has already been completed. The server will guarantee\nthat for at least 60 minutes after the first request.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).\n\n### Resource\n\n public Membership Resource { get; set; }\n\nRequired. The membership to create."]]