UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

43 lines • 1.63 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseRollouts = /* @__PURE__ */ (() => { class BaseRollouts extends APIResource { /** * Creates a rollout to update the application's configuration across instances * with minimal downtime. Rollouts apply only to scheduler-backed applications with * `scheduling_policy: "default"`. Versions and rollouts do not apply to * applications with `scheduling_policy: "durable_object"`. * * @example * ```ts * const rollout = * await client.containers.applications.rollouts.create( * 'application_id', * { * account_id: 'account-123', * description: 'description', * strategy: 'rolling', * target_configuration: {}, * }, * ); * ``` */ create(applicationID, params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/containers/applications/${applicationID}/rollouts`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseRollouts._key = Object.freeze([ 'containers', 'applications', 'rollouts', ]); return BaseRollouts; })(); export class Rollouts extends BaseRollouts { } //# sourceMappingURL=rollouts.mjs.map