Class: AWSCDK::AppSync::BackedDataSourceProps
- Inherits:
-
BaseDataSourceProps
- Object
- BaseDataSourceProps
- AWSCDK::AppSync::BackedDataSourceProps
- Defined in:
- app_sync/backed_data_source_props.rb
Overview
properties for an AppSync datasource backed by a resource.
Direct Known Subclasses
DynamoDBDataSourceProps, ElasticsearchDataSourceProps, EventBridgeDataSourceProps, HttpDataSourceProps, LambdaDataSourceProps, OpenSearchDataSourceProps, RDSDataSourceProps, RDSDataSourcePropsV2
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IGraphQLAPIRef
readonly
The API to attach this data source to.
-
#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.
-
#service_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM service role to be assumed by AppSync to interact with the data source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api:, description: nil, metrics_config: nil, name: nil, service_role: nil) ⇒ BackedDataSourceProps
constructor
A new instance of BackedDataSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, description: nil, metrics_config: nil, name: nil, service_role: nil) ⇒ BackedDataSourceProps
Returns a new instance of BackedDataSourceProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app_sync/backed_data_source_props.rb', line 12 def initialize(api:, description: nil, metrics_config: nil, name: nil, service_role: nil) @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcHBzeW5jLklHcmFwaFFMQXBpUmVmIn0=")), "api") @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? @service_role = service_role Jsii::Type.check_type(@service_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "serviceRole") unless @service_role.nil? end |
Instance Attribute Details
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IGraphQLAPIRef (readonly)
The API to attach this data source to.
28 29 30 |
# File 'app_sync/backed_data_source_props.rb', line 28 def api @api end |
#description ⇒ String? (readonly)
Default: - None
the description of the data source.
33 34 35 |
# File 'app_sync/backed_data_source_props.rb', line 33 def description @description end |
#metrics_config ⇒ AWSCDK::AppSync::DataSourceMetricsConfig? (readonly)
Default: - no metrics configuration
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.
38 39 40 |
# File 'app_sync/backed_data_source_props.rb', line 38 def metrics_config @metrics_config end |
#name ⇒ String? (readonly)
Default: - id of data source
The name of the data source.
43 44 45 |
# File 'app_sync/backed_data_source_props.rb', line 43 def name @name end |
#service_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - Create a new role
The IAM service role to be assumed by AppSync to interact with the data source.
48 49 50 |
# File 'app_sync/backed_data_source_props.rb', line 48 def service_role @service_role end |
Class Method Details
.jsii_properties ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'app_sync/backed_data_source_props.rb', line 50 def self.jsii_properties { :api => "api", :description => "description", :metrics_config => "metricsConfig", :name => "name", :service_role => "serviceRole", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'app_sync/backed_data_source_props.rb', line 60 def to_jsii result = {} result.merge!(super) result.merge!({ "api" => @api, "description" => @description, "metricsConfig" => @metrics_config, "name" => @name, "serviceRole" => @service_role, }) result.compact end |