connectAppAuthorization method
Establishes a connection between Amazon Web Services AppFabric and an application, which allows AppFabric to call the APIs of the application.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter appAuthorizationIdentifier :
The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of
the app authorization to use for the request.
Parameter appBundleIdentifier :
The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of
the app bundle that contains the app authorization to use for the request.
Parameter authRequest :
Contains OAuth2 authorization information.
This is required if the app authorization for the request is configured
with an OAuth2 (oauth2) authorization type.
Implementation
Future<ConnectAppAuthorizationResponse> connectAppAuthorization({
required String appAuthorizationIdentifier,
required String appBundleIdentifier,
AuthRequest? authRequest,
}) async {
final $payload = <String, dynamic>{
if (authRequest != null) 'authRequest': authRequest,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/appbundles/${Uri.encodeComponent(appBundleIdentifier)}/appauthorizations/${Uri.encodeComponent(appAuthorizationIdentifier)}/connect',
exceptionFnMap: _exceptionFns,
);
return ConnectAppAuthorizationResponse.fromJson(response);
}