Skip to content

Commit e0cff55

Browse files
Releasing version 2.79.1
Releasing version 2.79.1
2 parents 359758a + e7a2426 commit e0cff55

File tree

1,064 files changed

+10438
-20182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,064 files changed

+10438
-20182
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/).
6+
## 2.79.1 - 2024-02-13
7+
### Added
8+
- Support for adding automatic backups during cross region operations and disaster recovery in the Autonomous Database service
9+
- Support for overlapping CIDR in network path analyzer in the Virtual Network Monitoring service
10+
- Support for additional attributes in entity and topology in the Log Analytics service
11+
- Support for historic collection and log type while creating object collection rules in the Log Analytics service
12+
- Support for position aware parsers in the Log Analytics service
13+
- Support for filtering log sources, detection rules and scheduled tasks based on target service in the Log Analytics service
14+
- Support for additional recall and release attributes in the Log Analytics service
15+
- Support for opc-meta-properties header while uploading log events in the Log Analytics service
16+
17+
618
## 2.79.0 - 2024-02-06
719
### Added
820
- Support for the Globally Distributed Database service

examples/javascript/logging.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99

1010
var identity = require("oci-identity");
1111
var common = require("oci-common");
12-
var bunyan = require("bunyan");
1312

1413
// Integrate bunyan logger with the SDK. Make sure bunyan logger in installed.
1514
// You can integrate with log4js, winston or any other logger as well.
16-
var bunLog = bunyan.createLogger({ name: "LoggingExample", level: "debug" });
17-
common.LOG.logger = bunLog;
15+
process.env.USE_BUNYAN = "true";
1816
const provider = new common.ConfigFileAuthenticationDetailsProvider();
1917

