Class: AWSCDK::AppSync::EventAPIAttributes

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

Overview

Attributes for Event API imports.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_id:, http_dns:, realtime_dns:, api_arn: nil, api_name: nil, auth_provider_types: nil) ⇒ EventAPIAttributes

Returns a new instance of EventAPIAttributes.

Parameters:

  • api_id (String)

    a unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.

  • http_dns (String)

    the domain name of the Api's HTTP endpoint.

  • realtime_dns (String)

    the domain name of the Api's real-time endpoint.

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

    the ARN of the Event API.

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

    the name of the Event API.

  • auth_provider_types (Array<AWSCDK::AppSync::AppSyncAuthorizationType>, nil) (defaults to: nil)

    The Authorization Types for this Event Api.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app_sync/event_api_attributes.rb', line 13

def initialize(api_id:, http_dns:, realtime_dns:, api_arn: nil, api_name: nil, auth_provider_types: nil)
  @api_id = api_id
  Jsii::Type.check_type(@api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiId")
  @http_dns = http_dns
  Jsii::Type.check_type(@http_dns, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpDns")
  @realtime_dns = realtime_dns
  Jsii::Type.check_type(@realtime_dns, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "realtimeDns")
  @api_arn = api_arn
  Jsii::Type.check_type(@api_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiArn") unless @api_arn.nil?
  @api_name = api_name
  Jsii::Type.check_type(@api_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiName") unless @api_name.nil?
  @auth_provider_types = auth_provider_types
  Jsii::Type.check_type(@auth_provider_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkFwcFN5bmNBdXRob3JpemF0aW9uVHlwZSJ9LCJraW5kIjoiYXJyYXkifX0=")), "authProviderTypes") unless @auth_provider_types.nil?
end

Instance Attribute Details

#api_arnString? (readonly)

Note:

Default: - constructed arn

the ARN of the Event API.

Returns:

  • (String, nil)


44
45
46
# File 'app_sync/event_api_attributes.rb', line 44

def api_arn
  @api_arn
end

#api_idString (readonly)

a unique AWS AppSync Event API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.

Returns:

  • (String)


31
32
33
# File 'app_sync/event_api_attributes.rb', line 31

def api_id
  @api_id
end

#api_nameString? (readonly)

Note:

Default: - not needed to import API

the name of the Event API.

Returns:

  • (String, nil)


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

def api_name
  @api_name
end

#auth_provider_typesArray<AWSCDK::AppSync::AppSyncAuthorizationType>? (readonly)

Note:

Default: - none, required to construct event rules from imported APIs

The Authorization Types for this Event Api.



54
55
56
# File 'app_sync/event_api_attributes.rb', line 54

def auth_provider_types
  @auth_provider_types
end

#http_dnsString (readonly)

the domain name of the Api's HTTP endpoint.

Returns:

  • (String)


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

def http_dns
  @http_dns
end

#realtime_dnsString (readonly)

the domain name of the Api's real-time endpoint.

Returns:

  • (String)


39
40
41
# File 'app_sync/event_api_attributes.rb', line 39

def realtime_dns
  @realtime_dns
end

Class Method Details

.jsii_propertiesObject



56
57
58
59
60
61
62
63
64
65
# File 'app_sync/event_api_attributes.rb', line 56

def self.jsii_properties
  {
    :api_id => "apiId",
    :http_dns => "httpDns",
    :realtime_dns => "realtimeDns",
    :api_arn => "apiArn",
    :api_name => "apiName",
    :auth_provider_types => "authProviderTypes",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
78
# File 'app_sync/event_api_attributes.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "apiId" => @api_id,
    "httpDns" => @http_dns,
    "realtimeDns" => @realtime_dns,
    "apiArn" => @api_arn,
    "apiName" => @api_name,
    "authProviderTypes" => @auth_provider_types,
  })
  result.compact
end