createNodeRegistrationScript method
Create the Register Node script for all the nodes intended for a specific Cluster. You will then run the script on each hardware unit that is intended for that Cluster. The script creates a Node in the specified Cluster. It then binds the Node to this hardware unit, and activates the node hardware for use with MediaLive Anywhere.
May throw BadGatewayException.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw GatewayTimeoutException.
May throw InternalServerErrorException.
May throw TooManyRequestsException.
Parameter clusterId :
The ID of the cluster
Parameter id :
If you're generating a re-registration script for an already existing
node, this is where you provide the id.
Parameter name :
Specify a pattern for MediaLive Anywhere to use to assign a name to each
Node in the Cluster. The pattern can include the variables $hn (hostname
of the node hardware) and $ts for the date and time that the Node is
created, in UTC (for example, 2024-08-20T23:35:12Z).
Parameter nodeInterfaceMappings :
Documentation update needed
Parameter requestId :
An ID that you assign to a create request. This ID ensures idempotency
when creating resources.
Parameter role :
The initial role of the Node in the Cluster. ACTIVE means the Node is
available for encoding. BACKUP means the Node is a redundant Node and
might get used if an ACTIVE Node fails.
Implementation
Future<CreateNodeRegistrationScriptResponse> createNodeRegistrationScript({
required String clusterId,
String? id,
String? name,
List<NodeInterfaceMapping>? nodeInterfaceMappings,
String? requestId,
NodeRole? role,
}) async {
final $payload = <String, dynamic>{
if (id != null) 'id': id,
if (name != null) 'name': name,
if (nodeInterfaceMappings != null)
'nodeInterfaceMappings': nodeInterfaceMappings,
'requestId': requestId ?? _s.generateIdempotencyToken(),
if (role != null) 'role': role.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/prod/clusters/${Uri.encodeComponent(clusterId)}/nodeRegistrationScript',
exceptionFnMap: _exceptionFns,
);
return CreateNodeRegistrationScriptResponse.fromJson(response);
}