graphql_apis
Creates, updates, deletes or gets a graphql_api resource or lists graphql_apis in a region
Overview
| Name | graphql_apis |
| Type | Resource |
| Description | Resource Type definition for AWS::AppSync::GraphQLApi |
| Id | awscc.appsync.graphql_apis |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
additional_authentication_providers | array | A list of additional authentication providers for the GraphqlApi API. |
api_id | string | Unique AWS AppSync GraphQL API identifier. |
api_type | string | The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API (MERGED). |
arn | string | The Amazon Resource Name (ARN) of the API key |
authentication_type | string | Security configuration for your GraphQL API |
enhanced_metrics_config | object | 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. |
environment_variables | object | A map containing the list of resources with their properties and environment variables. |
graph_ql_dns | string | The fully qualified domain name (FQDN) of the endpoint URL of your GraphQL API. |
graph_ql_endpoint_arn | string | The GraphQL endpoint ARN. |
graph_ql_url | string | The Endpoint URL of your GraphQL API. |
introspection_config | string | 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. |
lambda_authorizer_config | object | 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. |
log_config | object | The Amazon CloudWatch Logs configuration. |
merged_api_execution_role_arn | string | The AWS Identity and Access Management service role ARN for a merged API. |
name | string | The API name |
open_id_connect_config | object | The OpenID Connect configuration. |
owner_contact | string | The owner contact information for an API resource. |
query_depth_limit | integer | 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. |
realtime_dns | string | The fully qualified domain name (FQDN) of the real-time endpoint URL of your GraphQL API. |
realtime_url | string | The GraphQL API real-time endpoint URL. |
resolver_count_limit | integer | The maximum number of resolvers that can be invoked in a single request. |
tags | array | An arbitrary set of tags (key-value pairs) for this GraphQL API.<br /> |
user_pool_config | object | Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.<br /> |
visibility | string | 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. |
xray_enabled | boolean | A flag indicating whether to use AWS X-Ray tracing for this GraphqlApi.<br /> |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
api_id | string | Unique AWS AppSync GraphQL API identifier. |
region | string | AWS region. |
For more information, see AWS::AppSync::GraphQLApi.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | graphql_apis | INSERT | Name, AuthenticationType, region |
delete_resource | graphql_apis | DELETE | Identifier, region |
update_resource | graphql_apis | UPDATE | Identifier, PatchDocument, region |
list_resources | graphql_apis_list_only | SELECT | region |
get_resource | graphql_apis | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all graphql_apis in a region.
SELECT
region,
api_id
FROM awscc.appsync.graphql_apis_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new graphql_api resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.appsync.graphql_apis (
AuthenticationType,
Name,
region
)
SELECT
'{{ authentication_type }}',
'{{ name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.appsync.graphql_apis (
AdditionalAuthenticationProviders,
ApiType,
AuthenticationType,
EnhancedMetricsConfig,
EnvironmentVariables,
IntrospectionConfig,
LambdaAuthorizerConfig,
LogConfig,
MergedApiExecutionRoleArn,
Name,
OpenIDConnectConfig,
OwnerContact,
QueryDepthLimit,
ResolverCountLimit,
Tags,
UserPoolConfig,
Visibility,
XrayEnabled,
region
)
SELECT
'{{ additional_authentication_providers }}',
'{{ api_type }}',
'{{ authentication_type }}',
'{{ enhanced_metrics_config }}',
'{{ environment_variables }}',
'{{ introspection_config }}',
'{{ lambda_authorizer_config }}',
'{{ log_config }}',
'{{ merged_api_execution_role_arn }}',
'{{ name }}',
'{{ open_id_connect_config }}',
'{{ owner_contact }}',
'{{ query_depth_limit }}',
'{{ resolver_count_limit }}',
'{{ tags }}',
'{{ user_pool_config }}',
'{{ visibility }}',
'{{ xray_enabled }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: graphql_api
props:
- name: additional_authentication_providers
value:
- lambda_authorizer_config:
identity_validation_expression: '{{ identity_validation_expression }}'
authorizer_uri: '{{ authorizer_uri }}'
authorizer_result_ttl_in_seconds: '{{ authorizer_result_ttl_in_seconds }}'
open_id_connect_config:
client_id: '{{ client_id }}'
auth_ttl: null
issuer: '{{ issuer }}'
iat_ttl: null
user_pool_config:
app_id_client_regex: '{{ app_id_client_regex }}'
user_pool_id: '{{ user_pool_id }}'
aws_region: '{{ aws_region }}'
authentication_type: '{{ authentication_type }}'
- name: api_type
value: '{{ api_type }}'
- name: authentication_type
value: '{{ authentication_type }}'
- name: enhanced_metrics_config
value:
operation_level_metrics_config: '{{ operation_level_metrics_config }}'
resolver_level_metrics_behavior: '{{ resolver_level_metrics_behavior }}'
data_source_level_metrics_behavior: '{{ data_source_level_metrics_behavior }}'
- name: environment_variables
value: {}
- name: introspection_config
value: '{{ introspection_config }}'
- name: lambda_authorizer_config
value: null
- name: log_config
value:
exclude_verbose_content: '{{ exclude_verbose_content }}'
field_log_level: '{{ field_log_level }}'
cloud_watch_logs_role_arn: '{{ cloud_watch_logs_role_arn }}'
- name: merged_api_execution_role_arn
value: '{{ merged_api_execution_role_arn }}'
- name: name
value: '{{ name }}'
- name: open_id_connect_config
value: null
- name: owner_contact
value: '{{ owner_contact }}'
- name: query_depth_limit
value: '{{ query_depth_limit }}'
- name: resolver_count_limit
value: '{{ resolver_count_limit }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: user_pool_config
value:
app_id_client_regex: '{{ app_id_client_regex }}'
user_pool_id: '{{ user_pool_id }}'
aws_region: '{{ aws_region }}'
default_action: '{{ default_action }}'
- name: visibility
value: '{{ visibility }}'
- name: xray_enabled
value: '{{ xray_enabled }}'
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:
- Create
- Read
- Update
- Delete
- List
appsync:CreateGraphqlApi,
appsync:TagResource
appsync:GetGraphqlApi,
appsync:GetGraphqlApiEnvironmentVariables,
appsync:ListTagsForResource
appsync:GetGraphqlApi,
appsync:UpdateGraphqlApi,
appsync:TagResource,
appsync:UntagResource
appsync:DeleteGraphqlApi
appsync:ListGraphqlApis