public sealed class CreateMembershipRequest : IMessage<CreateMembershipRequest>, IEquatable<CreateMembershipRequest>, IDeepCloneable<CreateMembershipRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the GKE Hub v1beta1 API class CreateMembershipRequest.
Request message for the GkeHubMembershipService.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 GKE Hub v1beta1 API, specifically for the \u003ccode\u003eGkeHubMembershipService.CreateMembership\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateMembershipRequest\u003c/code\u003e class is used to create a request for a new membership and 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.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains 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, all pertaining to the details of the membership being created and associated request data.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors available: a default constructor and a constructor that accepts another \u003ccode\u003eCreateMembershipRequest\u003c/code\u003e object for copying or cloning purposes.\u003c/p\u003e\n"],["\u003cp\u003eThere are 3 versions available of the class, with the latest being 2.0.0-beta07.\u003c/p\u003e\n"]]],[],null,["# GKE Hub v1beta1 API - Class CreateMembershipRequest (2.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest)\n- [2.0.0-beta06](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/2.0.0-beta06/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/1.0.0-beta04/Google.Cloud.GkeHub.V1Beta1.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 v1beta1 API class CreateMembershipRequest.\n\nRequest message for the `GkeHubMembershipService.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.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateMembershipRequest](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateMembershipRequest](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.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.V1Beta1](/dotnet/docs/reference/Google.Cloud.GkeHub.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.GkeHub.V1Beta1.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.V1Beta1/latest/Google.Cloud.GkeHub.V1Beta1.CreateMembershipRequest#Google_Cloud_GkeHub_V1Beta1_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."]]