describeProvisionedProduct method

Future<DescribeProvisionedProductOutput> describeProvisionedProduct({
  1. String? acceptLanguage,
  2. String? id,
  3. String? name,
})

Gets information about the specified provisioned product.

May throw ResourceNotFoundException. May throw InvalidParametersException.

Parameter acceptLanguage : The language code.

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

Parameter id : The provisioned product identifier. You must provide the name or ID, but not both.

If you do not provide a name or ID, or you provide both name and ID, an InvalidParametersException will occur.

Parameter name : The name of the provisioned product. You must provide the name or ID, but not both.

If you do not provide a name or ID, or you provide both name and ID, an InvalidParametersException will occur.

Implementation

Future<DescribeProvisionedProductOutput> describeProvisionedProduct({
  String? acceptLanguage,
  String? id,
  String? name,
}) async {
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  _s.validateStringLength(
    'id',
    id,
    1,
    100,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWS242ServiceCatalogService.DescribeProvisionedProduct'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
      if (id != null) 'Id': id,
      if (name != null) 'Name': name,
    },
  );

  return DescribeProvisionedProductOutput.fromJson(jsonResponse.body);
}