Class: Azure::ServiceBus::Relay

Inherits:
Resource
  • Object
show all
Defined in:
lib/azure/service_bus/relay.rb

Instance Attribute Summary

Attributes inherited from Resource

#author_name, #description, #id, #name, #published, #updated

Instance Method Summary collapse

Methods inherited from Resource

#get_props

Constructor Details

#initialize(name, options = {}) ⇒ Relay

Public: Initialize the relay endpoint.

Attributes

  • name - A String with the name of the relay endpoint.

  • options - The resource options Hash

Options

Accepted key/value pairs in options parameter are:

  • :relay_type - String. Determines the type of the relay endpoint. This is required.

  • :requires_client_authorization - Boolean. Determines whether or not clients need to authenticate when making calls.

  • :requires_transport_security - Boolean. Determines whether or not the endpoint uses transport security.



34
35
36
37
38
39
40
# File 'lib/azure/service_bus/relay.rb', line 34

def initialize(name, options = {})
  normalized_options = {}
  normalized_options["RelayType"] = options[:relay_type].to_s
  normalized_options["RequiresClientAuthorization"] = options[:requires_client_authorization].to_s if options.has_key?(:requires_client_authorization)
  normalized_options["RequiresTransportSecurity"] = options[:requires_transport_security].to_s if options.has_key?(:requires_transport_security)
  super(name, normalized_options)
end

Instance Method Details

#ordered_propsObject



79
80
81
82
83
84
85
# File 'lib/azure/service_bus/relay.rb', line 79

def ordered_props
  [
    'RelayType',
    'RequiresClientAuthorization',
    'RequiresTransportSecurity'
  ]
end

#relay_typeObject

RelayType: String

Displays the relay type of the endpoint.



45
46
47
# File 'lib/azure/service_bus/relay.rb', line 45

def relay_type
  description['RelayType']
end

#relay_type=(val) ⇒ Object



49
50
51
# File 'lib/azure/service_bus/relay.rb', line 49

def relay_type=(val)
  _set 'RelayType', val
end

#requires_client_authorizationObject

RequiresClientAuthorization: Boolean

Determines whether or not clients need to authenticate when making calls.

Default: true



58
59
60
# File 'lib/azure/service_bus/relay.rb', line 58

def requires_client_authorization
  to_bool description['RequiresClientAuthorization']
end

#requires_client_authorization=(val) ⇒ Object



62
63
64
# File 'lib/azure/service_bus/relay.rb', line 62

def requires_client_authorization=(val)
  _set 'RequiresClientAuthorization', val
end

#requires_transport_securityObject

RequiresTransportSecurity: Boolean

Determines whether or not the endpoint uses transport security.

Default: true



71
72
73
# File 'lib/azure/service_bus/relay.rb', line 71

def requires_transport_security
  to_bool description['RequiresTransportSecurity']
end

#requires_transport_security=(val) ⇒ Object



75
76
77
# File 'lib/azure/service_bus/relay.rb', line 75

def requires_transport_security=(val)
  _set 'RequiresTransportSecurity', val
end