setTypeDefaultVersion method
Future<void>
setTypeDefaultVersion({
- String? arn,
- RegistryType? type,
- String? typeName,
- String? versionId,
Specify the default version of a type. The default version of a type will be used in CloudFormation operations.
May throw CFNRegistryException. May throw TypeNotFoundException.
Parameter arn
:
The Amazon Resource Name (ARN) of the type for which you want version
summary information.
Conditional: You must specify either TypeName
and
Type
, or Arn
.
Parameter type
:
The kind of type.
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> setTypeDefaultVersion({
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: 'SetTypeDefaultVersion',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['SetTypeDefaultVersionInput'],
shapes: shapes,
resultWrapper: 'SetTypeDefaultVersionResult',
);
}