Skip to main content

graphql_apis

Creates, updates, deletes or gets a graphql_api resource or lists graphql_apis in a region

Overview

Namegraphql_apis
TypeResource
DescriptionResource Type definition for AWS::AppSync::GraphQLApi
Idawscc.appsync.graphql_apis

Fields

NameDatatypeDescription
additional_authentication_providersarrayA list of additional authentication providers for the GraphqlApi API.
api_idstringUnique AWS AppSync GraphQL API identifier.
api_typestringThe value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API (MERGED).
arnstringThe Amazon Resource Name (ARN) of the API key
authentication_typestringSecurity configuration for your GraphQL API
enhanced_metrics_configobjectEnables 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.
environment_variablesobjectA map containing the list of resources with their properties and environment variables.
graph_ql_dnsstringThe fully qualified domain name (FQDN) of the endpoint URL of your GraphQL API.
graph_ql_endpoint_arnstringThe GraphQL endpoint ARN.
graph_ql_urlstringThe Endpoint URL of your GraphQL API.
introspection_configstringSets 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.
lambda_authorizer_configobjectA 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.
log_configobjectThe Amazon CloudWatch Logs configuration.
merged_api_execution_role_arnstringThe AWS Identity and Access Management service role ARN for a merged API.
namestringThe API name
open_id_connect_configobjectThe OpenID Connect configuration.
owner_contactstringThe owner contact information for an API resource.
query_depth_limitintegerThe maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query.
realtime_dnsstringThe fully qualified domain name (FQDN) of the real-time endpoint URL of your GraphQL API.
realtime_urlstringThe GraphQL API real-time endpoint URL.
resolver_count_limitintegerThe maximum number of resolvers that can be invoked in a single request.
tagsarrayAn arbitrary set of tags (key-value pairs) for this GraphQL API.<br />
user_pool_configobjectOptional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.<br />
visibilitystringSets 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.
xray_enabledbooleanA flag indicating whether to use AWS X-Ray tracing for this GraphqlApi.<br />
regionstringAWS region.

For more information, see AWS::AppSync::GraphQLApi.

Methods

NameResourceAccessible byRequired Params
create_resourcegraphql_apisINSERTName, AuthenticationType, region
delete_resourcegraphql_apisDELETEIdentifier, region
update_resourcegraphql_apisUPDATEIdentifier, PatchDocument, region
list_resourcesgraphql_apis_list_onlySELECTregion
get_resourcegraphql_apisSELECTIdentifier, region

SELECT examples

Gets all properties from an individual graphql_api.

SELECT
region,
additional_authentication_providers,
api_id,
api_type,
arn,
authentication_type,
enhanced_metrics_config,
environment_variables,
graph_ql_dns,
graph_ql_endpoint_arn,
graph_ql_url,
introspection_config,
lambda_authorizer_config,
log_config,
merged_api_execution_role_arn,
name,
open_id_connect_config,
owner_contact,
query_depth_limit,
realtime_dns,
realtime_url,
resolver_count_limit,
tags,
user_pool_config,
visibility,
xray_enabled
FROM awscc.appsync.graphql_apis
WHERE
region = 'us-east-1' AND
Identifier = '{{ api_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new graphql_api resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.appsync.graphql_apis (
AuthenticationType,
Name,
region
)
SELECT
'{{ authentication_type }}',
'{{ name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a graphql_api resource, using stack-deploy.

/*+ update */
UPDATE awscc.appsync.graphql_apis
SET PatchDocument = string('{{ {
"AdditionalAuthenticationProviders": additional_authentication_providers,
"ApiType": api_type,
"AuthenticationType": authentication_type,
"EnhancedMetricsConfig": enhanced_metrics_config,
"EnvironmentVariables": environment_variables,
"IntrospectionConfig": introspection_config,
"LambdaAuthorizerConfig": lambda_authorizer_config,
"LogConfig": log_config,
"MergedApiExecutionRoleArn": merged_api_execution_role_arn,
"Name": name,
"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
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ api_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.appsync.graphql_apis
WHERE
Identifier = '{{ api_id }}' AND
region = 'us-east-1';

Permissions

To operate on the graphql_apis resource, the following permissions are required:

appsync:CreateGraphqlApi,
appsync:TagResource