Skip to content

aws.appsync.get_graphql_api

Example SQL Queries

SELECT * FROM
aws.appsync.get_graphql_api
WHERE
"api_id" = 'VALUE';

Description

Retrieves a GraphqlApi object.

Table Definition

Column NameColumn Data Type
api_id Required Input Column

The API ID for the GraphQL API.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
graphql_api

The GraphqlApi object.

STRUCT(
"name" VARCHAR,
"api_id" VARCHAR,
"authentication_type" VARCHAR,
"log_config" STRUCT(
"field_log_level" VARCHAR,
"cloud_watch_logs_role_arn" VARCHAR,
"exclude_verbose_content" BOOLEAN
),
"user_pool_config" STRUCT(
"user_pool_id" VARCHAR,
"aws_region" VARCHAR,
"default_action" VARCHAR,
"app_id_client_regex" VARCHAR
),
"open_id_connect_config" STRUCT(
"issuer" VARCHAR,
"client_id" VARCHAR,
"iat_ttl" BIGINT,
"auth_ttl" BIGINT
),
"arn" VARCHAR,
"uris" MAP(VARCHAR, VARCHAR),
"tags" MAP(VARCHAR, VARCHAR),
"additional_authentication_providers" STRUCT(
"authentication_type" VARCHAR,
"open_id_connect_config" STRUCT(
"issuer" VARCHAR,
"client_id" VARCHAR,
"iat_ttl" BIGINT,
"auth_ttl" BIGINT
),
"user_pool_config" STRUCT(
"user_pool_id" VARCHAR,
"aws_region" VARCHAR,
"app_id_client_regex" VARCHAR
),
"lambda_authorizer_config" STRUCT(
"authorizer_result_ttl_in_seconds" BIGINT,
"authorizer_uri" VARCHAR,
"identity_validation_expression" VARCHAR
)
)[],
"xray_enabled" BOOLEAN,
"waf_web_acl_arn" VARCHAR,
"lambda_authorizer_config" STRUCT(
"authorizer_result_ttl_in_seconds" BIGINT,
"authorizer_uri" VARCHAR,
"identity_validation_expression" VARCHAR
),
"dns" MAP(VARCHAR, VARCHAR),
"visibility" VARCHAR,
"api_type" VARCHAR,
"merged_api_execution_role_arn" VARCHAR,
"owner" VARCHAR,
"owner_contact" VARCHAR,
"introspection_config" VARCHAR,
"query_depth_limit" BIGINT,
"resolver_count_limit" BIGINT,
"enhanced_metrics_config" STRUCT(
"resolver_level_metrics_behavior" VARCHAR,
"data_source_level_metrics_behavior" VARCHAR,
"operation_level_metrics_config" VARCHAR
)
)
Show child fields
graphql_api.additional_authentication_providers[]
Show child fields
graphql_api.additional_authentication_providers[].authentication_type

The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

graphql_api.additional_authentication_providers[].lambda_authorizer_config

Configuration for Lambda function authorization.

Show child fields
graphql_api.additional_authentication_providers[].lambda_authorizer_config.authorizer_result_ttl_in_seconds

The number of seconds a response should be cached for. The default is 0 seconds, which disables caching. If you don't specify a value for authorizerResultTtlInSeconds, the default value is used. The maximum value is one hour (3600 seconds). The Lambda function can override this by returning a ttlOverride key in its response.

graphql_api.additional_authentication_providers[].lambda_authorizer_config.authorizer_uri

The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3), or an alias ARN.

Note: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

graphql_api.additional_authentication_providers[].lambda_authorizer_config.identity_validation_expression

A regular expression for validation of tokens before the Lambda function is called.

graphql_api.additional_authentication_providers[].open_id_connect_config

The OIDC configuration.

Show child fields
graphql_api.additional_authentication_providers[].open_id_connect_config.auth_ttl

The number of milliseconds that a token is valid after being authenticated.

graphql_api.additional_authentication_providers[].open_id_connect_config.client_id

The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

graphql_api.additional_authentication_providers[].open_id_connect_config.iat_ttl

The number of milliseconds that a token is valid after it's issued to a user.

graphql_api.additional_authentication_providers[].open_id_connect_config.issuer

The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

graphql_api.additional_authentication_providers[].user_pool_config

The Amazon Cognito user pool configuration.

Show child fields
graphql_api.additional_authentication_providers[].user_pool_config.app_id_client_regex

A regular expression for validating the incoming Amazon Cognito user pool app client ID. If this value isn't set, no filtering is applied.

graphql_api.additional_authentication_providers[].user_pool_config.aws_region

