AppSurface Search
API Reference

GcpCloudRun

Type

GcpCloudRunJsonAdmission

Source

Applies finite collection bounds to JSON admitted by the execution observer.

Remarks

The bound limits parser memory exposure at the observer trust boundary. It is not a Cloud Run provider semantic limit and is deliberately not used by legacy verification.

Method

ValidateFiniteCollections

void ValidateFiniteCollections(JsonElement root)

Rejects an object or array whose direct collection exceeds the observer admission bound.

Parameters

  • root
    The already parsed JSON root.

Exceptions

  • JsonException
    Thrown when a collection exceeds the finite admission bound.
Type

BoundedGcloudExecutionReadResult

Source

Immutable, safe result from a bounded execution read.

Remarks

Standard error is deliberately never exposed. Output bytes are usable only for BoundedGcloudExecutionReadOutcome.Complete with a zero exit code.

Property

Outcome

BoundedGcloudExecutionReadOutcome Outcome { get; } Source

Gets the classified read outcome.

Property

ExitCode

int? ExitCode { get; } Source

Gets the process exit code when the process reached an exit state.

Property

StandardOutput

byte[] StandardOutput { get; } Source

Gets a defensive copy of the captured standard-output bytes; the array is empty when no bytes were retained.

Type

IBoundedGcloudExecutionReader

Source

Reads one exact Cloud Run execution using a bounded, read-only gcloud process.

Method

ReadAsync

Task<BoundedGcloudExecutionReadResult> ReadAsync(string executionResourceName, TimeSpan timeout, CancellationToken cancellationToken = default)

Reads the selected canonical execution within the supplied total budget.

Parameters

  • executionResourceName
    Canonical Cloud Run execution resource name, including project, location, Job, and execution segments.
  • timeout
    Finite positive total read budget. The default implementation reserves part of this budget for process cleanup.
  • cancellationToken
    Caller cancellation. Cancellation is propagated; a timeout is returned as a BoundedGcloudExecutionReadOutcome.Deadline result.

Returns

A safe classification and, only for complete valid output, captured standard-output bytes. Standard error is never returned.

Exceptions

  • ArgumentException
    executionResourceName is null, empty, or whitespace.
  • ArgumentOutOfRangeException
    timeout is nonpositive, infinite, or outside the supported timer range.
  • OperationCanceledException
    The caller requested cancellation.
Type

BoundedGcloudExecutionReader

Source

Default bounded reader for the fixed Cloud SDK execution-describe command.

Method

CreateStartInfo

ProcessStartInfo CreateStartInfo(ExecutionResource resource, bool windows)

Builds the fixed launcher tokens; the platform seam permits testing cmd admission without starting cmd.

Type

GcpCloudRunBindingProfile

Source

Represents the closed, non-secret schema that maps AppSurface logical deployment ids to externally provisioned GCP resources.

Parameters

  • Environment
    Exact Aspire environment selected for rendering.
  • Project
    Existing 6-30 character lowercase Google Cloud project id.
  • Region
    Existing canonical Cloud Run region, such as us-central1 .
  • Jobs
    Logical job ids mapped to distinct lowercase Cloud Run Job names of at most 63 characters.
  • CloudSqlInstanceConnectionName
    Existing canonical Cloud SQL project:region:instance name.
  • Network
    Existing Direct VPC network and regional subnetwork resource references with an explicit supported egress mode.
  • ServiceAccounts
    Logical identity ids mapped to canonical user-managed service-account emails.
  • Secrets
    Logical secret ids mapped only to Secret Manager identifiers and the supported explicit version mode; no secret values are stored.

Remarks

Map keys are canonical lowercase AppSurface logical ids. Values are physical resource identifiers only; secret values and unknown properties are rejected by the profile loader.

Method

LoadAsync

2 overloads
Task<GcpCloudRunBindingProfile> LoadAsync(string path, string expectedEnvironment, CancellationToken cancellationToken = default)

Loads and strictly validates a profile without resolving any secret value.

