Class: AWSCDK::AppSync::EventAPIProps

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

Overview

Properties for an AppSync Event API.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_name:, authorization_config: nil, domain_name: nil, log_config: nil, owner_contact: nil) ⇒ EventAPIProps

Returns a new instance of EventAPIProps.

Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app_sync/event_api_props.rb', line 12

def initialize(api_name:, authorization_config: nil, domain_name: nil, log_config: nil, owner_contact: nil)
  @api_name = api_name
  Jsii::Type.check_type(@api_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiName")
  @authorization_config = authorization_config.is_a?(Hash) ? ::AWSCDK::AppSync::EventAPIAuthConfig.new(**authorization_config.transform_keys(&:to_sym)) : authorization_config
  Jsii::Type.check_type(@authorization_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5FdmVudEFwaUF1dGhDb25maWcifQ==")), "authorizationConfig") unless @authorization_config.nil?
  @domain_name = domain_name.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncDomainOptions.new(**domain_name.transform_keys(&:to_sym)) : domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jRG9tYWluT3B0aW9ucyJ9")), "domainName") unless @domain_name.nil?
  @log_config = log_config.is_a?(Hash) ? ::AWSCDK::AppSync::AppSyncLogConfig.new(**log_config.transform_keys(&:to_sym)) : log_config
  Jsii::Type.check_type(@log_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5BcHBTeW5jTG9nQ29uZmlnIn0=")), "logConfig") unless @log_config.nil?
  @owner_contact = owner_contact
  Jsii::Type.check_type(@owner_contact, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ownerContact") unless @owner_contact.nil?
end

Instance Attribute Details

#api_nameString (readonly)

the name of the Event API.

Returns:

  • (String)


28
29
30
# File 'app_sync/event_api_props.rb', line 28

def api_name
  @api_name
end

#authorization_configAWSCDK::AppSync::EventAPIAuthConfig? (readonly)

Note:

Default: - API Key authorization

Optional authorization configuration.



33
34
35
# File 'app_sync/event_api_props.rb', line 33

def authorization_config
  @authorization_config
end

#domain_nameAWSCDK::AppSync::AppSyncDomainOptions? (readonly)

Note:

Default: - no domain name

The domain name configuration for the Event API.

The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL



41
42
43
# File 'app_sync/event_api_props.rb', line 41

def domain_name
  @domain_name
end

#log_configAWSCDK::AppSync::AppSyncLogConfig? (readonly)

Note:

Default: - None

Logging configuration for this api.



46
47
48
# File 'app_sync/event_api_props.rb', line 46

def log_config
  @log_config
end

#owner_contactString? (readonly)

Note:

Default: - No owner contact.

The owner contact information for an API resource.

This field accepts any string input with a length of 0 - 256 characters.

Returns:

  • (String, nil)


53
54
55
# File 'app_sync/event_api_props.rb', line 53

def owner_contact
  @owner_contact
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
63
# File 'app_sync/event_api_props.rb', line 55

def self.jsii_properties
  {
    :api_name => "apiName",
    :authorization_config => "authorizationConfig",
    :domain_name => "domainName",
    :log_config => "logConfig",
    :owner_contact => "ownerContact",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
75
# File 'app_sync/event_api_props.rb', line 65

def to_jsii
  result = {}
  result.merge!({
    "apiName" => @api_name,
    "authorizationConfig" => @authorization_config,
    "domainName" => @domain_name,
    "logConfig" => @log_config,
    "ownerContact" => @owner_contact,
  })
  result.compact
end