describeProductAsAdmin method

Future<DescribeProductAsAdminOutput> describeProductAsAdmin({
  1. String? acceptLanguage,
  2. String? id,
  3. String? name,
  4. String? sourcePortfolioId,
})

Gets information about the specified product. This operation is run with administrator access.

May throw ResourceNotFoundException. May throw InvalidParametersException.

Parameter acceptLanguage : The language code.

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

Parameter id : The product identifier.

Parameter name : The product name.

Parameter sourcePortfolioId : The unique identifier of the shared portfolio that the specified product is associated with.

You can provide this parameter to retrieve the shared TagOptions associated with the product. If this parameter is provided and if TagOptions sharing is enabled in the portfolio share, the API returns both local and shared TagOptions associated with the product. Otherwise only local TagOptions will be returned.

Implementation

Future<DescribeProductAsAdminOutput> describeProductAsAdmin({
  String? acceptLanguage,
  String? id,
  String? name,
  String? sourcePortfolioId,
}) async {
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  _s.validateStringLength(
    'id',
    id,
    1,
    100,
  );
  _s.validateStringLength(
    'name',
    name,
    0,
    8191,
  );
  _s.validateStringLength(
    'sourcePortfolioId',
    sourcePortfolioId,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWS242ServiceCatalogService.DescribeProductAsAdmin'
  };
  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,
      if (sourcePortfolioId != null) 'SourcePortfolioId': sourcePortfolioId,
    },
  );

  return DescribeProductAsAdminOutput.fromJson(jsonResponse.body);
}