AppSurface Search
API Reference

Deployment

Namespaces

Type

DeploymentLogicalId

Source

A validated logical identifier used by deployment resources and bindings.

Property

Value

string Value { get; } Source

Gets the canonical identifier value.

Type

ImmutableImageReference

Source

An immutable container image reference pinned to a SHA-256 digest.

Property

Value

string Value { get; } Source

Gets the full immutable image identity.

Type

SourceRevision

Source

A full lowercase source-control commit used only for traceability.

Property

Value

string Value { get; } Source

Gets the full source revision.

Type

DeploymentExecutionPolicy

Source

Defines explicit, provider-neutral run-to-completion bounds.

Property

Tasks

int Tasks { get; } Source

Gets the number of tasks.

Property

Parallelism

int Parallelism { get; } Source

Gets maximum concurrent tasks.

Property

Retries

int Retries { get; } Source

Gets the retry count.

Property

Timeout

TimeSpan Timeout { get; } Source

Gets the task timeout.

Type

SecretBinding

Source

Describes a logical secret reference without carrying or resolving its value.

Property

Id

DeploymentLogicalId Id { get; } Source

Gets the logical binding id.

Property

Parameter

DeploymentLogicalId Parameter { get; } Source

Gets the logical Aspire parameter id; its value must never be evaluated by deployment publishing.

Property

EnvironmentVariable

string EnvironmentVariable { get; } Source

Gets the environment variable used for reference delivery.

Property

Delivery

SecretDeliveryKind Delivery { get; } Source

Gets the only secret-delivery mode supported in v1.

Type

DatabaseBinding

Source

Describes a relational database requirement and its connection-secret reference.

Property

Id

DeploymentLogicalId Id { get; } Source

Gets the logical database id.

Property

ConfigurationKey

string ConfigurationKey { get; } Source

Gets the application configuration key.

Property

ConnectionSecret

DeploymentLogicalId ConnectionSecret { get; } Source

Gets the referenced logical secret binding.

Property

RequireUnixSocket

bool RequireUnixSocket { get; } Source

Gets whether Unix-socket delivery is required.

Property

MigrationOwner

bool MigrationOwner { get; } Source

Gets whether the job owns migrations for this database.

Type

MigrationJobIntent

Source

Portable intent for one explicitly bounded migration job.

Property

Id

DeploymentLogicalId Id { get; } Source

Gets the logical job id.

Property

Phase

DeploymentPhase Phase { get; } Source

Gets the deployment phase.

Property

Image

ImmutableImageReference Image { get; } Source

Gets the immutable image.

Property

Command

string Command { get; } Source

Gets the executable command.

Property

Arguments

IReadOnlyList<string> Arguments { get; } Source

Gets ordered command arguments.

Property

Execution

DeploymentExecutionPolicy Execution { get; } Source

Gets execution bounds.

Property

ConnectionSecret

SecretBinding ConnectionSecret { get; } Source

Gets the connection-secret reference.

Property

Database

DatabaseBinding Database { get; } Source

Gets the database binding.

Property

ServiceIdentity

DeploymentLogicalId ServiceIdentity { get; } Source

Gets the logical runtime service identity.

Property

RequiredCapabilities

IReadOnlyList<DeploymentCapability> RequiredCapabilities { get; } Source

Gets required target capabilities in canonical order.

Property

RequirePrivateNetwork

bool RequirePrivateNetwork { get; } Source

Gets whether private networking is required.

Property

Environment

IReadOnlyDictionary<string, string> Environment { get; } Source

Gets sorted artifact-visible environment settings after secret-shaped names are rejected.

Type

DeploymentIntent

Source

The schema-versioned provider-neutral deployment artifact.

Property

Schema

string Schema { get; } Source

Gets the schema identifier.

Property

SchemaVersion

string SchemaVersion { get; } Source

Gets the schema version.

Property

Environment

string Environment { get; } Source

Gets the Aspire environment.

Property

SourceRevision

SourceRevision SourceRevision { get; } Source

Gets the explicit source revision.

Property

MigrationJobs

IReadOnlyList<MigrationJobIntent> MigrationJobs { get; } Source

Gets migration jobs in canonical logical-id order.

Type

DeploymentDiagnostic

Source

A stable safe deployment diagnostic with problem, cause, fix, and documentation.

Parameters

  • CodeStable `ASDEPLOY` code.
  • ProblemSafe one-line failure description.
  • CauseSafe explanation without secret values or raw provider output.
  • FixConcrete remediation.
  • DocumentationVersioned troubleshooting link.
Method

Create

DeploymentDiagnostic Create(string code, string problem, string cause, string fix) Source

Creates a diagnostic linked to the deployment troubleshooting reference.

Type

DeploymentValidationException

