deregisterType method

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

Removes a type or type version from active use in the CloudFormation registry. If a type or type version is deregistered, it cannot be used in CloudFormation operations.

To deregister a type, you must individually deregister all registered versions of that type. If a type has only a single registered version, deregistering that version results in the type itself being deregistered.

You cannot deregister the default version of a type, unless it is the only registered version of that type, in which case the type itself is deregistered as well.

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.

Implementation

Future<void> deregisterType({
  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);
  await _protocol.send(
    $request,
    action: 'DeregisterType',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeregisterTypeInput'],
    shapes: shapes,
    resultWrapper: 'DeregisterTypeResult',
  );
}