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
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 154 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.
187 188 189 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 187 def account_sid @properties['account_sid'] end |
#aws_credentials_sid ⇒ String
Returns SID of the Stored Credential resource CRxx.
199 200 201 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 199 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.
205 206 207 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 205 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.
211 212 213 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 211 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
178 179 180 181 182 183 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 178 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.
257 258 259 260 261 262 263 264 265 266 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 257 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.
223 224 225 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 223 def encryption_enabled @properties['encryption_enabled'] end |
#encryption_key_sid ⇒ String
Returns SID of the Public Key resource CRxx.
217 218 219 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 217 def encryption_key_sid @properties['encryption_key_sid'] end |
#fetch ⇒ RecordingSettingsInstance
Fetch a RecordingSettingsInstance
236 237 238 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 236 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Friendly name of the configuration to be shown in the console.
193 194 195 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 193 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
277 278 279 280 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 277 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingSettingsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
270 271 272 273 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 270 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingSettingsInstance #{values}>" end |
#url ⇒ String
Returns The url.
229 230 231 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 229 def url @properties['url'] end |