Class: Twilio::REST::Video::V1::RecordingSettingsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RecordingSettingsInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/recording_settings.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The Twilio Account SID associated with this item.
-
#aws_credentials_sid ⇒ String
SID of the Stored Credential resource CRxx.
-
#aws_s3_url ⇒ String
URL of the S3 bucket where the recordings should be stored.
-
#aws_storage_enabled ⇒ Boolean
True|false When set to true, all Recordings will be written to the AwsS3Url specified above.
-
#context ⇒ RecordingSettingsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Retrieve a single page of RecordingSettingsInstance records from the API.
-
#encryption_enabled ⇒ Boolean
True|false When set to true, all Recordings will be stored encrypted.
-
#encryption_key_sid ⇒ String
SID of the Public Key resource CRxx.
-
#fetch ⇒ RecordingSettingsInstance
Fetch a RecordingSettingsInstance.
-
#friendly_name ⇒ String
Friendly name of the configuration to be shown in the console.
-
#initialize(version, payload) ⇒ RecordingSettingsInstance
constructor
Initialize the RecordingSettingsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload) ⇒ RecordingSettingsInstance
Initialize the RecordingSettingsInstance
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 147 def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'aws_credentials_sid' => payload['aws_credentials_sid'], 'aws_s3_url' => payload['aws_s3_url'], 'aws_storage_enabled' => payload['aws_storage_enabled'], 'encryption_key_sid' => payload['encryption_key_sid'], 'encryption_enabled' => payload['encryption_enabled'], 'url' => payload['url'], } # Context @instance_context = nil @params = {} end |
Instance Method Details
#account_sid ⇒ String
Returns The Twilio Account SID associated with this item.
180 181 182 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 180 def account_sid @properties['account_sid'] end |
#aws_credentials_sid ⇒ String
Returns SID of the Stored Credential resource CRxx.
192 193 194 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 192 def aws_credentials_sid @properties['aws_credentials_sid'] end |
#aws_s3_url ⇒ String
Returns URL of the S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings is the path where you want recordings to be stored.
198 199 200 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 198 def aws_s3_url @properties['aws_s3_url'] end |
#aws_storage_enabled ⇒ Boolean
Returns true|false When set to true, all Recordings will be written to the AwsS3Url specified above. When set to false, all Recordings will be stored in Twilio’s cloud.
204 205 206 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 204 def aws_storage_enabled @properties['aws_storage_enabled'] end |
#context ⇒ RecordingSettingsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
171 172 173 174 175 176 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 171 def context unless @instance_context @instance_context = RecordingSettingsContext.new(@version, ) end @instance_context end |
#create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Retrieve a single page of RecordingSettingsInstance records from the API. Request is executed immediately.
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 250 def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) context.create( friendly_name: friendly_name, aws_credentials_sid: aws_credentials_sid, encryption_key_sid: encryption_key_sid, aws_s3_url: aws_s3_url, aws_storage_enabled: aws_storage_enabled, encryption_enabled: encryption_enabled, ) end |
#encryption_enabled ⇒ Boolean
Returns true|false When set to true, all Recordings will be stored encrypted.
216 217 218 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 216 def encryption_enabled @properties['encryption_enabled'] end |
#encryption_key_sid ⇒ String
Returns SID of the Public Key resource CRxx.
210 211 212 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 210 def encryption_key_sid @properties['encryption_key_sid'] end |
#fetch ⇒ RecordingSettingsInstance
Fetch a RecordingSettingsInstance
229 230 231 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 229 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Friendly name of the configuration to be shown in the console.
186 187 188 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 186 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
270 271 272 273 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 270 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingSettingsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
263 264 265 266 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 263 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingSettingsInstance #{values}>" end |
#url ⇒ String
Returns The url.
222 223 224 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 222 def url @properties['url'] end |