Parameters

  • path
    Path to a regular JSON file. The file and every ancestor to the filesystem root must not be symbolic links or reparse points, except the standard macOS /var , /tmp , and /etc aliases.
  • expectedEnvironment
    Aspire environment selected for publishing.
  • cancellationToken
    Cancellation observed while reading and parsing the profile.
Task<GcpCloudRunBindingProfile> LoadAsync(string path, string expectedEnvironment, string trustedRoot, CancellationToken cancellationToken = default)

Loads a profile and rejects symbolic links in every path component beneath a trusted root.

Parameters

  • path
    Path to the profile file.
  • expectedEnvironment
    Aspire environment selected for publishing.
  • trustedRoot
    Trusted AppHost root that must lexically contain the profile.
  • cancellationToken
    Cancellation observed while reading and parsing the profile.
Property

ProjectNumber

string? ProjectNumber { get; init; } Source

Gets or initializes the optional canonical positive Google Cloud project number.

Remarks

The value is decimal, positive, within signed 64-bit range, and has no leading zeroes.

Type

GcpCloudRunNetworkBinding

Source

Externally provisioned Direct VPC binding.

Parameters

  • Network
    Full global VPC network resource reference.
  • Subnetwork
    Full regional subnetwork resource reference.
  • Egress
    `PRIVATE_RANGES_ONLY` or `ALL_TRAFFIC`.
Type

GcpCloudRunSecretBinding

Source

Physical Secret Manager reference and explicit rotation mode.

Parameters

  • SecretId
    Existing Secret Manager secret id.
  • VersionMode
    Explicit version mode; version 1 supports `latest`.
Type

CloudRunExecutionObservationRequest

Source

Requests read-only observation against one trusted published bundle.

Parameters

  • Deployment
    The complete three-artifact deployment expectation; hashes do not authenticate its publisher.
  • LogicalJobId
    Exact logical Job in the bundle.
  • ExecutionResourceName
    Canonical projects/project/locations/region/jobs/job/executions/execution resource; never latest.
  • Timeout
    Positive total observation budget, at most 4,294,967,294 milliseconds.
  • PollInterval
    Positive delay between sequential reads, no greater than Timeout.
Type

CloudRunExecutionObservation

Source

A safe immutable observation, without provider output, environment values or exception text.

Parameters

  • LogicalJobId
    Validated logical identity, or empty when invalid.
  • ExecutionResourceName
    Validated selected resource, or empty when invalid.
  • State
    Supported last state, or Unknown.
  • ConfigurationMatched
    Whether every required captured operational setting positively matched.
  • ObservedAt
    UTC evidence receipt time; failure results use the local decision time.
  • DiagnosticCode
    Fixed ASDEPLOY170–189 diagnostic; see the deployment reference.
Type

IGcpCloudRunExecutionObserver

Source

Observes one selected execution without submitting, cancelling, retrying or changing cloud resources.

Method

ObserveAsync

Task<CloudRunExecutionObservation> ObserveAsync(CloudRunExecutionObservationRequest request, CancellationToken cancellationToken = default)

Validates the bundle and observes within one monotonic budget.

Parameters

  • request
    The immutable expected bundle, logical identity and exact selected execution.
  • cancellationToken
    Caller cancellation, propagated after local reader cleanup.

Returns

Safe evidence, or Unknown for invalid non-null requests and insufficient provider evidence.

Exceptions

  • ArgumentNullException
    The request is null.
  • OperationCanceledException
    The caller cancelled observation.
Type

GcpCloudRunExecutionObserver

Source

Coordinates immutable expectations, strict evidence classification and sequential bounded reads.

Remarks

Only the injected bounded-reader contract is used. There is no legacy unbounded-runner adapter, cache, retry policy or current-Job fallback.

Method

Create

GcpCloudRunExecutionObserver Create()

Creates the production fixed-command observer using the system clock.

Type

ExecutionResource

Source

Canonical selected identity shared by admission and classification; no alias lookup occurs.

Method

TryParse

bool TryParse(string? value, out ExecutionResource? resource)

Parses only canonical full selected resources.

Method

Matches

bool Matches(GcpCloudRunDeploymentPlan plan, GcpCloudRunMigrationParity expected)

Checks literal scope against declared expected bindings.

Method

IsLogicalId

