Class: AWSCDK::AppSync::AppSyncDynamoDBDataSourceProps
- Inherits:
-
AppSyncBackedDataSourceProps
- Object
- AppSyncBackedDataSourceProps
- AWSCDK::AppSync::AppSyncDynamoDBDataSourceProps
- Defined in:
- app_sync/app_sync_dynamo_db_data_source_props.rb
Overview
Properties for an AppSync DynamoDB datasource.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSAppsync::IAPIRef
readonly
The API to attach this data source to.
-
#description ⇒ String?
readonly
The description of the data source.
-
#name ⇒ String?
readonly
The name of the data source.
-
#read_only_access ⇒ Boolean?
readonly
Specify whether this Data Source is read only or has read and write permissions to the DynamoDB table.
-
#service_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM service role to be assumed by AppSync to interact with the data source.
-
#table ⇒ AWSCDK::DynamoDB::ITable
readonly
The DynamoDB table backing this data source.
-
#use_caller_credentials ⇒ Boolean?
readonly
Use credentials of caller to access DynamoDB.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api:, description: nil, name: nil, service_role: nil, table:, read_only_access: nil, use_caller_credentials: nil) ⇒ AppSyncDynamoDBDataSourceProps
constructor
A new instance of AppSyncDynamoDBDataSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, description: nil, name: nil, service_role: nil, table:, read_only_access: nil, use_caller_credentials: nil) ⇒ AppSyncDynamoDBDataSourceProps
Returns a new instance of AppSyncDynamoDBDataSourceProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 14 def initialize(api:, description: nil, name: nil, service_role: nil, table:, read_only_access: nil, use_caller_credentials: 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? @table = table Jsii::Type.check_type(@table, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSVRhYmxlIn0=")), "table") @read_only_access = read_only_access Jsii::Type.check_type(@read_only_access, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readOnlyAccess") unless @read_only_access.nil? @use_caller_credentials = use_caller_credentials Jsii::Type.check_type(@use_caller_credentials, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useCallerCredentials") unless @use_caller_credentials.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_dynamo_db_data_source_props.rb', line 34 def api @api end |
#description ⇒ String? (readonly)
Default: - None
The description of the data source.
39 40 41 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.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_dynamo_db_data_source_props.rb', line 47 def name @name end |
#read_only_access ⇒ Boolean? (readonly)
Default: false
Specify whether this Data Source is read only or has read and write permissions to the DynamoDB table.
61 62 63 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 61 def read_only_access @read_only_access 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_dynamo_db_data_source_props.rb', line 52 def service_role @service_role end |
#table ⇒ AWSCDK::DynamoDB::ITable (readonly)
The DynamoDB table backing this data source.
56 57 58 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 56 def table @table end |
#use_caller_credentials ⇒ Boolean? (readonly)
Default: false
Use credentials of caller to access DynamoDB.
66 67 68 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 66 def use_caller_credentials @use_caller_credentials end |
Class Method Details
.jsii_properties ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 68 def self.jsii_properties { :api => "api", :description => "description", :name => "name", :service_role => "serviceRole", :table => "table", :read_only_access => "readOnlyAccess", :use_caller_credentials => "useCallerCredentials", } end |
Instance Method Details
#to_jsii ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'app_sync/app_sync_dynamo_db_data_source_props.rb', line 80 def to_jsii result = {} result.merge!(super) result.merge!({ "api" => @api, "description" => @description, "name" => @name, "serviceRole" => @service_role, "table" => @table, "readOnlyAccess" => @read_only_access, "useCallerCredentials" => @use_caller_credentials, }) result.compact end |