updateAppAuthorization method

Future<UpdateAppAuthorizationResponse> updateAppAuthorization({
  1. required String appAuthorizationIdentifier,
  2. required String appBundleIdentifier,
  3. Credential? credential,
  4. Tenant? tenant,
})

Updates an app authorization within an app bundle, which allows AppFabric to connect to an application.

If the app authorization was in a connected state, updating the app authorization will set it back to a PendingConnect state.

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 to use for the request.

Parameter credential : Contains credentials for the application, such as an API key or OAuth2 client ID and secret.

Specify credentials that match the authorization type of the app authorization to update. For example, if the authorization type of the app authorization is OAuth2 (oauth2), then you should provide only the OAuth2 credentials.

Parameter tenant : Contains information about an application tenant, such as the application display name and identifier.

Implementation

Future<UpdateAppAuthorizationResponse> updateAppAuthorization({
  required String appAuthorizationIdentifier,
  required String appBundleIdentifier,
  Credential? credential,
  Tenant? tenant,
}) async {
  final $payload = <String, dynamic>{
    if (credential != null) 'credential': credential,
    if (tenant != null) 'tenant': tenant,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/appbundles/${Uri.encodeComponent(appBundleIdentifier)}/appauthorizations/${Uri.encodeComponent(appAuthorizationIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAppAuthorizationResponse.fromJson(response);
}