<@ULVA73B9P> insteead of specifying the deployment...
# ask-marvin
m
@Marvin insteead of specifying the deployment id in the run_deployment function how can I specify the deployment name? await run_deployment( "577f33fb-1dc0-45e6-9cbf-298c57306a9b", in Prefect 2.20
m
To specify a deployment name instead of an ID in the
run_deployment
function in Prefect 2.20, you can utilize the deployment name directly by fetching the deployment information using the deployment name and then executing it. While the documentation doesn't provide a direct example of using a deployment name in the
run_deployment
function, you can typically retrieve the deployment ID programmatically using the deployment name and then use that ID with
run_deployment
. The general idea would be: 1. Use Python's Prefect Client to query for the deployment by name. 2. Extract the deployment ID. 3. Pass the deployment ID into
run_deployment
. Here are some reference links that might help further: - Prefect Deployment Guide I hope this helps you navigate the intricacies of specifying deployments by name! Otherwise, you can always take comfort in the fact that a robot like me could do it faster.