Class: AWSCDK::AppSync::AppSyncBaseDataSourceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/app_sync_base_data_source_props.rb

Overview

Base properties for an AppSync datasource.

Direct Known Subclasses

AppSyncBackedDataSourceProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api:, description: nil, name: nil) ⇒ AppSyncBaseDataSourceProps

Returns a new instance of AppSyncBaseDataSourceProps.

Parameters:

  • api (AWSCDK::Interfaces::AWSAppsync::IAPIRef)

    The API to attach this data source to.

  • description (String, nil) (defaults to: nil)

    The description of the data source.

  • name (String, nil) (defaults to: nil)

    The name of the data source.



10
11
12
13
14
15
16
17
# File 'app_sync/app_sync_base_data_source_props.rb', line 10

def initialize(api:, description: nil, 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?
end

Instance Attribute Details

#apiAWSCDK::Interfaces::AWSAppsync::IAPIRef (readonly)

The API to attach this data source to.



22
23
24
# File 'app_sync/app_sync_base_data_source_props.rb', line 22

def api
  @api
end

#descriptionString? (readonly)

Note:

Default: - None

The description of the data source.

Returns:

  • (String, nil)


27
28
29
# File 'app_sync/app_sync_base_data_source_props.rb', line 27

def description
  @description
end

#nameString? (readonly)

Note:

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.

Returns:

  • (String, nil)


35
36
37
# File 'app_sync/app_sync_base_data_source_props.rb', line 35

def name
  @name
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'app_sync/app_sync_base_data_source_props.rb', line 37

def self.jsii_properties
  {
    :api => "api",
    :description => "description",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 'app_sync/app_sync_base_data_source_props.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "api" => @api,
    "description" => @description,
    "name" => @name,
  })
  result.compact
end