Skip to content

Commit 64951ac

Browse files
authored
Merge pull request #6 from oracle/release_2020-06-16
Releasing version 1.1.1
2 parents 542a8d2 + 48d3126 commit 64951ac

File tree

169 files changed

+3717
-291
lines changed

Some content is hidden

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

169 files changed

+3717
-291
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ 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/).
66

7+
## 1.1.1 - 2020-06-16
8+
9+
### Added
10+
11+
- Support for creating a new database from an existing database based on a given timestamp in the Database service
12+
- Support for enabling archive log backups of databases in the Database service
13+
- Support for returning the database version on autonomous container databases in the Database service
14+
- Support for the new DNS format of the Data Transfer service
15+
- Support for scheduled autoscaling, which allows for scaling actions triggered at particular times based on CRON expressions, in the Compute Autoscaling service
16+
- Support for filtering of list APIs for groups, identity providers, identity provider groups, compartments, dynamic groups, network sources, policies, and users by name or lifecycle state in the Identity Service
17+
718
## 1.1.0 - 2020-06-09
819

920
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to the Oracle Cloud Infrastructure SDK for TypeScript
1+
# Contributing to the Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
22

33
_Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved._
44

README-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Oracle Cloud Infrastructure SDK for TypeScript Development
1+
# Oracle Cloud Infrastructure SDK for TypeScript and JavaScript Development
22

33
## Getting Started
44

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Oracle Cloud Infrastructure SDK for Typescript
1+
# Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
22

