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
#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.
Human-readable reason the entitlement was actively denied. Null both when entitled AND when the gate doesn't apply to this instance.
True when the running instance is entitled by its cloud provider. See ICloudHost remarks for tri-state semantics.
Methods
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.