# PipelineStepAnnotation Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [PipelineStepAnnotation](/reference/api/csharp/aspire.hosting/pipelinestepannotation.md)
- Kind: `Methods`
- Members: `1`

An annotation that creates pipeline steps for a resource during deployment.

## CreateStepsAsync(PipelineStepFactoryContext)

- Name: `CreateStepsAsync(PipelineStepFactoryContext)`
- Returns: [Task<IEnumerable<PipelineStep>>](/reference/api/csharp/aspire.hosting/pipelinestep.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineStepAnnotation.cs#L60)

Creates pipeline steps asynchronously.

```csharp
public class PipelineStepAnnotation
{
    public Task<IEnumerable<PipelineStep>> CreateStepsAsync(
        PipelineStepFactoryContext context)
    {
        // ...
    }
}
```

## Parameters

- `context` ([PipelineStepFactoryContext](/reference/api/csharp/aspire.hosting/pipelinestepfactorycontext.md))
  The factory context containing the pipeline context and resource.

## Returns

[Task<IEnumerable<PipelineStep>>](/reference/api/csharp/aspire.hosting/pipelinestep.md) -- A task that represents the asynchronous operation and contains the created pipeline steps.
