<@U06RKAMK0UC> How do you activate a launch plan c...
# ask-ai
b
@ancient-wolf-19325 How do you activate a launch plan created using FlyteRemote object
j
To activate a launch plan using a
FlyteRemote
object, you need to fetch the launch plan and then update its state to "ACTIVE". Here's a concise example:
Copy code
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config

# Initialize FlyteRemote
remote = FlyteRemote(
    config=Config.auto(),
    default_project="flytesnacks",
    default_domain="development",
)

# Fetch the launch plan
launchplan_id = remote.fetch_launch_plan(name="process_data_lp").id

# Activate the launch plan
remote.client.update_launch_plan(launchplan_id, "ACTIVE")
Would you like more detail? Sources: - Running and scheduling workflows - Scheduling a launch plan 👍 1 button 👎 0 button 💡 Hint: Mention @ancient-wolf-19325 in the thread for followups.