@quantcdn/quant-client 4.38.0 → 4.40.0

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.38.0
7
+ * The version of the OpenAPI document: 4.40.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -64,6 +64,16 @@ 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
+ };
67
77
  export const ApplicationImageReferenceTypeEnum = {
68
78
  Internal: 'internal',
69
79
  External: 'external'
@@ -143,7 +153,8 @@ export const CiRunnerPoolConfigAlertsInnerTypeEnum = {
143
153
  QueueWait: 'queue_wait',
144
154
  AtCapacity: 'at_capacity',
145
155
  PoolError: 'pool_error',
146
- LabelsUnfit: 'labels_unfit'
156
+ LabelsUnfit: 'labels_unfit',
157
+ VmHoursIncluded: 'vm_hours_included'
147
158
  };
148
159
  export const CiRunnerPoolConfigConnectionProviderEnum = {
149
160
  Github: 'github'
@@ -294,6 +305,10 @@ export const DecideToolProposalRequestScopeEnum = {
294
305
  Once: 'once',
295
306
  Session: 'session'
296
307
  };
308
+ export const DeleteApplicationDatabaseResponseStatusEnum = {
309
+ Deleting: 'deleting',
310
+ Deleted: 'deleted'
311
+ };
297
312
  export const EmbeddingsRequestDimensionsEnum = {
298
313
  NUMBER_256: 256,
299
314
  NUMBER_512: 512,
@@ -512,6 +527,27 @@ export const ProjectsDelete503ResponseCodeEnum = {
512
527
  KvStoresUnreadable: 'KV_STORES_UNREADABLE',
513
528
  KvStoreDeleteFailed: 'KV_STORE_DELETE_FAILED'
514
529
  };
530
+ export const ProvisionApplicationDatabaseAcceptedEngineEnum = {
531
+ Mysql: 'mysql',
532
+ Postgres: 'postgres'
533
+ };
534
+ export const ProvisionApplicationDatabaseAcceptedStatusEnum = {
535
+ Provisioning: 'provisioning',
536
+ Ready: 'ready',
537
+ Failed: 'failed'
538
+ };
539
+ export const ProvisionApplicationDatabaseRequestEngineEnum = {
540
+ Mysql: 'mysql',
541
+ Postgres: 'postgres'
542
+ };
543
+ export const ProvisionApplicationDatabaseRequestInstanceClassEnum = {
544
+ DbT4gMicro: 'db.t4g.micro',
545
+ DbT4gSmall: 'db.t4g.small',
546
+ DbT4gMedium: 'db.t4g.medium',
547
+ DbT4gLarge: 'db.t4g.large',
548
+ DbT4gXlarge: 'db.t4g.xlarge',
549
+ DbT4g2xlarge: 'db.t4g.2xlarge'
550
+ };
515
551
  export const PurgeCreateRequestScopeEnum = {
516
552
  Project: 'project',
517
553
  Org: 'org'
@@ -545,6 +581,19 @@ export const QueryVectorCollectionRequestSortOrderEnum = {
545
581
  Asc: 'asc',
546
582
  Desc: 'desc'
547
583
  };
584
+ export const ResizeApplicationDatabaseRequestInstanceClassEnum = {
585
+ DbT4gMicro: 'db.t4g.micro',
586
+ DbT4gSmall: 'db.t4g.small',
587
+ DbT4gMedium: 'db.t4g.medium',
588
+ DbT4gLarge: 'db.t4g.large',
589
+ DbT4gXlarge: 'db.t4g.xlarge',
590
+ DbT4g2xlarge: 'db.t4g.2xlarge'
591
+ };
592
+ export const ResizeApplicationDatabaseResponseRoleEnum = {
593
+ Active: 'active',
594
+ Next: 'next',
595
+ Previous: 'previous'
596
+ };
548
597
  export const ResourceAttachmentAccessLevelEnum = {
549
598
  Scoped: 'scoped',
550
599
  Admin: 'admin'
@@ -1059,6 +1108,31 @@ export const V2RuleAuthRequestTrafficSourceIsNotEnum = {
1059
1108
  Abuser: 'abuser',
1060
1109
  Crawler: 'crawler'
1061
1110
  };
1111
+ export const V2RuleBotChallengeActionRobotChallengeVerifiedBotsSearchEnum = {
1112
+ Allow: 'allow',
1113
+ Challenge: 'challenge',
1114
+ Block: 'block'
1115
+ };
1116
+ export const V2RuleBotChallengeActionRobotChallengeVerifiedBotsAiSearchEnum = {
1117
+ Allow: 'allow',
1118
+ Challenge: 'challenge',
1119
+ Block: 'block'
1120
+ };
1121
+ export const V2RuleBotChallengeActionRobotChallengeVerifiedBotsPreviewEnum = {
1122
+ Allow: 'allow',
1123
+ Challenge: 'challenge',
1124
+ Block: 'block'
1125
+ };
1126
+ export const V2RuleBotChallengeActionRobotChallengeVerifiedBotsMonitorEnum = {
1127
+ Allow: 'allow',
1128
+ Challenge: 'challenge',
1129
+ Block: 'block'
1130
+ };
1131
+ export const V2RuleBotChallengeActionRobotChallengeVerifiedBotsOtherEnum = {
1132
+ Allow: 'allow',
1133
+ Challenge: 'challenge',
1134
+ Block: 'block'
1135
+ };
1062
1136
  export const V2RuleBotChallengeRequestAsnEnum = {
1063
1137
  Any: 'any',
1064
1138
  AsnIs: 'asn_is',
@@ -12475,6 +12549,548 @@ export class AlertChannelsApi extends BaseAPI {
12475
12549
  return AlertChannelsApiFp(this.configuration).alertChannelsList(organisation, project, options).then((request) => request(this.axios, this.basePath));
12476
12550
  }
12477
12551
  }
12552
+ /**
12553
+ * ApplicationDatabaseApi - axios parameter creator
12554
+ * @export
12555
+ */
12556
+ export const ApplicationDatabaseApiAxiosParamCreator = function (configuration) {
12557
+ return {
12558
+ /**
12559
+ * 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.
12560
+ * @summary Delete a database of an application
12561
+ * @param {string} organisation The organisation ID
12562
+ * @param {string} application The application ID
12563
+ * @param {string} instanceId The database instance identifier
12564
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12565
+ * @param {*} [options] Override http request option.
12566
+ * @throws {RequiredError}
12567
+ */
12568
+ 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 = {}) {
12569
+ // verify required parameter 'organisation' is not null or undefined
12570
+ assertParamExists('deleteApplicationDatabase', 'organisation', organisation);
12571
+ // verify required parameter 'application' is not null or undefined
12572
+ assertParamExists('deleteApplicationDatabase', 'application', application);
12573
+ // verify required parameter 'instanceId' is not null or undefined
12574
+ assertParamExists('deleteApplicationDatabase', 'instanceId', instanceId);
12575
+ // verify required parameter 'deleteApplicationDatabaseRequest' is not null or undefined
12576
+ assertParamExists('deleteApplicationDatabase', 'deleteApplicationDatabaseRequest', deleteApplicationDatabaseRequest);
12577
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12578
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12579
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12580
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12581
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12582
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12583
+ let baseOptions;
12584
+ if (configuration) {
12585
+ baseOptions = configuration.baseOptions;
12586
+ }
12587
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
12588
+ const localVarHeaderParameter = {};
12589
+ const localVarQueryParameter = {};
12590
+ // authentication BearerAuth required
12591
+ // http bearer authentication required
12592
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12593
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12596
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12597
+ localVarRequestOptions.data = serializeDataIfNeeded(deleteApplicationDatabaseRequest, localVarRequestOptions, configuration);
12598
+ return {
12599
+ url: toPathString(localVarUrlObj),
12600
+ options: localVarRequestOptions,
12601
+ };
12602
+ }),
12603
+ /**
12604
+ * Poll this for a database being added: status is provisioning, ready or failed.
12605
+ * @summary Get one database of an application
12606
+ * @param {string} organisation The organisation ID
12607
+ * @param {string} application The application ID
12608
+ * @param {string} instanceId The database instance identifier, as returned by the list
12609
+ * @param {*} [options] Override http request option.
12610
+ * @throws {RequiredError}
12611
+ */
12612
+ 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 = {}) {
12613
+ // verify required parameter 'organisation' is not null or undefined
12614
+ assertParamExists('getApplicationDatabase', 'organisation', organisation);
12615
+ // verify required parameter 'application' is not null or undefined
12616
+ assertParamExists('getApplicationDatabase', 'application', application);
12617
+ // verify required parameter 'instanceId' is not null or undefined
12618
+ assertParamExists('getApplicationDatabase', 'instanceId', instanceId);
12619
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12620
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12621
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12622
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12623
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12624
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12625
+ let baseOptions;
12626
+ if (configuration) {
12627
+ baseOptions = configuration.baseOptions;
12628
+ }
12629
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12630
+ const localVarHeaderParameter = {};
12631
+ const localVarQueryParameter = {};
12632
+ // authentication BearerAuth required
12633
+ // http bearer authentication required
12634
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12635
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12636
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12637
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12638
+ return {
12639
+ url: toPathString(localVarUrlObj),
12640
+ options: localVarRequestOptions,
12641
+ };
12642
+ }),
12643
+ /**
12644
+ * 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).
12645
+ * @summary Get the databases of an application
12646
+ * @param {string} organisation The organisation ID
12647
+ * @param {string} application The application ID
12648
+ * @param {*} [options] Override http request option.
12649
+ * @throws {RequiredError}
12650
+ */
12651
+ getApplicationDatabases: (organisation_1, application_1, ...args_1) => __awaiter(this, [organisation_1, application_1, ...args_1], void 0, function* (organisation, application, options = {}) {
12652
+ // verify required parameter 'organisation' is not null or undefined
12653
+ assertParamExists('getApplicationDatabases', 'organisation', organisation);
12654
+ // verify required parameter 'application' is not null or undefined
12655
+ assertParamExists('getApplicationDatabases', 'application', application);
12656
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database`
12657
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12658
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)));
12659
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12660
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12661
+ let baseOptions;
12662
+ if (configuration) {
12663
+ baseOptions = configuration.baseOptions;
12664
+ }
12665
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12666
+ const localVarHeaderParameter = {};
12667
+ const localVarQueryParameter = {};
12668
+ // authentication BearerAuth required
12669
+ // http bearer authentication required
12670
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12671
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12672
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12673
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12674
+ return {
12675
+ url: toPathString(localVarUrlObj),
12676
+ options: localVarRequestOptions,
12677
+ };
12678
+ }),
12679
+ /**
12680
+ * 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.
12681
+ * @summary Make a database the database of an application
12682
+ * @param {string} organisation The organisation ID
12683
+ * @param {string} application The application ID
12684
+ * @param {string} instanceId The database instance identifier
12685
+ * @param {*} [options] Override http request option.
12686
+ * @throws {RequiredError}
12687
+ */
12688
+ 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 = {}) {
12689
+ // verify required parameter 'organisation' is not null or undefined
12690
+ assertParamExists('promoteApplicationDatabase', 'organisation', organisation);
12691
+ // verify required parameter 'application' is not null or undefined
12692
+ assertParamExists('promoteApplicationDatabase', 'application', application);
12693
+ // verify required parameter 'instanceId' is not null or undefined
12694
+ assertParamExists('promoteApplicationDatabase', 'instanceId', instanceId);
12695
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}/promote`
12696
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12697
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12698
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12699
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12700
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12701
+ let baseOptions;
12702
+ if (configuration) {
12703
+ baseOptions = configuration.baseOptions;
12704
+ }
12705
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12706
+ const localVarHeaderParameter = {};
12707
+ const localVarQueryParameter = {};
12708
+ // authentication BearerAuth required
12709
+ // http bearer authentication required
12710
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12711
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12712
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12713
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12714
+ return {
12715
+ url: toPathString(localVarUrlObj),
12716
+ options: localVarRequestOptions,
12717
+ };
12718
+ }),
12719
+ /**
12720
+ * 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.
12721
+ * @summary Add a database to an application
12722
+ * @param {string} organisation The organisation ID
12723
+ * @param {string} application The application ID
12724
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
12725
+ * @param {*} [options] Override http request option.
12726
+ * @throws {RequiredError}
12727
+ */
12728
+ 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 = {}) {
12729
+ // verify required parameter 'organisation' is not null or undefined
12730
+ assertParamExists('provisionApplicationDatabase', 'organisation', organisation);
12731
+ // verify required parameter 'application' is not null or undefined
12732
+ assertParamExists('provisionApplicationDatabase', 'application', application);
12733
+ // verify required parameter 'provisionApplicationDatabaseRequest' is not null or undefined
12734
+ assertParamExists('provisionApplicationDatabase', 'provisionApplicationDatabaseRequest', provisionApplicationDatabaseRequest);
12735
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database`
12736
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12737
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)));
12738
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12739
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12740
+ let baseOptions;
12741
+ if (configuration) {
12742
+ baseOptions = configuration.baseOptions;
12743
+ }
12744
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12745
+ const localVarHeaderParameter = {};
12746
+ const localVarQueryParameter = {};
12747
+ // authentication BearerAuth required
12748
+ // http bearer authentication required
12749
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12750
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12751
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12752
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12753
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12754
+ localVarRequestOptions.data = serializeDataIfNeeded(provisionApplicationDatabaseRequest, localVarRequestOptions, configuration);
12755
+ return {
12756
+ url: toPathString(localVarUrlObj),
12757
+ options: localVarRequestOptions,
12758
+ };
12759
+ }),
12760
+ /**
12761
+ * 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.
12762
+ * @summary Resize a database of an application
12763
+ * @param {string} organisation The organisation ID
12764
+ * @param {string} application The application ID
12765
+ * @param {string} instanceId The database instance identifier
12766
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
12767
+ * @param {*} [options] Override http request option.
12768
+ * @throws {RequiredError}
12769
+ */
12770
+ 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 = {}) {
12771
+ // verify required parameter 'organisation' is not null or undefined
12772
+ assertParamExists('resizeApplicationDatabase', 'organisation', organisation);
12773
+ // verify required parameter 'application' is not null or undefined
12774
+ assertParamExists('resizeApplicationDatabase', 'application', application);
12775
+ // verify required parameter 'instanceId' is not null or undefined
12776
+ assertParamExists('resizeApplicationDatabase', 'instanceId', instanceId);
12777
+ // verify required parameter 'resizeApplicationDatabaseRequest' is not null or undefined
12778
+ assertParamExists('resizeApplicationDatabase', 'resizeApplicationDatabaseRequest', resizeApplicationDatabaseRequest);
12779
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/database/{instanceId}`
12780
+ .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
12781
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
12782
+ .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
12783
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12784
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12785
+ let baseOptions;
12786
+ if (configuration) {
12787
+ baseOptions = configuration.baseOptions;
12788
+ }
12789
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
12790
+ const localVarHeaderParameter = {};
12791
+ const localVarQueryParameter = {};
12792
+ // authentication BearerAuth required
12793
+ // http bearer authentication required
12794
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12795
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12796
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12797
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12798
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12799
+ localVarRequestOptions.data = serializeDataIfNeeded(resizeApplicationDatabaseRequest, localVarRequestOptions, configuration);
12800
+ return {
12801
+ url: toPathString(localVarUrlObj),
12802
+ options: localVarRequestOptions,
12803
+ };
12804
+ }),
12805
+ };
12806
+ };
12807
+ /**
12808
+ * ApplicationDatabaseApi - functional programming interface
12809
+ * @export
12810
+ */
12811
+ export const ApplicationDatabaseApiFp = function (configuration) {
12812
+ const localVarAxiosParamCreator = ApplicationDatabaseApiAxiosParamCreator(configuration);
12813
+ return {
12814
+ /**
12815
+ * 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.
12816
+ * @summary Delete a database of an application
12817
+ * @param {string} organisation The organisation ID
12818
+ * @param {string} application The application ID
12819
+ * @param {string} instanceId The database instance identifier
12820
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12821
+ * @param {*} [options] Override http request option.
12822
+ * @throws {RequiredError}
12823
+ */
12824
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
12825
+ return __awaiter(this, void 0, void 0, function* () {
12826
+ var _a, _b, _c;
12827
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options);
12828
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12829
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.deleteApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12830
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12831
+ });
12832
+ },
12833
+ /**
12834
+ * Poll this for a database being added: status is provisioning, ready or failed.
12835
+ * @summary Get one database of an application
12836
+ * @param {string} organisation The organisation ID
12837
+ * @param {string} application The application ID
12838
+ * @param {string} instanceId The database instance identifier, as returned by the list
12839
+ * @param {*} [options] Override http request option.
12840
+ * @throws {RequiredError}
12841
+ */
12842
+ getApplicationDatabase(organisation, application, instanceId, options) {
12843
+ return __awaiter(this, void 0, void 0, function* () {
12844
+ var _a, _b, _c;
12845
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getApplicationDatabase(organisation, application, instanceId, options);
12846
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12847
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.getApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12848
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12849
+ });
12850
+ },
12851
+ /**
12852
+ * 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).
12853
+ * @summary Get the databases of an application
12854
+ * @param {string} organisation The organisation ID
12855
+ * @param {string} application The application ID
12856
+ * @param {*} [options] Override http request option.
12857
+ * @throws {RequiredError}
12858
+ */
12859
+ getApplicationDatabases(organisation, application, options) {
12860
+ return __awaiter(this, void 0, void 0, function* () {
12861
+ var _a, _b, _c;
12862
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getApplicationDatabases(organisation, application, options);
12863
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12864
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.getApplicationDatabases']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12865
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12866
+ });
12867
+ },
12868
+ /**
12869
+ * 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.
12870
+ * @summary Make a database the database of an application
12871
+ * @param {string} organisation The organisation ID
12872
+ * @param {string} application The application ID
12873
+ * @param {string} instanceId The database instance identifier
12874
+ * @param {*} [options] Override http request option.
12875
+ * @throws {RequiredError}
12876
+ */
12877
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
12878
+ return __awaiter(this, void 0, void 0, function* () {
12879
+ var _a, _b, _c;
12880
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.promoteApplicationDatabase(organisation, application, instanceId, options);
12881
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12882
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.promoteApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12883
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12884
+ });
12885
+ },
12886
+ /**
12887
+ * 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.
12888
+ * @summary Add a database to an application
12889
+ * @param {string} organisation The organisation ID
12890
+ * @param {string} application The application ID
12891
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
12892
+ * @param {*} [options] Override http request option.
12893
+ * @throws {RequiredError}
12894
+ */
12895
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
12896
+ return __awaiter(this, void 0, void 0, function* () {
12897
+ var _a, _b, _c;
12898
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options);
12899
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12900
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.provisionApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12901
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12902
+ });
12903
+ },
12904
+ /**
12905
+ * 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.
12906
+ * @summary Resize a database of an application
12907
+ * @param {string} organisation The organisation ID
12908
+ * @param {string} application The application ID
12909
+ * @param {string} instanceId The database instance identifier
12910
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
12911
+ * @param {*} [options] Override http request option.
12912
+ * @throws {RequiredError}
12913
+ */
12914
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
12915
+ return __awaiter(this, void 0, void 0, function* () {
12916
+ var _a, _b, _c;
12917
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options);
12918
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
12919
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApplicationDatabaseApi.resizeApplicationDatabase']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
12920
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12921
+ });
12922
+ },
12923
+ };
12924
+ };
12925
+ /**
12926
+ * ApplicationDatabaseApi - factory interface
12927
+ * @export
12928
+ */
12929
+ export const ApplicationDatabaseApiFactory = function (configuration, basePath, axios) {
12930
+ const localVarFp = ApplicationDatabaseApiFp(configuration);
12931
+ return {
12932
+ /**
12933
+ * 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.
12934
+ * @summary Delete a database of an application
12935
+ * @param {string} organisation The organisation ID
12936
+ * @param {string} application The application ID
12937
+ * @param {string} instanceId The database instance identifier
12938
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
12939
+ * @param {*} [options] Override http request option.
12940
+ * @throws {RequiredError}
12941
+ */
12942
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
12943
+ return localVarFp.deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
12944
+ },
12945
+ /**
12946
+ * Poll this for a database being added: status is provisioning, ready or failed.
12947
+ * @summary Get one database of an application
12948
+ * @param {string} organisation The organisation ID
12949
+ * @param {string} application The application ID
12950
+ * @param {string} instanceId The database instance identifier, as returned by the list
12951
+ * @param {*} [options] Override http request option.
12952
+ * @throws {RequiredError}
12953
+ */
12954
+ getApplicationDatabase(organisation, application, instanceId, options) {
12955
+ return localVarFp.getApplicationDatabase(organisation, application, instanceId, options).then((request) => request(axios, basePath));
12956
+ },
12957
+ /**
12958
+ * 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).
12959
+ * @summary Get the databases of an application
12960
+ * @param {string} organisation The organisation ID
12961
+ * @param {string} application The application ID
12962
+ * @param {*} [options] Override http request option.
12963
+ * @throws {RequiredError}
12964
+ */
12965
+ getApplicationDatabases(organisation, application, options) {
12966
+ return localVarFp.getApplicationDatabases(organisation, application, options).then((request) => request(axios, basePath));
12967
+ },
12968
+ /**
12969
+ * 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.
12970
+ * @summary Make a database the database of an application
12971
+ * @param {string} organisation The organisation ID
12972
+ * @param {string} application The application ID
12973
+ * @param {string} instanceId The database instance identifier
12974
+ * @param {*} [options] Override http request option.
12975
+ * @throws {RequiredError}
12976
+ */
12977
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
12978
+ return localVarFp.promoteApplicationDatabase(organisation, application, instanceId, options).then((request) => request(axios, basePath));
12979
+ },
12980
+ /**
12981
+ * 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.
12982
+ * @summary Add a database to an application
12983
+ * @param {string} organisation The organisation ID
12984
+ * @param {string} application The application ID
12985
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
12986
+ * @param {*} [options] Override http request option.
12987
+ * @throws {RequiredError}
12988
+ */
12989
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
12990
+ return localVarFp.provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
12991
+ },
12992
+ /**
12993
+ * 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.
12994
+ * @summary Resize a database of an application
12995
+ * @param {string} organisation The organisation ID
12996
+ * @param {string} application The application ID
12997
+ * @param {string} instanceId The database instance identifier
12998
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
12999
+ * @param {*} [options] Override http request option.
13000
+ * @throws {RequiredError}
13001
+ */
13002
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
13003
+ return localVarFp.resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options).then((request) => request(axios, basePath));
13004
+ },
13005
+ };
13006
+ };
13007
+ /**
13008
+ * ApplicationDatabaseApi - object-oriented interface
13009
+ * @export
13010
+ * @class ApplicationDatabaseApi
13011
+ * @extends {BaseAPI}
13012
+ */
13013
+ export class ApplicationDatabaseApi extends BaseAPI {
13014
+ /**
13015
+ * 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.
13016
+ * @summary Delete a database of an application
13017
+ * @param {string} organisation The organisation ID
13018
+ * @param {string} application The application ID
13019
+ * @param {string} instanceId The database instance identifier
13020
+ * @param {DeleteApplicationDatabaseRequest} deleteApplicationDatabaseRequest
13021
+ * @param {*} [options] Override http request option.
13022
+ * @throws {RequiredError}
13023
+ * @memberof ApplicationDatabaseApi
13024
+ */
13025
+ deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options) {
13026
+ return ApplicationDatabaseApiFp(this.configuration).deleteApplicationDatabase(organisation, application, instanceId, deleteApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13027
+ }
13028
+ /**
13029
+ * Poll this for a database being added: status is provisioning, ready or failed.
13030
+ * @summary Get one database of an application
13031
+ * @param {string} organisation The organisation ID
13032
+ * @param {string} application The application ID
13033
+ * @param {string} instanceId The database instance identifier, as returned by the list
13034
+ * @param {*} [options] Override http request option.
13035
+ * @throws {RequiredError}
13036
+ * @memberof ApplicationDatabaseApi
13037
+ */
13038
+ getApplicationDatabase(organisation, application, instanceId, options) {
13039
+ return ApplicationDatabaseApiFp(this.configuration).getApplicationDatabase(organisation, application, instanceId, options).then((request) => request(this.axios, this.basePath));
13040
+ }
13041
+ /**
13042
+ * 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).
13043
+ * @summary Get the databases of an application
13044
+ * @param {string} organisation The organisation ID
13045
+ * @param {string} application The application ID
13046
+ * @param {*} [options] Override http request option.
13047
+ * @throws {RequiredError}
13048
+ * @memberof ApplicationDatabaseApi
13049
+ */
13050
+ getApplicationDatabases(organisation, application, options) {
13051
+ return ApplicationDatabaseApiFp(this.configuration).getApplicationDatabases(organisation, application, options).then((request) => request(this.axios, this.basePath));
13052
+ }
13053
+ /**
13054
+ * 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.
13055
+ * @summary Make a database the database of an application
13056
+ * @param {string} organisation The organisation ID
13057
+ * @param {string} application The application ID
13058
+ * @param {string} instanceId The database instance identifier
13059
+ * @param {*} [options] Override http request option.
13060
+ * @throws {RequiredError}
13061
+ * @memberof ApplicationDatabaseApi
13062
+ */
13063
+ promoteApplicationDatabase(organisation, application, instanceId, options) {
13064
+ return ApplicationDatabaseApiFp(this.configuration).promoteApplicationDatabase(organisation, application, instanceId, options).then((request) => request(this.axios, this.basePath));
13065
+ }
13066
+ /**
13067
+ * 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.
13068
+ * @summary Add a database to an application
13069
+ * @param {string} organisation The organisation ID
13070
+ * @param {string} application The application ID
13071
+ * @param {ProvisionApplicationDatabaseRequest} provisionApplicationDatabaseRequest
13072
+ * @param {*} [options] Override http request option.
13073
+ * @throws {RequiredError}
13074
+ * @memberof ApplicationDatabaseApi
13075
+ */
13076
+ provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options) {
13077
+ return ApplicationDatabaseApiFp(this.configuration).provisionApplicationDatabase(organisation, application, provisionApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13078
+ }
13079
+ /**
13080
+ * 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.
13081
+ * @summary Resize a database of an application
13082
+ * @param {string} organisation The organisation ID
13083
+ * @param {string} application The application ID
13084
+ * @param {string} instanceId The database instance identifier
13085
+ * @param {ResizeApplicationDatabaseRequest} resizeApplicationDatabaseRequest
13086
+ * @param {*} [options] Override http request option.
13087
+ * @throws {RequiredError}
13088
+ * @memberof ApplicationDatabaseApi
13089
+ */
13090
+ resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options) {
13091
+ return ApplicationDatabaseApiFp(this.configuration).resizeApplicationDatabase(organisation, application, instanceId, resizeApplicationDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
13092
+ }
13093
+ }
12478
13094
  /**
12479
13095
  * ApplicationsApi - axios parameter creator
12480
13096
  * @export
@@ -18871,7 +19487,7 @@ export const SyncToEnvironmentTypeEnum = {
18871
19487
  export const HeadersApiAxiosParamCreator = function (configuration) {
18872
19488
  return {
18873
19489
  /**
18874
- *
19490
+ * Replaces the custom headers of the project. On a project that Security > CSP manages, the CSP header names in the request are ignored and their stored values stay; the response header X-Quant-Warning then names them. The status is still 200.
18875
19491
  * @summary Create or update custom headers
18876
19492
  * @param {string} organization Organization identifier
18877
19493
  * @param {string} project Project identifier
@@ -18998,7 +19614,7 @@ export const HeadersApiFp = function (configuration) {
18998
19614
  const localVarAxiosParamCreator = HeadersApiAxiosParamCreator(configuration);
18999
19615
  return {
19000
19616
  /**
19001
- *
19617
+ * Replaces the custom headers of the project. On a project that Security > CSP manages, the CSP header names in the request are ignored and their stored values stay; the response header X-Quant-Warning then names them. The status is still 200.
19002
19618
  * @summary Create or update custom headers
19003
19619
  * @param {string} organization Organization identifier
19004
19620
  * @param {string} project Project identifier
@@ -19060,7 +19676,7 @@ export const HeadersApiFactory = function (configuration, basePath, axios) {
19060
19676
  const localVarFp = HeadersApiFp(configuration);
19061
19677
  return {
19062
19678
  /**
19063
- *
19679
+ * Replaces the custom headers of the project. On a project that Security > CSP manages, the CSP header names in the request are ignored and their stored values stay; the response header X-Quant-Warning then names them. The status is still 200.
19064
19680
  * @summary Create or update custom headers
19065
19681
  * @param {string} organization Organization identifier
19066
19682
  * @param {string} project Project identifier
@@ -19104,7 +19720,7 @@ export const HeadersApiFactory = function (configuration, basePath, axios) {
19104
19720
  */
19105
19721
  export class HeadersApi extends BaseAPI {
19106
19722
  /**
19107
- *
19723
+ * Replaces the custom headers of the project. On a project that Security > CSP manages, the CSP header names in the request are ignored and their stored values stay; the response header X-Quant-Warning then names them. The status is still 200.
19108
19724
  * @summary Create or update custom headers
19109
19725
  * @param {string} organization Organization identifier
19110
19726
  * @param {string} project Project identifier