Class: AWS::SimpleWorkflow::Domain

Inherits:
Resource show all
Includes:
OptionFormatters
Defined in:
lib/aws/simple_workflow/domain.rb

Overview

Domains are used to organize workflows types and activities for an account.

Instance Attribute Summary collapse

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods inherited from Resource

attribute, #exists?

Methods inherited from Core::Resource

attribute_providers, attribute_providers_for, attributes, #attributes_from_response, define_attribute_type, #eql?, #inspect, new_from

Methods included from Core::Cacheable

included, #retrieve_attribute

Methods included from Core::Model

#client, #config_prefix, #inspect

Constructor Details

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

Returns a new instance of Domain.



35
36
37
38
# File 'lib/aws/simple_workflow/domain.rb', line 35

def initialize name, options = {}
  @name = name.to_s
  super(options)
end

Instance Attribute Details

#descriptionString? (readonly)

Returns

Returns:

  • (String, nil)

    the current value of description



30
31
32
# File 'lib/aws/simple_workflow/domain.rb', line 30

def description
  @description
end

#nameString (readonly)

Returns the name of this domain.

Returns:

  • (String)

    Returns the name of this domain.



41
42
43
# File 'lib/aws/simple_workflow/domain.rb', line 41

def name
  @name
end

#retention_periodInteger, Symbol (readonly)

Returns the retention period for this domain. The return value may be an integer (number of days history is kept around) or the symbol :none, implying no expiry of closed workflow executions.

Returns:

  • (Integer, Symbol)

    the current value of retention_period



30
31
32
# File 'lib/aws/simple_workflow/domain.rb', line 30

def retention_period
  @retention_period
end

#statusSymbol (readonly)

Returns the domain’s status. Status will be either :registered or :deprecated.

Returns:

  • (Symbol)

    the current value of status



30
31
32
# File 'lib/aws/simple_workflow/domain.rb', line 30

def status
  @status
end

Instance Method Details

#activity_tasksActivityTaskCollection



73
74
75
# File 'lib/aws/simple_workflow/domain.rb', line 73

def activity_tasks
  ActivityTaskCollection.new(self)
end

#activity_typesActivityTypeCollection



58
59
60
# File 'lib/aws/simple_workflow/domain.rb', line 58

def activity_types
  ActivityTypeCollection.new(self)
end

#decision_tasksDecisionTaskCollection



68
69
70
# File 'lib/aws/simple_workflow/domain.rb', line 68

def decision_tasks
  DecisionTaskCollection.new(self)
end

#deprecatenil Also known as: delete

Deprecates the domain. After a domain has been deprecated it cannot be used to create new workflow executions or register new types. However, you can still use visibility actions on this domain.

Deprecating a domain also deprecates all activity and workflow types registered in the domain. Executions that were started before the domain was deprecated will continue to run.

Returns:

  • (nil)


92
93
94
95
# File 'lib/aws/simple_workflow/domain.rb', line 92

def deprecate
  client.deprecate_domain(:name => name)
  nil
end

#deprecated?Boolean

Returns true if this domain has been deprecated.

Returns:

  • (Boolean)

    Returns true if this domain has been deprecated.



78
79
80
# File 'lib/aws/simple_workflow/domain.rb', line 78

def deprecated?
  self.status == :deprecated
end

#workflow_executionsWorkflowExecutionCollection



63
64
65
# File 'lib/aws/simple_workflow/domain.rb', line 63

def workflow_executions
  WorkflowExecutionCollection.new(self)
end

#workflow_typesWorkflowTypeCollection



53
54
55
# File 'lib/aws/simple_workflow/domain.rb', line 53

def workflow_types
  WorkflowTypeCollection.new(self)
end