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>"aUser=<string>&upload_protocol=<string>&uploadType=<string>
Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
cryptoKeyId | string | Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63} | |
skipInitialVersionCreation | string | If 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. | |
$.xgafv | string | V1 error format. | |
access_token | string | OAuth access token. | |
alt | string | Data format for response. | |
callback | string | JSONP | |
fields | string | Selector specifying which fields to include in a partial response. | |
key | string | API 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_token | string | OAuth 2.0 token for the current user. | |
prettyPrint | string | Returns response with indentations and line breaks. | |
quotaUser | string | Available 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_protocol | string | Upload protocol for media (e.g. "raw", "multipart"). | |
uploadType | string | Legacy 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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"createTime":"incididunt velit Lorem","labels":"\u003cobject\u003e","name":"reprehenderit in eiusmod officia esse","nextRotationTime":"\u003cstring\u003e","primary":{"algorithm":"CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED","attestation":{"certChains":{"caviumCerts":["nisi culpa","consequat ut labore"],"googleCardCerts":["dolore proident dolor","cillum"],"googlePartitionCerts":["deserunt fugiat minim cupidatat","in nulla ea sunt"]},"content":"fugiat qui laboris dolor","format":"ATTESTATION_FORMAT_UNSPECIFIED"},"createTime":"consectetur elit veniam","destroyEventTime":"qui ad Ut aute","destroyTime":"ut","externalProtectionLevelOptions":{"externalKeyUri":"\u003cstring\u003e"},"generateTime":"voluptate","importFailureReason":"adipisicing commodo id","importJob":"dolore exercitation voluptate","importTime":"sit magna","name":"ea elit proident","protectionLevel":"EXTERNAL","state":"\u003cstring\u003e"},"purpose":"\u003cstring\u003e","rotationPeriod":"\u003cstring\u003e","versionTemplate":{"algorithm":"RSA_SIGN_PKCS1_4096_SHA256","protectionLevel":"EXTERNAL"}}