Class: AWSCDK::AppSync::HttpDataSourceOptions
- Inherits:
-
DataSourceOptions
- Object
- DataSourceOptions
- AWSCDK::AppSync::HttpDataSourceOptions
- Defined in:
- app_sync/http_data_source_options.rb
Overview
Optional configuration for Http data sources.
Instance Attribute Summary collapse
-
#authorization_config ⇒ AWSCDK::AppSync::AWSIAMConfig?
readonly
The authorization config in case the HTTP endpoint requires authorization.
-
#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, authorization_config: nil) ⇒ HttpDataSourceOptions
constructor
A new instance of HttpDataSourceOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, metrics_config: nil, name: nil, authorization_config: nil) ⇒ HttpDataSourceOptions
Returns a new instance of HttpDataSourceOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'app_sync/http_data_source_options.rb', line 11 def initialize(description: nil, metrics_config: nil, name: nil, authorization_config: 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? @authorization_config = .is_a?(Hash) ? ::AWSCDK::AppSync::AWSIAMConfig.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@authorization_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Bd3NJYW1Db25maWcifQ==")), "authorizationConfig") unless @authorization_config.nil? end |
Instance Attribute Details
#authorization_config ⇒ AWSCDK::AppSync::AWSIAMConfig? (readonly)
Default: - none
The authorization config in case the HTTP endpoint requires authorization.
41 42 43 |
# File 'app_sync/http_data_source_options.rb', line 41 def @authorization_config end |
#description ⇒ String? (readonly)
Default: - No description
The description of the data source.
26 27 28 |
# File 'app_sync/http_data_source_options.rb', line 26 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.
31 32 33 |
# File 'app_sync/http_data_source_options.rb', line 31 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.
36 37 38 |
# File 'app_sync/http_data_source_options.rb', line 36 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'app_sync/http_data_source_options.rb', line 43 def self.jsii_properties { :description => "description", :metrics_config => "metricsConfig", :name => "name", :authorization_config => "authorizationConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'app_sync/http_data_source_options.rb', line 52 def to_jsii result = {} result.merge!(super) result.merge!({ "description" => @description, "metricsConfig" => @metrics_config, "name" => @name, "authorizationConfig" => @authorization_config, }) result.compact end |