Class: AWSCDK::AppSync::CfnChannelNamespaceProps

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

Overview

Properties for defining a CfnChannelNamespace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_id:, name:, code_handlers: nil, code_s3_location: nil, handler_configs: nil, publish_auth_modes: nil, subscribe_auth_modes: nil, tags: nil) ⇒ CfnChannelNamespaceProps

Returns a new instance of CfnChannelNamespaceProps.

Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app_sync/cfn_channel_namespace_props.rb', line 17

def initialize(api_id:, name:, code_handlers: nil, code_s3_location: nil, handler_configs: nil, publish_auth_modes: nil, subscribe_auth_modes: nil, tags: nil)
  @api_id = api_id
  Jsii::Type.check_type(@api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiId")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @code_handlers = code_handlers
  Jsii::Type.check_type(@code_handlers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeHandlers") unless @code_handlers.nil?
  @code_s3_location = code_s3_location
  Jsii::Type.check_type(@code_s3_location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeS3Location") unless @code_s3_location.nil?
  @handler_configs = handler_configs.is_a?(Hash) ? ::AWSCDK::AppSync::CfnChannelNamespace::HandlerConfigsProperty.new(**handler_configs.transform_keys(&:to_sym)) : handler_configs
  Jsii::Type.check_type(@handler_configs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkNoYW5uZWxOYW1lc3BhY2UuSGFuZGxlckNvbmZpZ3NQcm9wZXJ0eSJ9XX19")), "handlerConfigs") unless @handler_configs.nil?
  @publish_auth_modes = publish_auth_modes
  Jsii::Type.check_type(@publish_auth_modes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5DZm5DaGFubmVsTmFtZXNwYWNlLkF1dGhNb2RlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "publishAuthModes") unless @publish_auth_modes.nil?
  @subscribe_auth_modes = subscribe_auth_modes
  Jsii::Type.check_type(@subscribe_auth_modes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5DZm5DaGFubmVsTmFtZXNwYWNlLkF1dGhNb2RlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "subscribeAuthModes") unless @subscribe_auth_modes.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#api_idString (readonly)

The Api ID.



40
41
42
# File 'app_sync/cfn_channel_namespace_props.rb', line 40

def api_id
  @api_id
end

#code_handlersString? (readonly)

The event handler functions that run custom business logic to process published events and subscribe requests.



52
53
54
# File 'app_sync/cfn_channel_namespace_props.rb', line 52

def code_handlers
  @code_handlers
end

#code_s3_locationString? (readonly)

The Amazon S3 endpoint where the code is located.



57
58
59
# File 'app_sync/cfn_channel_namespace_props.rb', line 57

def code_s3_location
  @code_s3_location
end

#handler_configsAWSCDK::IResolvable, ... (readonly)

The configuration for the OnPublish and OnSubscribe handlers.



62
63
64
# File 'app_sync/cfn_channel_namespace_props.rb', line 62

def handler_configs
  @handler_configs
end

#nameString (readonly)

The name of the channel namespace.

This name must be unique within the Api .



47
48
49
# File 'app_sync/cfn_channel_namespace_props.rb', line 47

def name
  @name
end

#publish_auth_modesAWSCDK::IResolvable, ... (readonly)

The authorization mode to use for publishing messages on the channel namespace.

This configuration overrides the default Api authorization configuration.



69
70
71
# File 'app_sync/cfn_channel_namespace_props.rb', line 69

def publish_auth_modes
  @publish_auth_modes
end

#subscribe_auth_modesAWSCDK::IResolvable, ... (readonly)

The authorization mode to use for subscribing to messages on the channel namespace.

This configuration overrides the default Api authorization configuration.



76
77
78
# File 'app_sync/cfn_channel_namespace_props.rb', line 76

def subscribe_auth_modes
  @subscribe_auth_modes
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A set of tags (key-value pairs) for this channel namespace.



81
82
83
# File 'app_sync/cfn_channel_namespace_props.rb', line 81

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



83
84
85
86
87
88
89
90
91
92
93
94
# File 'app_sync/cfn_channel_namespace_props.rb', line 83

def self.jsii_properties
  {
    :api_id => "apiId",
    :name => "name",
    :code_handlers => "codeHandlers",
    :code_s3_location => "codeS3Location",
    :handler_configs => "handlerConfigs",
    :publish_auth_modes => "publishAuthModes",
    :subscribe_auth_modes => "subscribeAuthModes",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'app_sync/cfn_channel_namespace_props.rb', line 96

def to_jsii
  result = {}
  result.merge!({
    "apiId" => @api_id,
    "name" => @name,
    "codeHandlers" => @code_handlers,
    "codeS3Location" => @code_s3_location,
    "handlerConfigs" => @handler_configs,
    "publishAuthModes" => @publish_auth_modes,
    "subscribeAuthModes" => @subscribe_auth_modes,
    "tags" => @tags,
  })
  result.compact
end