Source

Thrown when deployment intent or provider inputs violate a stable deployment contract.

Property

Diagnostic

DeploymentDiagnostic Diagnostic { get; } Source

Gets the structured diagnostic.

Type

DeploymentCanonicalJson

Source

Serializes portable deployment intent to deterministic UTF-8 JSON and hashes artifact bytes.

Method

Serialize

byte[] Serialize<T>(T value) Source

Serializes a value as UTF-8 without a BOM, with stable indentation and one trailing LF.

Method

Hash

string Hash(ReadOnlySpan<byte> bytes) Source

Computes a lowercase SHA-256 hash for exact artifact bytes.

Type

DeploymentArtifact

Source

A named deterministic deployment artifact whose content cannot be mutated after creation.

Method

Create

DeploymentArtifact Create(string fileName, byte[] content) Source

Creates an artifact and computes its content hash.

Parameters

  • fileNamePortable single-segment artifact name.
  • contentExact bytes copied into the immutable artifact.

Returns

An artifact with defensively copied content and its lowercase SHA-256 hash.

Property

FileName

string FileName { get; } Source

Gets the safe single-segment artifact file name.

Property

Content

byte[] Content { get; } Source

Gets a defensive copy of the exact artifact bytes.

Property

Sha256

string Sha256 { get; } Source

Gets the lowercase SHA-256 hash of the exact artifact bytes.

Type

DeploymentArtifactBundleWriter

Source

Writes a complete target-owned artifact directory through a staged same-parent directory swap.

Remarks

The writer refuses non-empty directories that do not contain its ownership marker and refuses unexpected files in an owned directory. It stages every artifact before replacing the directory, so validation, serialization, and cancellation failures do not expose a partial new bundle. The marker is internal bookkeeping and is not a release evidence artifact.

Method

WriteAsync

Task WriteAsync(string outputDirectory, string target, IEnumerable<DeploymentArtifact> artifacts, CancellationToken cancellationToken = default) Source

Writes a complete deterministic artifact bundle.

Parameters

  • outputDirectoryDedicated output directory owned by one deployment target.
  • targetStable target identifier stored in the ownership marker.
  • artifactsComplete artifact set; file names must be unique.
  • cancellationTokenCancels before the staged directory replaces the current bundle.

Exceptions

  • DeploymentValidationExceptionThrown for unsafe paths, non-owned files, or duplicate names.
Type

DeploymentRenderRequest

Source

Inputs passed to an Aspire-independent deployment target renderer.

Parameters

  • IntentValidated provider-neutral deployment intent.
  • BindingProfilePathResolved provider binding-profile path.
  • OutputDirectoryDedicated target output directory.
  • GeneratorVersionAppSurface generator package version recorded in evidence.
  • BindingProfileRootOptional trusted authoring-host root used to reject symlink escapes before reading.
Type

DeploymentRenderResult

Source

Deterministic artifacts produced by a deployment target.

Parameters

  • TargetStable target identifier.
  • ArtifactsComplete deterministic artifact set.
Type

DeploymentVerifyRequest

Source

Inputs passed to a read-only deployment verifier.

Parameters

  • RenderResultValidated render result to verify.
  • ParityModeShadow or owned comparison policy.
Type

DeploymentVerifyResult

Source

Result of read-only deployment verification.

Parameters

  • IsMatchWhether all required fields and public-principal checks matched.
  • ComparedFieldsNumber of normalized field checks performed.
  • DiagnosticsSafe drift diagnostics.
  • AuthorizationStatusExplicit limitation or authorization evidence status.
Type

IDeploymentTarget

Source

Compiles portable deployment intent and optionally verifies deployed state without mutation.

Method

RenderAsync

Task<DeploymentRenderResult> RenderAsync(DeploymentRenderRequest request, CancellationToken cancellationToken = default) Source

Renders deterministic artifacts without cloud calls or infrastructure mutation.

Method

VerifyAsync

Task<DeploymentVerifyResult> VerifyAsync(DeploymentVerifyRequest request, CancellationToken cancellationToken = default) Source

Performs read-only deployed-state verification; it must not accept or execute a job.

Property

Name

string Name { get; } Source

Gets the stable target identifier.

Property

Capabilities

IReadOnlySet<DeploymentCapability> Capabilities { get; } Source

Gets target capabilities used for fail-fast intent validation.

Enum

DeploymentPhase

Source

Identifies the phase in which a deployment resource participates.

Enum

DeploymentCapability

Source

Identifies a capability that a deployment target must support.

Enum

DeploymentParityMode

Source

Identifies whether parity is evaluated before or after the generated configuration becomes authoritative.

Enum

SecretDeliveryKind

Source

Identifies how a secret reference is delivered to a workload.