# CustomResourceSnapshot

- Kind: `record`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs)
- Implements: `IEquatable<CustomResourceSnapshot>`

An immutable snapshot of the state of a resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed record CustomResourceSnapshot
    : System.IEquatable<Aspire.Hosting.ApplicationModel.CustomResourceSnapshot>
{
    // ...
}
```

## Constructors

- [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot/constructors.md#constructor)

## Properties

- [Commands](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#commands) : `ImmutableArray<ResourceCommandSnapshot>` `get; init` -- The commands available in the dashboard for this resource.
- [CreationTimeStamp](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#creationtimestamp) : `DateTime?` `get; init` -- The creation timestamp of the resource.
- [EnvironmentVariables](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#environmentvariables) : `ImmutableArray<EnvironmentVariableSnapshot>` `get; init` -- The environment variables that should show up in the dashboard for this resource.
- [ExitCode](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#exitcode) : `int?` `get; init` -- The exit code of the resource.
- [HealthReports](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#healthreports) : `ImmutableArray<HealthReportSnapshot>` `get` -- The health reports for this resource.
- [HealthStatus](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#healthstatus) : `HealthStatus??` `get` -- Gets the health status of the resource.
- [IconName](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#iconname) : `string?` `get; init` -- The custom icon name for the resource. This should be a valid FluentUI icon name. If not specified, the dashboard will use default icons based on the resource type.
- [IconVariant](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#iconvariant) : [IconVariant?](/reference/api/csharp/aspire.hosting/iconvariant.md) `get; init` -- The custom icon variant for the resource.
- [IsHidden](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#ishidden) : `bool` `get; init` -- Whether this resource should be hidden in UI.
- [Properties](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#properties) : `ImmutableArray<ResourcePropertySnapshot>` `get; init` -- The properties that should show up in the dashboard for this resource.
- [Relationships](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#relationships) : `ImmutableArray<RelationshipSnapshot>` `get; init` -- The relationships to other resources.
- [ResourceType](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#resourcetype) : `string` `get; init` -- The type of the resource.
- [StartTimeStamp](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#starttimestamp) : `DateTime?` `get; init` -- The start timestamp of the resource.
- [State](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#state) : [ResourceStateSnapshot?](/reference/api/csharp/aspire.hosting/resourcestatesnapshot.md) `get; init` -- Represents the state of the resource.
- [StopTimeStamp](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#stoptimestamp) : `DateTime?` `get; init` -- The stop timestamp of the resource.
- [Urls](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#urls) : `ImmutableArray<UrlSnapshot>` `get; init` -- The URLs that should show up in the dashboard for this resource.
- [Volumes](/reference/api/csharp/aspire.hosting/customresourcesnapshot/properties.md#volumes) : `ImmutableArray<VolumeSnapshot>` `get; init` -- The volumes that should show up in the dashboard for this resource.

## Methods

- [<Clone>$](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#clone) : [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot.md)
- [Equals(object?)](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#equals-object) : `bool` -- Determines whether the specified object is equal to the current object.
- [Equals(CustomResourceSnapshot?)](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#equals-customresourcesnapshot) : `bool` -- Indicates whether the current object is equal to another object of the same type.
- [GetHashCode](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#gethashcode) : `int` -- Serves as the default hash function.
- [op_Equality(CustomResourceSnapshot?, CustomResourceSnapshot?)](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#op-equality-customresourcesnapshot-customresourcesnapshot) : `bool` `static`
- [op_Inequality(CustomResourceSnapshot?, CustomResourceSnapshot?)](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#op-inequality-customresourcesnapshot-customresourcesnapshot) : `bool` `static`
- [ToString](/reference/api/csharp/aspire.hosting/customresourcesnapshot/methods.md#tostring) : `string` -- Returns a string that represents the current object.
