Class: Twilio::REST::Video::V1::RecordingSettingsInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/video/v1/recording_settings.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ RecordingSettingsInstance

Initialize the RecordingSettingsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this RecordingSettings resource.

  • sid (String)

    The SID of the Call resource to fetch.



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 159

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_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RecordingSettings resource.

Returns:



192
193
194
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 192

def 
    @properties['account_sid']
end

#aws_credentials_sidString

Returns The SID of the stored Credential resource.

Returns:

  • (String)

    The SID of the stored Credential resource.



204
205
206
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 204

def aws_credentials_sid
    @properties['aws_credentials_sid']
end

#aws_s3_urlString

Returns The URL of the AWS S3 bucket where the recordings are stored. We only support DNS-compliant URLs like ‘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 [RFC 3986](tools.ietf.org/html/rfc3986#section-2).

Returns:



210
211
212
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 210

def aws_s3_url
    @properties['aws_s3_url']
end

#aws_storage_enabledBoolean

Returns Whether all recordings are written to the ‘aws_s3_url`. When `false`, all recordings are stored in our cloud.

Returns:

  • (Boolean)

    Whether all recordings are written to the ‘aws_s3_url`. When `false`, all recordings are stored in our cloud.



216
217
218
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 216

def aws_storage_enabled
    @properties['aws_storage_enabled']
end

#contextRecordingSettingsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



183
184
185
186
187
188
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 183

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

Create the RecordingSettingsInstance

Parameters:

  • friendly_name (String) (defaults to: nil)

    A descriptive string that you create to describe the resource and be shown to users in the console

  • aws_credentials_sid (String) (defaults to: :unset)

    The SID of the stored Credential resource.

  • encryption_key_sid (String) (defaults to: :unset)

    The SID of the Public Key resource to use for encryption.

  • aws_s3_url (String) (defaults to: :unset)

    The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like ‘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 [RFC 3986](tools.ietf.org/html/rfc3986#section-2).

  • aws_storage_enabled (Boolean) (defaults to: :unset)

    Whether all recordings should be written to the ‘aws_s3_url`. When `false`, all recordings are stored in our cloud.

  • encryption_enabled (Boolean) (defaults to: :unset)

    Whether all recordings should be stored in an encrypted form. The default is ‘false`.

Returns:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 247

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_enabledBoolean

Returns Whether all recordings are stored in an encrypted form. The default is ‘false`.

Returns:

  • (Boolean)

    Whether all recordings are stored in an encrypted form. The default is ‘false`.



228
229
230
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 228

def encryption_enabled
    @properties['encryption_enabled']
end

#encryption_key_sidString

Returns The SID of the Public Key resource used for encryption.

Returns:

  • (String)

    The SID of the Public Key resource used for encryption.



222
223
224
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 222

def encryption_key_sid
    @properties['encryption_key_sid']
end

#fetchRecordingSettingsInstance

Fetch the RecordingSettingsInstance

Returns:



269
270
271
272
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 269

def fetch

    context.fetch
end

#friendly_nameString

Returns The string that you assigned to describe the resource and show the user in the console.

Returns:

  • (String)

    The string that you assigned to describe the resource and show the user in the console



198
199
200
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 198

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



283
284
285
286
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 283

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.RecordingSettingsInstance #{values}>"
end

#to_sObject

Provide a user friendly representation



276
277
278
279
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 276

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.RecordingSettingsInstance #{values}>"
end

#urlString

Returns The absolute URL of the resource.

Returns:

  • (String)

    The absolute URL of the resource.



234
235
236
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 234

def url
    @properties['url']
end