oci-onesubscription 2.57.0 → 2.59.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/lib/client.d.ts +93 -13
- package/lib/client.js +197 -13
- package/lib/client.js.map +1 -1
- package/lib/request/get-commitment-request.d.ts +1 -1
- package/lib/request/get-computed-usage-request.d.ts +1 -1
- package/lib/request/get-subscribed-service-request.d.ts +1 -1
- package/lib/request/list-aggregated-computed-usages-request.d.ts +1 -1
- package/lib/request/list-billing-schedules-request.d.ts +1 -1
- package/lib/request/list-commitments-request.d.ts +1 -1
- package/lib/request/list-computed-usages-request.d.ts +1 -1
- package/lib/request/list-invoiceline-computed-usages-request.d.ts +1 -1
- package/lib/request/list-invoices-request.d.ts +1 -1
- package/lib/request/list-organization-subscriptions-request.d.ts +1 -1
- package/lib/request/list-rate-cards-request.d.ts +1 -1
- package/lib/request/list-subscribed-services-request.d.ts +1 -1
- package/lib/request/list-subscriptions-request.d.ts +1 -1
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -57,11 +57,14 @@ var BillingScheduleApiKeys;
|
|
|
57
57
|
*/
|
|
58
58
|
class BillingScheduleClient {
|
|
59
59
|
constructor(params, clientConfiguration) {
|
|
60
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
60
61
|
this["_endpoint"] = "";
|
|
61
62
|
this["_defaultHeaders"] = {};
|
|
62
63
|
this._circuitBreaker = null;
|
|
63
64
|
this._httpOptions = undefined;
|
|
64
65
|
this.targetService = "BillingSchedule";
|
|
66
|
+
this._regionId = "";
|
|
67
|
+
this._lastSetRegionOrRegionId = "";
|
|
65
68
|
const requestSigner = params.authenticationDetailsProvider
|
|
66
69
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
67
70
|
: null;
|
|
@@ -111,13 +114,31 @@ class BillingScheduleClient {
|
|
|
111
114
|
get logger() {
|
|
112
115
|
return common.LOG.logger;
|
|
113
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
119
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
120
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
121
|
+
*/
|
|
122
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
123
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
124
|
+
if (this.logger)
|
|
125
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
126
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
127
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(BillingScheduleClient.serviceEndpointTemplate, this._region, BillingScheduleClient.endpointServiceName);
|
|
128
|
+
}
|
|
129
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
130
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(BillingScheduleClient.serviceEndpointTemplate, this._regionId, BillingScheduleClient.endpointServiceName);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
114
133
|
/**
|
|
115
134
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
116
135
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
117
136
|
* @param region The region of the service.
|
|
118
137
|
*/
|
|
119
138
|
set region(region) {
|
|
139
|
+
this._region = region;
|
|
120
140
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(BillingScheduleClient.serviceEndpointTemplate, region, BillingScheduleClient.endpointServiceName);
|
|
141
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
121
142
|
}
|
|
122
143
|
/**
|
|
123
144
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -128,7 +149,9 @@ class BillingScheduleClient {
|
|
|
128
149
|
* @param regionId The public region ID.
|
|
129
150
|
*/
|
|
130
151
|
set regionId(regionId) {
|
|
152
|
+
this._regionId = regionId;
|
|
131
153
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(BillingScheduleClient.serviceEndpointTemplate, regionId, BillingScheduleClient.endpointServiceName);
|
|
154
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
132
155
|
}
|
|
133
156
|
/**
|
|
134
157
|
* This list API returns all billing schedules for given subscription id and
|
|
@@ -138,7 +161,7 @@ class BillingScheduleClient {
|
|
|
138
161
|
* @param ListBillingSchedulesRequest
|
|
139
162
|
* @return ListBillingSchedulesResponse
|
|
140
163
|
* @throws OciError when an error occurs
|
|
141
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
164
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListBillingSchedules.ts.html |here} to see how to use ListBillingSchedules API.
|
|
142
165
|
*/
|
|
143
166
|
listBillingSchedules(listBillingSchedulesRequest) {
|
|
144
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -253,11 +276,14 @@ var CommitmentApiKeys;
|
|
|
253
276
|
*/
|
|
254
277
|
class CommitmentClient {
|
|
255
278
|
constructor(params, clientConfiguration) {
|
|
279
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
256
280
|
this["_endpoint"] = "";
|
|
257
281
|
this["_defaultHeaders"] = {};
|
|
258
282
|
this._circuitBreaker = null;
|
|
259
283
|
this._httpOptions = undefined;
|
|
260
284
|
this.targetService = "Commitment";
|
|
285
|
+
this._regionId = "";
|
|
286
|
+
this._lastSetRegionOrRegionId = "";
|
|
261
287
|
const requestSigner = params.authenticationDetailsProvider
|
|
262
288
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
263
289
|
: null;
|
|
@@ -307,13 +333,31 @@ class CommitmentClient {
|
|
|
307
333
|
get logger() {
|
|
308
334
|
return common.LOG.logger;
|
|
309
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
338
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
339
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
340
|
+
*/
|
|
341
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
342
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
343
|
+
if (this.logger)
|
|
344
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
345
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
346
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(CommitmentClient.serviceEndpointTemplate, this._region, CommitmentClient.endpointServiceName);
|
|
347
|
+
}
|
|
348
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
349
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(CommitmentClient.serviceEndpointTemplate, this._regionId, CommitmentClient.endpointServiceName);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
310
352
|
/**
|
|
311
353
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
312
354
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
313
355
|
* @param region The region of the service.
|
|
314
356
|
*/
|
|
315
357
|
set region(region) {
|
|
358
|
+
this._region = region;
|
|
316
359
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(CommitmentClient.serviceEndpointTemplate, region, CommitmentClient.endpointServiceName);
|
|
360
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
317
361
|
}
|
|
318
362
|
/**
|
|
319
363
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -324,7 +368,9 @@ class CommitmentClient {
|
|
|
324
368
|
* @param regionId The public region ID.
|
|
325
369
|
*/
|
|
326
370
|
set regionId(regionId) {
|
|
371
|
+
this._regionId = regionId;
|
|
327
372
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(CommitmentClient.serviceEndpointTemplate, regionId, CommitmentClient.endpointServiceName);
|
|
373
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
328
374
|
}
|
|
329
375
|
/**
|
|
330
376
|
* This API returns the commitment details corresponding to the id provided
|
|
@@ -333,7 +379,7 @@ class CommitmentClient {
|
|
|
333
379
|
* @param GetCommitmentRequest
|
|
334
380
|
* @return GetCommitmentResponse
|
|
335
381
|
* @throws OciError when an error occurs
|
|
336
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
382
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/GetCommitment.ts.html |here} to see how to use GetCommitment API.
|
|
337
383
|
*/
|
|
338
384
|
getCommitment(getCommitmentRequest) {
|
|
339
385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -392,7 +438,7 @@ class CommitmentClient {
|
|
|
392
438
|
* @param ListCommitmentsRequest
|
|
393
439
|
* @return ListCommitmentsResponse
|
|
394
440
|
* @throws OciError when an error occurs
|
|
395
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
441
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListCommitments.ts.html |here} to see how to use ListCommitments API.
|
|
396
442
|
*/
|
|
397
443
|
listCommitments(listCommitmentsRequest) {
|
|
398
444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -506,11 +552,14 @@ var ComputedUsageApiKeys;
|
|
|
506
552
|
*/
|
|
507
553
|
class ComputedUsageClient {
|
|
508
554
|
constructor(params, clientConfiguration) {
|
|
555
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
509
556
|
this["_endpoint"] = "";
|
|
510
557
|
this["_defaultHeaders"] = {};
|
|
511
558
|
this._circuitBreaker = null;
|
|
512
559
|
this._httpOptions = undefined;
|
|
513
560
|
this.targetService = "ComputedUsage";
|
|
561
|
+
this._regionId = "";
|
|
562
|
+
this._lastSetRegionOrRegionId = "";
|
|
514
563
|
const requestSigner = params.authenticationDetailsProvider
|
|
515
564
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
516
565
|
: null;
|
|
@@ -560,13 +609,31 @@ class ComputedUsageClient {
|
|
|
560
609
|
get logger() {
|
|
561
610
|
return common.LOG.logger;
|
|
562
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
614
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
615
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
616
|
+
*/
|
|
617
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
618
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
619
|
+
if (this.logger)
|
|
620
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
621
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
622
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ComputedUsageClient.serviceEndpointTemplate, this._region, ComputedUsageClient.endpointServiceName);
|
|
623
|
+
}
|
|
624
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
625
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ComputedUsageClient.serviceEndpointTemplate, this._regionId, ComputedUsageClient.endpointServiceName);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
563
628
|
/**
|
|
564
629
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
565
630
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
566
631
|
* @param region The region of the service.
|
|
567
632
|
*/
|
|
568
633
|
set region(region) {
|
|
634
|
+
this._region = region;
|
|
569
635
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ComputedUsageClient.serviceEndpointTemplate, region, ComputedUsageClient.endpointServiceName);
|
|
636
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
570
637
|
}
|
|
571
638
|
/**
|
|
572
639
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -577,7 +644,9 @@ class ComputedUsageClient {
|
|
|
577
644
|
* @param regionId The public region ID.
|
|
578
645
|
*/
|
|
579
646
|
set regionId(regionId) {
|
|
647
|
+
this._regionId = regionId;
|
|
580
648
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ComputedUsageClient.serviceEndpointTemplate, regionId, ComputedUsageClient.endpointServiceName);
|
|
649
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
581
650
|
}
|
|
582
651
|
/**
|
|
583
652
|
* This is an API which returns Computed Usage corresponding to the id passed
|
|
@@ -586,7 +655,7 @@ class ComputedUsageClient {
|
|
|
586
655
|
* @param GetComputedUsageRequest
|
|
587
656
|
* @return GetComputedUsageResponse
|
|
588
657
|
* @throws OciError when an error occurs
|
|
589
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
658
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/GetComputedUsage.ts.html |here} to see how to use GetComputedUsage API.
|
|
590
659
|
*/
|
|
591
660
|
getComputedUsage(getComputedUsageRequest) {
|
|
592
661
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -648,7 +717,7 @@ class ComputedUsageClient {
|
|
|
648
717
|
* @param ListAggregatedComputedUsagesRequest
|
|
649
718
|
* @return ListAggregatedComputedUsagesResponse
|
|
650
719
|
* @throws OciError when an error occurs
|
|
651
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
720
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListAggregatedComputedUsages.ts.html |here} to see how to use ListAggregatedComputedUsages API.
|
|
652
721
|
*/
|
|
653
722
|
listAggregatedComputedUsages(listAggregatedComputedUsagesRequest) {
|
|
654
723
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -759,7 +828,7 @@ class ComputedUsageClient {
|
|
|
759
828
|
* @param ListComputedUsagesRequest
|
|
760
829
|
* @return ListComputedUsagesResponse
|
|
761
830
|
* @throws OciError when an error occurs
|
|
762
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
831
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListComputedUsages.ts.html |here} to see how to use ListComputedUsages API.
|
|
763
832
|
*/
|
|
764
833
|
listComputedUsages(listComputedUsagesRequest) {
|
|
765
834
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -877,11 +946,14 @@ var InvoiceSummaryApiKeys;
|
|
|
877
946
|
*/
|
|
878
947
|
class InvoiceSummaryClient {
|
|
879
948
|
constructor(params, clientConfiguration) {
|
|
949
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
880
950
|
this["_endpoint"] = "";
|
|
881
951
|
this["_defaultHeaders"] = {};
|
|
882
952
|
this._circuitBreaker = null;
|
|
883
953
|
this._httpOptions = undefined;
|
|
884
954
|
this.targetService = "InvoiceSummary";
|
|
955
|
+
this._regionId = "";
|
|
956
|
+
this._lastSetRegionOrRegionId = "";
|
|
885
957
|
const requestSigner = params.authenticationDetailsProvider
|
|
886
958
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
887
959
|
: null;
|
|
@@ -931,13 +1003,31 @@ class InvoiceSummaryClient {
|
|
|
931
1003
|
get logger() {
|
|
932
1004
|
return common.LOG.logger;
|
|
933
1005
|
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
1008
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
1009
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
1010
|
+
*/
|
|
1011
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
1012
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
1013
|
+
if (this.logger)
|
|
1014
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
1015
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
1016
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(InvoiceSummaryClient.serviceEndpointTemplate, this._region, InvoiceSummaryClient.endpointServiceName);
|
|
1017
|
+
}
|
|
1018
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
1019
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(InvoiceSummaryClient.serviceEndpointTemplate, this._regionId, InvoiceSummaryClient.endpointServiceName);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
934
1022
|
/**
|
|
935
1023
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
936
1024
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
937
1025
|
* @param region The region of the service.
|
|
938
1026
|
*/
|
|
939
1027
|
set region(region) {
|
|
1028
|
+
this._region = region;
|
|
940
1029
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(InvoiceSummaryClient.serviceEndpointTemplate, region, InvoiceSummaryClient.endpointServiceName);
|
|
1030
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
941
1031
|
}
|
|
942
1032
|
/**
|
|
943
1033
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -948,7 +1038,9 @@ class InvoiceSummaryClient {
|
|
|
948
1038
|
* @param regionId The public region ID.
|
|
949
1039
|
*/
|
|
950
1040
|
set regionId(regionId) {
|
|
1041
|
+
this._regionId = regionId;
|
|
951
1042
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(InvoiceSummaryClient.serviceEndpointTemplate, regionId, InvoiceSummaryClient.endpointServiceName);
|
|
1043
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
952
1044
|
}
|
|
953
1045
|
/**
|
|
954
1046
|
* This is a collection API which returns a list of Invoiced Computed Usages for given Invoiceline id.
|
|
@@ -957,7 +1049,7 @@ class InvoiceSummaryClient {
|
|
|
957
1049
|
* @param ListInvoicelineComputedUsagesRequest
|
|
958
1050
|
* @return ListInvoicelineComputedUsagesResponse
|
|
959
1051
|
* @throws OciError when an error occurs
|
|
960
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1052
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListInvoicelineComputedUsages.ts.html |here} to see how to use ListInvoicelineComputedUsages API.
|
|
961
1053
|
*/
|
|
962
1054
|
listInvoicelineComputedUsages(listInvoicelineComputedUsagesRequest) {
|
|
963
1055
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1067,7 +1159,7 @@ class InvoiceSummaryClient {
|
|
|
1067
1159
|
* @param ListInvoicesRequest
|
|
1068
1160
|
* @return ListInvoicesResponse
|
|
1069
1161
|
* @throws OciError when an error occurs
|
|
1070
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1162
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListInvoices.ts.html |here} to see how to use ListInvoices API.
|
|
1071
1163
|
*/
|
|
1072
1164
|
listInvoices(listInvoicesRequest) {
|
|
1073
1165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1184,11 +1276,14 @@ var OrganizationSubscriptionApiKeys;
|
|
|
1184
1276
|
*/
|
|
1185
1277
|
class OrganizationSubscriptionClient {
|
|
1186
1278
|
constructor(params, clientConfiguration) {
|
|
1279
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
1187
1280
|
this["_endpoint"] = "";
|
|
1188
1281
|
this["_defaultHeaders"] = {};
|
|
1189
1282
|
this._circuitBreaker = null;
|
|
1190
1283
|
this._httpOptions = undefined;
|
|
1191
1284
|
this.targetService = "OrganizationSubscription";
|
|
1285
|
+
this._regionId = "";
|
|
1286
|
+
this._lastSetRegionOrRegionId = "";
|
|
1192
1287
|
const requestSigner = params.authenticationDetailsProvider
|
|
1193
1288
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1194
1289
|
: null;
|
|
@@ -1238,13 +1333,31 @@ class OrganizationSubscriptionClient {
|
|
|
1238
1333
|
get logger() {
|
|
1239
1334
|
return common.LOG.logger;
|
|
1240
1335
|
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
1338
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
1339
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
1340
|
+
*/
|
|
1341
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
1342
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
1343
|
+
if (this.logger)
|
|
1344
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
1345
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
1346
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OrganizationSubscriptionClient.serviceEndpointTemplate, this._region, OrganizationSubscriptionClient.endpointServiceName);
|
|
1347
|
+
}
|
|
1348
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
1349
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OrganizationSubscriptionClient.serviceEndpointTemplate, this._regionId, OrganizationSubscriptionClient.endpointServiceName);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1241
1352
|
/**
|
|
1242
1353
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1243
1354
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1244
1355
|
* @param region The region of the service.
|
|
1245
1356
|
*/
|
|
1246
1357
|
set region(region) {
|
|
1358
|
+
this._region = region;
|
|
1247
1359
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OrganizationSubscriptionClient.serviceEndpointTemplate, region, OrganizationSubscriptionClient.endpointServiceName);
|
|
1360
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
1248
1361
|
}
|
|
1249
1362
|
/**
|
|
1250
1363
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -1255,7 +1368,9 @@ class OrganizationSubscriptionClient {
|
|
|
1255
1368
|
* @param regionId The public region ID.
|
|
1256
1369
|
*/
|
|
1257
1370
|
set regionId(regionId) {
|
|
1371
|
+
this._regionId = regionId;
|
|
1258
1372
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OrganizationSubscriptionClient.serviceEndpointTemplate, regionId, OrganizationSubscriptionClient.endpointServiceName);
|
|
1373
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
1259
1374
|
}
|
|
1260
1375
|
/**
|
|
1261
1376
|
* API that returns data for the list of subscription ids returned from Organizations API
|
|
@@ -1264,7 +1379,7 @@ class OrganizationSubscriptionClient {
|
|
|
1264
1379
|
* @param ListOrganizationSubscriptionsRequest
|
|
1265
1380
|
* @return ListOrganizationSubscriptionsResponse
|
|
1266
1381
|
* @throws OciError when an error occurs
|
|
1267
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1382
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListOrganizationSubscriptions.ts.html |here} to see how to use ListOrganizationSubscriptions API.
|
|
1268
1383
|
*/
|
|
1269
1384
|
listOrganizationSubscriptions(listOrganizationSubscriptionsRequest) {
|
|
1270
1385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1377,11 +1492,14 @@ var RatecardApiKeys;
|
|
|
1377
1492
|
*/
|
|
1378
1493
|
class RatecardClient {
|
|
1379
1494
|
constructor(params, clientConfiguration) {
|
|
1495
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
1380
1496
|
this["_endpoint"] = "";
|
|
1381
1497
|
this["_defaultHeaders"] = {};
|
|
1382
1498
|
this._circuitBreaker = null;
|
|
1383
1499
|
this._httpOptions = undefined;
|
|
1384
1500
|
this.targetService = "Ratecard";
|
|
1501
|
+
this._regionId = "";
|
|
1502
|
+
this._lastSetRegionOrRegionId = "";
|
|
1385
1503
|
const requestSigner = params.authenticationDetailsProvider
|
|
1386
1504
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1387
1505
|
: null;
|
|
@@ -1431,13 +1549,31 @@ class RatecardClient {
|
|
|
1431
1549
|
get logger() {
|
|
1432
1550
|
return common.LOG.logger;
|
|
1433
1551
|
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
1554
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
1555
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
1556
|
+
*/
|
|
1557
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
1558
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
1559
|
+
if (this.logger)
|
|
1560
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
1561
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
1562
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RatecardClient.serviceEndpointTemplate, this._region, RatecardClient.endpointServiceName);
|
|
1563
|
+
}
|
|
1564
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
1565
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RatecardClient.serviceEndpointTemplate, this._regionId, RatecardClient.endpointServiceName);
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1434
1568
|
/**
|
|
1435
1569
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1436
1570
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1437
1571
|
* @param region The region of the service.
|
|
1438
1572
|
*/
|
|
1439
1573
|
set region(region) {
|
|
1574
|
+
this._region = region;
|
|
1440
1575
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RatecardClient.serviceEndpointTemplate, region, RatecardClient.endpointServiceName);
|
|
1576
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
1441
1577
|
}
|
|
1442
1578
|
/**
|
|
1443
1579
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -1448,7 +1584,9 @@ class RatecardClient {
|
|
|
1448
1584
|
* @param regionId The public region ID.
|
|
1449
1585
|
*/
|
|
1450
1586
|
set regionId(regionId) {
|
|
1587
|
+
this._regionId = regionId;
|
|
1451
1588
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RatecardClient.serviceEndpointTemplate, regionId, RatecardClient.endpointServiceName);
|
|
1589
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
1452
1590
|
}
|
|
1453
1591
|
/**
|
|
1454
1592
|
* List API that returns all ratecards for given Subscription Id and Account ID (if provided) and
|
|
@@ -1458,7 +1596,7 @@ class RatecardClient {
|
|
|
1458
1596
|
* @param ListRateCardsRequest
|
|
1459
1597
|
* @return ListRateCardsResponse
|
|
1460
1598
|
* @throws OciError when an error occurs
|
|
1461
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1599
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListRateCards.ts.html |here} to see how to use ListRateCards API.
|
|
1462
1600
|
*/
|
|
1463
1601
|
listRateCards(listRateCardsRequest) {
|
|
1464
1602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1575,11 +1713,14 @@ var SubscribedServiceApiKeys;
|
|
|
1575
1713
|
*/
|
|
1576
1714
|
class SubscribedServiceClient {
|
|
1577
1715
|
constructor(params, clientConfiguration) {
|
|
1716
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
1578
1717
|
this["_endpoint"] = "";
|
|
1579
1718
|
this["_defaultHeaders"] = {};
|
|
1580
1719
|
this._circuitBreaker = null;
|
|
1581
1720
|
this._httpOptions = undefined;
|
|
1582
1721
|
this.targetService = "SubscribedService";
|
|
1722
|
+
this._regionId = "";
|
|
1723
|
+
this._lastSetRegionOrRegionId = "";
|
|
1583
1724
|
const requestSigner = params.authenticationDetailsProvider
|
|
1584
1725
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1585
1726
|
: null;
|
|
@@ -1629,13 +1770,31 @@ class SubscribedServiceClient {
|
|
|
1629
1770
|
get logger() {
|
|
1630
1771
|
return common.LOG.logger;
|
|
1631
1772
|
}
|
|
1773
|
+
/**
|
|
1774
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
1775
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
1776
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
1777
|
+
*/
|
|
1778
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
1779
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
1780
|
+
if (this.logger)
|
|
1781
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
1782
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
1783
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(SubscribedServiceClient.serviceEndpointTemplate, this._region, SubscribedServiceClient.endpointServiceName);
|
|
1784
|
+
}
|
|
1785
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
1786
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(SubscribedServiceClient.serviceEndpointTemplate, this._regionId, SubscribedServiceClient.endpointServiceName);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1632
1789
|
/**
|
|
1633
1790
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1634
1791
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1635
1792
|
* @param region The region of the service.
|
|
1636
1793
|
*/
|
|
1637
1794
|
set region(region) {
|
|
1795
|
+
this._region = region;
|
|
1638
1796
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(SubscribedServiceClient.serviceEndpointTemplate, region, SubscribedServiceClient.endpointServiceName);
|
|
1797
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
1639
1798
|
}
|
|
1640
1799
|
/**
|
|
1641
1800
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -1646,7 +1805,9 @@ class SubscribedServiceClient {
|
|
|
1646
1805
|
* @param regionId The public region ID.
|
|
1647
1806
|
*/
|
|
1648
1807
|
set regionId(regionId) {
|
|
1808
|
+
this._regionId = regionId;
|
|
1649
1809
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(SubscribedServiceClient.serviceEndpointTemplate, regionId, SubscribedServiceClient.endpointServiceName);
|
|
1810
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
1650
1811
|
}
|
|
1651
1812
|
/**
|
|
1652
1813
|
* This API returns the subscribed service details corresponding to the id provided
|
|
@@ -1655,7 +1816,7 @@ class SubscribedServiceClient {
|
|
|
1655
1816
|
* @param GetSubscribedServiceRequest
|
|
1656
1817
|
* @return GetSubscribedServiceResponse
|
|
1657
1818
|
* @throws OciError when an error occurs
|
|
1658
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1819
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/GetSubscribedService.ts.html |here} to see how to use GetSubscribedService API.
|
|
1659
1820
|
*/
|
|
1660
1821
|
getSubscribedService(getSubscribedServiceRequest) {
|
|
1661
1822
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1716,7 +1877,7 @@ class SubscribedServiceClient {
|
|
|
1716
1877
|
* @param ListSubscribedServicesRequest
|
|
1717
1878
|
* @return ListSubscribedServicesResponse
|
|
1718
1879
|
* @throws OciError when an error occurs
|
|
1719
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
1880
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListSubscribedServices.ts.html |here} to see how to use ListSubscribedServices API.
|
|
1720
1881
|
*/
|
|
1721
1882
|
listSubscribedServices(listSubscribedServicesRequest) {
|
|
1722
1883
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1832,11 +1993,14 @@ var SubscriptionApiKeys;
|
|
|
1832
1993
|
*/
|
|
1833
1994
|
class SubscriptionClient {
|
|
1834
1995
|
constructor(params, clientConfiguration) {
|
|
1996
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
1835
1997
|
this["_endpoint"] = "";
|
|
1836
1998
|
this["_defaultHeaders"] = {};
|
|
1837
1999
|
this._circuitBreaker = null;
|
|
1838
2000
|
this._httpOptions = undefined;
|
|
1839
2001
|
this.targetService = "Subscription";
|
|
2002
|
+
this._regionId = "";
|
|
2003
|
+
this._lastSetRegionOrRegionId = "";
|
|
1840
2004
|
const requestSigner = params.authenticationDetailsProvider
|
|
1841
2005
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1842
2006
|
: null;
|
|
@@ -1886,13 +2050,31 @@ class SubscriptionClient {
|
|
|
1886
2050
|
get logger() {
|
|
1887
2051
|
return common.LOG.logger;
|
|
1888
2052
|
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
2055
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
2056
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
2057
|
+
*/
|
|
2058
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
2059
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
2060
|
+
if (this.logger)
|
|
2061
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
2062
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
2063
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(SubscriptionClient.serviceEndpointTemplate, this._region, SubscriptionClient.endpointServiceName);
|
|
2064
|
+
}
|
|
2065
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
2066
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(SubscriptionClient.serviceEndpointTemplate, this._regionId, SubscriptionClient.endpointServiceName);
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
1889
2069
|
/**
|
|
1890
2070
|
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1891
2071
|
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1892
2072
|
* @param region The region of the service.
|
|
1893
2073
|
*/
|
|
1894
2074
|
set region(region) {
|
|
2075
|
+
this._region = region;
|
|
1895
2076
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(SubscriptionClient.serviceEndpointTemplate, region, SubscriptionClient.endpointServiceName);
|
|
2077
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
1896
2078
|
}
|
|
1897
2079
|
/**
|
|
1898
2080
|
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
@@ -1903,7 +2085,9 @@ class SubscriptionClient {
|
|
|
1903
2085
|
* @param regionId The public region ID.
|
|
1904
2086
|
*/
|
|
1905
2087
|
set regionId(regionId) {
|
|
2088
|
+
this._regionId = regionId;
|
|
1906
2089
|
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(SubscriptionClient.serviceEndpointTemplate, regionId, SubscriptionClient.endpointServiceName);
|
|
2090
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
1907
2091
|
}
|
|
1908
2092
|
/**
|
|
1909
2093
|
* This list API returns all subscriptions for a given plan number or subscription id or buyer email
|
|
@@ -1915,7 +2099,7 @@ class SubscriptionClient {
|
|
|
1915
2099
|
* @param ListSubscriptionsRequest
|
|
1916
2100
|
* @return ListSubscriptionsResponse
|
|
1917
2101
|
* @throws OciError when an error occurs
|
|
1918
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
2102
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.59.0/onesubscription/ListSubscriptions.ts.html |here} to see how to use ListSubscriptions API.
|
|
1919
2103
|
*/
|
|
1920
2104
|
listSubscriptions(listSubscriptionsRequest) {
|
|
1921
2105
|
return __awaiter(this, void 0, void 0, function* () {
|