Class: AWSCDK::AppSync::CfnAPIProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::CfnAPIProps
- Defined in:
- app_sync/cfn_api_props.rb
Overview
Properties for defining a CfnApi.
Instance Attribute Summary collapse
-
#event_config ⇒ AWSCDK::IResolvable, ...
readonly
Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
-
#name ⇒ String
readonly
The name of the
Api. -
#owner_contact ⇒ String?
readonly
The owner contact information for an API resource.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A set of tags (key-value pairs) for this API.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, event_config: nil, owner_contact: nil, tags: nil) ⇒ CfnAPIProps
constructor
A new instance of CfnAPIProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, event_config: nil, owner_contact: nil, tags: nil) ⇒ CfnAPIProps
Returns a new instance of CfnAPIProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'app_sync/cfn_api_props.rb', line 13 def initialize(name:, event_config: nil, owner_contact: nil, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @event_config = event_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnAPI::EventConfigProperty.new(**event_config.transform_keys(&:to_sym)) : event_config Jsii::Type.check_type(@event_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkFwaS5FdmVudENvbmZpZ1Byb3BlcnR5In1dfX0=")), "eventConfig") unless @event_config.nil? @owner_contact = owner_contact Jsii::Type.check_type(@owner_contact, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ownerContact") unless @owner_contact.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#event_config ⇒ AWSCDK::IResolvable, ... (readonly)
Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
33 34 35 |
# File 'app_sync/cfn_api_props.rb', line 33 def event_config @event_config end |
#name ⇒ String (readonly)
The name of the Api .
28 29 30 |
# File 'app_sync/cfn_api_props.rb', line 28 def name @name end |
#owner_contact ⇒ String? (readonly)
The owner contact information for an API resource.
This field accepts any string input with a length of 0 - 256 characters.
40 41 42 |
# File 'app_sync/cfn_api_props.rb', line 40 def owner_contact @owner_contact end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A set of tags (key-value pairs) for this API.
45 46 47 |
# File 'app_sync/cfn_api_props.rb', line 45 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'app_sync/cfn_api_props.rb', line 47 def self.jsii_properties { :name => "name", :event_config => "eventConfig", :owner_contact => "ownerContact", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'app_sync/cfn_api_props.rb', line 56 def to_jsii result = {} result.merge!({ "name" => @name, "eventConfig" => @event_config, "ownerContact" => @owner_contact, "tags" => @tags, }) result.compact end |