Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/).

## 1.2.3 - 2020-07-14
### Added
- Support for Instance Principal
- Support for the Blockchain service
- Support for failing over an autonomous database that has Data Guard enabled in the Database service
- Support for switching over an autonomous database that has Data Guard enabled in the Database service
- Support for git configuration sources in the Resource Manager service
- Support for optionally specifying a VCN id on list operations of DHCP options, subnets, security lists, route tables, internet gateways, and local peering gateways in the Networking service

## 1.2.2 - 2020-07-07
### Added
- Support for registering and deregistering autonomous dedicated databases with Data Safe in the Database service
Expand Down
703 changes: 703 additions & 0 deletions THIRD_PARTY_LICENSES.txt

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions examples/javascript/instance-principal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* 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.
*/

/*
* This example demostrates the usage of Instance Principal. In order to run this example, this code
* must be in an Oracle Cloud instance. The Instance Principal will utiltize internal resources to
* create an authentication provider. Refer to:
* https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
* for more details.
*/

const identity = require("oci-identity");
const common = require("oci-common");

(async () => {
const authenticationProvider = await new common.InstancePrincipalsAuthenticationDetailsProviderBuilder().build();
try {
const identityClient = await new identity.IdentityClient({
authenticationDetailsProvider: authenticationProvider
});
const regions = await identityClient.listRegions({});
console.log("Regions: ", JSON.stringify(regions));
} catch (e) {
throw Error(`Failed with error: ${e}`);
}
})();
28 changes: 28 additions & 0 deletions examples/typescript/instance-principal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* 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.
*/

/*
* This example demostrates the usage of Instance Principal. In order to run this example, this code
* must be in an Oracle Cloud instance. The Instance Principal will utiltize internal resources to
* create an authentication provider. Refer to:
* https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
* for more details.
*/

import * as identity from "oci-identity";
import common = require("oci-common");

(async () => {
const authenticationProvider = await new common.InstancePrincipalsAuthenticationDetailsProviderBuilder().build();
try {
const identityClient = await new identity.IdentityClient({
authenticationDetailsProvider: authenticationProvider
});
const regions = await identityClient.listRegions({});
console.log("Regions: ", JSON.stringify(regions));
} catch (e) {
throw Error(`Failed with error: ${e}`);
}
})();
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ export import secrets = require("oci-secrets");
export import dataintegration = require("oci-dataintegration");
export import ocvp = require("oci-ocvp");
export import usageapi = require("oci-usageapi");
export import blockchain = require("oci-blockchain");
2 changes: 1 addition & 1 deletion lib/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-analytics",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for Analytics Service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/announcementsservice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-announcementsservice",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for Announcement Service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/apigateway/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-apigateway",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for API gateway service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/applicationmigration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-applicationmigration",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for Application Migration service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-audit",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for Audit Service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/autoscaling/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-autoscaling",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for Autoscaling Service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion lib/bds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oci-bds",
"version": "1.2.2",
"version": "1.2.3",
"description": "OCI NodeJS client for BDS Service",
"repository": {
"type": "git",
Expand Down
22 changes: 22 additions & 0 deletions lib/blockchain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# OCI NodeJS client for Blockchain Service

This module enables you to write code to manage resources for Blockchain Service.

## Requirements

To use this module, you must have the following:

- An Oracle Cloud Infrastructure account.
- A user created in that account, in a group with a policy that grants the desired permissions. This can be a user for yourself, or another person/system that needs to call the API. For an example of how to set up a new user, group, compartment, and policy, see [Adding Users](https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/addingusers.htm). For a list of typical policies you may want to use, see [Common Policies](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm).
- A key pair used for signing API requests, with the public key uploaded to Oracle. Only the user calling the API should be in possession of the private key. For more information, see [Configuring Credentials](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdkgettingstarted.htm#Configure)

## Installing

Use the following command to install this module:

```
npm install oci-blockchain
```

Alternatively you can git clone this repo.
24 changes: 24 additions & 0 deletions lib/blockchain/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Blockchain Platform Control Plane API
* Blockchain Platform Plane API
* OpenAPI spec version: 20191010
*
*
* NOTE: This class is auto generated by OracleSDKGenerator.
* Do not edit the class manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* 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.
*/

import * as requests from "./lib/request";
import * as models from "./lib/model";
import * as responses from "./lib/response";
import * as client from "./lib/client";
import * as blockchainplatform_waiter from "./lib/blockchainplatform-waiter";

export { models };
export { requests };
export { responses };
export import BlockchainPlatformClient = client.BlockchainPlatformClient;
export import BlockchainPlatformWaiter = blockchainplatform_waiter.BlockchainPlatformWaiter;
96 changes: 96 additions & 0 deletions lib/blockchain/lib/blockchainplatform-waiter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/**
* Blockchain Platform Control Plane API
* Blockchain Platform Plane API
* OpenAPI spec version: 20191010
*
*
* NOTE: This class is auto generated by OracleSDKGenerator.
* Do not edit the class manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* 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.
*/

import * as serviceRequests from "./request";
import * as serviceResponses from "./response";
import * as models from "./model";
import { BlockchainPlatformClient } from "./client";
import { genericWaiter, genericTerminalConditionWaiter, WaiterConfiguration } from "oci-common";

export class BlockchainPlatformWaiter {
public constructor(
private client: BlockchainPlatformClient,
private readonly config?: WaiterConfiguration
) {}

/**
* Waits forBlockchainPlatform till it reaches any of the provided states
*
* @param request the request to send
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
* @return response returns GetBlockchainPlatformResponse | null (null in case of 404 response)
*/
public async forBlockchainPlatform(
request: serviceRequests.GetBlockchainPlatformRequest,
...targetStates: models.BlockchainPlatform.LifecycleState[]
): Promise<serviceResponses.GetBlockchainPlatformResponse | null> {
return genericTerminalConditionWaiter(
this.config,
() => this.client.getBlockchainPlatform(request),
response => targetStates.exists(response.blockchainPlatform.lifecycleState),
targetStates.includes(models.BlockchainPlatform.LifecycleState.DELETED)
);
}

/**
* Waits forOsn till it reaches any of the provided states
*
* @param request the request to send
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
* @return response returns GetOsnResponse
*/
public async forOsn(
request: serviceRequests.GetOsnRequest,
...targetStates: models.Osn.LifecycleState[]
): Promise<serviceResponses.GetOsnResponse> {
return genericWaiter(
this.config,
() => this.client.getOsn(request),
response => targetStates.exists(response.osn.lifecycleState)
);
}

/**
* Waits forPeer till it reaches any of the provided states
*
* @param request the request to send
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
* @return response returns GetPeerResponse
*/
public async forPeer(
request: serviceRequests.GetPeerRequest,
...targetStates: models.Peer.LifecycleState[]
): Promise<serviceResponses.GetPeerResponse> {
return genericWaiter(
this.config,
() => this.client.getPeer(request),
response => targetStates.exists(response.peer.lifecycleState)
);
}

/**
* Waits forWorkRequest
*
* @param request the request to send
* @return response returns GetWorkRequestResponse
*/
public async forWorkRequest(
request: serviceRequests.GetWorkRequestRequest
): Promise<serviceResponses.GetWorkRequestResponse> {
return genericWaiter(
this.config,
() => this.client.getWorkRequest(request),
response => (response.workRequest.timeFinished ? true : false)
);
}
}
Loading