pub enum ExternalBinding {
Storage(StorageBinding),
Queue(QueueBinding),
Kv(KvBinding),
ArtifactRegistry(ArtifactRegistryBinding),
Vault(VaultBinding),
ContainerAppsEnvironment(ContainerAppsEnvironmentBinding),
Postgres(PostgresBinding),
Redis(RedisBinding),
Ai(ExternalAi),
Custom(CustomExternalBinding),
}Expand description
Represents a binding to pre-existing infrastructure.
The binding type must match the resource type it’s applied to. Validated at runtime by the executor.
Variants§
Storage(StorageBinding)
External storage binding (S3-compatible, GCS, Blob Storage)
Queue(QueueBinding)
External queue binding (Kafka, SQS, etc.)
Kv(KvBinding)
External KV binding (Redis, etc.)
ArtifactRegistry(ArtifactRegistryBinding)
External artifact registry binding (OCI registry)
Vault(VaultBinding)
External vault binding (HashiCorp Vault, etc.)
ContainerAppsEnvironment(ContainerAppsEnvironmentBinding)
External Azure Container Apps Environment binding (pre-existing environment)
Postgres(PostgresBinding)
External Postgres binding (operator-provided / BYO database)
Redis(RedisBinding)
External Redis binding (operator-provided Redis-compatible server)
Ai(ExternalAi)
External AI binding: a BYO-key provider (OpenAI/Anthropic, etc.) or a cloud AI service reached with the workload’s own identity (Bedrock)
Custom(CustomExternalBinding)
A binding to an existing resource of a type an extension defines. It serializes to the same object as the variants above, with the extension’s type as the tag.
Implementations§
Source§impl ExternalBinding
impl ExternalBinding
pub fn serialize<__S>(
__self: &ExternalBinding,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl<'de> ExternalBinding
impl<'de> ExternalBinding
pub fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExternalBinding, __D::Error>where
__D: Deserializer<'de>,
Source§impl ExternalBinding
impl ExternalBinding
Sourcepub fn binding_type(&self) -> &str
pub fn binding_type(&self) -> &str
Returns the type name of this binding variant.
Sourcepub fn to_resource_outputs(&self) -> Option<ResourceOutputs>
pub fn to_resource_outputs(&self) -> Option<ResourceOutputs>
Converts this external binding into resource outputs that dependent resources
can read via get_resource_outputs().
Infrastructure bindings (Container Apps Environment) produce typed outputs so that
dependent resources like functions and builds can read the environment’s name,
resource ID, and resource group. Application-level bindings (Storage, Queue, KV, etc.)
return None — they are consumed via remote_binding_params and environment variables
rather than get_resource_outputs().
Sourcepub fn to_env_binding_value(&self) -> Result<Value>
pub fn to_env_binding_value(&self) -> Result<Value>
Serializes this external binding to the JSON value injected into the worker
environment as ALIEN_<NAME>_BINDING, matching the shape the SDK parses.
The AI arm converts to an AiBinding so the value keeps the service tag the
SDK’s ai(name) parser discriminates on: external-ai for a BYO key, bedrock
for ambient credentials. Every other arm serializes the
carried binding directly, like the runtime controllers’ get_binding_params.
Trait Implementations§
Source§impl Clone for ExternalBinding
impl Clone for ExternalBinding
Source§impl Debug for ExternalBinding
impl Debug for ExternalBinding
Source§impl<'de> Deserialize<'de> for ExternalBinding
Only a tag that names an extension’s type reads as Custom. A built-in tag takes its own
variant’s shape and any other tag is refused, so a malformed built-in binding never loads as
custom.
impl<'de> Deserialize<'de> for ExternalBinding
Only a tag that names an extension’s type reads as Custom. A built-in tag takes its own
variant’s shape and any other tag is refused, so a malformed built-in binding never loads as
custom.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for ExternalBinding
Source§impl PartialEq for ExternalBinding
impl PartialEq for ExternalBinding
Source§impl Serialize for ExternalBinding
impl Serialize for ExternalBinding
impl StructuralPartialEq for ExternalBinding
Auto Trait Implementations§
impl Forget for ExternalBinding
impl Freeze for ExternalBinding
impl Move for ExternalBinding
impl RefUnwindSafe for ExternalBinding
impl Send for ExternalBinding
impl Sync for ExternalBinding
impl Unpin for ExternalBinding
impl UnsafeUnpin for ExternalBinding
impl UnwindSafe for ExternalBinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.