Class: Aliyun::Log::Project
- Inherits:
-
Common::AttrStruct
- Object
- Common::AttrStruct
- Aliyun::Log::Project
- Defined in:
- lib/aliyun/log/project.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_logstore(logstore_name, opt = {}) ⇒ Object
- #delete_logstore(logstore_name) ⇒ Object
- #get_logstore(logstore_name) ⇒ Object
-
#initialize(opts, protocol) ⇒ Project
constructor
A new instance of Project.
- #list_logstores(size = nil, offset = nil) ⇒ Object
- #update_logstore(logstore_name) ⇒ Object
Methods inherited from Common::AttrStruct
Methods included from Common::AttrStruct::AttrHelper
Constructor Details
#initialize(opts, protocol) ⇒ Project
Returns a new instance of Project.
9 10 11 12 |
# File 'lib/aliyun/log/project.rb', line 9 def initialize(opts, protocol) super(opts) @protocol = protocol end |
Class Method Details
.from_json(attrs, protocol) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/aliyun/log/project.rb', line 14 def self.from_json(attrs, protocol) new({ create_time: attrs['createTime'], description: attrs['description'], last_modify_time: attrs['lastModifyTime'], owner: attrs['owner'], name: attrs['projectName'], region: attrs['region'], status: attrs['status'] }, protocol) end |
Instance Method Details
#create_logstore(logstore_name, opt = {}) ⇒ Object
34 35 36 |
# File 'lib/aliyun/log/project.rb', line 34 def create_logstore(logstore_name, opt = {}) @protocol.create_logstore(name, logstore_name, opt) end |
#delete_logstore(logstore_name) ⇒ Object
42 43 44 |
# File 'lib/aliyun/log/project.rb', line 42 def delete_logstore(logstore_name) @protocol.delete_logstore(name, logstore_name) end |
#get_logstore(logstore_name) ⇒ Object
30 31 32 |
# File 'lib/aliyun/log/project.rb', line 30 def get_logstore(logstore_name) @protocol.get_logstore(name, logstore_name) end |
#list_logstores(size = nil, offset = nil) ⇒ Object
26 27 28 |
# File 'lib/aliyun/log/project.rb', line 26 def list_logstores(size = nil, offset = nil) @protocol.list_logstores(name, size, offset) end |
#update_logstore(logstore_name) ⇒ Object
38 39 40 |
# File 'lib/aliyun/log/project.rb', line 38 def update_logstore(logstore_name) @protocol.update_logstore(name, logstore_name) end |