UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

48 lines • 1.83 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Rollouts = exports.BaseRollouts = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseRollouts = /* @__PURE__ */ (() => { class BaseRollouts extends resource_1.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((0, path_1.path) `/accounts/${account_id}/containers/applications/${applicationID}/rollouts`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseRollouts._key = Object.freeze([ 'containers', 'applications', 'rollouts', ]); return BaseRollouts; })(); exports.BaseRollouts = BaseRollouts; class Rollouts extends BaseRollouts { } exports.Rollouts = Rollouts; //# sourceMappingURL=rollouts.js.map