Class: AWSCDK::AppSync::AppSyncDynamoDBDataSource
- Inherits:
-
AppSyncBackedDataSource
- Object
- AppSyncBackedDataSource
- AWSCDK::AppSync::AppSyncDynamoDBDataSource
- Defined in:
- app_sync/app_sync_dynamo_db_data_source.rb
Overview
An AppSync datasource backed by a DynamoDB table.
Class Method Summary collapse
Instance Method Summary collapse
-
#api ⇒ AWSCDK::AppSync::IAPI
The API this data source is attached to Set the API this data source is attached to.
- #api=(value) ⇒ Object
-
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal of the data source to be IGrantable.
-
#initialize(scope, id, props) ⇒ AppSyncDynamoDBDataSource
constructor
A new instance of AppSyncDynamoDBDataSource.
-
#name ⇒ String
The name of the data source.
-
#node ⇒ Constructs::Node
The tree node.
-
#resource ⇒ AWSCDK::AppSync::CfnDataSource
The underlying CFN data source resource.
- #service_role ⇒ AWSCDK::IAM::IRole?
- #service_role=(value) ⇒ Object
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ AppSyncDynamoDBDataSource
Returns a new instance of AppSyncDynamoDBDataSource.
11 12 13 14 15 16 17 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 11 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncDynamoDBDataSourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jRHluYW1vRGJEYXRhU291cmNlUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 19 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :name => { kind: :property, name: "name", is_optional: false }, :resource => { kind: :property, name: "resource", is_optional: false }, :api => { kind: :property, name: "api", is_optional: false }, :service_role => { kind: :property, name: "serviceRole", is_optional: true }, :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, } end |
Instance Method Details
#api ⇒ AWSCDK::AppSync::IAPI
The API this data source is attached to Set the API this data source is attached to.
56 57 58 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 56 def api() jsii_get_property("api") end |
#api=(value) ⇒ Object
60 61 62 63 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 60 def api=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5JQXBpIn0=")), "api") jsii_set_property("api", value) end |
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal of the data source to be IGrantable.
78 79 80 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 78 def grant_principal() jsii_get_property("grantPrincipal") end |
#name ⇒ String
The name of the data source.
42 43 44 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 42 def name() jsii_get_property("name") end |
#node ⇒ Constructs::Node
The tree node.
35 36 37 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 35 def node() jsii_get_property("node") end |
#resource ⇒ AWSCDK::AppSync::CfnDataSource
The underlying CFN data source resource.
49 50 51 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 49 def resource() jsii_get_property("resource") end |
#service_role ⇒ AWSCDK::IAM::IRole?
66 67 68 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 66 def service_role() jsii_get_property("serviceRole") end |
#service_role=(value) ⇒ Object
70 71 72 73 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 70 def service_role=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "serviceRole") unless value.nil? jsii_set_property("serviceRole", value) end |
#to_string ⇒ String
Returns a string representation of this construct.
85 86 87 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 85 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
98 99 100 101 102 103 |
# File 'app_sync/app_sync_dynamo_db_data_source.rb', line 98 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |