Class: AWSCDK::AppSync::PrimaryKey
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::AppSync::PrimaryKey
- Defined in:
- app_sync/primary_key.rb
Overview
Specifies the assignment to the primary key.
It either contains the full primary key or only the partition key.
Direct Known Subclasses
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.partition(key) ⇒ AWSCDK::AppSync::PartitionKeyStep
Allows assigning a value to the partition key.
Instance Method Summary collapse
-
#initialize(pkey, skey = nil) ⇒ PrimaryKey
constructor
A new instance of PrimaryKey.
- #pkey ⇒ AWSCDK::AppSync::Assign
-
#render_template ⇒ String
Renders the key assignment to a VTL string.
Constructor Details
#initialize(pkey, skey = nil) ⇒ PrimaryKey
Returns a new instance of PrimaryKey.
13 14 15 16 17 |
# File 'app_sync/primary_key.rb', line 13 def initialize(pkey, skey = nil) Jsii::Type.check_type(pkey, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Bc3NpZ24ifQ==")), "pkey") Jsii::Type.check_type(skey, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Bc3NpZ24ifQ==")), "skey") unless skey.nil? Jsii::Object.instance_method(:initialize).bind(self).call(pkey, skey) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 |
# File 'app_sync/primary_key.rb', line 19 def self.jsii_overridable_methods { :pkey => { kind: :property, name: "pkey", is_optional: false }, :render_template => { kind: :method, name: "renderTemplate", is_optional: false }, } end |
.partition(key) ⇒ AWSCDK::AppSync::PartitionKeyStep
Allows assigning a value to the partition key.
30 31 32 33 |
# File 'app_sync/primary_key.rb', line 30 def self.partition(key) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.PrimaryKey", "partition", [key]) end |
Instance Method Details
#pkey ⇒ AWSCDK::AppSync::Assign
36 37 38 |
# File 'app_sync/primary_key.rb', line 36 def pkey() jsii_get_property("pkey") end |
#render_template ⇒ String
Renders the key assignment to a VTL string.
43 44 45 |
# File 'app_sync/primary_key.rb', line 43 def render_template() jsii_call_method("renderTemplate", []) end |