updateGraphqlApi method
- required String apiId,
- required String name,
- List<
AdditionalAuthenticationProvider> ? additionalAuthenticationProviders, - AuthenticationType? authenticationType,
- LogConfig? logConfig,
- OpenIDConnectConfig? openIDConnectConfig,
- UserPoolConfig? userPoolConfig,
- bool? xrayEnabled,
Updates a GraphqlApi
object.
May throw BadRequestException. May throw ConcurrentModificationException. May throw NotFoundException. May throw UnauthorizedException. May throw InternalFailureException. May throw AccessDeniedException.
Parameter apiId
:
The API ID.
Parameter name
:
The new name for the GraphqlApi
object.
Parameter additionalAuthenticationProviders
:
A list of additional authentication providers for the
GraphqlApi
API.
Parameter authenticationType
:
The new authentication type for the GraphqlApi
object.
Parameter logConfig
:
The Amazon CloudWatch Logs configuration for the GraphqlApi
object.
Parameter openIDConnectConfig
:
The OpenID Connect configuration for the GraphqlApi
object.
Parameter userPoolConfig
:
The new Amazon Cognito user pool configuration for the
GraphqlApi
object.
Parameter xrayEnabled
:
A flag indicating whether to enable X-Ray tracing for the
GraphqlApi
.
Implementation
Future<UpdateGraphqlApiResponse> updateGraphqlApi({
required String apiId,
required String name,
List<AdditionalAuthenticationProvider>? additionalAuthenticationProviders,
AuthenticationType? authenticationType,
LogConfig? logConfig,
OpenIDConnectConfig? openIDConnectConfig,
UserPoolConfig? userPoolConfig,
bool? xrayEnabled,
}) async {
ArgumentError.checkNotNull(apiId, 'apiId');
ArgumentError.checkNotNull(name, 'name');
final $payload = <String, dynamic>{
'name': name,
if (additionalAuthenticationProviders != null)
'additionalAuthenticationProviders': additionalAuthenticationProviders,
if (authenticationType != null)
'authenticationType': authenticationType.toValue(),
if (logConfig != null) 'logConfig': logConfig,
if (openIDConnectConfig != null)
'openIDConnectConfig': openIDConnectConfig,
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);
}