Class: Twilio::REST::Video::V1::RecordingSettingsContext

Inherits:
InstanceContext show all
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

Constructor Details

#initialize(version) ⇒ RecordingSettingsContext

Initialize the RecordingSettingsContext

Parameters:

  • Version that contains the resource



72
73
74
75
76
77
78
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 72

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/RecordingSettings/Default"
end

Instance Method Details

#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.

Parameters:

  • (defaults to: nil)

    Friendly name of the configuration to be shown in the console

  • (defaults to: :unset)

    SID of the Stored Credential resource ‘CRxx`

  • (defaults to: :unset)

    SID of the Public Key resource ‘CRxx`

  • (defaults to: :unset)

    Identity of the external location 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.

  • (defaults to: :unset)

    ‘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.

  • (defaults to: :unset)

    ‘true|false` When set to `true`, all Recordings will be stored encrypted. Dafault value is `false`

Returns:

  • Newly created RecordingSettingsInstance



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 112

def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
  data = Twilio::Values.of({
      'FriendlyName' => friendly_name,
      'AwsCredentialsSid' => aws_credentials_sid,
      'EncryptionKeySid' => encryption_key_sid,
      'AwsS3Url' => aws_s3_url,
      'AwsStorageEnabled' => aws_storage_enabled,
      'EncryptionEnabled' => encryption_enabled,
  })

  payload = @version.create(
      'POST',
      @uri,
      data: data
  )

  RecordingSettingsInstance.new(@version, payload, )
end

#fetchRecordingSettingsInstance

Fetch a RecordingSettingsInstance

Returns:

  • Fetched RecordingSettingsInstance



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 83

def fetch
  params = Twilio::Values.of({})

  payload = @version.fetch(
      'GET',
      @uri,
      params,
  )

  RecordingSettingsInstance.new(@version, payload, )
end

#inspectObject

Provide a detailed, user friendly representation



140
141
142
143
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 140

def inspect
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Video.V1.RecordingSettingsContext #{context}>"
end

#to_sObject

Provide a user friendly representation



133
134
135
136
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 133

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Video.V1.RecordingSettingsContext #{context}>"
end