Class: AWSCDK::AppSync::HttpDataSourceProps
- Inherits:
-
BackedDataSourceProps
- Object
- BackedDataSourceProps
- AWSCDK::AppSync::HttpDataSourceProps
- Defined in:
- app_sync/http_data_source_props.rb
Overview
Properties for an AppSync http datasource.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IGraphQLAPIRef
readonly
The API to attach this data source to.
-
#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.
-
#endpoint ⇒ String
readonly
The http endpoint.
-
#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, endpoint:, authorization_config: nil) ⇒ HttpDataSourceProps
constructor
A new instance of HttpDataSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, description: nil, metrics_config: nil, name: nil, service_role: nil, endpoint:, authorization_config: nil) ⇒ HttpDataSourceProps
Returns a new instance of HttpDataSourceProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app_sync/http_data_source_props.rb', line 14 def initialize(api:, description: nil, metrics_config: nil, name: nil, service_role: nil, endpoint:, authorization_config: 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? @endpoint = endpoint Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpoint") @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
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IGraphQLAPIRef (readonly)
The API to attach this data source to.
34 35 36 |
# File 'app_sync/http_data_source_props.rb', line 34 def api @api end |
#authorization_config ⇒ AWSCDK::AppSync::AWSIAMConfig? (readonly)
Default: - none
The authorization config in case the HTTP endpoint requires authorization.
63 64 65 |
# File 'app_sync/http_data_source_props.rb', line 63 def @authorization_config end |
#description ⇒ String? (readonly)
Default: - None
the description of the data source.
39 40 41 |
# File 'app_sync/http_data_source_props.rb', line 39 def description @description end |
#endpoint ⇒ String (readonly)
The http endpoint.
58 59 60 |
# File 'app_sync/http_data_source_props.rb', line 58 def endpoint @endpoint 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.
44 45 46 |
# File 'app_sync/http_data_source_props.rb', line 44 def metrics_config @metrics_config end |
#name ⇒ String? (readonly)
Default: - id of data source
The name of the data source.
49 50 51 |
# File 'app_sync/http_data_source_props.rb', line 49 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.
54 55 56 |
# File 'app_sync/http_data_source_props.rb', line 54 def service_role @service_role end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 |
# File 'app_sync/http_data_source_props.rb', line 65 def self.jsii_properties { :api => "api", :description => "description", :metrics_config => "metricsConfig", :name => "name", :service_role => "serviceRole", :endpoint => "endpoint", :authorization_config => "authorizationConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'app_sync/http_data_source_props.rb', line 77 def to_jsii result = {} result.merge!(super) result.merge!({ "api" => @api, "description" => @description, "metricsConfig" => @metrics_config, "name" => @name, "serviceRole" => @service_role, "endpoint" => @endpoint, "authorizationConfig" => @authorization_config, }) result.compact end |