describeType method

Future<DescribeTypeOutput> describeType({
  1. String? arn,
  2. RegistryType? type,
  3. String? typeName,
  4. String? versionId,
})

Returns detailed information about a type that has been registered.

If you specify a VersionId, DescribeType returns information about that specific type version. Otherwise, it returns information about the default type version.

May throw CFNRegistryException. May throw TypeNotFoundException.

Parameter arn : The Amazon Resource Name (ARN) of the type.

Conditional: You must specify either TypeName and Type, or Arn.

Parameter type : The kind of type.

Currently the only valid value is RESOURCE.

Conditional: You must specify either TypeName and Type, or Arn.

Parameter typeName : The name of the type.

Conditional: You must specify either TypeName and Type, or Arn.

Parameter versionId : The ID of a specific version of the type. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the type version when it is registered.

If you specify a VersionId, DescribeType returns information about that specific type version. Otherwise, it returns information about the default type version.

Implementation

Future<DescribeTypeOutput> describeType({
  String? arn,
  RegistryType? type,
  String? typeName,
  String? versionId,
}) async {
  _s.validateStringLength(
    'arn',
    arn,
    0,
    1024,
  );
  _s.validateStringLength(
    'typeName',
    typeName,
    10,
    204,
  );
  _s.validateStringLength(
    'versionId',
    versionId,
    1,
    128,
  );
  final $request = <String, dynamic>{};
  arn?.also((arg) => $request['Arn'] = arg);
  type?.also((arg) => $request['Type'] = arg.toValue());
  typeName?.also((arg) => $request['TypeName'] = arg);
  versionId?.also((arg) => $request['VersionId'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeType',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeTypeInput'],
    shapes: shapes,
    resultWrapper: 'DescribeTypeResult',
  );
  return DescribeTypeOutput.fromXml($result);
}