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 | aws.appsync.graphql_apis |
Fields
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. |
user_pool_config | object | Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint. |
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. |
region | string | AWS region. |
For more information, see AWS::AppSync::GraphQLApi
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, AuthenticationType, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all graphql_apis
in a region.
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 aws.appsync.graphql_apis
WHERE region = 'us-east-1';
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 aws.appsync.graphql_apis
WHERE region = 'us-east-1' AND data__Identifier = '<ApiId>';
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 aws.appsync.graphql_apis (
AuthenticationType,
Name,
region
)
SELECT
'{{ AuthenticationType }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.appsync.graphql_apis (
AdditionalAuthenticationProviders,
ApiType,
AuthenticationType,
EnhancedMetricsConfig,
EnvironmentVariables,
IntrospectionConfig,
LambdaAuthorizerConfig,
LogConfig,
MergedApiExecutionRoleArn,
Name,
OpenIDConnectConfig,
OwnerContact,
QueryDepthLimit,
ResolverCountLimit,
Tags,
UserPoolConfig,
Visibility,
XrayEnabled,
region
)
SELECT
'{{ AdditionalAuthenticationProviders }}',
'{{ ApiType }}',
'{{ AuthenticationType }}',
'{{ EnhancedMetricsConfig }}',
'{{ EnvironmentVariables }}',
'{{ IntrospectionConfig }}',
'{{ LambdaAuthorizerConfig }}',
'{{ LogConfig }}',
'{{ MergedApiExecutionRoleArn }}',
'{{ Name }}',
'{{ OpenIDConnectConfig }}',
'{{ OwnerContact }}',
'{{ QueryDepthLimit }}',
'{{ ResolverCountLimit }}',
'{{ Tags }}',
'{{ UserPoolConfig }}',
'{{ Visibility }}',
'{{ XrayEnabled }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: graphql_api
props:
- name: AdditionalAuthenticationProviders
value:
- LambdaAuthorizerConfig:
IdentityValidationExpression: '{{ IdentityValidationExpression }}'
AuthorizerUri: '{{ AuthorizerUri }}'
AuthorizerResultTtlInSeconds: '{{ AuthorizerResultTtlInSeconds }}'
OpenIDConnectConfig:
ClientId: '{{ ClientId }}'
AuthTTL: null
Issuer: '{{ Issuer }}'
IatTTL: null
UserPoolConfig:
AppIdClientRegex: '{{ AppIdClientRegex }}'
UserPoolId: '{{ UserPoolId }}'
AwsRegion: '{{ AwsRegion }}'
AuthenticationType: '{{ AuthenticationType }}'
- name: ApiType
value: '{{ ApiType }}'
- name: AuthenticationType
value: '{{ AuthenticationType }}'
- name: EnhancedMetricsConfig
value:
OperationLevelMetricsConfig: '{{ OperationLevelMetricsConfig }}'
ResolverLevelMetricsBehavior: '{{ ResolverLevelMetricsBehavior }}'
DataSourceLevelMetricsBehavior: '{{ DataSourceLevelMetricsBehavior }}'
- name: EnvironmentVariables
value: {}
- name: IntrospectionConfig
value: '{{ IntrospectionConfig }}'
- name: LambdaAuthorizerConfig
value: null
- name: LogConfig
value:
ExcludeVerboseContent: '{{ ExcludeVerboseContent }}'
FieldLogLevel: '{{ FieldLogLevel }}'
CloudWatchLogsRoleArn: '{{ CloudWatchLogsRoleArn }}'
- name: MergedApiExecutionRoleArn
value: '{{ MergedApiExecutionRoleArn }}'
- name: Name
value: '{{ Name }}'
- name: OpenIDConnectConfig
value: null
- name: OwnerContact
value: '{{ OwnerContact }}'
- name: QueryDepthLimit
value: '{{ QueryDepthLimit }}'
- name: ResolverCountLimit
value: '{{ ResolverCountLimit }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: UserPoolConfig
value:
AppIdClientRegex: '{{ AppIdClientRegex }}'
UserPoolId: '{{ UserPoolId }}'
AwsRegion: '{{ AwsRegion }}'
DefaultAction: '{{ DefaultAction }}'
- name: Visibility
value: '{{ Visibility }}'
- name: XrayEnabled
value: '{{ XrayEnabled }}'
DELETE
example
/*+ delete */
DELETE FROM aws.appsync.graphql_apis
WHERE data__Identifier = '<ApiId>'
AND region = 'us-east-1';
Permissions
To operate on the graphql_apis
resource, the following permissions are required:
Create
appsync:CreateGraphqlApi,
appsync:TagResource
Read
appsync:GetGraphqlApi,
appsync:GetGraphqlApiEnvironmentVariables,
appsync:ListTagsForResource
Update
appsync:GetGraphqlApi,
appsync:UpdateGraphqlApi,
appsync:TagResource,
appsync:UntagResource
Delete
appsync:DeleteGraphqlApi
List
appsync:ListGraphqlApis