bool IsLogicalId(string? value)

Admits safe logical IDs without echoing invalid input.

Method

ValidDurations

bool ValidDurations(TimeSpan timeout, TimeSpan interval)

Checks finite positive TimeProvider timer allowances without rounding tiny budgets up.

Type

GcpCloudRunBundleValidator

Source

Validates one immutable Cloud Run artifact snapshot for execution observation.

Remarks

The observer admission limit is deliberately separate from legacy verification, whose public behavior is preserved.

Method

ValidateForObservation

GcpCloudRunDeploymentPlan ValidateForObservation(DeploymentRenderResult renderResult)

Validates the observation-specific finite input and closed JSON admission rules.

Type

CloudRunExecutionEvidence

Source

Pure, presence-aware execution proof. It never reads today's Job or a provider message.

Method

Classify

CloudRunExecutionEvidence Classify(ReadOnlyMemory<byte> bytes, GcpCloudRunDeploymentPlan plan, GcpCloudRunMigrationParity expected, ExecutionResource selected)

Checks one complete bounded JSON response against an immutable expectation.

Type

GcpCloudRunDeploymentTarget

Source

Compiles migration-job intent to GCP Cloud Run v2 artifacts and performs read-only deployed parity checks.

Method

Create

GcpCloudRunDeploymentTarget Create()

Creates the standard GCP Cloud Run deployment target.

Method

ValidateBundleLegacy

GcpCloudRunDeploymentPlan ValidateBundleLegacy(DeploymentRenderResult renderResult)

Validates the legacy three-artifact bundle without imposing observer input limits.

Type

GcpCloudRunMigrationParity

Source

Safe normalized Cloud Run migration-job configuration used for shadow and owned parity.

Type

IGcloudCommandRunner

Source

Executes one read-only gcloud invocation expressed as an argument array.

Method

RunAsync

Task<GcloudCommandResult> RunAsync(IReadOnlyList<string> arguments, TimeSpan timeout, CancellationToken cancellationToken)

Runs gcloud with bounded time and cancellation.

Type

GcloudCommandResult

Source

Captured process result. Callers must not log raw output without provider sanitization.

Parameters

  • ExitCode
    Process exit code.
  • StandardOutput
    Captured standard output consumed only by safe provider parsing.
  • StandardError
    Captured standard error consumed only by safe classification.
Type

GcloudCommandException

Source

Safe classified process-launch or timeout failure.

Property

Code

string Code { get; } Source

Gets the stable diagnostic code.

Property

Problem

string Problem { get; } Source

Gets the safe problem.

Property

Cause

string Cause { get; } Source

Gets the safe cause.

Property

Fix

string Fix { get; } Source

Gets the remediation.

Type

GcloudCommandRunner

Source

Production gcloud process runner. It launches the executable directly except on Windows, where the Cloud SDK's gcloud.cmd launcher requires cmd.exe ; that path rejects whitespace and shell metacharacters before dispatch. The runner kills the process tree on timeout or cancellation.

Method

CreateStartInfo

ProcessStartInfo CreateStartInfo(IReadOnlyList<string> arguments)

Builds the non-shell or bounded Windows process-start contract without launching a process.

Parameters

  • arguments
    Ordered provider arguments.

Returns

A fully configured process start description.

Method

BuildWindowsCommand

string BuildWindowsCommand(string command, IReadOnlyList<string> arguments)

Builds a metacharacter-free Windows command line for the fixed Cloud SDK launcher.

Parameters

  • command
    The fixed executable command name.
  • arguments
    Ordered gcloud arguments.

Returns

A command string safe for the bounded cmd.exe /d /c dispatch path.

Property

Command

string Command { get; } Source

Gets the selected gcloud command for platform-contract tests.

Property

RequiresWindowsCommandInterpreter

bool RequiresWindowsCommandInterpreter { get; } Source

Gets whether the selected command requires the bounded Windows command-interpreter path.

Enum

BoundedGcloudExecutionReadOutcome

Source

Outcome of a bounded read of one selected Cloud Run execution.

Enum

CloudRunExecutionState

Source

The last supported state of the caller-selected execution.