The Amazon Web Services Region in which the user pool was created.

graphql_api.additional_authentication_providers[].user_pool_config.user_pool_id

The user pool ID.

graphql_api.api_id

The API ID.

graphql_api.api_type

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

graphql_api.arn

The Amazon Resource Name (ARN).

graphql_api.authentication_type

The authentication type.

graphql_api.dns

The DNS records for the API.

graphql_api.enhanced_metrics_config

The enhancedMetricsConfig object.

Show child fields
graphql_api.enhanced_metrics_config.data_source_level_metrics_behavior

Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:

  • Requests: The number of invocations that occured during a request.

  • Latency: The time to complete a data source invocation.

  • Errors: The number of errors that occurred during a data source invocation.

These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name. dataSourceLevelMetricsBehavior accepts one of these values at a time:

  • FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request.

  • PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have the metricsConfig value set to ENABLED.

graphql_api.enhanced_metrics_config.operation_level_metrics_config

Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:

  • Requests: The number of times a specified GraphQL operation was called.

  • GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.

Metrics will be recorded by API ID and operation name. You can set the value to ENABLED or DISABLED.

graphql_api.enhanced_metrics_config.resolver_level_metrics_behavior

Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:

  • GraphQL errors: The number of GraphQL errors that occurred.

  • Requests: The number of invocations that occurred during a request.

  • Latency: The time to complete a resolver invocation.

  • Cache hits: The number of cache hits during a request.

  • Cache misses: The number of cache misses during a request.

These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name. resolverLevelMetricsBehavior accepts one of these values at a time:

  • FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request.

  • PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have the metricsConfig value set to ENABLED.

graphql_api.introspection_config

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.

graphql_api.lambda_authorizer_config

Configuration for Lambda function authorization.

Show child fields
graphql_api.lambda_authorizer_config.authorizer_result_ttl_in_seconds

The number of seconds a response should be cached for. The default is 0 seconds, which disables caching. If you don't specify a value for authorizerResultTtlInSeconds, the default value is used. The maximum value is one hour (3600 seconds). The Lambda function can override this by returning a ttlOverride key in its response.

graphql_api.lambda_authorizer_config.authorizer_uri

The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3), or an alias ARN.

Note: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

graphql_api.lambda_authorizer_config.identity_validation_expression

A regular expression for validation of tokens before the Lambda function is called.

graphql_api.log_config

The Amazon CloudWatch Logs configuration.

Show child fields
graphql_api.log_config.cloud_watch_logs_role_arn

The service role that AppSync assumes to publish to CloudWatch logs in your account.

graphql_api.log_config.exclude_verbose_content

Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

graphql_api.log_config.field_log_level

The field logging level. Values can be NONE, ERROR, or ALL.

  • NONE: No field-level logs are captured.

  • ERROR: Logs the following information only for the fields that are in error:

    • The error section in the server response.

    • Field-level errors.

    • The generated request/response functions that got resolved for error fields.

  • ALL: The following information is logged for all fields in the query:

    • Field-level tracing information.

    • The generated request/response functions that got resolved for each field.

graphql_api.merged_api_execution_role_arn

The 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.

graphql_api.name

The API name.

graphql_api.open_id_connect_config

The OpenID Connect configuration.

Show child fields
graphql_api.open_id_connect_config.auth_ttl

The number of milliseconds that a token is valid after being authenticated.

graphql_api.open_id_connect_config.client_id

The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

graphql_api.open_id_connect_config.iat_ttl

The number of milliseconds that a token is valid after it's issued to a user.

graphql_api.open_id_connect_config.issuer

The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

graphql_api.owner

The account owner of the GraphQL API.

graphql_api.owner_contact

The owner contact information for an API resource.

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

graphql_api.query_depth_limit

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.

graphql_api.resolver_count_limit

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.

graphql_api.tags

The tags.

graphql_api.uris

The URIs.

graphql_api.user_pool_config

The Amazon Cognito user pool configuration.

Show child fields
graphql_api.user_pool_config.app_id_client_regex

A regular expression for validating the incoming Amazon Cognito user pool app client ID. If this value isn't set, no filtering is applied.

graphql_api.user_pool_config.aws_region

The Amazon Web Services Region in which the user pool was created.

graphql_api.user_pool_config.default_action

The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

graphql_api.user_pool_config.user_pool_id

The user pool ID.

graphql_api.visibility

Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed once the API has been created.

graphql_api.waf_web_acl_arn

The ARN of the WAF access control list (ACL) associated with this GraphqlApi, if one exists.

graphql_api.xray_enabled

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