class Twilio::REST::Video::V1::RecordingSettingsContext

Public Class Methods

new(version) click to toggle source

Initialize the RecordingSettingsContext @param [Version] version Version that contains the resource @return [RecordingSettingsContext] RecordingSettingsContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/video/v1/recording_settings.rb
66 def initialize(version)
67   super(version)
68 
69   # Path Solution
70   @solution = {}
71   @uri = "/RecordingSettings/Default"
72 end

Public Instance Methods

create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) click to toggle source

Create the RecordingSettingsInstance @param [String] friendly_name A descriptive string that you create to describe

the resource and be shown to users in the console

@param [String] aws_credentials_sid The SID of the stored Credential resource. @param [String] encryption_key_sid The SID of the Public Key resource to use for

encryption.

@param [String] aws_s3_url The URL of the AWS S3 bucket where the recordings

should be stored. We only support DNS-compliant URLs like
`https://documentation-example-twilio-bucket/recordings`, where `recordings` is
the path in which you want the recordings to be stored. This URL accepts only
URI-valid characters, as described in the <a
href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.

@param [Boolean] aws_storage_enabled Whether all recordings should be written to

the `aws_s3_url`. When `false`, all recordings are stored in our cloud.

@param [Boolean] encryption_enabled Whether all recordings should be stored in

an encrypted form. The default is `false`.

@return [RecordingSettingsInstance] Created RecordingSettingsInstance

    # File lib/twilio-ruby/rest/video/v1/recording_settings.rb
101 def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
102   data = Twilio::Values.of({
103       'FriendlyName' => friendly_name,
104       'AwsCredentialsSid' => aws_credentials_sid,
105       'EncryptionKeySid' => encryption_key_sid,
106       'AwsS3Url' => aws_s3_url,
107       'AwsStorageEnabled' => aws_storage_enabled,
108       'EncryptionEnabled' => encryption_enabled,
109   })
110 
111   payload = @version.create('POST', @uri, data: data)
112 
113   RecordingSettingsInstance.new(@version, payload, )
114 end
fetch() click to toggle source

Fetch the RecordingSettingsInstance @return [RecordingSettingsInstance] Fetched RecordingSettingsInstance

   # File lib/twilio-ruby/rest/video/v1/recording_settings.rb
77 def fetch
78   payload = @version.fetch('GET', @uri)
79 
80   RecordingSettingsInstance.new(@version, payload, )
81 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/video/v1/recording_settings.rb
125 def inspect
126   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
127   "#<Twilio.Video.V1.RecordingSettingsContext #{context}>"
128 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/video/v1/recording_settings.rb
118 def to_s
119   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
120   "#<Twilio.Video.V1.RecordingSettingsContext #{context}>"
121 end