listIntegrations method

Future<ListIntegrationsResponse> listIntegrations({
  1. String? integrationNamePrefix,
  2. IntegrationStatus? integrationStatus,
  3. IntegrationType? integrationType,
})

Returns a list of integrations between CloudWatch Logs and other services in this account. Currently, only one integration can be created in an account, and this integration must be with OpenSearch Service.

May throw InvalidParameterException. May throw ServiceUnavailableException.

Parameter integrationNamePrefix : To limit the results to integrations that start with a certain name prefix, specify that name prefix here.

Parameter integrationStatus : To limit the results to integrations with a certain status, specify that status here.

Parameter integrationType : To limit the results to integrations of a certain type, specify that type here.

Implementation

Future<ListIntegrationsResponse> listIntegrations({
  String? integrationNamePrefix,
  IntegrationStatus? integrationStatus,
  IntegrationType? integrationType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.ListIntegrations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (integrationNamePrefix != null)
        'integrationNamePrefix': integrationNamePrefix,
      if (integrationStatus != null)
        'integrationStatus': integrationStatus.value,
      if (integrationType != null) 'integrationType': integrationType.value,
    },
  );

  return ListIntegrationsResponse.fromJson(jsonResponse.body);
}