@quantcdn/quant-client 4.39.0 → 4.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services ## Rate limits - **Per token.** Each API token has a limit per organisation: by default 240 requests per minute. The limit counts after the token is validated, so tokens that share an IP address (for example Quant Cloud apps and CI runners) do not share a limit. An organisation can have a different limit (set per organisation or by subscription plan); contact Quant support to change it. - **Unauthenticated requests.** Requests that end without a valid token (no token, an invalid or expired token, public routes) have a coarse limit per client IP address: by default 600 requests per minute. A request with a valid token never counts against it and is never refused by it. A request with a valid token that is refused before the per-token limit runs (for example an organisation the token cannot use) still counts against the token. - **KV per project.** Some KV operations also have a limit per project, shared by every token: kv-admin 10 requests per minute (index create, delete and resume; upgrade; export create and resume; ledger declare, raise and drop), kv-erase 30 (ledger subject preview and shred), kv-verify 6 (ledger verify). - **Responses.** Over a limit the answer is 429 with a Retry-After header (seconds). KV routes answer the V2KvError body with code RATE_LIMITED and retryable true; other routes answer {\"message\": \"Too Many Attempts.\"}. Rate-limited routes send RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (IETF draft; Reset is seconds until the window resets) and X-RateLimit-Limit and X-RateLimit-Remaining on the responses of requests that reach a limiter, and X-RateLimit-Reset (Unix time) on a 429. A request refused before a limiter runs (for example a 401, 403 or 404 from an earlier check) can come back without these headers. When two limits apply, the headers describe the one with fewer requests left. Wait Retry-After seconds, then send the request again.
6
6
  *
7
- * The version of the OpenAPI document: 4.39.0
7
+ * The version of the OpenAPI document: 4.40.1
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -64,6 +64,32 @@ export const ApplicationDatabaseRdsInstanceEngineEnum = {
64
64
  Mysql: 'mysql',
65
65
  Postgres: 'postgres'
66
66
  };
