Class: AWSCDK::AppSync::AppSyncRDSDataSourcePropsV2
- Inherits:
-
AppSyncBackedDataSourceProps
- Object
- AppSyncBackedDataSourceProps
- AWSCDK::AppSync::AppSyncRDSDataSourcePropsV2
- Defined in:
- app_sync/app_sync_rds_data_source_props_v2.rb
Overview
Properties for an AppSync RDS datasource Aurora Serverless V2.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IAPIRef
readonly
The API to attach this data source to.
-
#database_name ⇒ String?
readonly
The name of the database to use within the cluster.
-
#description ⇒ String?
readonly
The description of the data source.
-
#name ⇒ String?
readonly
The name of the data source.
-
#secret_store ⇒ AWSCDK::SecretsManager::ISecret
readonly
The secret containing the credentials for the database.
-
#serverless_cluster ⇒ AWSCDK::RDS::IDatabaseCluster
readonly
The serverless cluster to call to interact with this 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, name: nil, service_role: nil, secret_store:, serverless_cluster:, database_name: nil) ⇒ AppSyncRDSDataSourcePropsV2
constructor
A new instance of AppSyncRDSDataSourcePropsV2.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, description: nil, name: nil, service_role: nil, secret_store:, serverless_cluster:, database_name: nil) ⇒ AppSyncRDSDataSourcePropsV2
Returns a new instance of AppSyncRDSDataSourcePropsV2.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 14 def initialize(api:, description: nil, name: nil, service_role: nil, secret_store:, serverless_cluster:, database_name: nil) @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcHBzeW5jLklBcGlSZWYifQ==")), "api") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.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? @secret_store = secret_store Jsii::Type.check_type(@secret_store, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VjcmV0c21hbmFnZXIuSVNlY3JldCJ9")), "secretStore") @serverless_cluster = serverless_cluster Jsii::Type.check_type(@serverless_cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLklEYXRhYmFzZUNsdXN0ZXIifQ==")), "serverlessCluster") @database_name = database_name Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName") unless @database_name.nil? end |
Instance Attribute Details
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IAPIRef (readonly)
The API to attach this data source to.
34 35 36 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 34 def api @api end |
#database_name ⇒ String? (readonly)
Default: - None
The name of the database to use within the cluster.
65 66 67 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 65 def database_name @database_name end |
#description ⇒ String? (readonly)
Default: - None
The description of the data source.
39 40 41 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 39 def description @description end |
#name ⇒ String? (readonly)
Default: - id of data source
The name of the data source.
The only allowed pattern is: [_A-Za-z][_0-9A-Za-z]*. Any invalid characters will be automatically removed.
47 48 49 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 47 def name @name end |
#secret_store ⇒ AWSCDK::SecretsManager::ISecret (readonly)
The secret containing the credentials for the database.
56 57 58 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 56 def secret_store @secret_store end |
#serverless_cluster ⇒ AWSCDK::RDS::IDatabaseCluster (readonly)
The serverless cluster to call to interact with this data source.
60 61 62 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 60 def serverless_cluster @serverless_cluster 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.
52 53 54 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 52 def service_role @service_role end |
Class Method Details
.jsii_properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 67 def self.jsii_properties { :api => "api", :description => "description", :name => "name", :service_role => "serviceRole", :secret_store => "secretStore", :serverless_cluster => "serverlessCluster", :database_name => "databaseName", } end |
Instance Method Details
#to_jsii ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'app_sync/app_sync_rds_data_source_props_v2.rb', line 79 def to_jsii result = {} result.merge!(super) result.merge!({ "api" => @api, "description" => @description, "name" => @name, "serviceRole" => @service_role, "secretStore" => @secret_store, "serverlessCluster" => @serverless_cluster, "databaseName" => @database_name, }) result.compact end |