Class: GetStream::Generated::Models::S3Request
- Defined in:
- lib/getstream_ruby/generated/models/s3_request.rb
Overview
Config for creating Amazon S3 storage.
Instance Attribute Summary collapse
-
#s3_api_key ⇒ String
The AWS API key.
-
#s3_custom_endpoint_url ⇒ String
The custom endpoint for S3.
-
#s3_region ⇒ String
The AWS region where the bucket is hosted.
-
#s3_secret ⇒ String
The AWS API Secret.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ S3Request
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ S3Request
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 26 def initialize(attributes = {}) super(attributes) @s3_region = attributes[:s3_region] || attributes['s3_region'] @s3_api_key = attributes[:s3_api_key] || attributes['s3_api_key'] || nil @s3_custom_endpoint_url = attributes[:s3_custom_endpoint_url] || attributes['s3_custom_endpoint_url'] || nil @s3_secret = attributes[:s3_secret] || attributes['s3_secret'] || nil end |
Instance Attribute Details
#s3_api_key ⇒ String
Returns The AWS API key. To use Amazon S3 as your storage provider, you have two authentication options: IAM role or API key. If you do not specify the ‘s3_api_key` parameter, Stream will use IAM role authentication. In that case make sure to have the correct IAM role configured for your application.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 17 def s3_api_key @s3_api_key end |
#s3_custom_endpoint_url ⇒ String
Returns The custom endpoint for S3. If you want to use a custom endpoint, you must also provide the ‘s3_api_key` and `s3_secret` parameters.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 20 def s3_custom_endpoint_url @s3_custom_endpoint_url end |
#s3_region ⇒ String
Returns The AWS region where the bucket is hosted.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 14 def s3_region @s3_region end |
#s3_secret ⇒ String
Returns The AWS API Secret.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 23 def s3_secret @s3_secret end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
35 36 37 38 39 40 41 42 |
# File 'lib/getstream_ruby/generated/models/s3_request.rb', line 35 def self.json_field_mappings { s3_region: 's3_region', s3_api_key: 's3_api_key', s3_custom_endpoint_url: 's3_custom_endpoint_url', s3_secret: 's3_secret' } end |