Class: AWSCDK::AppSync::DataSourceOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::DataSourceOptions
- Defined in:
- app_sync/data_source_options.rb
Overview
Optional configuration for data sources.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
The description of the data source.
-
#metrics_config ⇒ AWSCDK::AppSync::DataSourceMetricsConfig?
readonly
Whether to enable enhanced metrics of the data source Value will be ignored, if
enhancedMetricsConfig.dataSourceLevelMetricsBehavioron AppSync GraphqlApi construct is set toFULL_REQUEST_DATA_SOURCE_METRICS. -
#name ⇒ String?
readonly
The name of the data source, overrides the id given by cdk.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, metrics_config: nil, name: nil) ⇒ DataSourceOptions
constructor
A new instance of DataSourceOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, metrics_config: nil, name: nil) ⇒ DataSourceOptions
Returns a new instance of DataSourceOptions.
10 11 12 13 14 15 16 17 |
# File 'app_sync/data_source_options.rb', line 10 def initialize(description: nil, metrics_config: nil, name: nil) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @metrics_config = metrics_config Jsii::Type.check_type(@metrics_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5EYXRhU291cmNlTWV0cmljc0NvbmZpZyJ9")), "metricsConfig") unless @metrics_config.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - No description
The description of the data source.
23 24 25 |
# File 'app_sync/data_source_options.rb', line 23 def description @description end |
#metrics_config ⇒ AWSCDK::AppSync::DataSourceMetricsConfig? (readonly)
Default: - Enhance metrics are disabled
Whether to enable enhanced metrics of the data source Value will be ignored, if enhancedMetricsConfig.dataSourceLevelMetricsBehavior on AppSync GraphqlApi construct is set to FULL_REQUEST_DATA_SOURCE_METRICS.
28 29 30 |
# File 'app_sync/data_source_options.rb', line 28 def metrics_config @metrics_config end |
#name ⇒ String? (readonly)
Default: - generated by cdk given the id
The name of the data source, overrides the id given by cdk.
33 34 35 |
# File 'app_sync/data_source_options.rb', line 33 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'app_sync/data_source_options.rb', line 35 def self.jsii_properties { :description => "description", :metrics_config => "metricsConfig", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'app_sync/data_source_options.rb', line 43 def to_jsii result = {} result.merge!({ "description" => @description, "metricsConfig" => @metrics_config, "name" => @name, }) result.compact end |