public sealed class CreateKeyRequest : IMessage<CreateKeyRequest>, IEquatable<CreateKeyRequest>, IDeepCloneable<CreateKeyRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the API Keys v2 API class CreateKeyRequest.
User specified key id (optional). If specified, it will become the final
component of the key resource name.
The id must be unique within the project, must conform with RFC-1034,
is restricted to lower-cased letters, and has a maximum length of 63
characters. In another word, the id must match the regular
expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
[[["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\u003eThe \u003ccode\u003eCreateKeyRequest\u003c/code\u003e class is used as the request message for the \u003ccode\u003eCreateKey\u003c/code\u003e method in the API Keys v2 API, with version 1.0.0 being available.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements \u003ccode\u003eIMessage<CreateKeyRequest>\u003c/code\u003e, \u003ccode\u003eIEquatable<CreateKeyRequest>\u003c/code\u003e, \u003ccode\u003eIDeepCloneable<CreateKeyRequest>\u003c/code\u003e, \u003ccode\u003eIBufferMessage\u003c/code\u003e, and \u003ccode\u003eIMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateKeyRequest\u003c/code\u003e includes constructors for creating a new instance or cloning an existing instance, and has properties to define the API \u003ccode\u003eKey\u003c/code\u003e, a user-specified \u003ccode\u003eKeyId\u003c/code\u003e, and the project \u003ccode\u003eParent\u003c/code\u003e where the key will be created.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKey\u003c/code\u003e property within \u003ccode\u003eCreateKeyRequest\u003c/code\u003e allows configuration of \u003ccode\u003edisplay_name\u003c/code\u003e, \u003ccode\u003erestrictions\u003c/code\u003e, and \u003ccode\u003eannotations\u003c/code\u003e for the API key during creation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKeyId\u003c/code\u003e property must be unique, follow RFC-1034 constraints, and cannot be a UUID-like string, limited to lowercase letters and hyphens with a maximum length of 63 characters.\u003c/p\u003e\n"]]],[],null,[]]