describeEndpoint method
Get the information about an existing global endpoint. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .
May throw InternalException.
May throw ResourceNotFoundException.
Parameter name :
The name of the endpoint you want to get information about. For example,
"Name":"us-east-2-custom_bus_A-endpoint".
Parameter homeRegion :
The primary Region of the endpoint you want to get information about. For
example "HomeRegion": "us-east-1".
Implementation
Future<DescribeEndpointResponse> describeEndpoint({
required String name,
String? homeRegion,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.DescribeEndpoint'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (homeRegion != null) 'HomeRegion': homeRegion,
},
);
return DescribeEndpointResponse.fromJson(jsonResponse.body);
}