class Twilio::REST::Accounts::V1::CredentialList::AwsInstance
Public Class Methods
Initialize the AwsInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The Twilio-provided string that uniquely identifies the AWS
resource to fetch.
@return [AwsInstance] AwsInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 233 def initialize(version, payload, sid: nil) 234 super(version) 235 236 # Marshaled Properties 237 @properties = { 238 'sid' => payload['sid'], 239 'account_sid' => payload['account_sid'], 240 'friendly_name' => payload['friendly_name'], 241 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 242 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 243 'url' => payload['url'], 244 } 245 246 # Context 247 @instance_context = nil 248 @params = {'sid' => sid || @properties['sid'], } 249 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 270 def account_sid 271 @properties['account_sid'] 272 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [AwsContext] AwsContext
for this AwsInstance
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 255 def context 256 unless @instance_context 257 @instance_context = AwsContext.new(@version, @params['sid'], ) 258 end 259 @instance_context 260 end
@return [Time] The RFC 2822 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 282 def date_created 283 @properties['date_created'] 284 end
@return [Time] The RFC 2822 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 288 def date_updated 289 @properties['date_updated'] 290 end
Delete the AwsInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 317 def delete 318 context.delete 319 end
Fetch the AwsInstance
@return [AwsInstance] Fetched AwsInstance
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 301 def fetch 302 context.fetch 303 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 276 def friendly_name 277 @properties['friendly_name'] 278 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 330 def inspect 331 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 332 "<Twilio.Accounts.V1.AwsInstance #{values}>" 333 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 264 def sid 265 @properties['sid'] 266 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 323 def to_s 324 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 325 "<Twilio.Accounts.V1.AwsInstance #{values}>" 326 end
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 310 def update(friendly_name: :unset) 311 context.update(friendly_name: friendly_name, ) 312 end
@return [String] The URI for this resource, relative to `accounts.twilio.com`
# File lib/twilio-ruby/rest/accounts/v1/credential/aws.rb 294 def url 295 @properties['url'] 296 end