Class: AWSCDK::AppSync::AppSyncOpenSearchDataSource

Inherits:
AppSyncBackedDataSource
  • Object
show all
Defined in:
app_sync/app_sync_open_search_data_source.rb

Overview

An Appsync datasource backed by OpenSearch.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ AppSyncOpenSearchDataSource

Returns a new instance of AppSyncOpenSearchDataSource.

Parameters:



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

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncOpenSearchDataSourceProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jT3BlblNlYXJjaERhdGFTb3VyY2VQcm9wcyJ9")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'app_sync/app_sync_open_search_data_source.rb', line 19

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :name => { kind: :property, name: "name", is_optional: false },
    :resource => { kind: :property, name: "resource", is_optional: false },
    :api => { kind: :property, name: "api", is_optional: false },
    :service_role => { kind: :property, name: "serviceRole", is_optional: true },
    :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
  }
end

Instance Method Details

#apiAWSCDK::AppSync::IAPI

The API this data source is attached to Set the API this data source is attached to.



56
57
58
# File 'app_sync/app_sync_open_search_data_source.rb', line 56

def api()
  jsii_get_property("api")
end

#api=(value) ⇒ Object



60
61
62
63
# File 'app_sync/app_sync_open_search_data_source.rb', line 60

def api=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5JQXBpIn0=")), "api")
  jsii_set_property("api", value)
end

#grant_principalAWSCDK::IAM::IPrincipal

The principal of the data source to be IGrantable.



78
79
80
# File 'app_sync/app_sync_open_search_data_source.rb', line 78

def grant_principal()
  jsii_get_property("grantPrincipal")
end

#nameString

The name of the data source.

Returns:

  • (String)


42
43
44
# File 'app_sync/app_sync_open_search_data_source.rb', line 42

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


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

def node()
  jsii_get_property("node")
end

#resourceAWSCDK::AppSync::CfnDataSource

The underlying CFN data source resource.



49
50
51
# File 'app_sync/app_sync_open_search_data_source.rb', line 49

def resource()
  jsii_get_property("resource")
end

#service_roleAWSCDK::IAM::IRole?

Returns:



66
67
68
# File 'app_sync/app_sync_open_search_data_source.rb', line 66

def service_role()
  jsii_get_property("serviceRole")
end

#service_role=(value) ⇒ Object



70
71
72
73
# File 'app_sync/app_sync_open_search_data_source.rb', line 70

def service_role=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "serviceRole") unless value.nil?
  jsii_set_property("serviceRole", value)
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


85
86
87
# File 'app_sync/app_sync_open_search_data_source.rb', line 85

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



98
99
100
101
102
103
# File 'app_sync/app_sync_open_search_data_source.rb', line 98

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end