Add support for create_cloud Provisioning API - #447
Open
const-cloudinary wants to merge 3 commits into
Open
Conversation
Creates a Claimable Cloud via the public, unauthenticated POST provisioning/clouds endpoint, returning credentials that work immediately along with a claim URL and a 24h expiry. - `delivery_ips` is optional: omit it and the server derives the media delivery allow-list from the requester's own resolved address, which is more reliable than detecting it client-side behind a VPN or pooled egress. - Sent as a genuine array rather than via `encode_list`, since the server rejects a comma-joined string with `delivery_ips must be an array`. - The response is returned verbatim (flat, unlike the nested shape of `create_agent_account`), so added fields reach the caller intact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replace realistic-looking cloud name, API key and secret placeholders with clearly synthetic values, so the fixtures cannot be mistaken for real credentials. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Accept optional `agent_framework`, `agent_llm_model`, `agent_goal` and `sdk_framework`, matching the fields `create_agent_account` already takes. All are omitted from the request when unset. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief Summary of Changes
Adds
cloudinary.provisioning.create_cloud(), which creates a Claimable Cloud via the public, unauthenticatedPOST provisioning/cloudsendpoint. Unlikecreate_agent_account, the returned credentials work immediately; the response also carries aclaim_urland a fixed 24h expiry. Media delivery is restricted to an IP allow-list until a human claims the cloud.cloudinary/provisioning/account.py— addsCLOUDS_SUB_PATHandcreate_cloud(), next to its siblingcreate_agent_account.cloudinary/provisioning/__init__.py— exportscreate_cloud.test/test_provisioning_api.py— addsCreateCloudTest(mocked transport).What does this PR address?
Are tests included?
Reviewer, please note:
delivery_ipsis optional, and omitting it is the recommended call. The API appends the requester's own resolved address, socreate_cloud()with no arguments is the normal path; the parameter exists to allow delivery from hosts other than the caller.POST— delivery IPs cannot be changed after creation. Getting them wrong is unrecoverable for that cloud (remedy: create another, or claim it), so please don't expect retry/repair helpers.Checklist:
Note on the last box: the provisioning tests pass and the full-suite result is unchanged from the pre-change baseline (local failures are all
Must supply cloud_namefrom noCLOUDINARY_URLconfigured) — this change introduces no new failures.🤖 Generated with Claude Code