Module: ESP
- Defined in:
- lib/esp.rb,
lib/esp/version.rb,
lib/esp/exceptions.rb,
lib/esp/aws_clients.rb,
lib/esp/resources/tag.rb,
lib/esp/resources/role.rb,
lib/esp/resources/stat.rb,
lib/esp/resources/team.rb,
lib/esp/resources/user.rb,
lib/esp/resources/alert.rb,
lib/esp/commands/console.rb,
lib/esp/resources/region.rb,
lib/esp/resources/report.rb,
lib/esp/resources/service.rb,
lib/esp/resources/metadata.rb,
lib/esp/resources/resource.rb,
lib/esp/resources/dashboard.rb,
lib/esp/resources/signature.rb,
lib/esp/resources/stat_region.rb,
lib/esp/resources/suppression.rb,
lib/esp/resources/organization.rb,
lib/esp/resources/stat_service.rb,
lib/esp/commands/commands_tasks.rb,
lib/esp/resources/scan_interval.rb,
lib/esp/external_account_creator.rb,
lib/esp/resources/stat_signature.rb,
lib/esp/resources/contact_request.rb,
lib/esp/resources/custom_signature.rb,
lib/esp/resources/external_account.rb,
lib/esp/resources/sub_organization.rb,
lib/esp/resources/cloud_trail_event.rb,
lib/esp/resources/suppression/region.rb,
lib/esp/resources/concerns/stat_totals.rb,
lib/esp/resources/stat_custom_signature.rb,
lib/esp/resources/suppression/signature.rb,
lib/esp/resources/custom_signature/result.rb,
lib/esp/resources/reports/export/integration.rb,
lib/esp/resources/custom_signature/definition.rb,
lib/esp/resources/custom_signature/result/alert.rb,
lib/esp/resources/suppression/unique_identifier.rb
Defined Under Namespace
Classes: Alert, CloudTrailEvent, ContactRequest, CustomSignature, Dashboard, ExternalAccount, Metadata, Organization, Region, Report, Role, ScanInterval, Service, Signature, Stat, StatCustomSignature, StatRegion, StatService, StatSignature, SubOrganization, Suppression, Tag, Team, User
Constant Summary collapse
- PATH =
'/api/v2'.freeze
- VERSION =
'2.7.0'.freeze
Class Method Summary collapse
-
.access_key_id ⇒ String?
Reads the
ESP_ACCESS_KEY_ID
environment variable if ESP.access_key_id= was not set manually. -
.access_key_id=(access_key_id) ⇒ void
Manually set the access_key_id you created from esp.evident.io/settings/api_keys.
-
.configure {|self| ... } ⇒ void
For use in a Rails initializer to set the ESP.access_key_id=, ESP.secret_access_key= and ESP.site.
-
.env ⇒ String
Default environment is production which will set ESP.site to “api.evident.io/api/v2”.
-
.host=(host) ⇒ void
Users of the Evident.io marketplace appliance application will need to set the host for their instance.
-
.http_proxy ⇒ String?
Reads the
HTTP_PROXY
environment variable if ESP.http_proxy= was not set manually. -
.http_proxy=(proxy) ⇒ void
Manually set an http_proxy.
-
.secret_access_key ⇒ String?
Reads the
ESP_SECRET_ACCESS_KEY
environment variable if ESP.secret_access_key= was not set manually. -
.secret_access_key=(secret_access_key) ⇒ void
Manually set the secret_access_key you created from esp.evident.io/settings/api_keys.
-
.site ⇒ String
The site the SDK will hit.
Class Method Details
.access_key_id ⇒ String?
Reads the ESP_ACCESS_KEY_ID
environment variable if access_key_id= was not set manually.
Returns nil if no key or environment variable has been set.
18 19 20 |
# File 'lib/esp.rb', line 18 def self.access_key_id @access_key_id || ENV['ESP_ACCESS_KEY_ID'] end |
.access_key_id=(access_key_id) ⇒ void
This method returns an undefined value.
Manually set the access_key_id you created from esp.evident.io/settings/api_keys.
You can optionally set the ESP_ACCESS_KEY_ID
environment variable.
8 9 10 11 |
# File 'lib/esp.rb', line 8 def self.access_key_id=(access_key_id) @access_key_id = access_key_id ESP::Resource.hmac_access_id = access_key_id end |
.configure {|self| ... } ⇒ void
This method returns an undefined value.
For use in a Rails initializer to set the access_key_id=, secret_access_key= and site.
97 98 99 |
# File 'lib/esp.rb', line 97 def self.configure yield self end |
.env ⇒ String
Default environment is production which will set site to “api.evident.io/api/v2”.
104 105 106 |
# File 'lib/esp.rb', line 104 def self.env @env ||= ActiveSupport::StringInquirer.new(ENV['ESP_ENV'] || ENV['RAILS_ENV'] || 'production') end |
.host=(host) ⇒ void
This method returns an undefined value.
Users of the Evident.io marketplace appliance application will need to set the host for their instance.
53 54 55 56 |
# File 'lib/esp.rb', line 53 def self.host=(host) @host = host ESP::Resource.site = site end |
.http_proxy ⇒ String?
Reads the HTTP_PROXY
environment variable if http_proxy= was not set manually.
Returns nil if no proxy or environment variable has been set.
81 82 83 |
# File 'lib/esp.rb', line 81 def self.http_proxy @http_proxy || ENV['http_proxy'] end |
.http_proxy=(proxy) ⇒ void
This method returns an undefined value.
Manually set an http_proxy
You can optionally set the HTTP_PROXY
environment variable.
71 72 73 74 |
# File 'lib/esp.rb', line 71 def self.http_proxy=(proxy) @http_proxy = proxy ESP::Resource.proxy = http_proxy end |
.secret_access_key ⇒ String?
Reads the ESP_SECRET_ACCESS_KEY
environment variable if secret_access_key= was not set manually.
Returns nil if no key or environment variable has been set.
38 39 40 |
# File 'lib/esp.rb', line 38 def self.secret_access_key @secret_access_key || ENV['ESP_SECRET_ACCESS_KEY'] end |
.secret_access_key=(secret_access_key) ⇒ void
This method returns an undefined value.
Manually set the secret_access_key you created from esp.evident.io/settings/api_keys.
You can optionally set the ESP_SECRET_ACCESS_KEY
environment variable.
28 29 30 31 |
# File 'lib/esp.rb', line 28 def self.secret_access_key=(secret_access_key) @secret_access_key = secret_access_key ESP::Resource.hmac_secret_key = secret_access_key end |