Class: TencentCloud::Common::Credential

Inherits:
Object
  • Object
show all
Defined in:
lib/tencent_cloud/common/credential.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(secret_id, secret_key, token = nil) ⇒ Credential

Tencent Cloud Credentials. Access console.cloud.tencent.com/cam/capi to manage your credentials. :param secret_id: The secret id of your credential. :type secret_id: string :param secret_key: The secret key of your credential. :type secret_key: string :param token: The federation token of your credential, if this field

is specified, secret_id and secret_key should be set
accordingly, see: https://cloud.tencent.com/document/product/598/13896


18
19
20
21
22
# File 'lib/tencent_cloud/common/credential.rb', line 18

def initialize(secret_id, secret_key, token = nil)
  self.secret_id = secret_id if validate(:secret_id, secret_id)
  self.secret_key = secret_key if validate(:secret_key, secret_key)
  self.token = token
end

Instance Attribute Details

#secret_idObject

Returns the value of attribute secret_id.



6
7
8
# File 'lib/tencent_cloud/common/credential.rb', line 6

def secret_id
  @secret_id
end

#secret_keyObject

Returns the value of attribute secret_key.



6
7
8
# File 'lib/tencent_cloud/common/credential.rb', line 6

def secret_key
  @secret_key
end

#tokenObject

Returns the value of attribute token.



6
7
8
# File 'lib/tencent_cloud/common/credential.rb', line 6

def token
  @token
end