describeUsageLimits method

Future<UsageLimitList> describeUsageLimits({
  1. String? clusterIdentifier,
  2. UsageLimitFeatureType? featureType,
  3. String? marker,
  4. int? maxRecords,
  5. List<String>? tagKeys,
  6. List<String>? tagValues,
  7. String? usageLimitId,
})

Shows usage limits on a cluster. Results are filtered based on the combination of input usage limit identifier, cluster identifier, and feature type parameters:

  • If usage limit identifier, cluster identifier, and feature type are not provided, then all usage limit objects for the current account in the current region are returned.
  • If usage limit identifier is provided, then the corresponding usage limit object is returned.
  • If cluster identifier is provided, then all usage limit objects for the specified cluster are returned.
  • If cluster identifier and feature type are provided, then all usage limit objects for the combination of cluster and feature are returned.

May throw ClusterNotFoundFault. May throw UnsupportedOperationFault.

Parameter clusterIdentifier : The identifier of the cluster for which you want to describe usage limits.

Parameter featureType : The feature type for which you want to describe usage limits.

Parameter marker : An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeUsageLimits request exceed the value specified in MaxRecords, AWS returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.

Parameter maxRecords : The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.

Default: 100

Constraints: minimum 20, maximum 100.

Parameter tagKeys : A tag key or keys for which you want to return all matching usage limit objects that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called owner and environment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the usage limit objects have either or both of these tag keys associated with them.

Parameter tagValues : A tag value or values for which you want to return all matching usage limit objects that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called admin and test. If you specify both of these tag values in the request, Amazon Redshift returns a response with the usage limit objects that have either or both of these tag values associated with them.

Parameter usageLimitId : The identifier of the usage limit to describe.

Implementation

Future<UsageLimitList> describeUsageLimits({
  String? clusterIdentifier,
  UsageLimitFeatureType? featureType,
  String? marker,
  int? maxRecords,
  List<String>? tagKeys,
  List<String>? tagValues,
  String? usageLimitId,
}) async {
  _s.validateStringLength(
    'clusterIdentifier',
    clusterIdentifier,
    0,
    2147483647,
  );
  _s.validateStringLength(
    'marker',
    marker,
    0,
    2147483647,
  );
  _s.validateStringLength(
    'usageLimitId',
    usageLimitId,
    0,
    2147483647,
  );
  final $request = <String, dynamic>{};
  clusterIdentifier?.also((arg) => $request['ClusterIdentifier'] = arg);
  featureType?.also((arg) => $request['FeatureType'] = arg.toValue());
  marker?.also((arg) => $request['Marker'] = arg);
  maxRecords?.also((arg) => $request['MaxRecords'] = arg);
  tagKeys?.also((arg) => $request['TagKeys'] = arg);
  tagValues?.also((arg) => $request['TagValues'] = arg);
  usageLimitId?.also((arg) => $request['UsageLimitId'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeUsageLimits',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeUsageLimitsMessage'],
    shapes: shapes,
    resultWrapper: 'DescribeUsageLimitsResult',
  );
  return UsageLimitList.fromXml($result);
}