Module: AkamaiApi::CCU
- Extended by:
- CCU
- Included in:
- CCU
- Defined in:
- lib/akamai_api/ccu.rb,
lib/akamai_api/ccu/error.rb,
lib/akamai_api/ccu/base_response.rb,
lib/akamai_api/ccu/unrecognized_option.rb
Overview
This module contains the behavior needed to operate with the Akamai Content Control Utility (CCU) interface.
Using the Akamai CCU interface you can:
-
submit a request to clean one or more resources (CPCodes or ARLs)
-
check the status of a particular request submitted through the Akamai CCU interface
-
check the status of the Akamai CCU queue
For all operations you can directly use the helpers directly defined in this module.
For more informations about the Akamai CCU interface, you can read the Developers Guide provided by Akamai
Defined Under Namespace
Modules: Purge, PurgeStatus, Status Classes: BaseResponse, Error, UnrecognizedOption
Instance Method Summary collapse
-
#invalidate(type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more resources.
-
#invalidate_arl(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more ARLs.
-
#invalidate_cpcode(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more CPCodes.
-
#purge(action, type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Purges one or more resources.
-
#remove(type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Remove one or more resources.
-
#remove_arl(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more ARLs.
-
#remove_cpcode(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more CPCodes.
-
#status(purge_id_or_progress_uri = nil) ⇒ Object
Checks the status of the Akamai CCU queue or the status of a purge request.
Instance Method Details
#invalidate(type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more resources
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#invalidate_arl(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more ARLs
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#invalidate_cpcode(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more CPCodes
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#purge(action, type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Purges one or more resources
129 130 131 132 |
# File 'lib/akamai_api/ccu.rb', line 129 def purge action, type, items, opts = {} request = Purge::Request.new action, type, domain: opts[:domain] request.execute items end |
#remove(type, items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Remove one or more resources
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#remove_arl(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more ARLs
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#remove_cpcode(items, opts = {}) ⇒ AkamaiApi::CCU::Purge::Response
Invalidates one or more CPCodes
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/akamai_api/ccu.rb', line 100 [:invalidate, :remove].each do |action| define_method action do |type, items, opts={}| purge action, type, items, opts end [:arl, :cpcode].each do |type| define_method "#{action}_#{type}" do |items, opts={}| purge action, type, items, opts end end end |
#status ⇒ AkamaiApi::CCU::Status::Response #status(progress_uri) ⇒ AkamaiApi::CCU::PurgeStatus::Response
Checks the status of the Akamai CCU queue or the status of a purge request
148 149 150 151 152 153 154 |
# File 'lib/akamai_api/ccu.rb', line 148 def status purge_id_or_progress_uri = nil if purge_id_or_progress_uri PurgeStatus::Request.new.execute purge_id_or_progress_uri else Status::Request.new.execute end end |