cloudkms.projects.locations.key Rings.crypto Keys.create

POST {{baseUrl}}/v1/:parent/cryptoKeys?cryptoKeyId=<string>&skipInitialVersionCreation=<boolean>&$.xgafv=<string>&access_token=<string>&alt=<string>&callback=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>&quotaUser=<string>&upload_protocol=<string>&uploadType=<string>

Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required.

Request Params

KeyDatatypeRequiredDescription
cryptoKeyIdstringRequired. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}
skipInitialVersionCreationstringIf set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey.
$.xgafvstringV1 error format.
access_tokenstringOAuth access token.
altstringData format for response.
callbackstringJSONP
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
upload_protocolstringUpload protocol for media (e.g. "raw", "multipart").
uploadTypestringLegacy upload protocol for media (e.g. "media", "multipart").

Request Body

{"labels"=>"<object>", "nextRotationTime"=>"<string>", "purpose"=>"<string>", "rotationPeriod"=>"<string>", "versionTemplate"=>{"algorithm"=>"RSA_SIGN_PKCS1_4096_SHA256", "protectionLevel"=>"SOFTWARE"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;createTime&quot;:&quot;incididunt velit Lorem&quot;,&quot;labels&quot;:&quot;\u003cobject\u003e&quot;,&quot;name&quot;:&quot;reprehenderit in eiusmod officia esse&quot;,&quot;nextRotationTime&quot;:&quot;\u003cstring\u003e&quot;,&quot;primary&quot;:{&quot;algorithm&quot;:&quot;CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED&quot;,&quot;attestation&quot;:{&quot;certChains&quot;:{&quot;caviumCerts&quot;:[&quot;nisi culpa&quot;,&quot;consequat ut labore&quot;],&quot;googleCardCerts&quot;:[&quot;dolore proident dolor&quot;,&quot;cillum&quot;],&quot;googlePartitionCerts&quot;:[&quot;deserunt fugiat minim cupidatat&quot;,&quot;in nulla ea sunt&quot;]},&quot;content&quot;:&quot;fugiat qui laboris dolor&quot;,&quot;format&quot;:&quot;ATTESTATION_FORMAT_UNSPECIFIED&quot;},&quot;createTime&quot;:&quot;consectetur elit veniam&quot;,&quot;destroyEventTime&quot;:&quot;qui ad Ut aute&quot;,&quot;destroyTime&quot;:&quot;ut&quot;,&quot;externalProtectionLevelOptions&quot;:{&quot;externalKeyUri&quot;:&quot;\u003cstring\u003e&quot;},&quot;generateTime&quot;:&quot;voluptate&quot;,&quot;importFailureReason&quot;:&quot;adipisicing commodo id&quot;,&quot;importJob&quot;:&quot;dolore exercitation voluptate&quot;,&quot;importTime&quot;:&quot;sit magna&quot;,&quot;name&quot;:&quot;ea elit proident&quot;,&quot;protectionLevel&quot;:&quot;EXTERNAL&quot;,&quot;state&quot;:&quot;\u003cstring\u003e&quot;},&quot;purpose&quot;:&quot;\u003cstring\u003e&quot;,&quot;rotationPeriod&quot;:&quot;\u003cstring\u003e&quot;,&quot;versionTemplate&quot;:{&quot;algorithm&quot;:&quot;RSA_SIGN_PKCS1_4096_SHA256&quot;,&quot;protectionLevel&quot;:&quot;EXTERNAL&quot;}}