67
+ export const ApplicationDatabaseErrorOperationEnum = {
68
+ Provision: 'provision',
69
+ Promote: 'promote',
70
+ Delete: 'delete'
71
+ };
72
+ export const ApplicationDatabaseErrorRequestedEnum = {
73
+ Provision: 'provision',
74
+ Promote: 'promote',
75
+ Delete: 'delete'
76
+ };
77
+ export const ApplicationDatabaseInstanceRoleEnum = {
78
+ Active: 'active',
79
+ Next: 'next',
80
+ Previous: 'previous'
81
+ };
82
+ export const ApplicationDatabaseInstanceStatusEnum = {
83
+ Active: 'active',
84
+ Provisioning: 'provisioning',
85
+ Ready: 'ready',
86
+ Failed: 'failed',
87
+ Previous: 'previous'
88
+ };
89
+ export const ApplicationDatabaseInstanceEngineEnum = {
90
+ Mysql: 'mysql',
91
+ Postgres: 'postgres'
92
+ };
67
93
  export const ApplicationImageReferenceTypeEnum = {
68
94
  Internal: 'internal',
69
95
  External: 'external'
@@ -295,6 +321,10 @@ export const DecideToolProposalRequestScopeEnum = {
295
321
  Once: 'once',
296
322
  Session: 'session'
297
323
  };
324
+ export const DeleteApplicationDatabaseResponseStatusEnum = {
325
+ Deleting: 'deleting',
326
+ Deleted: 'deleted'
327
+ };
298
328
  export const EmbeddingsRequestDimensionsEnum = {
299
329
  NUMBER_256: 256,
300
330
  NUMBER_512: 512,
@@ -513,6 +543,27 @@ export const ProjectsDelete503ResponseCodeEnum = {
513
543
  KvStoresUnreadable: 'KV_STORES_UNREADABLE',
514
544
  KvStoreDeleteFailed: 'KV_STORE_DELETE_FAILED'
515
545
  };
546
+ export const ProvisionApplicationDatabaseAcceptedEngineEnum = {
547
+ Mysql: 'mysql',
548
+ Postgres: 'postgres'
549
+ };
550
+ export const ProvisionApplicationDatabaseAcceptedStatusEnum = {
551
+ Provisioning: 'provisioning',
552
+ Ready: 'ready',
553
+ Failed: 'failed'
554
+ };
555
+ export const ProvisionApplicationDatabaseRequestEngineEnum = {
556
+ Mysql: 'mysql',
557
+ Postgres: 'postgres'
558
+ };
559
+ export const ProvisionApplicationDatabaseRequestInstanceClassEnum = {
560
+ DbT4gMicro: 'db.t4g.micro',
561
+ DbT4gSmall: 'db.t4g.small',
562
+ DbT4gMedium: 'db.t4g.medium',
563
+ DbT4gLarge: 'db.t4g.large',
564
+ DbT4gXlarge: 'db.t4g.xlarge',
565
+ DbT4g2xlarge: 'db.t4g.2xlarge'
566
+ };
516
567
  export const PurgeCreateRequestScopeEnum = {
517
568
  Project: 'project',
518
569
  Org: 'org'
@@ -546,6 +597,19 @@ export const QueryVectorCollectionRequestSortOrderEnum = {
546
597
  Asc: 'asc',
547
598
  Desc: 'desc'
548
599
  };
600
+ export const ResizeApplicationDatabaseRequestInstanceClassEnum = {
601
+ DbT4gMicro: 'db.t4g.micro',
602
+ DbT4gSmall: 'db.t4g.small',
603
+ DbT4gMedium: 'db.t4g.medium',
604
+ DbT4gLarge: 'db.t4g.large',
605
+ DbT4gXlarge: 'db.t4g.xlarge',
606
+ DbT4g2xlarge: 'db.t4g.2xlarge'
607
+ };
608
+ export const ResizeApplicationDatabaseResponseRoleEnum = {
609
+ Active: 'active',
610
+ Next: 'next',
611
+ Previous: 'previous'
612
+ };
549
613
  export const ResourceAttachmentAccessLevelEnum = {
550
614
  Scoped: 'scoped',
551
615
  Admin: 'admin'
@@ -12501,6 +12565,548 @@ export class AlertChannelsApi extends BaseAPI {
12501
12565
  return AlertChannelsApiFp(this.configuration).alertChannelsList(organisation, project, options).then((request) => request(this.axios, this.basePath));
12502
12566
  }
12503
12567
  }
12568
+ /**
12569
+ * ApplicationDatabaseApi - axios parameter creator
12570
+ * @export
12571
+ */
12572
+ export const ApplicationDatabaseApiAxiosParamCreator = function (configuration) {
12573
+ return {
12574
+ /**
12575
+ * Deletes the pending or previous database. No final snapshot is taken and its automated backups are deleted with it, so the body must set acknowledgeDataloss to true (422 otherwise, nothing is deleted). Take a backup before promoting: a retired database is not reachable through the backups API after the promote. The active database cannot be deleted (409), nor can one while another database operation (including its own provision) holds the application\'s lock. Needs the delete_applications permission and the cloud:delete scope.
12576
+ * @summary Delete a database of an application
12577
+ * @param {string} organisation The organisation ID
12578
+ * @param {string} application The application ID
12579
+ * @param {string} instanceId The database instance identifier
12580
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12581
+ * @param {*} [options] Override http request option.
12582
+ * @throws {RequiredError}
12583
+ */
12584
+ deleteApplicationDatabase: (organisation_1, application_1, instanceId_1, deleteApplicationDatabaseRequest_1, ...args_1) => __awaiter(this, [organisation_1, application_1, instanceId_1, deleteApplicationDatabaseRequest_1, ...args_1], void 0, function* (organisation, application, instanceId, deleteApplicationDatabaseRequest, options = {}) {
12585
+ // verify required parameter 'organisation' is not null or undefined
12586
+ assertParamExists('deleteApplicationDatabase', 'organisation', organisation);
12587
+ // verify required parameter 'application' is not null or undefined
12588
+ assertParamExists('deleteApplicationDatabase', 'application', application);
12589
+ // verify required parameter 'instanceId' is not null or undefined
12590
+ assertParamExists('deleteApplicationDatabase', 'instanceId', instanceId);
12591
+ // verify required parameter 'deleteApplicationDatabaseRequest' is not null or undefined
12592
+ assertParamExists('deleteApplicationDatabase', 'deleteApplicationDatabaseRequest', deleteApplicationDatabaseRequest);
12593
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12594
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12595
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12596
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12597
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12598
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12599
+ let baseOptions;
12600
+ if (configuration) {
12601
+ baseOptions = configuration.baseOptions;
12602
+ }
12603
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
12604
+ const localVarHeaderParameter = {};
12605
+ const localVarQueryParameter = {};
12606
+ // authentication BearerAuth required
12607
+ // http bearer authentication required
12608
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12609
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12610
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12611
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12612
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12613
+ localVarRequestOptions.data = serializeDataIfNeeded(deleteApplicationDatabaseRequest, localVarRequestOptions, configuration);
12614
+ return {
12615
+ url: toPathString(localVarUrlObj),
12616
+ options: localVarRequestOptions,
12617
+ };
12618
+ }),
12619
+ /**
12620
+ * Poll this for a database being added: status is provisioning, ready or failed.
12621
+ * @summary Get one database of an application
12622
+ * @param {string} organisation The organisation ID
12623
+ * @param {string} application The application ID
12624
+ * @param {string} instanceId The database instance identifier, as returned by the list
12625
+ * @param {*} [options] Override http request option.
12626
+ * @throws {RequiredError}
12627
+ */
12628
+ getApplicationDatabase: (organisation_1, application_1, instanceId_1, ...args_1) => __awaiter(this, [organisation_1, application_1, instanceId_1, ...args_1], void 0, function* (organisation, application, instanceId, options = {}) {
12629
+ // verify required parameter 'organisation' is not null or undefined
12630
+ assertParamExists('getApplicationDatabase', 'organisation', organisation);
12631
+ // verify required parameter 'application' is not null or undefined
12632
+ assertParamExists('getApplicationDatabase', 'application', application);
12633
+ // verify required parameter 'instanceId' is not null or undefined
12634
+ assertParamExists('getApplicationDatabase', 'instanceId', instanceId);
12635
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12636
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12637
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12638
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12639
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12640
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12641
+ let baseOptions;
12642
+ if (configuration) {
12643
+ baseOptions = configuration.baseOptions;
12644
+ }
12645
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12646
+ const localVarHeaderParameter = {};
12647
+ const localVarQueryParameter = {};
12648
+ // authentication BearerAuth required
12649
+ // http bearer authentication required
12650
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12651
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12652
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12653
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12654
+ return {
12655
+ url: toPathString(localVarUrlObj),
12656
+ options: localVarRequestOptions,
12657
+ };
12658
+ }),
12659
+ /**
12660
+ * The active database, the one being added next to it (next) and the one the last promote replaced (previous). Each is null when there is none. No credential value is returned. The application must exist (404 otherwise).
12661
+ * @summary Get the databases of an application
12662
+ * @param {string} organisation The organisation ID
12663
+ * @param {string} application The application ID
12664
+ * @param {*} [options] Override http request option.
12665
+ * @throws {RequiredError}
12666
+ */
12667
+ getApplicationDatabases: (organisation_1, application_1, ...args_1) => __awaiter(this, [organisation_1, application_1, ...args_1], void 0, function* (organisation, application, options = {}) {
12668
+ // verify required parameter 'organisation' is not null or undefined
12669
+ assertParamExists('getApplicationDatabases', 'organisation', organisation);
12670
+ // verify required parameter 'application' is not null or undefined
12671
+ assertParamExists('getApplicationDatabases', 'application', application);
12672
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database`
12673
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12674
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)));
12675
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12676
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12677
+ let baseOptions;
12678
+ if (configuration) {
12679
+ baseOptions = configuration.baseOptions;
12680
+ }
12681
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12682
+ const localVarHeaderParameter = {};
12683
+ const localVarQueryParameter = {};
12684
+ // authentication BearerAuth required
12685
+ // http bearer authentication required
12686
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12687
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12688
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12689
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12690
+ return {
12691
+ url: toPathString(localVarUrlObj),
12692
+ options: localVarRequestOptions,
12693
+ };
12694
+ }),
12695
+ /**
12696
+ * Makes the ready database the one every environment, backup, restore and new environment uses, and redeploys each environment onto it (a brief interruption per environment). The previous database is kept, so promoting it again is the rollback. Take a backup before promoting: the retired database is not reachable through the backups API afterwards. Environments are redeployed within about 15 seconds of the call: redeployed, redeployQueued (not done yet), redeployFailed (with a reason) and upToDate list the outcome, and redeployRequired is failed plus queued. Repeating the request only touches environments not yet on the new revision. Refused with 409, changing nothing, when another database operation holds the application\'s lock, when the database is not ready, when a previous database is still kept (delete it first), when an environment has no user on it or its credentials cannot be read (environments lists them), or when it has no endpoint yet. Needs the delete_applications permission and the cloud:delete scope.
12697
+ * @summary Make a database the database of an application
12698
+ * @param {string} organisation The organisation ID
12699
+ * @param {string} application The application ID
12700
+ * @param {string} instanceId The database instance identifier
12701
+ * @param {*} [options] Override http request option.
12702
+ * @throws {RequiredError}
12703
+ */
12704
+ promoteApplicationDatabase: (organisation_1, application_1, instanceId_1, ...args_1) => __awaiter(this, [organisation_1, application_1, instanceId_1, ...args_1], void 0, function* (organisation, application, instanceId, options = {}) {
12705
+ // verify required parameter 'organisation' is not null or undefined
12706
+ assertParamExists('promoteApplicationDatabase', 'organisation', organisation);
12707
+ // verify required parameter 'application' is not null or undefined
12708
+ assertParamExists('promoteApplicationDatabase', 'application', application);
12709
+ // verify required parameter 'instanceId' is not null or undefined
12710
+ assertParamExists('promoteApplicationDatabase', 'instanceId', instanceId);
12711
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}/promote`
12712
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12713
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12714
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12715
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12716
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12717
+ let baseOptions;
12718
+ if (configuration) {
12719
+ baseOptions = configuration.baseOptions;
12720
+ }
12721
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12722
+ const localVarHeaderParameter = {};
12723
+ const localVarQueryParameter = {};
12724
+ // authentication BearerAuth required
12725
+ // http bearer authentication required
12726
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12727
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12728
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12729
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12730
+ return {
12731
+ url: toPathString(localVarUrlObj),
12732
+ options: localVarRequestOptions,
12733
+ };
12734
+ }),
12735
+ /**
12736
+ * Provisions a second database next to the one the application has and sets up every environment on it. Nothing the running environments use changes: DB_NEXT_HOST, DB_NEXT_PORT, DB_NEXT_DATABASE and DB_NEXT_ENGINE are added, and the existing DB_USERNAME and DB_PASSWORD are valid on both. It answers 202 at once; poll the status URL until status is ready or failed. The new database has its own user and password per environment: the application connects to the old one with DB_* and to the new one with DB_NEXT_* (DB_NEXT_USERNAME and DB_NEXT_PASSWORD are secret references). Take a backup before promoting. Repeating the request after the worker has finished resumes it, or adds an environment created since. Only one database operation runs per application at a time: a second provision, promote or delete answers 409 while one holds the lock, including a repeat of the same provision while its worker is still running. Needs the write_applications permission and the cloud:write scope.
12737
+ * @summary Add a database to an application
12738
+ * @param {string} organisation The organisation ID
12739
+ * @param {string} application The application ID
12740
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
12741
+ * @param {*} [options] Override http request option.
12742
+ * @throws {RequiredError}
12743
+ */
12744
+ provisionApplicationDatabase: (organisation_1, application_1, provisionApplicationDatabaseRequest_1, ...args_1) => __awaiter(this, [organisation_1, application_1, provisionApplicationDatabaseRequest_1, ...args_1], void 0, function* (organisation, application, provisionApplicationDatabaseRequest, options = {}) {
12745
+ // verify required parameter 'organisation' is not null or undefined
12746
+ assertParamExists('provisionApplicationDatabase', 'organisation', organisation);
12747
+ // verify required parameter 'application' is not null or undefined
12748
+ assertParamExists('provisionApplicationDatabase', 'application', application);
12749
+ // verify required parameter 'provisionApplicationDatabaseRequest' is not null or undefined
12750
+ assertParamExists('provisionApplicationDatabase', 'provisionApplicationDatabaseRequest', provisionApplicationDatabaseRequest);
12751
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database`
12752
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12753
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)));
12754
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12755
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12756
+ let baseOptions;
12757
+ if (configuration) {
12758
+ baseOptions = configuration.baseOptions;
12759
+ }
12760
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12761
+ const localVarHeaderParameter = {};
12762
+ const localVarQueryParameter = {};
12763
+ // authentication BearerAuth required
12764
+ // http bearer authentication required
12765
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12766
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12767
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12768
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12769
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12770
+ localVarRequestOptions.data = serializeDataIfNeeded(provisionApplicationDatabaseRequest, localVarRequestOptions, configuration);
12771
+ return {
12772
+ url: toPathString(localVarUrlObj),
12773
+ options: localVarRequestOptions,
12774
+ };
12775
+ }),
12776
+ /**
12777
+ * Changes the instance class, the storage or Multi-AZ of the active, pending (once ready) or previous database. Only fields that differ change; the class and Multi-AZ compare with the value the instance will have (live, or pending for the maintenance window), so the live value withdraws a pending change. A class change restarts the instance (a few minutes without the database, about a minute of failover with Multi-AZ). Storage only grows, by at least 10 %, and can change again only after 6 hours; to make a database smaller, provision a smaller one and promote it. applyImmediately false leaves the change for the maintenance window. RDS applies every pending change with an immediate one, so an immediate request is a 409 while a pending change it does not name exists. Needs the write_applications permission and the cloud:write scope.
12778
+ * @summary Resize a database of an application
12779
+ * @param {string} organisation The organisation ID
12780
+ * @param {string} application The application ID
12781
+ * @param {string} instanceId The database instance identifier
12782
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
12783
+ * @param {*} [options] Override http request option.
12784
+ * @throws {RequiredError}
12785
+ */
12786
+ resizeApplicationDatabase: (organisation_1, application_1, instanceId_1, resizeApplicationDatabaseRequest_1, ...args_1) => __awaiter(this, [organisation_1, application_1, instanceId_1, resizeApplicationDatabaseRequest_1, ...args_1], void 0, function* (organisation, application, instanceId, resizeApplicationDatabaseRequest, options = {}) {
12787
+ // verify required parameter 'organisation' is not null or undefined
12788
+ assertParamExists('resizeApplicationDatabase', 'organisation', organisation);
12789
+ // verify required parameter 'application' is not null or undefined
12790
+ assertParamExists('resizeApplicationDatabase', 'application', application);
12791
+ // verify required parameter 'instanceId' is not null or undefined
12792
+ assertParamExists('resizeApplicationDatabase', 'instanceId', instanceId);
12793
+ // verify required parameter 'resizeApplicationDatabaseRequest' is not null or undefined
12794
+ assertParamExists('resizeApplicationDatabase', 'resizeApplicationDatabaseRequest', resizeApplicationDatabaseRequest);
12795
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12796
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12797
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12798
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12799
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12800
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12801
+ let baseOptions;
12802
+ if (configuration) {
12803
+ baseOptions = configuration.baseOptions;
12804
+ }
12805
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
12806
+ const localVarHeaderParameter = {};
12807
+ const localVarQueryParameter = {};
12808
+ // authentication BearerAuth required
12809
+ // http bearer authentication required
12810
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12811
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12812
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12813
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12814
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12815
+ localVarRequestOptions.data = serializeDataIfNeeded(resizeApplicationDatabaseRequest, localVarRequestOptions, configuration);
12816
+ return {
12817
+ url: toPathString(localVarUrlObj),
12818
+ options: localVarRequestOptions,
12819
+ };
12820
+ }),
12821
+ };
12822
+ };
12823
+ /**
12824
+ * ApplicationDatabaseApi - functional programming interface
12825
+ * @export
12826
+ */
12827
+ export const ApplicationDatabaseApiFp = function (configuration) {
12828
+ const localVarAxiosParamCreator = ApplicationDatabaseApiAxiosParamCreator(configuration);
12829
+ return {
12830
+ /**
12831
+ * Deletes the pending or previous database. No final snapshot is taken and its automated backups are deleted with it, so the body must set acknowledgeDataloss to true (422 otherwise, nothing is deleted). Take a backup before promoting: a retired database is not reachable through the backups API after the promote. The active database cannot be deleted (409), nor can one while another database operation (including its own provision) holds the application\'s lock. Needs the delete_applications permission and the cloud:delete scope.
12832
+ * @summary Delete a database of an application
12833
+ * @param {string} organisation The organisation ID
12834
+ * @param {string} application The application ID
12835
+ * @param {string} instanceId The database instance identifier
12836
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12837
+ * @param {*} [options] Override http request option.
12838
+ * @throws {RequiredError}
12839
+ */
12840
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
12841
+ return __awaiter(this, void 0, void 0, function* () {
12842
+ var _a, _b, _c;
12843
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options);
12844
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12845
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.deleteApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12846
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12847
+ });
12848
+ },
12849
+ /**
12850
+ * Poll this for a database being added: status is provisioning, ready or failed.
12851
+ * @summary Get one database of an application
12852
+ * @param {string} organisation The organisation ID
12853
+ * @param {string} application The application ID
12854
+ * @param {string} instanceId The database instance identifier, as returned by the list
12855
+ * @param {*} [options] Override http request option.
12856
+ * @throws {RequiredError}
12857
+ */
12858
+ getApplicationDatabase(organisation, application, instanceId, options) {
12859
+ return __awaiter(this, void 0, void 0, function* () {
12860
+ var _a, _b, _c;
12861
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getApplicationDatabase(organisation, application, instanceId, options);
12862
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12863
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.getApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12864
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12865
+ });
12866
+ },
12867
+ /**
12868
+ * The active database, the one being added next to it (next) and the one the last promote replaced (previous). Each is null when there is none. No credential value is returned. The application must exist (404 otherwise).
12869
+ * @summary Get the databases of an application
12870
+ * @param {string} organisation The organisation ID
12871
+ * @param {string} application The application ID
12872
+ * @param {*} [options] Override http request option.
12873
+ * @throws {RequiredError}
12874
+ */
12875
+ getApplicationDatabases(organisation, application, options) {
12876
+ return __awaiter(this, void 0, void 0, function* () {
12877
+ var _a, _b, _c;
12878
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getApplicationDatabases(organisation, application, options);
12879
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12880
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.getApplicationDatabases']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12881
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12882
+ });
12883
+ },
12884
+ /**
12885
+ * Makes the ready database the one every environment, backup, restore and new environment uses, and redeploys each environment onto it (a brief interruption per environment). The previous database is kept, so promoting it again is the rollback. Take a backup before promoting: the retired database is not reachable through the backups API afterwards. Environments are redeployed within about 15 seconds of the call: redeployed, redeployQueued (not done yet), redeployFailed (with a reason) and upToDate list the outcome, and redeployRequired is failed plus queued. Repeating the request only touches environments not yet on the new revision. Refused with 409, changing nothing, when another database operation holds the application\'s lock, when the database is not ready, when a previous database is still kept (delete it first), when an environment has no user on it or its credentials cannot be read (environments lists them), or when it has no endpoint yet. Needs the delete_applications permission and the cloud:delete scope.
12886
+ * @summary Make a database the database of an application
12887
+ * @param {string} organisation The organisation ID
12888
+ * @param {string} application The application ID
12889
+ * @param {string} instanceId The database instance identifier
12890
+ * @param {*} [options] Override http request option.
12891
+ * @throws {RequiredError}
12892
+ */
12893
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
12894
+ return __awaiter(this, void 0, void 0, function* () {
12895
+ var _a, _b, _c;
12896
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.promoteApplicationDatabase(organisation, application, instanceId, options);
12897
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12898
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.promoteApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12899
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12900
+ });
12901
+ },
12902
+ /**
12903
+ * Provisions a second database next to the one the application has and sets up every environment on it. Nothing the running environments use changes: DB_NEXT_HOST, DB_NEXT_PORT, DB_NEXT_DATABASE and DB_NEXT_ENGINE are added, and the existing DB_USERNAME and DB_PASSWORD are valid on both. It answers 202 at once; poll the status URL until status is ready or failed. The new database has its own user and password per environment: the application connects to the old one with DB_* and to the new one with DB_NEXT_* (DB_NEXT_USERNAME and DB_NEXT_PASSWORD are secret references). Take a backup before promoting. Repeating the request after the worker has finished resumes it, or adds an environment created since. Only one database operation runs per application at a time: a second provision, promote or delete answers 409 while one holds the lock, including a repeat of the same provision while its worker is still running. Needs the write_applications permission and the cloud:write scope.
12904
+ * @summary Add a database to an application
12905
+ * @param {string} organisation The organisation ID
12906
+ * @param {string} application The application ID
12907
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
12908
+ * @param {*} [options] Override http request option.
12909
+ * @throws {RequiredError}
12910
+ */
12911
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
12912
+ return __awaiter(this, void 0, void 0, function* () {
12913
+ var _a, _b, _c;
12914
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options);
12915
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12916
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.provisionApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12917
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12918
+ });
12919
+ },
12920
+ /**
12921
+ * Changes the instance class, the storage or Multi-AZ of the active, pending (once ready) or previous database. Only fields that differ change; the class and Multi-AZ compare with the value the instance will have (live, or pending for the maintenance window), so the live value withdraws a pending change. A class change restarts the instance (a few minutes without the database, about a minute of failover with Multi-AZ). Storage only grows, by at least 10 %, and can change again only after 6 hours; to make a database smaller, provision a smaller one and promote it. applyImmediately false leaves the change for the maintenance window. RDS applies every pending change with an immediate one, so an immediate request is a 409 while a pending change it does not name exists. Needs the write_applications permission and the cloud:write scope.
12922
+ * @summary Resize a database of an application
12923
+ * @param {string} organisation The organisation ID
12924
+ * @param {string} application The application ID
12925
+ * @param {string} instanceId The database instance identifier
12926
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
12927
+ * @param {*} [options] Override http request option.
12928
+ * @throws {RequiredError}
12929
+ */
12930
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
12931
+ return __awaiter(this, void 0, void 0, function* () {
12932
+ var _a, _b, _c;
12933
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options);
12934
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12935
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.resizeApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12936
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12937
+ });
12938
+ },
12939
+ };
12940
+ };
12941
+ /**
12942
+ * ApplicationDatabaseApi - factory interface
12943
+ * @export
12944
+ */
12945
+ export const ApplicationDatabaseApiFactory = function (configuration, basePath, axios) {
12946
+ const localVarFp = ApplicationDatabaseApiFp(configuration);
12947
+ return {
12948
+ /**
12949
+ * Deletes the pending or previous database. No final snapshot is taken and its automated backups are deleted with it, so the body must set acknowledgeDataloss to true (422 otherwise, nothing is deleted). Take a backup before promoting: a retired database is not reachable through the backups API after the promote. The active database cannot be deleted (409), nor can one while another database operation (including its own provision) holds the application\'s lock. Needs the delete_applications permission and the cloud:delete scope.
12950
+ * @summary Delete a database of an application
12951
+ * @param {string} organisation The organisation ID
12952
+ * @param {string} application The application ID
12953
+ * @param {string} instanceId The database instance identifier
12954
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12955
+ * @param {*} [options] Override http request option.
12956
+ * @throws {RequiredError}
12957
+ */
12958
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
12959
+ return localVarFp.deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
12960
+ },
12961
+ /**
12962
+ * Poll this for a database being added: status is provisioning, ready or failed.
12963
+ * @summary Get one database of an application
12964
+ * @param {string} organisation The organisation ID
12965
+ * @param {string} application The application ID
12966
+ * @param {string} instanceId The database instance identifier, as returned by the list
12967
+ * @param {*} [options] Override http request option.
12968
+ * @throws {RequiredError}
12969
+ */
12970
+ getApplicationDatabase(organisation, application, instanceId, options) {
12971
+ return localVarFp.getApplicationDatabase(organisation, application, instanceId, options).then((request) => request(axios, basePath));
12972
+ },
12973
+ /**
12974
+ * The active database, the one being added next to it (next) and the one the last promote replaced (previous). Each is null when there is none. No credential value is returned. The application must exist (404 otherwise).
12975
+ * @summary Get the databases of an application
12976
+ * @param {string} organisation The organisation ID
12977
+ * @param {string} application The application ID
12978
+ * @param {*} [options] Override http request option.
12979
+ * @throws {RequiredError}
12980
+ */
12981
+ getApplicationDatabases(organisation, application, options) {
12982
+ return localVarFp.getApplicationDatabases(organisation, application, options).then((request) => request(axios, basePath));
12983
+ },
12984
+ /**
12985
+ * Makes the ready database the one every environment, backup, restore and new environment uses, and redeploys each environment onto it (a brief interruption per environment). The previous database is kept, so promoting it again is the rollback. Take a backup before promoting: the retired database is not reachable through the backups API afterwards. Environments are redeployed within about 15 seconds of the call: redeployed, redeployQueued (not done yet), redeployFailed (with a reason) and upToDate list the outcome, and redeployRequired is failed plus queued. Repeating the request only touches environments not yet on the new revision. Refused with 409, changing nothing, when another database operation holds the application\'s lock, when the database is not ready, when a previous database is still kept (delete it first), when an environment has no user on it or its credentials cannot be read (environments lists them), or when it has no endpoint yet. Needs the delete_applications permission and the cloud:delete scope.
12986
+ * @summary Make a database the database of an application
12987
+ * @param {string} organisation The organisation ID
12988
+ * @param {string} application The application ID
12989
+ * @param {string} instanceId The database instance identifier
12990
+ * @param {*} [options] Override http request option.
12991
+ * @throws {RequiredError}
12992
+ */
12993
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
12994
+ return localVarFp.promoteApplicationDatabase(organisation, application, instanceId, options).then((request) => request(axios, basePath));
12995
+ },
12996
+ /**
12997
+ * Provisions a second database next to the one the application has and sets up every environment on it. Nothing the running environments use changes: DB_NEXT_HOST, DB_NEXT_PORT, DB_NEXT_DATABASE and DB_NEXT_ENGINE are added, and the existing DB_USERNAME and DB_PASSWORD are valid on both. It answers 202 at once; poll the status URL until status is ready or failed. The new database has its own user and password per environment: the application connects to the old one with DB_* and to the new one with DB_NEXT_* (DB_NEXT_USERNAME and DB_NEXT_PASSWORD are secret references). Take a backup before promoting. Repeating the request after the worker has finished resumes it, or adds an environment created since. Only one database operation runs per application at a time: a second provision, promote or delete answers 409 while one holds the lock, including a repeat of the same provision while its worker is still running. Needs the write_applications permission and the cloud:write scope.
12998
+ * @summary Add a database to an application
12999
+ * @param {string} organisation The organisation ID
13000
+ * @param {string} application The application ID
13001
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
13002
+ * @param {*} [options] Override http request option.
13003
+ * @throws {RequiredError}
13004
+ */
13005
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
13006
+ return localVarFp.provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
13007
+ },
13008
+ /**
13009
+ * Changes the instance class, the storage or Multi-AZ of the active, pending (once ready) or previous database. Only fields that differ change; the class and Multi-AZ compare with the value the instance will have (live, or pending for the maintenance window), so the live value withdraws a pending change. A class change restarts the instance (a few minutes without the database, about a minute of failover with Multi-AZ). Storage only grows, by at least 10 %, and can change again only after 6 hours; to make a database smaller, provision a smaller one and promote it. applyImmediately false leaves the change for the maintenance window. RDS applies every pending change with an immediate one, so an immediate request is a 409 while a pending change it does not name exists. Needs the write_applications permission and the cloud:write scope.
13010
+ * @summary Resize a database of an application
13011
+ * @param {string} organisation The organisation ID
13012
+ * @param {string} application The application ID
13013
+ * @param {string} instanceId The database instance identifier
13014
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
13015
+ * @param {*} [options] Override http request option.
13016
+ * @throws {RequiredError}
13017
+ */
13018
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
13019
+ return localVarFp.resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
13020
+ },
13021
+ };
13022
+ };
13023
+ /**
13024
+ * ApplicationDatabaseApi - object-oriented interface
13025
+ * @export
13026
+ * @class ApplicationDatabaseApi
13027
+ * @extends {BaseAPI}
13028
+ */
13029
+ export class ApplicationDatabaseApi extends BaseAPI {
13030
+ /**
13031
+ * Deletes the pending or previous database. No final snapshot is taken and its automated backups are deleted with it, so the body must set acknowledgeDataloss to true (422 otherwise, nothing is deleted). Take a backup before promoting: a retired database is not reachable through the backups API after the promote. The active database cannot be deleted (409), nor can one while another database operation (including its own provision) holds the application\'s lock. Needs the delete_applications permission and the cloud:delete scope.
13032
+ * @summary Delete a database of an application
13033
+ * @param {string} organisation The organisation ID
13034
+ * @param {string} application The application ID
13035
+ * @param {string} instanceId The database instance identifier
13036
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
13037
+ * @param {*} [options] Override http request option.
13038
+ * @throws {RequiredError}
13039
+ * @memberof ApplicationDatabaseApi
13040
+ */
13041
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
13042
+ return ApplicationDatabaseApiFp(this.configuration).deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13043
+ }
13044
+ /**
13045
+ * Poll this for a database being added: status is provisioning, ready or failed.
13046
+ * @summary Get one database of an application
13047
+ * @param {string} organisation The organisation ID
13048
+ * @param {string} application The application ID
13049
+ * @param {string} instanceId The database instance identifier, as returned by the list
13050
+ * @param {*} [options] Override http request option.
13051
+ * @throws {RequiredError}
13052
+ * @memberof ApplicationDatabaseApi
13053
+ */
13054
+ getApplicationDatabase(organisation, application, instanceId, options) {
13055
+ return ApplicationDatabaseApiFp(this.configuration).getApplicationDatabase(organisation, application, instanceId, options).then((request) => request(this.axios, this.basePath));
13056
+ }
13057
+ /**
13058
+ * The active database, the one being added next to it (next) and the one the last promote replaced (previous). Each is null when there is none. No credential value is returned. The application must exist (404 otherwise).
13059
+ * @summary Get the databases of an application
13060
+ * @param {string} organisation The organisation ID
13061
+ * @param {string} application The application ID
13062
+ * @param {*} [options] Override http request option.
13063
+ * @throws {RequiredError}
13064
+ * @memberof ApplicationDatabaseApi
13065
+ */
13066
+ getApplicationDatabases(organisation, application, options) {
13067
+ return ApplicationDatabaseApiFp(this.configuration).getApplicationDatabases(organisation, application, options).then((request) => request(this.axios, this.basePath));
13068
+ }
13069
+ /**
13070
+ * Makes the ready database the one every environment, backup, restore and new environment uses, and redeploys each environment onto it (a brief interruption per environment). The previous database is kept, so promoting it again is the rollback. Take a backup before promoting: the retired database is not reachable through the backups API afterwards. Environments are redeployed within about 15 seconds of the call: redeployed, redeployQueued (not done yet), redeployFailed (with a reason) and upToDate list the outcome, and redeployRequired is failed plus queued. Repeating the request only touches environments not yet on the new revision. Refused with 409, changing nothing, when another database operation holds the application\'s lock, when the database is not ready, when a previous database is still kept (delete it first), when an environment has no user on it or its credentials cannot be read (environments lists them), or when it has no endpoint yet. Needs the delete_applications permission and the cloud:delete scope.
13071
+ * @summary Make a database the database of an application
13072
+ * @param {string} organisation The organisation ID
13073
+ * @param {string} application The application ID
13074
+ * @param {string} instanceId The database instance identifier
13075
+ * @param {*} [options] Override http request option.
13076
+ * @throws {RequiredError}
13077
+ * @memberof ApplicationDatabaseApi
13078
+ */
13079
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
13080
+ return ApplicationDatabaseApiFp(this.configuration).promoteApplicationDatabase(organisation, application, instanceId, options).then((request) => request(this.axios, this.basePath));
13081
+ }
13082
+ /**
13083
+ * Provisions a second database next to the one the application has and sets up every environment on it. Nothing the running environments use changes: DB_NEXT_HOST, DB_NEXT_PORT, DB_NEXT_DATABASE and DB_NEXT_ENGINE are added, and the existing DB_USERNAME and DB_PASSWORD are valid on both. It answers 202 at once; poll the status URL until status is ready or failed. The new database has its own user and password per environment: the application connects to the old one with DB_* and to the new one with DB_NEXT_* (DB_NEXT_USERNAME and DB_NEXT_PASSWORD are secret references). Take a backup before promoting. Repeating the request after the worker has finished resumes it, or adds an environment created since. Only one database operation runs per application at a time: a second provision, promote or delete answers 409 while one holds the lock, including a repeat of the same provision while its worker is still running. Needs the write_applications permission and the cloud:write scope.
13084
+ * @summary Add a database to an application
13085
+ * @param {string} organisation The organisation ID
13086
+ * @param {string} application The application ID
13087
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
13088
+ * @param {*} [options] Override http request option.
13089
+ * @throws {RequiredError}
13090
+ * @memberof ApplicationDatabaseApi
13091
+ */
13092
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
13093
+ return ApplicationDatabaseApiFp(this.configuration).provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13094
+ }
13095
+ /**
13096
+ * Changes the instance class, the storage or Multi-AZ of the active, pending (once ready) or previous database. Only fields that differ change; the class and Multi-AZ compare with the value the instance will have (live, or pending for the maintenance window), so the live value withdraws a pending change. A class change restarts the instance (a few minutes without the database, about a minute of failover with Multi-AZ). Storage only grows, by at least 10 %, and can change again only after 6 hours; to make a database smaller, provision a smaller one and promote it. applyImmediately false leaves the change for the maintenance window. RDS applies every pending change with an immediate one, so an immediate request is a 409 while a pending change it does not name exists. Needs the write_applications permission and the cloud:write scope.
13097
+ * @summary Resize a database of an application
13098
+ * @param {string} organisation The organisation ID
13099
+ * @param {string} application The application ID
13100
+ * @param {string} instanceId The database instance identifier
13101
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
13102
+ * @param {*} [options] Override http request option.
13103
+ * @throws {RequiredError}
13104
+ * @memberof ApplicationDatabaseApi
13105
+ */
13106
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
13107
+ return ApplicationDatabaseApiFp(this.configuration).resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13108
+ }
13109
+ }
12504
13110
  /**
12505
13111
  * ApplicationsApi - axios parameter creator
12506
13112
  * @export