listPipes method

Future<ListPipesResponse> listPipes({
  1. PipeState? currentState,
  2. RequestedPipeState? desiredState,
  3. int? limit,
  4. String? namePrefix,
  5. String? nextToken,
  6. String? sourcePrefix,
  7. String? targetPrefix,
})

Get the pipes associated with this account. For more information about pipes, see Amazon EventBridge Pipes in the Amazon EventBridge User Guide.

May throw InternalException. May throw ThrottlingException. May throw ValidationException.

Parameter currentState : The state the pipe is in.

Parameter desiredState : The state the pipe should be in.

Parameter limit : The maximum number of pipes to include in the response.

Parameter namePrefix : A value that will return a subset of the pipes associated with this account. For example, "NamePrefix": "ABC" will return all endpoints with "ABC" in the name.

Parameter nextToken : If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

Parameter sourcePrefix : The prefix matching the pipe source.

Parameter targetPrefix : The prefix matching the pipe target.

Implementation

Future<ListPipesResponse> listPipes({
  PipeState? currentState,
  RequestedPipeState? desiredState,
  int? limit,
  String? namePrefix,
  String? nextToken,
  String? sourcePrefix,
  String? targetPrefix,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (currentState != null) 'CurrentState': [currentState.value],
    if (desiredState != null) 'DesiredState': [desiredState.value],
    if (limit != null) 'Limit': [limit.toString()],
    if (namePrefix != null) 'NamePrefix': [namePrefix],
    if (nextToken != null) 'NextToken': [nextToken],
    if (sourcePrefix != null) 'SourcePrefix': [sourcePrefix],
    if (targetPrefix != null) 'TargetPrefix': [targetPrefix],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/pipes',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListPipesResponse.fromJson(response);
}