Class: Fastly::ACL
- Inherits:
-
BelongsToServiceAndVersion
- Object
- Base
- BelongsToServiceAndVersion
- Fastly::ACL
- Defined in:
- lib/fastly/acl.rb
Overview
Acces Control List configuration
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
Attributes inherited from BelongsToServiceAndVersion
Attributes inherited from Base
Instance Method Summary collapse
-
#create_entry(opts = {}) ⇒ Object
Create an ACL entry and add it to the ACL.
-
#delete_entry(entry) ⇒ Object
Delete an ACL entry.
-
#get_entry(entry_id) ⇒ Object
Retrieve an ACL entry.
-
#list_entries ⇒ Object
List ACL entries that belong to the ACL.
-
#update_entry(entry) ⇒ Object
Update an ACL entry.
Methods inherited from BelongsToServiceAndVersion
#as_hash, delete_path, get_path, path_escape, post_path, put_path, #service, #version_number
Methods inherited from Base
#as_hash, #delete!, delete_path, get_path, #initialize, list_path, path, post_path, put_path, #require_api_key!, #save!
Constructor Details
This class inherits a constructor from Fastly::Base
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/fastly/acl.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/fastly/acl.rb', line 4 def name @name end |
#service_id ⇒ Object
Returns the value of attribute service_id.
4 5 6 |
# File 'lib/fastly/acl.rb', line 4 def service_id @service_id end |
Instance Method Details
#create_entry(opts = {}) ⇒ Object
Create an ACL entry and add it to the ACL
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fastly/acl.rb', line 30 def create_entry(opts = {}) fetcher.create_acl_entry( service_id: service_id, acl_id: id, ip: opts[:ip], negated: opts[:negated], subnet: opts[:subnet], comment: opts[:comment] ) end |
#delete_entry(entry) ⇒ Object
Delete an ACL entry
58 59 60 |
# File 'lib/fastly/acl.rb', line 58 def delete_entry(entry) fetcher.delete_acl_entry(entry) end |
#get_entry(entry_id) ⇒ Object
Retrieve an ACL entry
44 45 46 |
# File 'lib/fastly/acl.rb', line 44 def get_entry(entry_id) fetcher.get_acl_entry(service_id, id, entry_id) end |
#list_entries ⇒ Object
List ACL entries that belong to the ACL
23 24 25 |
# File 'lib/fastly/acl.rb', line 23 def list_entries fetcher.list_acl_entries(:service_id => service_id, :acl_id => id) end |
#update_entry(entry) ⇒ Object
Update an ACL entry
51 52 53 |
# File 'lib/fastly/acl.rb', line 51 def update_entry(entry) fetcher.update_acl_entry(entry) end |