createDeployment method

Future<CreateDeploymentOutput> createDeployment({
  1. required String deploymentPatternName,
  2. required String name,
  3. required Map<String, String> specifications,
  4. required String workloadName,
  5. bool? dryRun,
  6. Map<String, String>? tags,
})

Creates a deployment for the given workload. Deployments created by this operation are not available in the Launch Wizard console to use the Clone deployment action on.

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

Parameter deploymentPatternName : The name of the deployment pattern supported by a given workload. You can use the ListWorkloadDeploymentPatterns operation to discover supported values for this parameter.

Parameter name : The name 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 workloadName : The name of the workload. You can use the ListWorkloads operation to discover supported values for this parameter.

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 tags : The tags to add to the deployment.

Implementation

Future<CreateDeploymentOutput> createDeployment({
  required String deploymentPatternName,
  required String name,
  required Map<String, String> specifications,
  required String workloadName,
  bool? dryRun,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'deploymentPatternName': deploymentPatternName,
    'name': name,
    'specifications': specifications,
    'workloadName': workloadName,
    if (dryRun != null) 'dryRun': dryRun,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/createDeployment',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDeploymentOutput.fromJson(response);
}