创建密钥

最近更新时间:2019-08-29 17:19:15

CreateKey(创建密钥)

Request Parameters(请求参数)

KeyName

  • 用户定义的密钥名称
  • 类型:String
  • 是否必填:否
  • 缺省值:Ksc_key
  • 格式:2-128个字符,支持中英文数字特殊符号

Response Elements(返回值)

RequestId

  • 请求接口时传递过来的,用户跟踪问题
  • 类型:String

PrivateKey

  • 用户的公钥信息
  • 类型:String

Key

  • 密钥对的信息
  • 类型:Key

Example(例子)

Sample Request(请求)
http://sks.api.ksyun.com/?Action=CreateKey&Version=2015-11-01&KeyName=xw-test
Sample Response(返回)
{
    "RequestId": "01f3faaa-96b2-4b88-a580-6049a1032f14",
    "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQCTfdQIoo9FMCqUXWUDpCuGzHZowESmSqBWoRS+H5oit9qXft38\noC2qz+8lKQyamQc9UMSKXdBf2Nvn5WjT6Ms2+Rvdh3JTVgcWMH72MW+u44rC2dps\nsSHTpz5brKma6FPOCsdYvehDglvcwg77sJxD8rrj/vI1LGSgSKt64LrxTwIDAQAB\nAoGBAJKZrkjK86cswhXoYwBkjNMWpddmzJWRdZ/Fym1T0gwSPNb6RkHVIK84sRZ5\nn8qGsphykHiL2RN75NCxySlgqaM/Vz+eAgHt+PdD7XcQs/Zk4Yhq0XW5+4PuEKHH\nAaR20ynKzevtghDdzeZSvNhWB4F+J2nfpbeBcD8DWAjBjYY5AkEAxHe9A+alT1DX\nDx1hlGJjBKs2DSEQNp50LVKNDln5tMPBZ00lekSUFSoRPk3gZ7mG3qUxbC46QriB\nzKfgGP0uGwJBAMAu8L2TmE02ITZTKmD3jzv4RKQIs1odI9JLmpZj/ST15CkNlvMF\nTKrxTeFEOYWqrg9AVVTV1U597cM/eAyQrN0CQQCpLDGl2kUeNw34BeSwUMfSjVrN\nk1rSrT58iEjNwswxyx4ORW+wCL06PC785zIEHszzims0K9oe+aFLCIL/AYNhAkB0\n5Jg9VubOH9x3pIIkVK9kdI+bjkc4ynydTqsKSmsQ7hcG+WMVEeYeG4OZPtwV90jD\nsge1ABMsGOBjX9lvGxhpAkA8Un2sqZ9cTCAM8t5ef24NkPJU8M7Py2EFVykSt3xu\nF4bcCCuovxMTA2wdIkyoKXmcaeW/gBGkhulpLTNPVDyB\n-----END RSA PRIVATE KEY-----\n",
    "Key": {
        "KeyId": "0819e53d-039a-45de-a1ae-a52a460e0f2b",
        "PublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCTfdQIoo9FMCqUXWUDpCuGzHZowESmSqBWoRS+H5oit9qXft38oC2qz+8lKQyamQc9UMSKXdBf2Nvn5WjT6Ms2+Rvdh3JTVgcWMH72MW+u44rC2dpssSHTpz5brKma6FPOCsdYvehDglvcwg77sJxD8rrj/vI1LGSgSKt64LrxTw== root\n",
        "CreateTime": "2019-08-29 16:24:10",
        "KeyName": "xw-test"
    }
}

金山云,开启您的云计算之旅

注册有礼