create_graphql_api
async
¶
create_graphql_api(
name: String,
authentication_type: AuthenticationType,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = None,
log_config: Optional[LogConfig] = None,
user_pool_config: Optional[UserPoolConfig] = None,
open_id_connect_config: Optional[OpenIDConnectConfig] = None,
tags: Optional[TagMap] = None,
additional_authentication_providers: Optional[
AdditionalAuthenticationProviders
] = None,
xray_enabled: Optional[Boolean] = None,
lambda_authorizer_config: Optional[LambdaAuthorizerConfig] = None,
api_type: Optional[GraphQLApiType] = None,
merged_api_execution_role_arn: Optional[String] = None,
visibility: Optional[GraphQLApiVisibility] = None,
owner_contact: Optional[String] = None,
introspection_config: Optional[GraphQLApiIntrospectionConfig] = None,
query_depth_limit: Optional[QueryDepthLimit] = None,
resolver_count_limit: Optional[ResolverCountLimit] = None,
enhanced_metrics_config: Optional[EnhancedMetricsConfig] = None,
) -> CreateGraphqlApiResponse
Creates a GraphqlApi object.
Parameters:
-
name(String) –A user-supplied name for the
GraphqlApi. -
log_config(Optional[LogConfig], default:None) –The Amazon CloudWatch Logs configuration.
-
authentication_type(AuthenticationType) –The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.
-
user_pool_config(Optional[UserPoolConfig], default:None) –The Amazon Cognito user pool configuration.
-
open_id_connect_config(Optional[OpenIDConnectConfig], default:None) –The OIDC configuration.
-
tags(Optional[TagMap], default:None) –A
TagMapobject. -
additional_authentication_providers(Optional[AdditionalAuthenticationProviders], default:None) –A list of additional authentication providers for the
GraphqlApiAPI. -
xray_enabled(Optional[Boolean], default:None) –A flag indicating whether to use X-Ray tracing for the
GraphqlApi. -
lambda_authorizer_config(Optional[LambdaAuthorizerConfig], default:None) –Configuration for Lambda function authorization.
-
api_type(Optional[GraphQLApiType], default:None) –The value that indicates whether the GraphQL API is a standard API (
GRAPHQL) or merged API (MERGED). -
merged_api_execution_role_arn(Optional[String], default:None) –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_MERGEto update the merged API endpoint with the source API changes automatically. -
visibility(Optional[GraphQLApiVisibility], default:None) –Sets the value of the GraphQL API to public (
GLOBAL) or private (PRIVATE). If no value is provided, the visibility will be set toGLOBALby default. This value cannot be changed once the API has been created. -
owner_contact(Optional[String], default:None) –The owner contact information for an API resource.
This field accepts any string input with a length of 0 - 256 characters.
-
introspection_config(Optional[GraphQLApiIntrospectionConfig], default:None) –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 toENABLEDby 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.
-
query_depth_limit(Optional[QueryDepthLimit], default:None) –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 between1and75nested 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.
-
resolver_count_limit(Optional[ResolverCountLimit], default:None) –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 to10000. When specified, the limit value can be between1and10000. This field will produce a limit error if the operation falls out of bounds. -
enhanced_metrics_config(Optional[EnhancedMetricsConfig], default:None) –The
enhancedMetricsConfigobject.
Raises:
-
ApiLimitExceededException–The GraphQL API exceeded a limit. Try your request again.
-
BadRequestException–The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
-
ConcurrentModificationException–Another modification is in progress at this time and it must complete before you can make your change.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
LimitExceededException–The request exceeded a limit. Try your request again.
-
UnauthorizedException–You aren't authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_appsync/_services/async_app_sync.py
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 | |