Class: TencentCloud::Lighthouse::V20200324::ImportKeyPairRequest

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20200324/models.rb

Overview

ImportKeyPair请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyname = nil, publickey = nil, tags = nil) ⇒ ImportKeyPairRequest

Returns a new instance of ImportKeyPairRequest.



5427
5428
5429
5430
5431
# File 'lib/v20200324/models.rb', line 5427

def initialize(keyname=nil, publickey=nil, tags=nil)
  @KeyName = keyname
  @PublicKey = publickey
  @Tags = tags
end

Instance Attribute Details

#KeyNameObject

Parameters:

  • KeyName:

    密钥对名称,可由数字,字母和下划线组成,长度不超过 25 个字符。

  • PublicKey:

    密钥对的公钥内容, OpenSSH RSA 格式。

  • Tags:

    标签键和标签值。 如果指定多个标签,则会为指定资源同时创建并绑定该多个标签。 同一个资源上的同一个标签键只能对应一个标签值。如果您尝试添加已有标签键,则对应的标签值会更新为新值。 如果标签不存在会为您自动创建标签。 数组最多支持10个元素。



5425
5426
5427
# File 'lib/v20200324/models.rb', line 5425

def KeyName
  @KeyName
end

#PublicKeyObject

Parameters:

  • KeyName:

    密钥对名称,可由数字,字母和下划线组成,长度不超过 25 个字符。

  • PublicKey:

    密钥对的公钥内容, OpenSSH RSA 格式。

  • Tags:

    标签键和标签值。 如果指定多个标签,则会为指定资源同时创建并绑定该多个标签。 同一个资源上的同一个标签键只能对应一个标签值。如果您尝试添加已有标签键,则对应的标签值会更新为新值。 如果标签不存在会为您自动创建标签。 数组最多支持10个元素。



5425
5426
5427
# File 'lib/v20200324/models.rb', line 5425

def PublicKey
  @PublicKey
end

#TagsObject

Parameters:

  • KeyName:

    密钥对名称,可由数字,字母和下划线组成,长度不超过 25 个字符。

  • PublicKey:

    密钥对的公钥内容, OpenSSH RSA 格式。

  • Tags:

    标签键和标签值。 如果指定多个标签,则会为指定资源同时创建并绑定该多个标签。 同一个资源上的同一个标签键只能对应一个标签值。如果您尝试添加已有标签键,则对应的标签值会更新为新值。 如果标签不存在会为您自动创建标签。 数组最多支持10个元素。



5425
5426
5427
# File 'lib/v20200324/models.rb', line 5425

def Tags
  @Tags
end

Instance Method Details

#deserialize(params) ⇒ Object



5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
# File 'lib/v20200324/models.rb', line 5433

def deserialize(params)
  @KeyName = params['KeyName']
  @PublicKey = params['PublicKey']
  unless params['Tags'].nil?
    @Tags = []
    params['Tags'].each do |i|
      tag_tmp = Tag.new
      tag_tmp.deserialize(i)
      @Tags << tag_tmp
    end
  end
end