describeServices method
Returns the current list of AWS services and a list of service categories for each service. You then use service names and categories in your CreateCase requests. Each AWS service has its own set of categories.
The service codes and category codes correspond to the values that appear
in the Service and Category lists on the AWS Support Center
Create
Case page. The values in those fields don't necessarily match the
service codes and categories returned by the DescribeServices
operation. Always use the service codes and categories that the
DescribeServices
operation returns, so that you have the most
recent set of service and category codes.
- You must have a Business or Enterprise support plan to use the AWS Support API.
-
If you call the AWS Support API from an account that does not have a
Business or Enterprise support plan, the
SubscriptionRequiredException
error message appears. For information about changing your support plan, see AWS Support.
May throw InternalServerError.
Parameter language
:
The ISO 639-1 code for the language in which AWS provides support. AWS
Support currently supports English ("en") and Japanese ("ja"). Language
parameters must be passed explicitly for operations that take them.
Parameter serviceCodeList
:
A JSON-formatted list of service codes available for AWS services.
Implementation
Future<DescribeServicesResponse> describeServices({
String? language,
List<String>? serviceCodeList,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSupport_20130415.DescribeServices'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (language != null) 'language': language,
if (serviceCodeList != null) 'serviceCodeList': serviceCodeList,
},
);
return DescribeServicesResponse.fromJson(jsonResponse.body);
}