CloudHostUtils

public static class CloudHostUtils
Public wrapper exposing the cloud entitlement gate to cross-platform consumers. Resolves the platform service lazily on first use; falls back to a no-op host when no platform implementation is registered.

Properties

AppliesToThisInstance

#
public static bool AppliesToThisInstance { get; }
True only when this instance is subject to Marketplace entitlement gating (its EC2 identity document claims our product code). Decoupled from IsEntitled: an instance can apply yet be denied. False for non-EC2, classic EC2, other products, and on any error. Run-gate enforcement consults this to know whether the gate applies.

DenyReason

#Since v8.33
public static string DenyReason { get; }
Human-readable reason the entitlement was actively denied. Null both when entitled AND when the gate doesn't apply to this instance.

IsEntitled

#Since v8.33
public static bool IsEntitled { get; }
True when the running instance is entitled by its cloud provider. See ICloudHost remarks for tri-state semantics.

Signature

#Since v8.33
public static string Signature { get; }
Signed proof of entitlement returned by the cloud provider (null when not applicable).

Methods

CheckEntitlement

#Since v8.33
public static void CheckEntitlement()
Performs the cloud entitlement check (and on AMI-based Marketplace products, also submits a metering record). Re-callable — each invocation runs the gate independently and the platform implementation makes no claim of idempotency. On EC2 with a Marketplace-attached product code and the right IAM role this calls AWS Marketplace MeterUsage; elsewhere this is a no-op.