updateDeployment method

Future<UpdateDeploymentOutput> updateDeployment({
  1. required String deploymentId,
  2. required Map<String, String> specifications,
  3. String? deploymentPatternVersionName,
  4. bool? dryRun,
  5. bool? force,
  6. String? workloadVersionName,
})

Updates a deployment.

May throw InternalServerException. May throw ResourceLimitException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter deploymentId : The ID of the deployment.

Parameter specifications : The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see SAP deployment specifications. To retrieve the specifications required to create a deployment for other workloads, use the GetWorkloadDeploymentPattern operation.

Parameter deploymentPatternVersionName : The name of the deployment pattern version.

Parameter dryRun : Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Parameter force : Forces the update even if validation warnings are present.

Parameter workloadVersionName : The name of the workload version.

Implementation

Future<UpdateDeploymentOutput> updateDeployment({
  required String deploymentId,
  required Map<String, String> specifications,
  String? deploymentPatternVersionName,
  bool? dryRun,
  bool? force,
  String? workloadVersionName,
}) async {
  final $payload = <String, dynamic>{
    'deploymentId': deploymentId,
    'specifications': specifications,
    if (deploymentPatternVersionName != null)
      'deploymentPatternVersionName': deploymentPatternVersionName,
    if (dryRun != null) 'dryRun': dryRun,
    if (force != null) 'force': force,
    if (workloadVersionName != null)
      'workloadVersionName': workloadVersionName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/updateDeployment',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDeploymentOutput.fromJson(response);
}