导入密钥

最近更新时间:2019-08-29 17:22:13

ImportKey(导入密钥)

Request Parameters(请求参数)

KeyName

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

PublicKey

  • 用户的公钥信息
  • 类型:String
  • 是否必填:是

Response Elements(返回值)

RequestId

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

Key

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

Example(例子)

Sample Request(请求)
http://sks.api.ksyun.com/?Version=2015-11-01&Action=ImportKey&KeyName=chenglulu-test&PublicKey=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCBfVhotQAc3rzSE7fb5GQiS7JBhtXor04nDL3U8FfBfxlYjjNKbrbZnMSlGDeABVxbaV9O4BMHdt1PBPPqQmTaNxU86CenzSsTuo0MrFTtV1rqwfUL6TuyWsfLP215PGuQFlyzv8E4AEj4O6ozlW4HKFqggxvXWRrVs6p8S41diQ== root
Sample Response(返回)
{
    "RequestId": "f64ad7f7-9865-4578-b9f5-3576329d91df",
    "Key": {
        "KeyId": "4b2441be-0b4a-499e-bc45-ccb419674d7e",
        "PublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCBfVhotQAc3rzSE7fb5GQiS7JBhtXor04nDL3U8FfBfxlYjjNKbrbZnMSlGDeABVxbaV9O4BMHdt1PBPPqQmTaNxU86CenzSsTuo0MrFTtV1rqwfUL6TuyWsfLP215PGuQFlyzv8E4AEj4O6ozlW4HKFqggxvXWRrVs6p8S41diQ== root",
        "CreateTime": "2019-08-29 17:12:58",
        "KeyName": "chenglulu-test"
    }
}

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

注册有礼