pub async fn bind(
neon: &dyn NeonControl,
project: &str,
name_or_id: &str,
req: &NeonRequirements,
credential_name: &str,
) -> Result<(NeonBinding, Option<StorageCredential>), NeonError>Available on crate feature
neon only.Expand description
Bind an instance to the branch name_or_id of project, for a plan that needs req:
- every function the plan runs must be deployed on the branch (
NeonError::MissingFunctionslists the ones that aren’t); - the databases and buckets it uses are created where missing;
- when it uses object storage, a credential called
credential_nameis minted on the branch (returned with the binding: the caller stores the secret, the binding only its id).
The returned NeonBinding is the instance’s source config.