updateEventBus method

Future<UpdateEventBusResponse> updateEventBus({
  1. DeadLetterConfig? deadLetterConfig,
  2. String? description,
  3. String? kmsKeyIdentifier,
  4. LogConfig? logConfig,
  5. String? name,
})

Updates the specified event bus.

May throw ConcurrentModificationException. May throw InternalException. May throw OperationDisabledException. May throw ResourceNotFoundException.

Parameter description : The event bus description.

Parameter kmsKeyIdentifier : The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.

For more information, see Identify and view keys in the Key Management Service Developer Guide.

  • You call CreateDiscoverer on an event bus set to use a customer managed key for encryption.
  • You call UpdatedEventBus to set a customer managed key on an event bus with schema discovery enabled.
To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Encrypting events in the Amazon EventBridge User Guide.

Implementation

Future<UpdateEventBusResponse> updateEventBus({
  DeadLetterConfig? deadLetterConfig,
  String? description,
  String? kmsKeyIdentifier,
  LogConfig? logConfig,
  String? name,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSEvents.UpdateEventBus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (deadLetterConfig != null) 'DeadLetterConfig': deadLetterConfig,
      if (description != null) 'Description': description,
      if (kmsKeyIdentifier != null) 'KmsKeyIdentifier': kmsKeyIdentifier,
      if (logConfig != null) 'LogConfig': logConfig,
      if (name != null) 'Name': name,
    },
  );

  return UpdateEventBusResponse.fromJson(jsonResponse.body);
}