createDeploymentJob method

Future<CreateDeploymentJobResponse> createDeploymentJob({
  1. required List<DeploymentApplicationConfig> deploymentApplicationConfigs,
  2. required String fleet,
  3. String? clientRequestToken,
  4. DeploymentConfig? deploymentConfig,
  5. Map<String, String>? tags,
})

Deploys a specific version of a robot application to robots in a fleet.

The robot application must have a numbered applicationVersion for consistency reasons. To create a new version, use CreateRobotApplicationVersion or see Creating a Robot Application Version.

May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InternalServerException. May throw ThrottlingException. May throw LimitExceededException. May throw ConcurrentDeploymentException. May throw IdempotentParameterMismatchException.

Parameter deploymentApplicationConfigs : The deployment application configuration.

Parameter fleet : The Amazon Resource Name (ARN) of the fleet to deploy.

Parameter clientRequestToken : Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Parameter deploymentConfig : The requested deployment configuration.

Parameter tags : A map that contains tag keys and tag values that are attached to the deployment job.

Implementation

Future<CreateDeploymentJobResponse> createDeploymentJob({
  required List<DeploymentApplicationConfig> deploymentApplicationConfigs,
  required String fleet,
  String? clientRequestToken,
  DeploymentConfig? deploymentConfig,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(
      deploymentApplicationConfigs, 'deploymentApplicationConfigs');
  ArgumentError.checkNotNull(fleet, 'fleet');
  _s.validateStringLength(
    'fleet',
    fleet,
    1,
    1224,
    isRequired: true,
  );
  _s.validateStringLength(
    'clientRequestToken',
    clientRequestToken,
    1,
    64,
  );
  final $payload = <String, dynamic>{
    'deploymentApplicationConfigs': deploymentApplicationConfigs,
    'fleet': fleet,
    'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (deploymentConfig != null) 'deploymentConfig': deploymentConfig,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/createDeploymentJob',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDeploymentJobResponse.fromJson(response);
}