Class: TencentCloud::Common::Credential
- Inherits:
-
Object
- Object
- TencentCloud::Common::Credential
- Defined in:
- lib/tencent_cloud/common/credential.rb
Instance Attribute Summary collapse
-
#secret_id ⇒ Object
Returns the value of attribute secret_id.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(secret_id, secret_key, token = nil) ⇒ Credential
constructor
Tencent Cloud Credentials.
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_id ⇒ Object
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_key ⇒ Object
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 |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/tencent_cloud/common/credential.rb', line 6 def token @token end |