Method: Aws::ServiceQuotas::Client#list_service_quotas

Defined in:
lib/aws-sdk-servicequotas/client.rb

#list_service_quotas(params = {}) ⇒ Types::ListServiceQuotasResponse

Lists the applied quota values for the specified Amazon Web Service. For some quotas, only the default values are available. If the applied quota value is not available for a quota, the quota is not retrieved.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_service_quotas({
  service_code: "ServiceCode", # required
  next_token: "NextToken",
  max_results: 1,
  quota_code: "QuotaCode",
  quota_applied_at_level: "ACCOUNT", # accepts ACCOUNT, RESOURCE, ALL
})

Response structure


resp.next_token #=> String
resp.quotas #=> Array
resp.quotas[0].service_code #=> String
resp.quotas[0].service_name #=> String
resp.quotas[0].quota_arn #=> String
resp.quotas[0].quota_code #=> String
resp.quotas[0].quota_name #=> String
resp.quotas[0].value #=> Float
resp.quotas[0].unit #=> String
resp.quotas[0].adjustable #=> Boolean
resp.quotas[0].global_quota #=> Boolean
resp.quotas[0].usage_metric.metric_namespace #=> String
resp.quotas[0].usage_metric.metric_name #=> String
resp.quotas[0].usage_metric.metric_dimensions #=> Hash
resp.quotas[0].usage_metric.metric_dimensions["MetricDimensionName"] #=> String
resp.quotas[0].usage_metric.metric_statistic_recommendation #=> String
resp.quotas[0].period.period_value #=> Integer
resp.quotas[0].period.period_unit #=> String, one of "MICROSECOND", "MILLISECOND", "SECOND", "MINUTE", "HOUR", "DAY", "WEEK"
resp.quotas[0].error_reason.error_code #=> String, one of "DEPENDENCY_ACCESS_DENIED_ERROR", "DEPENDENCY_THROTTLING_ERROR", "DEPENDENCY_SERVICE_ERROR", "SERVICE_QUOTA_NOT_AVAILABLE_ERROR"
resp.quotas[0].error_reason.error_message #=> String
resp.quotas[0].quota_applied_at_level #=> String, one of "ACCOUNT", "RESOURCE", "ALL"
resp.quotas[0].quota_context.context_scope #=> String, one of "RESOURCE", "ACCOUNT"
resp.quotas[0].quota_context.context_scope_type #=> String
resp.quotas[0].quota_context.context_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :service_code (required, String)

    Specifies the service identifier. To find the service code value for an Amazon Web Services service, use the ListServices operation.

  • :next_token (String)

    Specifies a value for receiving additional results after you receive a ‘NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value of the previous call’s ‘NextToken` response to indicate where the output should continue from.

  • :max_results (Integer)

    Specifies the maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the ‘NextToken` response element is present and has a value (is not null). Include that value as the `NextToken` request parameter in the next call to the operation to get the next part of the results.

    <note markdown=“1”> An API operation can return fewer results than the maximum even when there are more results available. You should check ‘NextToken` after every operation to ensure that you receive all of the results.

    </note>
    
  • :quota_code (String)

    Specifies the quota identifier. To find the quota code for a specific quota, use the ListServiceQuotas operation, and look for the ‘QuotaCode` response in the output for the quota you want.

  • :quota_applied_at_level (String)

    Specifies at which level of granularity that the quota value is applied.

Returns:

See Also:



1174
1175
1176
1177
# File 'lib/aws-sdk-servicequotas/client.rb', line 1174

def list_service_quotas(params = {}, options = {})
  req = build_request(:list_service_quotas, params)
  req.send_request(options)
end