Class: AWSCDK::Scheduler::ContextAttribute

Inherits:
Jsii::Object
  • Object
show all
Defined in:
scheduler/context_attribute.rb

Overview

A set of convenient static methods representing the Scheduler Context Attributes.

These Context Attributes keywords can be used inside a ScheduleTargetInput.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ContextAttribute

Returns a new instance of ContextAttribute.

Raises:

  • (NoMethodError)


12
13
14
# File 'scheduler/context_attribute.rb', line 12

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_scheduler.ContextAttribute does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.attempt_numberString

A counter that identifies the attempt number for the current invocation, for example, 1.

Returns:

  • (String)


35
36
37
# File 'scheduler/context_attribute.rb', line 35

def self.attempt_number()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_scheduler.ContextAttribute", "attemptNumber")
end

.execution_idString

The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, for example, d32c5kddcf5bb8c3.

Returns:

  • (String)


42
43
44
# File 'scheduler/context_attribute.rb', line 42

def self.execution_id()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_scheduler.ContextAttribute", "executionId")
end

.from_name(name) ⇒ String

Escape hatch for other Context Attributes that may be added in the future.

Parameters:

  • name (String)
    • name will replace xxx in .

Returns:

  • (String)


27
28
29
30
# File 'scheduler/context_attribute.rb', line 27

def self.from_name(name)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_scheduler.ContextAttribute", "fromName", [name])
end

.jsii_overridable_methodsObject



16
17
18
19
20
21
# File 'scheduler/context_attribute.rb', line 16

def self.jsii_overridable_methods
  {
    :name => { kind: :property, name: "name", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
  }
end

.schedule_arnString

The ARN of the schedule.

Returns:

  • (String)


49
50
51
# File 'scheduler/context_attribute.rb', line 49

def self.schedule_arn()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_scheduler.ContextAttribute", "scheduleArn")
end

.scheduled_timeString

The time you specified for the schedule to invoke its target, for example, 2022-03-22T18:59:43Z.

Returns:

  • (String)


56
57
58
# File 'scheduler/context_attribute.rb', line 56

def self.scheduled_time()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_scheduler.ContextAttribute", "scheduledTime")
end

Instance Method Details

#nameString

Returns:

  • (String)


61
62
63
# File 'scheduler/context_attribute.rb', line 61

def name()
  jsii_get_property("name")
end

#to_stringString

Convert the path to the field in the event pattern to JSON.

Returns:

  • (String)


68
69
70
# File 'scheduler/context_attribute.rb', line 68

def to_string()
  jsii_call_method("toString", [])
end