Class: TencentCloud::Lighthouse::V20200324::CreateKeyPairRequest

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

Overview

CreateKeyPair请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyname = nil, tags = nil) ⇒ CreateKeyPairRequest

Returns a new instance of CreateKeyPairRequest.



1234
1235
1236
1237
# File 'lib/v20200324/models.rb', line 1234

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

Instance Attribute Details

#KeyNameObject

Parameters:

  • KeyName:

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

  • Tags:

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



1232
1233
1234
# File 'lib/v20200324/models.rb', line 1232

def KeyName
  @KeyName
end

#TagsObject

Parameters:

  • KeyName:

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

  • Tags:

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



1232
1233
1234
# File 'lib/v20200324/models.rb', line 1232

def Tags
  @Tags
end

Instance Method Details

#deserialize(params) ⇒ Object



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
# File 'lib/v20200324/models.rb', line 1239

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