# ResourceRelationshipAnnotation Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceRelationshipAnnotation](/reference/api/csharp/aspire.hosting/resourcerelationshipannotation.md)
- Kind: `Constructors`
- Members: `1`

An annotation which represents the relationship between two resources.

## ResourceRelationshipAnnotation(IResource, string)

- Name: `Constructor(IResource, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceRelationshipAnnotation.cs#L12-L22)

An annotation which represents the relationship between two resources.

```csharp
public sealed class ResourceRelationshipAnnotation
{
    public ResourceRelationshipAnnotation(
        IResource resource,
        string type)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([IResource](/reference/api/csharp/aspire.hosting/iresource.md))
- `type` (`string`)
