describeTemplateDefinition method

Future<DescribeTemplateDefinitionResponse> describeTemplateDefinition({
  1. required String awsAccountId,
  2. required String templateId,
  3. String? aliasName,
  4. int? versionNumber,
})

Provides a detailed description of the definition of a template.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the template. You must be using the Amazon Web Services account that the template is in.

Parameter templateId : The ID of the template that you're describing.

Parameter aliasName : The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword $LATEST in the AliasName parameter. The keyword $PUBLISHED doesn't apply to templates.

Parameter versionNumber : The version number of the template.

Implementation

Future<DescribeTemplateDefinitionResponse> describeTemplateDefinition({
  required String awsAccountId,
  required String templateId,
  String? aliasName,
  int? versionNumber,
}) async {
  _s.validateNumRange(
    'versionNumber',
    versionNumber,
    1,
    1152921504606846976,
  );
  final $query = <String, List<String>>{
    if (aliasName != null) 'alias-name': [aliasName],
    if (versionNumber != null) 'version-number': [versionNumber.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/templates/${Uri.encodeComponent(templateId)}/definition',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeTemplateDefinitionResponse.fromJson(response);
}