Class: AWS::SimpleWorkflow::Type

Inherits:
Resource
  • Object
show all
Defined in:
lib/aws/simple_workflow/type.rb

Overview

Base class for WorkflowType and ActivityType objects.

Direct Known Subclasses

ActivityType, WorkflowType

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain, name, version, options = {}) ⇒ Type

Returns a new instance of Type.

Parameters:

  • domain (Domain)

    The domain this type is registered to.

  • name (String)

    The name of this type.

  • version (String)

    The version of this type.



23
24
25
26
27
28
# 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

Instance Attribute Details

#domainDomain (readonly)

Returns the domain this type is registered to.

Returns:

  • (Domain)

    Returns the domain this type is registered to.



31
32
33
# File 'lib/aws/simple_workflow/type.rb', line 31

def domain
  @domain
end

#nameString (readonly)

Returns the name of this type.

Returns:

  • (String)

    Returns the name of this type.



34
35
36
# File 'lib/aws/simple_workflow/type.rb', line 34

def name
  @name
end

#versionString (readonly)

Returns the version of this type.

Returns:

  • (String)

    Returns the version of this type.



37
38
39
# File 'lib/aws/simple_workflow/type.rb', line 37

def version
  @version
end

Instance Method Details

#deprecatenil Also known as: delete

Note:

This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.

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.

Returns:

  • (nil)


50
51
52
53
# File 'lib/aws/simple_workflow/type.rb', line 50

def deprecate
  client.send("deprecate_#{self.class.ruby_name}", resource_options)
  nil
end

#deprecated?Boolean

Returns true if the type is deprecated.

Returns:

  • (Boolean)

    Returns true if the type is deprecated.



57
58
59
# File 'lib/aws/simple_workflow/type.rb', line 57

def deprecated?
  status == :deprecated
end