describeConstraint method

Future<DescribeConstraintOutput> describeConstraint({
  1. required String id,
  2. String? acceptLanguage,
})

Gets information about the specified constraint.

May throw ResourceNotFoundException.

Parameter id : The identifier of the constraint.

Parameter acceptLanguage : The language code.

  • en - English (default)
  • jp - Japanese
  • zh - Chinese

Implementation

Future<DescribeConstraintOutput> describeConstraint({
  required String id,
  String? acceptLanguage,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    1,
    100,
    isRequired: true,
  );
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWS242ServiceCatalogService.DescribeConstraint'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
    },
  );

  return DescribeConstraintOutput.fromJson(jsonResponse.body);
}