33
[![wercker status](https://app.wercker.com/status/09bc4818e7b1d70b04285331a9bdbc41/s/master "wercker status")](https://app.wercker.com/project/byKey/09bc4818e7b1d70b04285331a9bdbc41)
44

5-
This is Oracle Cloud Infrastructure SDK for TypeScript. (Note that the SDK works with both JavaScript and TypeScript projects.) This project is open source and maintained by Oracle Corp.
6-
The home page for the project is [Oracle Cloud Infrastructure SDK for TypeScript](https://github.com/oracle/oci-typescript-sdk/).
5+
This is Oracle Cloud Infrastructure SDK for TypeScript and JavaScript. (Note that the SDK works with both JavaScript and TypeScript projects.) This project is open source and maintained by Oracle Corp.
6+
The home page for the project is [Oracle Cloud Infrastructure SDK for TypeScript and JavaScript](https://github.com/oracle/oci-typescript-sdk/).
77

88
## Installing
99

@@ -15,9 +15,9 @@ npm install oci-sdk
1515

1616
Alternatively you can git clone this repo.
1717

18-
## Working with the SDK for TypeScript
18+
## Working with the SDK for TypeScript and JavaScript
1919

20-
To start working with the SDK for TypeScript, you import the service package, create a client, and then use that client to make calls. [Refer to examples section](https://github.com/oracle/oci-typescript-sdk/tree/master/examples) for examples on how to make requests.
20+
To start working with the SDK for TypeScript and JavaScript, you import the service package, create a client, and then use that client to make calls. [Refer to examples section](https://github.com/oracle/oci-typescript-sdk/tree/master/examples) for examples on how to make requests.
2121

2222
### Configuring
2323

@@ -28,7 +28,7 @@ Before using the SDK, set up a config file with the required credentials. See [S
2828
The `oci-typescript-sdk` contains the following:
2929

3030
- **Service packages**: All packages except `common` and any other package found inside `lib`. These packages represent
31-
the Oracle Cloud Infrastructure services supported by the SDK for TypeScript. Each package represents a service.
31+
the Oracle Cloud Infrastructure services supported by the SDK for TypeScript and JavaScript. Each package represents a service.
3232
These packages include methods to interact with the service, structs that model
3333
input and output parameters, and a client struct that acts as receiver for the above methods.
3434

@@ -42,15 +42,15 @@ Examples can be found [in the examples section](https://github.com/oracle/oci-ty
4242

4343
## Documentation
4444

45-
Full documentation can be found [on the sdk for typescript documentation site](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdk.htm).
45+
Full documentation can be found [on the sdk for typescript and javascript documentation site](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdk.htm).
4646

4747
## Versions Supported
4848

49-
The SDK for TypeScript currently supports NodeJS version 10.15.3 and TypeScript version 3.6.4.
49+
The SDK for TypeScript and JavaScript currently supports NodeJS version 10.15.3 and TypeScript version 3.6.4.
5050

5151
## Node & Browser Support
5252

53-
The SDK for TypeScript currently supports NodeJS but does not have browser support.
53+
The SDK for TypeScript and JavaScript currently supports NodeJS but does not have browser support.
5454

5555
## Help
5656

examples/javascript/filestorage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
2020
);
2121

2222
/**
23-
* This file provides an example of how to use the File Storage service in the SDK for Typescript.
23+
* This file provides an example of how to use the File Storage service in the SDK for TypeScript.
2424
*
2525
* In order to demonstrate functionality for mount targets and export sets, this script will also create a VCN
2626
* and subnet. These will be deleted at the end of the script. This script also makes some assumptions about

examples/javascript/identity.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const tenancyId = {
3737
const userDetails = {
3838
compartmentId: provider.getTenantId() || "",
3939
name: userName,
40-
description: "Created by a SDK for Typescript example"
40+
description: "Created by a SDK for TypeScript example"
4141
};
4242

4343
const userReq = {
@@ -52,7 +52,7 @@ const tenancyId = {
5252
const groupDetails = {
5353
compartmentId: provider.getTenantId() || "",
5454
name: groupName,
55-
description: "Created by a SDK for Typescript example"
55+
description: "Created by a SDK for TypeScript example"
5656
};
5757

5858
const groupReq = {

examples/javascript/invoke-function.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
1717
);
1818
/**
1919
* This is a basic example of how to register and invoke a serverless Function
20-
* on OCI using the SDK for Typescript.
20+
* on OCI using the SDK for TypeScript.
2121
*
2222
* The example has some pre-requisites. In particular you will need to create a
2323
* Function and publish it to OCIR. The best way to do this is with the 'Fn

examples/javascript/monitoring-alarm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
1414
configProfile
1515
);
1616
/**
17-
* This class demonstrates how to use the Monitoring api in the SDK for Typescript. This will cover:
17+
* This class demonstrates how to use the Monitoring api in the SDK for TypeScript. This will cover:
1818
*
1919
* <ul>
2020
* <li>Creating, updating, retrieving, listing and deleting alarms</li>
@@ -35,7 +35,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
3535
* <ul>
3636
*/
3737

38-
const DISPLAY_NAME = "Alarm for SDK for Typescript sample";
38+
const DISPLAY_NAME = "Alarm for SDK for TypeScript sample";
3939
const NAME_SPACE = "oci_computeagent";
4040
const METRIC_QUERY = "CpuUtilization[1m].max() > 75";
4141
const RESOLUTION = "1m";

examples/javascript/tagging.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
2525
const namespace = {
2626
compartmentId: compartmentId,
2727
name: `typeScriptExample_namespace${Math.floor(Math.random() * Math.floor(1000000))}`,
28-
description: "SDK for Typescript example tag namespace"
28+
description: "SDK for TypeScript example tag namespace"
2929
};
3030
const namespaceReq = {
3131
createTagNamespaceDetails: namespace
@@ -37,7 +37,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
3737
// Create a tag one
3838
const tagOneName = {
3939
name: "typeScriptExample_tagOne",
40-
description: "SDK for Typescript example tag one"
40+
description: "SDK for TypeScript example tag one"
4141
};
4242

4343
const createTagOneReq = {
@@ -50,7 +50,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
5050
// Create another tag
5151
const tagTwoName = {
5252
name: "typeScriptExample_tagTwo",
53-
description: "SDK for Typescript example tag two"
53+
description: "SDK for TypeScript example tag two"
5454
};
5555

5656
const createTagTwoReq = {
@@ -124,7 +124,7 @@ const provider = new common.ConfigFileAuthenticationDetailsProvider(
124124
const createVCNDetails = {
125125
cidrBlock: "10.0.0.0/16",
126126
compartmentId: compartmentId,
127-
displayName: "SDK for Typescript tagging example VCN",
127+
displayName: "SDK for TypeScript tagging example VCN",
128128
dnsLabel: `vcn${Math.floor(Math.random() * Math.floor(1000000))}`,
129129
freeformTags: { "free": "form", "another": "item" },
130130
definedTags: {

examples/typescript/containerengine-node-pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
1717
configProfile
1818
);
1919
/**
20-
* This class provides an example of how to create a Container Engine node pool in the SDK for Typescript.
20+
* This class provides an example of how to create a Container Engine node pool in the SDK for TypeScript.
2121
* It will create a VCN and three subnets, one Container Engine cluster and add one node pool in the cluster.
2222
* These will be deleted at the end. The class also makes some assumptions about
2323
* the resources it will create:

examples/typescript/filestorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
2020
);
2121

2222
/**
23-
* This file provides an example of how to use the File Storage service in the SDK for Typescript.
23+
* This file provides an example of how to use the File Storage service in the SDK for TypeScript.
2424
*
2525
* In order to demonstrate functionality for mount targets and export sets, this script will also create a VCN
2626
* and subnet. These will be deleted at the end of the script. This script also makes some assumptions about

examples/typescript/identity.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
2020
configProfile
2121
);
2222

23-
const profile = config.accumulator.configurationsByProfile.get("DEFAULT");
24-
let tenancy = "";
25-
if (profile) {
26-
tenancy = profile.get("tenancy") as string;
27-
} else {
28-
tenancy = "";
29-
}
23+
const tenancy = provider.getTenantId();
3024
const tenancyId: identity.requests.ListRegionSubscriptionsRequest = {
3125
tenancyId: tenancy || ""
3226
};
@@ -48,7 +42,7 @@ const tenancyId: identity.requests.ListRegionSubscriptionsRequest = {
4842
const userDetails: identity.models.CreateUserDetails = {
4943
compartmentId: tenancy,
5044
name: userName,
51-
description: "Created by a SDK for Typescript example"
45+
description: "Created by a SDK for TypeScript example"
5246
};
5347

5448
const userReq: identity.requests.CreateUserRequest = {
@@ -63,7 +57,7 @@ const tenancyId: identity.requests.ListRegionSubscriptionsRequest = {
6357
const groupDetails: identity.models.CreateGroupDetails = {
6458
compartmentId: tenancy,
6559
name: groupName,
66-
description: "Created by a SDK for Typescript example"
60+
description: "Created by a SDK for TypeScript example"
6761
};
6862

6963
const groupReq: identity.requests.CreateGroupRequest = {

examples/typescript/invoke-function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
1818

1919
/**
2020
* This is a basic example of how to register and invoke a serverless Function
21-
* on OCI using the SDK for Typescript.
21+
* on OCI using the SDK for TypeScript.
2222
*
2323
* The example has some pre-requisites. In particular you will need to create a
2424
* Function and publish it to OCIR. The best way to do this is with the 'Fn

examples/typescript/logging.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright (c) 2020, 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+
This is an example shows how to integrate a logger with the SDK
6+
*/
7+
8+
var oci = require("oci-sdk");
9+
var bunyan = require("bunyan");
10+
11+
// Integrate bunyan logger with the SDK. Make sure bunyan logger in installed.
12+
// You can integrate with log4js, winston or any other logger as well.
13+
var bunLog = bunyan.createLogger({ name: "LoggingExample", level: "debug" });
14+
oci.LOG.logger = bunLog;
15+
16+
const configurationFilePath = "~/.oci/config";
17+
const configProfile = "DEFAULT";
18+
19+
const provider = new oci.ConfigFileAuthenticationDetailsProvider(
20+
configurationFilePath,
21+
configProfile
22+
);
23+
24+
const tenancyId = {
25+
tenancyId: provider.getTenantId() || ""
26+
};
27+
28+
(async () => {
29+
const identityClient = new oci.identity.IdentityClient({
30+
authenticationDetailsProvider: provider
31+
});
32+
const regions = await identityClient.listRegionSubscriptions(tenancyId);
33+
for (let i = 0; i < regions.items.length; i++) {
34+
console.log(`Region fetched ${regions.items[i].regionName}`);
35+
}
36+
})();

examples/typescript/monitoring-alarm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
1414
configProfile
1515
);
1616
/**
17-
* This class demonstrates how to use the Monitoring api in the SDK for Typescript. This will cover:
17+
* This class demonstrates how to use the Monitoring api in the SDK for TypeScript. This will cover:
1818
*
1919
* <ul>
2020
* <li>Creating, updating, retrieving, listing and deleting alarms</li>
@@ -35,7 +35,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
3535
* <ul>
3636
*/
3737

38-
const DISPLAY_NAME: string = "Alarm for SDK for Typescript sample";
38+
const DISPLAY_NAME: string = "Alarm for SDK for TypeScript sample";
3939
const NAME_SPACE: string = "oci_computeagent";
4040
const METRIC_QUERY: string = "CpuUtilization[1m].max() > 75";
4141
const RESOLUTION: string = "1m";

examples/typescript/move-compartment.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313

1414
import * as identity from "oci-identity";
15-
import { ConfigFileReader } from "oci-common/lib/config-file-reader";
1615
import common = require("oci-common");
1716

1817
const configurationFilePath = "~/.oci/config";
@@ -22,14 +21,7 @@ const provider: common.ConfigFileAuthenticationDetailsProvider = new common.Conf
2221
configurationFilePath,
2322
configProfile
2423
);
25-
const config = ConfigFileReader.parseDefault(null);
26-
const profile = config.accumulator.configurationsByProfile.get("DEFAULT");
27-
let compartmentId = "";
28-
if (profile) {
29-
compartmentId = profile.get("tenancy") as string;
30-
} else {
31-
compartmentId = "";
32-
}
24+
const compartmentId = provider.getTenantId();
3325

3426
(async () => {
3527
const identityClient = new identity.IdentityClient({ authenticationDetailsProvider: provider });

examples/typescript/pagination.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,16 @@
55

66
import common = require("oci-common");
77
import * as identity from "oci-identity";
8-
import {
9-
paginateRecords,
10-
paginateResponses,
11-
paginatedRecordsWithLimit,
12-
paginatedResponsesWithLimit
13-
} from "oci-common/lib/paginators";
14-
import { ConfigFileReader } from "oci-common/lib/config-file-reader";
8+
import { paginatedRecordsWithLimit, paginatedResponsesWithLimit } from "oci-common/lib/paginators";
9+
1510
const configurationFilePath = "~/.oci/config";
1611
const configProfile = "DEFAULT";
1712

1813
const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider(
1914
configurationFilePath,
2015
configProfile
2116
);
22-
const config = ConfigFileReader.parseDefault(null);
23-
const profile = config.accumulator.configurationsByProfile.get("DEFAULT");
24-
let compartmentId = "";
25-
if (profile) {
26-
compartmentId = profile.get("tenancy") as string;
27-
} else {
28-
compartmentId = "";
29-
}
17+
const compartmentId = provider.getTenantId();
3018

3119
(async () => {
3220
const identityClient = new identity.IdentityClient({ authenticationDetailsProvider: provider });

0 commit comments

Comments
 (0)