class AWS::SimpleWorkflow::Type

Base class for {WorkflowType} and {ActivityType} objects.

Attributes

domain[R]

@return [Domain] Returns the domain this type is registered to.

name[R]

@return [String] Returns the name of this type.

version[R]

@return [String] Returns the version of this type.

Public Class Methods

new(domain, name, version, options = {}) click to toggle source

@param [Domain] domain The domain this type is registered to. @param [String] name The name of this type. @param [String] version The version of this type.

Calls superclass method AWS::Core::Resource.new
# File lib/aws/simple_workflow/type.rb, line 23
def initialize domain, name, version, options = {}
  @domain = domain
  @name = name.to_s
  @version = version.to_s
  super
end

Protected Class Methods

ruby_name() click to toggle source
# File lib/aws/simple_workflow/type.rb, line 78
def self.ruby_name
  Core::Inflection.ruby_name(name.split(/::/).last)
end
type_key() click to toggle source
# File lib/aws/simple_workflow/type.rb, line 83
def self.type_key
  "#{ruby_name.split(/_/).first}Type"
end

Public Instance Methods

delete()
Alias for: deprecate
deprecate() click to toggle source

Deprecates the type.

After a type has been deprecated, you cannot create new executions of that type. Executions that were started before the type was deprecated will continue to run.

@note This operation is eventually consistent. The results are best

effort and may not exactly reflect recent updates and changes.

@return [nil]

# File lib/aws/simple_workflow/type.rb, line 50
def deprecate
  client.send("deprecate_#{self.class.ruby_name}", resource_options)
  nil
end
Also aliased as: delete
deprecated?() click to toggle source

@return [Boolean] Returns true if the type is deprecated.

# File lib/aws/simple_workflow/type.rb, line 57
def deprecated?
  status == :deprecated
end

Protected Instance Methods

resource_identifiers() click to toggle source
# File lib/aws/simple_workflow/type.rb, line 62
def resource_identifiers
  [[:domain,domain.name], [:name,name], [:version,version]]
end
resource_options() click to toggle source
# File lib/aws/simple_workflow/type.rb, line 67
def resource_options
  {
    :domain => domain.name,
    :"#{self.class.ruby_name}" => {
      :name => name,
      :version => version
    }
  }
end