Class: AWSCDK::AppSync::AppSyncBaseDataSource
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::AppSync::AppSyncBaseDataSource
- Defined in:
- app_sync/app_sync_base_data_source.rb
Overview
Abstract AppSync datasource implementation.
Do not use directly but use subclasses for concrete datasources
Direct Known Subclasses
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
-
#initialize(scope, id, props, extended) ⇒ AppSyncBaseDataSource
constructor
A new instance of AppSyncBaseDataSource.
-
#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, extended) ⇒ AppSyncBaseDataSource
Returns a new instance of AppSyncBaseDataSource.
14 15 16 17 18 19 20 21 22 |
# File 'app_sync/app_sync_base_data_source.rb', line 14 def initialize(scope, id, props, extended) props = props.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncBackedDataSourceProps.new(**props.transform_keys(&:to_sym)) : props extended = extended.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncExtendedDataSourceProps.new(**extended.transform_keys(&:to_sym)) : extended 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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jQmFja2VkRGF0YVNvdXJjZVByb3BzIn0=")), "props") Jsii::Type.check_type(extended, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jRXh0ZW5kZWREYXRhU291cmNlUHJvcHMifQ==")), "extended") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props, extended) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'app_sync/app_sync_base_data_source.rb', line 24 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 }, :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.
60 61 62 |
# File 'app_sync/app_sync_base_data_source.rb', line 60 def api() jsii_get_property("api") end |
#api=(value) ⇒ Object
64 65 66 67 |
# File 'app_sync/app_sync_base_data_source.rb', line 64 def api=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5JQXBpIn0=")), "api") jsii_set_property("api", value) end |
#name ⇒ String
The name of the data source.
46 47 48 |
# File 'app_sync/app_sync_base_data_source.rb', line 46 def name() jsii_get_property("name") end |
#node ⇒ Constructs::Node
The tree node.
39 40 41 |
# File 'app_sync/app_sync_base_data_source.rb', line 39 def node() jsii_get_property("node") end |
#resource ⇒ AWSCDK::AppSync::CfnDataSource
The underlying CFN data source resource.
53 54 55 |
# File 'app_sync/app_sync_base_data_source.rb', line 53 def resource() jsii_get_property("resource") end |
#service_role ⇒ AWSCDK::IAM::IRole?
70 71 72 |
# File 'app_sync/app_sync_base_data_source.rb', line 70 def service_role() jsii_get_property("serviceRole") end |
#service_role=(value) ⇒ Object
74 75 76 77 |
# File 'app_sync/app_sync_base_data_source.rb', line 74 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.
82 83 84 |
# File 'app_sync/app_sync_base_data_source.rb', line 82 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.
95 96 97 98 99 100 |
# File 'app_sync/app_sync_base_data_source.rb', line 95 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 |