2018
(async () => {

examples/typescript/generate-text.ts

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/**
2+
* Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
3+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
*/
5+
6+
/*
7+
* This example demostrates the usage of Instance Principal. In order to run this example, this code
8+
* must be in an Oracle Cloud instance. The Instance Principal will utiltize internal resources to
9+
* create an authentication provider. Refer to:
10+
* https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
11+
* for more details.
12+
*/
13+
14+
import * as genai from "oci-generativeaiinference";
15+
import common = require("oci-common");
16+
17+
(async () => {
18+
const region = "us-chicago-1";
19+
const provider = new common.ConfigFileAuthenticationDetailsProvider();
20+
provider.setRegion(region);
21+
22+
const client = new genai.GenerativeAiInferenceClient({
23+
authenticationDetailsProvider: provider
24+
});
25+
26+
const compartment_id = ""; // Fill-in with compartment ID with access to generative AI API
27+
const modelId = "cohere.command";
28+
const prompt = "Tell me a fact about the earth";
29+
const max_tokens = 50;
30+
const temperature = 0.75;
31+
const frequency_penalty = 1.0;
32+
const top_p = 0.7;
33+
const isStream = false;
34+
const serving_mode: genai.models.OnDemandServingMode = {
35+
modelId: modelId,
36+
servingType: genai.models.OnDemandServingMode.servingType
37+
};
38+
39+
const inference_request: genai.models.CohereLlmInferenceRequest = {
40+
prompt: prompt,
41+
isStream: isStream,
42+
maxTokens: max_tokens,
43+
temperature: temperature,
44+
frequencyPenalty: frequency_penalty,
45+
topP: top_p,
46+
runtimeType: genai.models.CohereLlmInferenceRequest.runtimeType
47+
};
48+
49+
const details: genai.models.GenerateTextDetails = {
50+
compartmentId: compartment_id,
51+
servingMode: serving_mode,
52+
inferenceRequest: inference_request
53+
};
54+
55+
const req_body: genai.requests.GenerateTextRequest = {
56+
generateTextDetails: details
57+
};
58+
59+
// Generate text as non-stream
60+
const response = await client.generateText(req_body);
61+
console.log(
62+
"Response: " +
63+
(response.generateTextResult.inferenceResponse as genai.models.CohereLlmInferenceResponse)
64+
.generatedTexts[0].text
65+
);
66+
67+
// Attempt to generate text as SSE stream (throws error)
68+
try {
69+
inference_request.isStream = true;
70+
const responseStream = await client.generateText(req_body);
71+
console.log(
72+
"Response: " +
73+
(responseStream.generateTextResult
74+
.inferenceResponse as genai.models.CohereLlmInferenceResponse).generatedTexts[0].text
75+
);
76+
} catch (e) {
77+
console.log(e);
78+
}
79+
})();

examples/typescript/logging.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@
77
* This is an example shows how to integrate a logger with the SDK
88
*/
99

10-
var oci = require("oci-sdk");
11-
var bunyan = require("bunyan");
10+
var identity = require("oci-identity");
11+
var common = require("oci-common");
1212

1313
// Integrate bunyan logger with the SDK. Make sure bunyan logger in installed.
1414
// You can integrate with log4js, winston or any other logger as well.
15-
var bunLog = bunyan.createLogger({ name: "LoggingExample", level: "debug" });
16-
oci.LOG.logger = bunLog;
17-
18-
const provider = new oci.common.ConfigFileAuthenticationDetailsProvider();
15+
process.env.USE_BUNYAN = "true";
16+
const provider = new common.ConfigFileAuthenticationDetailsProvider();
1917

2018
(async () => {
21-
const identityClient = new oci.identity.IdentityClient({
19+
const identityClient = new identity.IdentityClient({
2220
authenticationDetailsProvider: provider
2321
});
2422
const regions = await identityClient.listRegionSubscriptions({
2523
tenancyId: provider.getTenantId() || ""
2624
});
2725
for (let i = 0; i < regions.items.length; i++) {
28-
console.log(`Region fetched ${regions.items[i].regionName}`);
26+
common.logger.info(`Region fetched ${regions.items[i].regionName}`);
2927
}
3028
})();

index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export import DefaultRequestSigner = common.DefaultRequestSigner;
1313
export import OciError = common.OciError;
1414
export import HandleErrorResponse = common.handleErrorResponse;
1515
export import ConvertStringToType = common.convertStringToType;
16-
export import LOG = common.LOG;
1716
export import ConfigFileAuthenticationDetailsProvider = common.ConfigFileAuthenticationDetailsProvider;
1817
// Analytics Service
1918
export import analytics = require("oci-analytics");

lib/accessgovernancecp/lib/client.ts

+16-40
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import {
2020
composeResponse,
2121
composeRequest,
2222
GenericRetrier,
23-
developerToolConfiguration
23+
developerToolConfiguration,
24+
logger
2425
} from "oci-common";
2526
const Breaker = require("opossum");
2627

@@ -117,11 +118,7 @@ export class AccessGovernanceCPClient {
117118
public set endpoint(endpoint: string) {
118119
this._endpoint = endpoint;
119120
this._endpoint = this._endpoint + "/20220518";
120-
if (this.logger) this.logger.info(`AccessGovernanceCPClient endpoint set to ${this._endpoint}`);
121-
}
122-
123-
public get logger() {
124-
return common.LOG.logger;
121+
logger.info(`AccessGovernanceCPClient endpoint set to ${this._endpoint}`);
125122
}
126123

127124
/**
@@ -131,10 +128,9 @@ export class AccessGovernanceCPClient {
131128
*/
132129
public set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean) {
133130
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
134-
if (this.logger)
135-
this.logger.info(
136-
`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`
137-
);
131+
logger.info(
132+
`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`
133+
);
138134
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
139135
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(
140136
AccessGovernanceCPClient.serviceEndpointTemplate,
@@ -226,10 +222,7 @@ export class AccessGovernanceCPClient {
226222
public async changeGovernanceInstanceCompartment(
227223
changeGovernanceInstanceCompartmentRequest: requests.ChangeGovernanceInstanceCompartmentRequest
228224
): Promise<responses.ChangeGovernanceInstanceCompartmentResponse> {
229-
if (this.logger)
230-
this.logger.debug(
231-
"Calling operation AccessGovernanceCPClient#changeGovernanceInstanceCompartment."
232-
);
225+
logger.debug("Calling operation AccessGovernanceCPClient#changeGovernanceInstanceCompartment.");
233226
const operationName = "changeGovernanceInstanceCompartment";
234227
const apiReferenceLink = "";
235228
const pathParams = {
@@ -251,7 +244,6 @@ export class AccessGovernanceCPClient {
251244
changeGovernanceInstanceCompartmentRequest.retryConfiguration,
252245
specRetryConfiguration
253246
);
254-
if (this.logger) retrier.logger = this.logger;
255247
const request = await composeRequest({
256248
baseEndpoint: this._endpoint,
257249
defaultHeaders: this._defaultHeaders,
@@ -303,8 +295,7 @@ export class AccessGovernanceCPClient {
303295
public async createGovernanceInstance(
304296
createGovernanceInstanceRequest: requests.CreateGovernanceInstanceRequest
305297
): Promise<responses.CreateGovernanceInstanceResponse> {
306-
if (this.logger)
307-
this.logger.debug("Calling operation AccessGovernanceCPClient#createGovernanceInstance.");
298+
logger.debug("Calling operation AccessGovernanceCPClient#createGovernanceInstance.");
308299
const operationName = "createGovernanceInstance";
309300
const apiReferenceLink = "";
310301
const pathParams = {};
@@ -323,7 +314,6 @@ export class AccessGovernanceCPClient {
323314
createGovernanceInstanceRequest.retryConfiguration,
324315
specRetryConfiguration
325316
);
326-
if (this.logger) retrier.logger = this.logger;
327317
const request = await composeRequest({
328318
baseEndpoint: this._endpoint,
329319
defaultHeaders: this._defaultHeaders,
@@ -389,8 +379,7 @@ export class AccessGovernanceCPClient {
389379
public async deleteGovernanceInstance(
390380
deleteGovernanceInstanceRequest: requests.DeleteGovernanceInstanceRequest
391381
): Promise<responses.DeleteGovernanceInstanceResponse> {
392-
if (this.logger)
393-
this.logger.debug("Calling operation AccessGovernanceCPClient#deleteGovernanceInstance.");
382+
logger.debug("Calling operation AccessGovernanceCPClient#deleteGovernanceInstance.");
394383
const operationName = "deleteGovernanceInstance";
395384
const apiReferenceLink = "";
396385
const pathParams = {
@@ -412,7 +401,6 @@ export class AccessGovernanceCPClient {
412401
deleteGovernanceInstanceRequest.retryConfiguration,
413402
specRetryConfiguration
414403
);
415-
if (this.logger) retrier.logger = this.logger;
416404
const request = await composeRequest({
417405
baseEndpoint: this._endpoint,
418406
defaultHeaders: this._defaultHeaders,
@@ -463,8 +451,7 @@ export class AccessGovernanceCPClient {
463451
public async getGovernanceInstance(
464452
getGovernanceInstanceRequest: requests.GetGovernanceInstanceRequest
465453
): Promise<responses.GetGovernanceInstanceResponse> {
466-
if (this.logger)
467-
this.logger.debug("Calling operation AccessGovernanceCPClient#getGovernanceInstance.");
454+
logger.debug("Calling operation AccessGovernanceCPClient#getGovernanceInstance.");
468455
const operationName = "getGovernanceInstance";
469456
const apiReferenceLink = "";
470457
const pathParams = {
@@ -484,7 +471,6 @@ export class AccessGovernanceCPClient {
484471
getGovernanceInstanceRequest.retryConfiguration,
485472
specRetryConfiguration
486473
);
487-
if (this.logger) retrier.logger = this.logger;
488474
const request = await composeRequest({
489475
baseEndpoint: this._endpoint,
490476
defaultHeaders: this._defaultHeaders,
@@ -539,10 +525,7 @@ export class AccessGovernanceCPClient {
539525
public async getGovernanceInstanceConfiguration(
540526
getGovernanceInstanceConfigurationRequest: requests.GetGovernanceInstanceConfigurationRequest
541527
): Promise<responses.GetGovernanceInstanceConfigurationResponse> {
542-
if (this.logger)
543-
this.logger.debug(
544-
"Calling operation AccessGovernanceCPClient#getGovernanceInstanceConfiguration."
545-
);
528+
logger.debug("Calling operation AccessGovernanceCPClient#getGovernanceInstanceConfiguration.");
546529
const operationName = "getGovernanceInstanceConfiguration";
547530
const apiReferenceLink = "";
548531
const pathParams = {};
@@ -562,7 +545,6 @@ export class AccessGovernanceCPClient {
562545
getGovernanceInstanceConfigurationRequest.retryConfiguration,
563546
specRetryConfiguration
564547
);
565-
if (this.logger) retrier.logger = this.logger;
566548
const request = await composeRequest({
567549
baseEndpoint: this._endpoint,
568550
defaultHeaders: this._defaultHeaders,
@@ -618,8 +600,7 @@ export class AccessGovernanceCPClient {
618600
public async listGovernanceInstances(
619601
listGovernanceInstancesRequest: requests.ListGovernanceInstancesRequest
620602
): Promise<responses.ListGovernanceInstancesResponse> {
621-
if (this.logger)
622-
this.logger.debug("Calling operation AccessGovernanceCPClient#listGovernanceInstances.");
603+
logger.debug("Calling operation AccessGovernanceCPClient#listGovernanceInstances.");
623604
const operationName = "listGovernanceInstances";
624605
const apiReferenceLink = "";
625606
const pathParams = {};
@@ -646,7 +627,6 @@ export class AccessGovernanceCPClient {
646627
listGovernanceInstancesRequest.retryConfiguration,
647628
specRetryConfiguration
648629
);
649-
if (this.logger) retrier.logger = this.logger;
650630
const request = await composeRequest({
651631
baseEndpoint: this._endpoint,
652632
defaultHeaders: this._defaultHeaders,
@@ -701,8 +681,7 @@ export class AccessGovernanceCPClient {
701681
public async updateGovernanceInstance(
702682
updateGovernanceInstanceRequest: requests.UpdateGovernanceInstanceRequest
703683
): Promise<responses.UpdateGovernanceInstanceResponse> {
704-
if (this.logger)
705-
this.logger.debug("Calling operation AccessGovernanceCPClient#updateGovernanceInstance.");
684+
logger.debug("Calling operation AccessGovernanceCPClient#updateGovernanceInstance.");
706685
const operationName = "updateGovernanceInstance";
707686
const apiReferenceLink = "";
708687
const pathParams = {
@@ -723,7 +702,6 @@ export class AccessGovernanceCPClient {
723702
updateGovernanceInstanceRequest.retryConfiguration,
724703
specRetryConfiguration
725704
);
726-
if (this.logger) retrier.logger = this.logger;
727705
const request = await composeRequest({
728706
baseEndpoint: this._endpoint,
729707
defaultHeaders: this._defaultHeaders,
@@ -788,10 +766,9 @@ export class AccessGovernanceCPClient {
788766
public async updateGovernanceInstanceConfiguration(
789767
updateGovernanceInstanceConfigurationRequest: requests.UpdateGovernanceInstanceConfigurationRequest
790768
): Promise<responses.UpdateGovernanceInstanceConfigurationResponse> {
791-
if (this.logger)
792-
this.logger.debug(
793-
"Calling operation AccessGovernanceCPClient#updateGovernanceInstanceConfiguration."
794-
);
769+
logger.debug(
770+
"Calling operation AccessGovernanceCPClient#updateGovernanceInstanceConfiguration."
771+
);
795772
const operationName = "updateGovernanceInstanceConfiguration";
796773
const apiReferenceLink = "";
797774
const pathParams = {};
@@ -812,7 +789,6 @@ export class AccessGovernanceCPClient {
812789
updateGovernanceInstanceConfigurationRequest.retryConfiguration,
813790
specRetryConfiguration
814791
);
815-
if (this.logger) retrier.logger = this.logger;
816792
const request = await composeRequest({
817793
baseEndpoint: this._endpoint,
818794
defaultHeaders: this._defaultHeaders,

lib/accessgovernancecp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-accessgovernancecp",
3-
"version": "2.79.0",
3+
"version": "2.79.1",
44
"description": "OCI NodeJS client for Access Governance Cp Service",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)