CreateWorkflowStepCommand

Create a step in the migration workflow.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { MigrationHubOrchestratorClient, CreateWorkflowStepCommand } from "@aws-sdk/client-migrationhuborchestrator"; // ES Modules import
// const { MigrationHubOrchestratorClient, CreateWorkflowStepCommand } = require("@aws-sdk/client-migrationhuborchestrator"); // CommonJS import
const client = new MigrationHubOrchestratorClient(config);
const input = { // CreateWorkflowStepRequest
  name: "STRING_VALUE", // required
  stepGroupId: "STRING_VALUE", // required
  workflowId: "STRING_VALUE", // required
  stepActionType: "STRING_VALUE", // required
  description: "STRING_VALUE",
  workflowStepAutomationConfiguration: { // WorkflowStepAutomationConfiguration
    scriptLocationS3Bucket: "STRING_VALUE",
    scriptLocationS3Key: { // PlatformScriptKey
      linux: "STRING_VALUE",
      windows: "STRING_VALUE",
    },
    command: { // PlatformCommand
      linux: "STRING_VALUE",
      windows: "STRING_VALUE",
    },
    runEnvironment: "STRING_VALUE",
    targetType: "STRING_VALUE",
  },
  stepTarget: [ // StringList
    "STRING_VALUE",
  ],
  outputs: [ // WorkflowStepOutputList
    { // WorkflowStepOutput
      name: "STRING_VALUE",
      dataType: "STRING_VALUE",
      required: true || false,
      value: { // WorkflowStepOutputUnion Union: only one key present
        integerValue: Number("int"),
        stringValue: "STRING_VALUE",
        listOfStringValue: [ // MaxStringList
          "STRING_VALUE",
        ],
      },
    },
  ],
  previous: [
    "STRING_VALUE",
  ],
  next: [
    "STRING_VALUE",
  ],
};
const command = new CreateWorkflowStepCommand(input);
const response = await client.send(command);
// { // CreateWorkflowStepResponse
//   id: "STRING_VALUE",
//   stepGroupId: "STRING_VALUE",
//   workflowId: "STRING_VALUE",
//   name: "STRING_VALUE",
// };

CreateWorkflowStepCommand Input

See CreateWorkflowStepCommandInput for more details

Parameter
Type
Description
name
Required
string | undefined

The name of the step.

stepActionType
Required
StepActionType | undefined

The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.

stepGroupId
Required
string | undefined

The ID of the step group.

workflowId
Required
string | undefined

The ID of the migration workflow.

description
string | undefined

The description of the step.

next
string[] | undefined

The next step.

outputs
WorkflowStepOutput[] | undefined

The key value pairs added for the expected output.

previous
string[] | undefined

The previous step.

stepTarget
string[] | undefined

The servers on which a step will be run.

workflowStepAutomationConfiguration
WorkflowStepAutomationConfiguration | undefined

The custom script to run tests on source or target environments.

CreateWorkflowStepCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
id
string | undefined

The ID of the step.

name
string | undefined

The name of the step.

stepGroupId
string | undefined

The ID of the step group.

workflowId
string | undefined

The ID of the migration workflow.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

An internal error has occurred.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by an AWS service.

MigrationHubOrchestratorServiceException
Base exception class for all service exceptions from MigrationHubOrchestrator service.