Class: AWSCDK::AppSync::PartitionKey
- Inherits:
-
PrimaryKey
- Object
- PrimaryKey
- AWSCDK::AppSync::PartitionKey
- Defined in:
- app_sync/partition_key.rb
Overview
Specifies the assignment to the partition key.
It can be enhanced with the assignment of the sort key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pkey) ⇒ PartitionKey
constructor
A new instance of PartitionKey.
- #pkey ⇒ AWSCDK::AppSync::Assign
-
#render_template ⇒ String
Renders the key assignment to a VTL string.
-
#sort(key) ⇒ AWSCDK::AppSync::SortKeyStep
Allows assigning a value to the sort key.
Constructor Details
#initialize(pkey) ⇒ PartitionKey
Returns a new instance of PartitionKey.
12 13 14 15 |
# File 'app_sync/partition_key.rb', line 12 def initialize(pkey) Jsii::Type.check_type(pkey, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Bc3NpZ24ifQ==")), "pkey") Jsii::Object.instance_method(:initialize).bind(self).call(pkey) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 22 23 |
# File 'app_sync/partition_key.rb', line 17 def self.jsii_overridable_methods { :pkey => { kind: :property, name: "pkey", is_optional: false }, :render_template => { kind: :method, name: "renderTemplate", is_optional: false }, :sort => { kind: :method, name: "sort", is_optional: false }, } end |
Instance Method Details
#pkey ⇒ AWSCDK::AppSync::Assign
26 27 28 |
# File 'app_sync/partition_key.rb', line 26 def pkey() jsii_get_property("pkey") end |
#render_template ⇒ String
Renders the key assignment to a VTL string.
33 34 35 |
# File 'app_sync/partition_key.rb', line 33 def render_template() jsii_call_method("renderTemplate", []) end |
#sort(key) ⇒ AWSCDK::AppSync::SortKeyStep
Allows assigning a value to the sort key.
41 42 43 44 |
# File 'app_sync/partition_key.rb', line 41 def sort(key) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") jsii_call_method("sort", [key]) end |