From 760ac780b958c62541d4d3218a6ea07f63d1a8f1 Mon Sep 17 00:00:00 2001 From: Dan Brian Date: Thu, 5 Dec 2024 16:52:56 -0500 Subject: [PATCH] Update apps_update.yml (#953) * Update apps_update.yml Updates App update cURL example to be complete * Apply suggestions from code review feedback via ASB Co-authored-by: Andrew Starr-Bochicchio * Update apps_update.yml More minimal app spec * Update apps_update.yml --------- Co-authored-by: Andrew Starr-Bochicchio --- specification/resources/apps/examples/curl/apps_update.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/resources/apps/examples/curl/apps_update.yml b/specification/resources/apps/examples/curl/apps_update.yml index 4956fb91e..1757d84ac 100644 --- a/specification/resources/apps/examples/curl/apps_update.yml +++ b/specification/resources/apps/examples/curl/apps_update.yml @@ -1,6 +1,7 @@ lang: cURL source: |- curl -X PUT \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ - "https://api.digitalocean.com/v2/apps/{id}" + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/apps/{id}" \ + -d '{"alerts":[{"rule":"DEPLOYMENT_FAILED"},{"rule":"DOMAIN_FAILED"}],"domains":[{"domain":"example.com","type":"PRIMARY","zone":"example.com"}],"envs":[{"key":"API_KEY","scope":"RUN_AND_BUILD_TIME","type":"SECRET","value":"EV[1:zqiRIeaaYK/NqctZDYzy6t0pTrtRDez8:wqGpZRrsKN5nPhWQrS479cfBiXT0WQ==]"}],"features":["buildpack-stack=ubuntu-22"],"ingress":{},"name":"example-app","region":"nyc","services":[{"autoscaling":{"max_instance_count":4,"metrics":{"cpu":{"percent":70}},"min_instance_count":2},"git":{"branch":"main","repo_clone_url":"https://github.com/digitalocean/sample-nodejs.git"},"internal_ports":[8080],"log_destinations":[{"name":"your_log_consumer_name","open_search":{"endpoint":"logs.example.com:12345","basic_auth":{"user":"doadmin","password":"1234567890abcdef"},"index_name":"example-index","cluster_name":"example-cluster"}}],"name":"sample-nodejs","run_command":"yarn start","source_dir":"/"}]}'