updateGraphqlApi method
- required String apiId,
- required AuthenticationType authenticationType,
- required String name,
- List<
AdditionalAuthenticationProvider> ? additionalAuthenticationProviders, - EnhancedMetricsConfig? enhancedMetricsConfig,
- GraphQLApiIntrospectionConfig? introspectionConfig,
- LambdaAuthorizerConfig? lambdaAuthorizerConfig,
- LogConfig? logConfig,
- String? mergedApiExecutionRoleArn,
- OpenIDConnectConfig? openIDConnectConfig,
- String? ownerContact,
- int? queryDepthLimit,
- int? resolverCountLimit,
- UserPoolConfig? userPoolConfig,
- bool? xrayEnabled,
Updates a GraphqlApi object.
May throw AccessDeniedException.
May throw BadRequestException.
May throw ConcurrentModificationException.
May throw InternalFailureException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter apiId :
The API ID.
Parameter authenticationType :
The new authentication type for the GraphqlApi object.
Parameter name :
The new name for the GraphqlApi object.
Parameter additionalAuthenticationProviders :
A list of additional authentication providers for the
GraphqlApi API.
Parameter enhancedMetricsConfig :
The enhancedMetricsConfig object.
Parameter introspectionConfig :
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.
Parameter lambdaAuthorizerConfig :
Configuration for Lambda function authorization.
Parameter logConfig :
The Amazon CloudWatch Logs configuration for the GraphqlApi
object.
Parameter mergedApiExecutionRoleArn :
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.
Parameter openIDConnectConfig :
The OpenID Connect configuration for the GraphqlApi object.
Parameter ownerContact :
The owner contact information for an API resource.
This field accepts any string input with a length of 0 - 256 characters.
Parameter queryDepthLimit :
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.
Parameter resolverCountLimit :
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.
Parameter userPoolConfig :
The new Amazon Cognito user pool configuration for the
~GraphqlApi object.
Parameter xrayEnabled :
A flag indicating whether to use X-Ray tracing for the
GraphqlApi.
Implementation
Future<UpdateGraphqlApiResponse> updateGraphqlApi({
required String apiId,
required AuthenticationType authenticationType,
required String name,
List<AdditionalAuthenticationProvider>? additionalAuthenticationProviders,
EnhancedMetricsConfig? enhancedMetricsConfig,
GraphQLApiIntrospectionConfig? introspectionConfig,
LambdaAuthorizerConfig? lambdaAuthorizerConfig,
LogConfig? logConfig,
String? mergedApiExecutionRoleArn,
OpenIDConnectConfig? openIDConnectConfig,
String? ownerContact,
int? queryDepthLimit,
int? resolverCountLimit,
UserPoolConfig? userPoolConfig,
bool? xrayEnabled,
}) async {
_s.validateNumRange(
'queryDepthLimit',
queryDepthLimit,
0,
75,
);
_s.validateNumRange(
'resolverCountLimit',
resolverCountLimit,
0,
10000,
);
final $payload = <String, dynamic>{
'authenticationType': authenticationType.value,
'name': name,
if (additionalAuthenticationProviders != null)
'additionalAuthenticationProviders': additionalAuthenticationProviders,
if (enhancedMetricsConfig != null)
'enhancedMetricsConfig': enhancedMetricsConfig,
if (introspectionConfig != null)
'introspectionConfig': introspectionConfig.value,
if (lambdaAuthorizerConfig != null)
'lambdaAuthorizerConfig': lambdaAuthorizerConfig,
if (logConfig != null) 'logConfig': logConfig,
if (mergedApiExecutionRoleArn != null)
'mergedApiExecutionRoleArn': mergedApiExecutionRoleArn,
if (openIDConnectConfig != null)
'openIDConnectConfig': openIDConnectConfig,
if (ownerContact != null) 'ownerContact': ownerContact,
if (queryDepthLimit != null) 'queryDepthLimit': queryDepthLimit,
if (resolverCountLimit != null) 'resolverCountLimit': resolverCountLimit,
if (userPoolConfig != null) 'userPoolConfig': userPoolConfig,
if (xrayEnabled != null) 'xrayEnabled': xrayEnabled,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/apis/${Uri.encodeComponent(apiId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateGraphqlApiResponse.fromJson(response);
}