associateSourceGraphqlApi method
Creates an association between a Merged API and source API using the Merged API's identifier.
May throw BadRequestException.
May throw ConcurrentModificationException.
May throw InternalFailureException.
May throw LimitExceededException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter mergedApiIdentifier :
The identifier of the AppSync Merged API. This is generated by the AppSync
service. In most cases, Merged APIs (especially in your account) only
require the API ID value or ARN of the merged API. However, Merged APIs in
other accounts (cross-account use cases) strictly require the full
resource ARN of the merged API.
Parameter sourceApiIdentifier :
The identifier of the AppSync Source API. This is generated by the AppSync
service. In most cases, source APIs (especially in your account) only
require the API ID value or ARN of the source API. However, source APIs
from other accounts (cross-account use cases) strictly require the full
resource ARN of the source API.
Parameter description :
The description field.
Parameter sourceApiAssociationConfig :
The SourceApiAssociationConfig object data.
Implementation
Future<AssociateSourceGraphqlApiResponse> associateSourceGraphqlApi({
required String mergedApiIdentifier,
required String sourceApiIdentifier,
String? description,
SourceApiAssociationConfig? sourceApiAssociationConfig,
}) async {
final $payload = <String, dynamic>{
'sourceApiIdentifier': sourceApiIdentifier,
if (description != null) 'description': description,
if (sourceApiAssociationConfig != null)
'sourceApiAssociationConfig': sourceApiAssociationConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v1/mergedApis/${Uri.encodeComponent(mergedApiIdentifier)}/sourceApiAssociations',
exceptionFnMap: _exceptionFns,
);
return AssociateSourceGraphqlApiResponse.fromJson(response);
}