Class: Softlayer::Network::ContentDelivery::Authentication::Token

Inherits:
Entity
  • Object
show all
Defined in:
lib/softlayer/network/content_delivery/authentication/token.rb

Defined Under Namespace

Classes: Representer

Constant Summary collapse

SERVICE =
'SoftLayer_Network_ContentDelivery_Authentication_Token'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

all, all_request_for, create, find, #init_headers, parse, request, #request, service_name, #service_name, #to_hash

Methods included from Model::Operations

extended, #filter, included, #limit, #mask, #request_headers

Instance Attribute Details

#cdn_account_idObject

Returns the value of attribute cdn_account_id.



7
8
9
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 7

def 
  @cdn_account_id
end

#client_ipObject

Returns the value of attribute client_ip.



8
9
10
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 8

def client_ip
  @client_ip
end

#create_dateObject

Returns the value of attribute create_date.



9
10
11
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 9

def create_date
  @create_date
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 10

def name
  @name
end

#referrerObject

Returns the value of attribute referrer.



11
12
13
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 11

def referrer
  @referrer
end

#tokenObject

Returns the value of attribute token.



12
13
14
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 12

def token
  @token
end

Class Method Details

.create_object(template_object = nil) ⇒ Object



14
15
16
17
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 14

def self.create_object(template_object = nil)
  message = {template_object: template_object}
  request(:create_object, Softlayer::Network::ContentDelivery::Authentication::Token, message)
end

.get_all_managed_tokens(cdn_account_id = nil) ⇒ Object



19
20
21
22
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 19

def self.get_all_managed_tokens( = nil)
  message = {cdn_account_id: }
  request(:get_all_managed_tokens, Array[Softlayer::Network::ContentDelivery::Authentication::Token], message)
end

.get_timed_token(cdn_account_id = nil, token_life = nil, client_ip = nil, referrer = nil, media_type = nil) ⇒ Object



28
29
30
31
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 28

def self.get_timed_token( = nil, token_life = nil, client_ip = nil, referrer = nil, media_type = nil)
  message = {cdn_account_id: , token_life: token_life, client_ip: client_ip, referrer: referrer, media_type: media_type}
  request(:get_timed_token, String, message)
end

.revoke_all_managed_tokens(cdn_account_id = nil) ⇒ Object



33
34
35
36
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 33

def self.revoke_all_managed_tokens( = nil)
  message = {cdn_account_id: }
  request(:revoke_all_managed_tokens, Boolean, message)
end

.revoke_all_tokens(cdn_account_id = nil, media_type = nil) ⇒ Object



38
39
40
41
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 38

def self.revoke_all_tokens( = nil, media_type = nil)
  message = {cdn_account_id: , media_type: media_type}
  request(:revoke_all_tokens, Boolean, message)
end

.revoke_managed_token(cdn_account_id = nil, token = nil) ⇒ Object



43
44
45
46
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 43

def self.revoke_managed_token( = nil, token = nil)
  message = {cdn_account_id: , token: token}
  request(:revoke_managed_token, Boolean, message)
end

.revoke_managed_tokens(template_objects = nil) ⇒ Object



48
49
50
51
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 48

def self.revoke_managed_tokens(template_objects = nil)
  message = {template_objects: template_objects}
  request(:revoke_managed_tokens, Boolean, message)
end

Instance Method Details

#get_objectObject



24
25
26
# File 'lib/softlayer/network/content_delivery/authentication/token.rb', line 24

def get_object
  request(:get_object, Softlayer::Network::ContentDelivery::Authentication::Token)
end