describeEventBus method

Future<DescribeEventBusResponse> describeEventBus({
  1. String? name,
})

Displays details about an event bus in your account. This can include the external AWS accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time.

To enable your account to receive events from other accounts on its default event bus, use PutPermission.

For more information about partner event buses, see CreateEventBus.

May throw ResourceNotFoundException. May throw InternalException.

Parameter name : The name or ARN of the event bus to show details for. If you omit this, the default event bus is displayed.

Implementation

Future<DescribeEventBusResponse> describeEventBus({
  String? name,
}) async {
  _s.validateStringLength(
    'name',
    name,
    1,
    1600,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSEvents.DescribeEventBus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (name != null) 'Name': name,
    },
  );

  return DescribeEventBusResponse.fromJson(jsonResponse.body);
}