# DistributedApplicationPipeline.AddStep

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [DistributedApplicationPipeline](/reference/api/go/aspire.hosting/distributedapplicationpipeline.md)
- Version: `17.0.0`
- Kind: `method`

Adds an application-level pipeline step in a TypeScript-friendly shape.

## Definition

```go
type DistributedApplicationPipeline interface {
    // ... omitted for brevity
    AddStep(
        stepName string,
        callback func(arg PipelineStepContext),
        options ...*AddStepOptions,
    ) error
}
```

## Signature

```go
AddStep(
    stepName string,
    callback func(arg PipelineStepContext),
    options ...*AddStepOptions,
) error
```

## Parameters

- `stepName` (`string`) -- The unique name of the pipeline step.
- `callback` (`func(arg PipelineStepContext)`) -- The callback to execute when the step runs.
- `options` (`...*AddStepOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddStepOptions` argument.

- `DependsOn` (`[]string`) -- Optional step names that this step depends on.
- `RequiredBy` (`[]string`) -- Optional step names that require this step.

## Returns

`error`

Returns `error`.

## Defined on

- [DistributedApplicationPipeline](/reference/api/go/aspire.hosting/distributedapplicationpipeline.md) -- `interface`
