class Twilio::REST::Accounts::V1::CredentialList::AwsContext
Public Class Methods
new(version, sid)
click to toggle source
Initialize the AwsContext
@param [Version] version Version
that contains the resource @param [String] sid The Twilio-provided string that uniquely identifies the AWS
resource to fetch.
@return [AwsContext] AwsContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 173 def initialize(version, sid) 174 super(version) 175 176 # Path Solution 177 @solution = {sid: sid, } 178 @uri = "/Credentials/AWS/#{@solution[:sid]}" 179 end
Public Instance Methods
delete()
click to toggle source
Delete the AwsInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 206 def delete 207 @version.delete('DELETE', @uri) 208 end
fetch()
click to toggle source
Fetch the AwsInstance
@return [AwsInstance] Fetched AwsInstance
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 184 def fetch 185 payload = @version.fetch('GET', @uri) 186 187 AwsInstance.new(@version, payload, sid: @solution[:sid], ) 188 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 219 def inspect 220 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 221 "#<Twilio.Accounts.V1.AwsContext #{context}>" 222 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 212 def to_s 213 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 214 "#<Twilio.Accounts.V1.AwsContext #{context}>" 215 end
update(friendly_name: :unset)
click to toggle source
Update the AwsInstance
@param [String] friendly_name A descriptive string that you create to describe
the resource. It can be up to 64 characters long.
@return [AwsInstance] Updated AwsInstance
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 195 def update(friendly_name: :unset) 196 data = Twilio::Values.of({'FriendlyName' => friendly_name, }) 197 198 payload = @version.update('POST', @uri, data: data) 199 200 AwsInstance.new(@version, payload, sid: @solution[:sid], ) 201 end