Class: AWSCDK::AppSync::GraphqlAPIAttributes

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

Overview

Attributes for GraphQL imports.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graphql_api_id:, graphql_api_arn: nil, graph_ql_endpoint_arn: nil, modes: nil, visibility: nil) ⇒ GraphqlAPIAttributes

Returns a new instance of GraphqlAPIAttributes.

Parameters:

  • graphql_api_id (String)

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

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

    the arn for the GraphQL Api.

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

    The GraphQl endpoint arn for the GraphQL API.

  • modes (Array<AWSCDK::AppSync::AuthorizationType>, nil) (defaults to: nil)

    The Authorization Types for this GraphQL Api.

  • visibility (AWSCDK::AppSync::Visibility, nil) (defaults to: nil)

    The GraphQl API visibility.



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

def initialize(graphql_api_id:, graphql_api_arn: nil, graph_ql_endpoint_arn: nil, modes: nil, visibility: nil)
  @graphql_api_id = graphql_api_id
  Jsii::Type.check_type(@graphql_api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "graphqlApiId")
  @graphql_api_arn = graphql_api_arn
  Jsii::Type.check_type(@graphql_api_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "graphqlApiArn") unless @graphql_api_arn.nil?
  @graph_ql_endpoint_arn = graph_ql_endpoint_arn
  Jsii::Type.check_type(@graph_ql_endpoint_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "graphQLEndpointArn") unless @graph_ql_endpoint_arn.nil?
  @modes = modes
  Jsii::Type.check_type(@modes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkF1dGhvcml6YXRpb25UeXBlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "modes") unless @modes.nil?
  @visibility = visibility
  Jsii::Type.check_type(@visibility, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5WaXNpYmlsaXR5In0=")), "visibility") unless @visibility.nil?
end

Instance Attribute Details

#graph_ql_endpoint_arnString? (readonly)

Note:

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

The GraphQl endpoint arn for the GraphQL API.

Returns:

  • (String, nil)


38
39
40
# File 'app_sync/graphql_api_attributes.rb', line 38

def graph_ql_endpoint_arn
  @graph_ql_endpoint_arn
end

#graphql_api_arnString? (readonly)

Note:

Default: - autogenerated arn

the arn for the GraphQL Api.

Returns:

  • (String, nil)


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

def graphql_api_arn
  @graphql_api_arn
end

#graphql_api_idString (readonly)

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

Returns:

  • (String)


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

def graphql_api_id
  @graphql_api_id
end

#modesArray<AWSCDK::AppSync::AuthorizationType>? (readonly)

Note:

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

The Authorization Types for this GraphQL Api.

Returns:



43
44
45
# File 'app_sync/graphql_api_attributes.rb', line 43

def modes
  @modes
end

#visibilityAWSCDK::AppSync::Visibility? (readonly)

Note:

Default: - GLOBAL

The GraphQl API visibility.

Returns:



48
49
50
# File 'app_sync/graphql_api_attributes.rb', line 48

def visibility
  @visibility
end

Class Method Details

.jsii_propertiesObject



50
51
52
53
54
55
56
57
58
# File 'app_sync/graphql_api_attributes.rb', line 50

def self.jsii_properties
  {
    :graphql_api_id => "graphqlApiId",
    :graphql_api_arn => "graphqlApiArn",
    :graph_ql_endpoint_arn => "graphQLEndpointArn",
    :modes => "modes",
    :visibility => "visibility",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
70
# File 'app_sync/graphql_api_attributes.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "graphqlApiId" => @graphql_api_id,
    "graphqlApiArn" => @graphql_api_arn,
    "graphQLEndpointArn" => @graph_ql_endpoint_arn,
    "modes" => @modes,
    "visibility" => @visibility,
  })
  result.compact
end