Class: AWSCDK::AppSync::CfnGraphQLAPIProps

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

Overview

Properties for defining a CfnGraphQLApi.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authentication_type:, name:, additional_authentication_providers: nil, api_type: nil, enhanced_metrics_config: nil, environment_variables: nil, introspection_config: nil, lambda_authorizer_config: nil, log_config: nil, merged_api_execution_role_arn: nil, open_id_connect_config: nil, owner_contact: nil, query_depth_limit: nil, resolver_count_limit: nil, tags: nil, user_pool_config: nil, visibility: nil, xray_enabled: nil) ⇒ CfnGraphQLAPIProps

Returns a new instance of CfnGraphQLAPIProps.

Parameters:

  • authentication_type (String)

    Security configuration for your GraphQL API.

  • name (String)

    The API name.

  • additional_authentication_providers (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::AdditionalAuthenticationProviderProperty>, nil) (defaults to: nil)

    A list of additional authentication providers for the GraphqlApi API.

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

    The value that indicates whether the GraphQL API is a standard API ( GRAPHQL ) or merged API ( MERGED ).

  • enhanced_metrics_config (AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::EnhancedMetricsConfigProperty, nil) (defaults to: nil)

    Enables and controls the enhanced metrics feature.

  • environment_variables (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    A map containing the list of resources with their properties and environment variables.

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

    Sets the value of the GraphQL API to enable ( ENABLED ) or disable ( DISABLED ) introspection.

  • lambda_authorizer_config (AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::LambdaAuthorizerConfigProperty, nil) (defaults to: nil)

    A LambdaAuthorizerConfig holds configuration on how to authorize AWS AppSync API access when using the AWS_LAMBDA authorizer mode.

  • log_config (AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::LogConfigProperty, nil) (defaults to: nil)

    The Amazon CloudWatch Logs configuration.

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

    The AWS Identity and Access Management service role ARN for a merged API.

  • open_id_connect_config (AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::OpenIDConnectConfigProperty, nil) (defaults to: nil)

    The OpenID Connect configuration.

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

    The owner contact information for an API resource.

  • query_depth_limit (Numeric, nil) (defaults to: nil)

    The maximum depth a query can have in a single request.

  • resolver_count_limit (Numeric, nil) (defaults to: nil)

    The maximum number of resolvers that can be invoked in a single request.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An arbitrary set of tags (key-value pairs) for this GraphQL API.

  • user_pool_config (AWSCDK::IResolvable, AWSCDK::AppSync::CfnGraphQLAPI::UserPoolConfigProperty, nil) (defaults to: nil)

    Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.

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

    Sets the scope of the GraphQL API to public ( GLOBAL ) or private ( PRIVATE ).

  • xray_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    A flag indicating whether to use AWS X-Ray tracing for this GraphqlApi .



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app_sync/cfn_graph_qlapi_props.rb', line 27

def initialize(authentication_type:, name:, additional_authentication_providers: nil, api_type: nil, enhanced_metrics_config: nil, environment_variables: nil, introspection_config: nil, lambda_authorizer_config: nil, log_config: nil, merged_api_execution_role_arn: nil, open_id_connect_config: nil, owner_contact: nil, query_depth_limit: nil, resolver_count_limit: nil, tags: nil, user_pool_config: nil, visibility: nil, xray_enabled: nil)
  @authentication_type = authentication_type
  Jsii::Type.check_type(@authentication_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authenticationType")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @additional_authentication_providers = additional_authentication_providers
  Jsii::Type.check_type(@additional_authentication_providers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5DZm5HcmFwaFFMQXBpLkFkZGl0aW9uYWxBdXRoZW50aWNhdGlvblByb3ZpZGVyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "additionalAuthenticationProviders") unless @additional_authentication_providers.nil?
  @api_type = api_type
  Jsii::Type.check_type(@api_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiType") unless @api_type.nil?
  @enhanced_metrics_config = enhanced_metrics_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnGraphQLAPI::EnhancedMetricsConfigProperty.new(**enhanced_metrics_config.transform_keys(&:to_sym)) : enhanced_metrics_config
  Jsii::Type.check_type(@enhanced_metrics_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkdyYXBoUUxBcGkuRW5oYW5jZWRNZXRyaWNzQ29uZmlnUHJvcGVydHkifV19fQ==")), "enhancedMetricsConfig") unless @enhanced_metrics_config.nil?
  @environment_variables = environment_variables
  Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "environmentVariables") unless @environment_variables.nil?
  @introspection_config = introspection_config
  Jsii::Type.check_type(@introspection_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "introspectionConfig") unless @introspection_config.nil?
  @lambda_authorizer_config = lambda_authorizer_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnGraphQLAPI::LambdaAuthorizerConfigProperty.new(**lambda_authorizer_config.transform_keys(&:to_sym)) : lambda_authorizer_config
  Jsii::Type.check_type(@lambda_authorizer_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkdyYXBoUUxBcGkuTGFtYmRhQXV0aG9yaXplckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "lambdaAuthorizerConfig") unless @lambda_authorizer_config.nil?
  @log_config = log_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnGraphQLAPI::LogConfigProperty.new(**log_config.transform_keys(&:to_sym)) : log_config
  Jsii::Type.check_type(@log_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkdyYXBoUUxBcGkuTG9nQ29uZmlnUHJvcGVydHkifV19fQ==")), "logConfig") unless @log_config.nil?
  @merged_api_execution_role_arn = merged_api_execution_role_arn
  Jsii::Type.check_type(@merged_api_execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mergedApiExecutionRoleArn") unless @merged_api_execution_role_arn.nil?
  @open_id_connect_config = open_id_connect_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnGraphQLAPI::OpenIDConnectConfigProperty.new(**open_id_connect_config.transform_keys(&:to_sym)) : open_id_connect_config
  Jsii::Type.check_type(@open_id_connect_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkdyYXBoUUxBcGkuT3BlbklEQ29ubmVjdENvbmZpZ1Byb3BlcnR5In1dfX0=")), "openIdConnectConfig") unless @open_id_connect_config.nil?
  @owner_contact = owner_contact
  Jsii::Type.check_type(@owner_contact, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ownerContact") unless @owner_contact.nil?
  @query_depth_limit = query_depth_limit
  Jsii::Type.check_type(@query_depth_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "queryDepthLimit") unless @query_depth_limit.nil?
  @resolver_count_limit = resolver_count_limit
  Jsii::Type.check_type(@resolver_count_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "resolverCountLimit") unless @resolver_count_limit.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?
  @user_pool_config = user_pool_config.is_a?(Hash) ? ::AWSCDK::AppSync::CfnGraphQLAPI::UserPoolConfigProperty.new(**user_pool_config.transform_keys(&:to_sym)) : user_pool_config
  Jsii::Type.check_type(@user_pool_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBzeW5jLkNmbkdyYXBoUUxBcGkuVXNlclBvb2xDb25maWdQcm9wZXJ0eSJ9XX19")), "userPoolConfig") unless @user_pool_config.nil?
  @visibility = visibility
  Jsii::Type.check_type(@visibility, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "visibility") unless @visibility.nil?
  @xray_enabled = xray_enabled
  Jsii::Type.check_type(@xray_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "xrayEnabled") unless @xray_enabled.nil?
end

Instance Attribute Details

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

A list of additional authentication providers for the GraphqlApi API.



82
83
84
# File 'app_sync/cfn_graph_qlapi_props.rb', line 82

def additional_authentication_providers
  @additional_authentication_providers
end

#api_typeString? (readonly)

The value that indicates whether the GraphQL API is a standard API ( GRAPHQL ) or merged API ( MERGED ).

WARNING : If the ApiType has not been defined, explicitly setting it to GRAPHQL in a template/stack update will result in an API replacement and new DNS values.

The following values are valid:

GRAPHQL | MERGED



93
94
95
# File 'app_sync/cfn_graph_qlapi_props.rb', line 93

def api_type
  @api_type
end

#authentication_typeString (readonly)

Security configuration for your GraphQL API.

For allowed values (such as API_KEY , AWS_IAM , AMAZON_COGNITO_USER_POOLS , OPENID_CONNECT , or AWS_LAMBDA ), see Security in the AWS AppSync Developer Guide .



72
73
74
# File 'app_sync/cfn_graph_qlapi_props.rb', line 72

def authentication_type
  @authentication_type
end

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

Enables and controls the enhanced metrics feature.

Enhanced metrics emit granular data on API usage and performance such as AppSync request and error counts, latency, and cache hits/misses. All enhanced metric data is sent to your CloudWatch account, and you can configure the types of data that will be sent.

Enhanced metrics can be configured at the resolver, data source, and operation levels. For more information, see Monitoring and logging in the AWS AppSync User Guide .



102
103
104
# File 'app_sync/cfn_graph_qlapi_props.rb', line 102

def enhanced_metrics_config
  @enhanced_metrics_config
end

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

A map containing the list of resources with their properties and environment variables.

For more information, see Environmental variables .

Pattern : ^[A-Za-z]+\\w*$\\

Minimum : 2

Maximum : 64



115
116
117
# File 'app_sync/cfn_graph_qlapi_props.rb', line 115

def environment_variables
  @environment_variables
end

#introspection_configString? (readonly)

Sets the value of the GraphQL API to enable ( ENABLED ) or disable ( DISABLED ) introspection.

If no value is provided, the introspection configuration will be set to ENABLED by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.

For more information about introspection, see GraphQL introspection .



124
125
126
# File 'app_sync/cfn_graph_qlapi_props.rb', line 124

def introspection_config
  @introspection_config
end

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

A LambdaAuthorizerConfig holds configuration on how to authorize AWS AppSync API access when using the AWS_LAMBDA authorizer mode.

Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.



131
132
133
# File 'app_sync/cfn_graph_qlapi_props.rb', line 131

def lambda_authorizer_config
  @lambda_authorizer_config
end

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

The Amazon CloudWatch Logs configuration.



136
137
138
# File 'app_sync/cfn_graph_qlapi_props.rb', line 136

def log_config
  @log_config
end

#merged_api_execution_role_arnString? (readonly)

The AWS Identity and Access Management service role ARN for a merged API.

The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the AUTO_MERGE to update the merged API endpoint with the source API changes automatically.



143
144
145
# File 'app_sync/cfn_graph_qlapi_props.rb', line 143

def merged_api_execution_role_arn
  @merged_api_execution_role_arn
end

#nameString (readonly)

The API name.



77
78
79
# File 'app_sync/cfn_graph_qlapi_props.rb', line 77

def name
  @name
end

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

The OpenID Connect configuration.



148
149
150
# File 'app_sync/cfn_graph_qlapi_props.rb', line 148

def open_id_connect_config
  @open_id_connect_config
end

#owner_contactString? (readonly)

The owner contact information for an API resource.

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



155
156
157
# File 'app_sync/cfn_graph_qlapi_props.rb', line 155

def owner_contact
  @owner_contact
end

#query_depth_limitNumeric? (readonly)

The maximum depth a query can have in a single request.

Depth refers to the amount of nested levels allowed in the body of query. The default value is 0 (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between 1 and 75 nested levels. This field will produce a limit error if the operation falls out of bounds. Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.



162
163
164
# File 'app_sync/cfn_graph_qlapi_props.rb', line 162

def query_depth_limit
  @query_depth_limit
end

#resolver_count_limitNumeric? (readonly)

The maximum number of resolvers that can be invoked in a single request.

The default value is 0 (or unspecified), which will set the limit to 10000 . When specified, the limit value can be between 1 and 10000 . This field will produce a limit error if the operation falls out of bounds.



169
170
171
# File 'app_sync/cfn_graph_qlapi_props.rb', line 169

def resolver_count_limit
  @resolver_count_limit
end

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

An arbitrary set of tags (key-value pairs) for this GraphQL API.



174
175
176
# File 'app_sync/cfn_graph_qlapi_props.rb', line 174

def tags
  @tags
end

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

Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.



179
180
181
# File 'app_sync/cfn_graph_qlapi_props.rb', line 179

def user_pool_config
  @user_pool_config
end

#visibilityString? (readonly)

Sets the scope of the GraphQL API to public ( GLOBAL ) or private ( PRIVATE ).

By default, the scope is set to Global if no value is provided.

WARNING : If Visibility has not been defined, explicitly setting it to GLOBAL in a template/stack update will result in an API replacement and new DNS values.



188
189
190
# File 'app_sync/cfn_graph_qlapi_props.rb', line 188

def visibility
  @visibility
end

#xray_enabledBoolean, ... (readonly)

A flag indicating whether to use AWS X-Ray tracing for this GraphqlApi .



193
194
195
# File 'app_sync/cfn_graph_qlapi_props.rb', line 193

def xray_enabled
  @xray_enabled
end

Class Method Details

.jsii_propertiesObject



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'app_sync/cfn_graph_qlapi_props.rb', line 195

def self.jsii_properties
  {
    :authentication_type => "authenticationType",
    :name => "name",
    :additional_authentication_providers => "additionalAuthenticationProviders",
    :api_type => "apiType",
    :enhanced_metrics_config => "enhancedMetricsConfig",
    :environment_variables => "environmentVariables",
    :introspection_config => "introspectionConfig",
    :lambda_authorizer_config => "lambdaAuthorizerConfig",
    :log_config => "logConfig",
    :merged_api_execution_role_arn => "mergedApiExecutionRoleArn",
    :open_id_connect_config => "openIdConnectConfig",
    :owner_contact => "ownerContact",
    :query_depth_limit => "queryDepthLimit",
    :resolver_count_limit => "resolverCountLimit",
    :tags => "tags",
    :user_pool_config => "userPoolConfig",
    :visibility => "visibility",
    :xray_enabled => "xrayEnabled",
  }
end

Instance Method Details

#to_jsiiObject



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'app_sync/cfn_graph_qlapi_props.rb', line 218

def to_jsii
  result = {}
  result.merge!({
    "authenticationType" => @authentication_type,
    "name" => @name,
    "additionalAuthenticationProviders" => @additional_authentication_providers,
    "apiType" => @api_type,
    "enhancedMetricsConfig" => @enhanced_metrics_config,
    "environmentVariables" => @environment_variables,
    "introspectionConfig" => @introspection_config,
    "lambdaAuthorizerConfig" => @lambda_authorizer_config,
    "logConfig" => @log_config,
    "mergedApiExecutionRoleArn" => @merged_api_execution_role_arn,
    "openIdConnectConfig" => @open_id_connect_config,
    "ownerContact" => @owner_contact,
    "queryDepthLimit" => @query_depth_limit,
    "resolverCountLimit" => @resolver_count_limit,
    "tags" => @tags,
    "userPoolConfig" => @user_pool_config,
    "visibility" => @visibility,
    "xrayEnabled" => @xray_enabled,
  })
  result.compact
end