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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ 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.2 - 2020-07-07
### Added
- Support for registering and deregistering autonomous dedicated databases with Data Safe in the Database service
- Support for switching between non-private-endpoints and private endpoints on autonomous databases in the Database service
- Support for returning group names when listing identity provider groups in the Identity service
- Support for server-side object re-encryption in the Object Storage service
- Support for private endpoint (ingress) and public endpoint whitelisting in the Analytics Cloud service

## 1.2.1 - 2020-06-30
### Added
- Support for the Usage service
Expand Down
39 changes: 39 additions & 0 deletions examples/javascript/logging.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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 is an example shows how to integrate a logger with the SDK
*/

var identity = require("oci-identity");
var common = require("oci-common");
var bunyan = require("bunyan");

// Integrate bunyan logger with the SDK. Make sure bunyan logger in installed.
// You can integrate with log4js, winston or any other logger as well.
var bunLog = bunyan.createLogger({ name: "LoggingExample", level: "debug" });
common.LOG.logger = bunLog;

const configurationFilePath = "~/.oci/config";
const configProfile = "DEFAULT";

const provider = new common.ConfigFileAuthenticationDetailsProvider(
configurationFilePath,
configProfile
);

const tenancyId = {
tenancyId: provider.getTenantId() || ""
};

(async () => {
const identityClient = new identity.IdentityClient({
authenticationDetailsProvider: provider
});
const regions = await identityClient.listRegionSubscriptions(tenancyId);
for (let i = 0; i < regions.items.length; i++) {
console.log(`Region fetched ${regions.items[i].regionName}`);
}
})();
11 changes: 6 additions & 5 deletions examples/typescript/audit.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
* 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.
coding: utf-8
This script retrieves all audit logs across an Oracle Cloud Infrastructure Tenancy.
/**
* 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 script retrieves all audit logs across an Oracle Cloud Infrastructure Tenancy.
for a timespan defined by startTime and endTime.
This sample script retrieves Audit events for last 5 days.
This script will work at a tenancy level only.
Expand Down
4 changes: 3 additions & 1 deletion examples/typescript/database.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/**
* 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.
*/

@param args Arguments to provide to the example. The following arguments are expected:
/**
* @param args Arguments to provide to the example. The following arguments are expected:
* <ul>
* <li>The first argument is the OCID of the tenancy.</li>
* <li>The second argument is the OCID of the compartment.</li>
Expand Down
8 changes: 5 additions & 3 deletions examples/typescript/identity.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/**
* 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 is an example where we will create a new user, a new group and assign that user to the group
We will then remove the user from the group, delete the group, delete the user.
*/

/**
* This is an example where we will create a new user, a new group and assign that user to the group
* We will then remove the user from the group, delete the group, delete the user.
*/
import * as identity from "oci-identity";
import common = require("oci-common");
Expand Down
3 changes: 2 additions & 1 deletion examples/typescript/launch_instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* 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.
*/

/* @param args Arguments to provide to the example. The following arguments are expected:
/**
* @param args Arguments to provide to the example. The following arguments are expected:
* <ul>
* <li>The first argument is the OCID of the tenancy.</li>
* <li>The second argument is the OCID of the compartment.</li>
Expand Down
6 changes: 4 additions & 2 deletions examples/typescript/logging.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/**
* 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 is an example shows how to integrate a logger with the SDK
*/

/**
* This is an example shows how to integrate a logger with the SDK
*/

var oci = require("oci-sdk");
Expand Down
14 changes: 7 additions & 7 deletions examples/typescript/move-compartment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* 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 script provides an example on how to move a compartment to a different compartment
This script will:
* create cp_source_TSSDK under tenancy
* create cp_target_TSSDK under tenancy
* move cp_source_TSSDK under cp_target_TSSDK
*/
/**
* This script provides an example on how to move a compartment to a different compartment
* This script will:
* create cp_source_TSSDK under tenancy
* create cp_target_TSSDK under tenancy
* move cp_source_TSSDK under cp_target_TSSDK
*/

import * as identity from "oci-identity";
import common = require("oci-common");
Expand Down
3 changes: 2 additions & 1 deletion examples/typescript/objectstorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* 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.
*/

/* @param args Arguments to provide to the example. The following arguments are expected:
/**
* @param args Arguments to provide to the example. The following arguments are expected:
* <ul>
* <li>The first argument is the OCID of the compartment.</li>
* <li>The second is the name of bucket to create and later fetch</li>
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

/**
* This example provides an example of basic streaming usage.
* This example provides an example of basic streaming usage.
* - List streams
* - Get a stream
* - Create a stream
Expand Down
5 changes: 4 additions & 1 deletion examples/typescript/tagging.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/**
* 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 script provides an example on how to use tagging in the SDK for TypeScript to manage tags and tag namespaces,
/**
*
* This script provides an example on how to use tagging in the SDK for TypeScript to manage tags and tag namespaces,
as well as how to apply freeform and defined tags to a resource.
*/

Expand Down
67 changes: 67 additions & 0 deletions lib/analytics/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,73 @@ export class AnalyticsClient {
}
}

/**
* Change an Analytics instance network endpoint. The operation is long-running
* and creates a new WorkRequest.
*
* @param ChangeAnalyticsInstanceNetworkEndpointRequest
* @return ChangeAnalyticsInstanceNetworkEndpointResponse
* @throws OciError when an error occurs
*/
public async changeAnalyticsInstanceNetworkEndpoint(
changeAnalyticsInstanceNetworkEndpointRequest: requests.ChangeAnalyticsInstanceNetworkEndpointRequest
): Promise<responses.ChangeAnalyticsInstanceNetworkEndpointResponse> {
if (this.logger)
this.logger.debug(
"Calling operation AnalyticsClient#changeAnalyticsInstanceNetworkEndpoint."
);
const pathParams = {
"{analyticsInstanceId}": changeAnalyticsInstanceNetworkEndpointRequest.analyticsInstanceId
};

const queryParams = {};

let headerParams = {
"if-match": changeAnalyticsInstanceNetworkEndpointRequest.ifMatch,
"opc-request-id": changeAnalyticsInstanceNetworkEndpointRequest.opcRequestId,
"opc-retry-token": changeAnalyticsInstanceNetworkEndpointRequest.opcRetryToken
};

const request = await composeRequest({
baseEndpoint: this._endpoint,
defaultHeaders: this._defaultHeaders,
path: "/analyticsInstances/{analyticsInstanceId}/actions/changeNetworkEndpoint",
method: "POST",
bodyContent: common.ObjectSerializer.serialize(
changeAnalyticsInstanceNetworkEndpointRequest.changeAnalyticsInstanceNetworkEndpointDetails,
"ChangeAnalyticsInstanceNetworkEndpointDetails",
models.ChangeAnalyticsInstanceNetworkEndpointDetails.getJsonObj
),
pathParams: pathParams,
headerParams: headerParams,
queryParams: queryParams
});

const response = await this._httpClient.send(request);
if (response.status && response.status >= 200 && response.status <= 299) {
const sdkResponse = composeResponse({
responseObject: <responses.ChangeAnalyticsInstanceNetworkEndpointResponse>{},
responseHeaders: [
{
value: response.headers.get("opc-request-id"),
key: "opcRequestId",
dataType: "string"
},
{
value: response.headers.get("opc-work-request-id"),
key: "opcWorkRequestId",
dataType: "string"
}
]
});

return sdkResponse;
} else {
const errBody = await common.handleErrorBody(response);
throw common.handleErrorResponse(response, errBody);
}
}

/**
* Create a new AnalyticsInstance in the specified compartment. The operation is long-running
* and creates a new WorkRequest.
Expand Down
7 changes: 6 additions & 1 deletion lib/analytics/lib/model/analytics-instance-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface AnalyticsInstanceSummary {
*
*/
"emailNotification"?: string;
"networkEndpointDetails": model.PrivateEndpointDetails | model.PublicEndpointDetails;
/**
* URL of the Analytics service.
*
Expand All @@ -87,7 +88,11 @@ export namespace AnalyticsInstanceSummary {
const jsonObj = {
...obj,
...{
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined,

"networkEndpointDetails": obj.networkEndpointDetails
? model.NetworkEndpointDetails.getJsonObj(obj.networkEndpointDetails)
: undefined
}
};

Expand Down
7 changes: 6 additions & 1 deletion lib/analytics/lib/model/analytics-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface AnalyticsInstance {
*
*/
"emailNotification"?: string;
"networkEndpointDetails": model.PrivateEndpointDetails | model.PublicEndpointDetails;
/**
* URL of the Analytics service.
*
Expand Down Expand Up @@ -103,7 +104,11 @@ export namespace AnalyticsInstance {
const jsonObj = {
...obj,
...{
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined,

"networkEndpointDetails": obj.networkEndpointDetails
? model.NetworkEndpointDetails.getJsonObj(obj.networkEndpointDetails)
: undefined
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Analytics API
* Analytics API.

* OpenAPI spec version: 20190331
*
*
* 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 model from "../model";
import common = require("oci-common");

/**
* Input payload to update an Analytics instance endpoint details.
*
*/
export interface ChangeAnalyticsInstanceNetworkEndpointDetails {
"networkEndpointDetails": model.PrivateEndpointDetails | model.PublicEndpointDetails;
}

export namespace ChangeAnalyticsInstanceNetworkEndpointDetails {
export function getJsonObj(obj: ChangeAnalyticsInstanceNetworkEndpointDetails): object {
const jsonObj = {
...obj,
...{
"networkEndpointDetails": obj.networkEndpointDetails
? model.NetworkEndpointDetails.getJsonObj(obj.networkEndpointDetails)
: undefined
}
};

return jsonObj;
}
}
7 changes: 6 additions & 1 deletion lib/analytics/lib/model/create-analytics-instance-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface CreateAnalyticsInstanceDetails {
*
*/
"emailNotification"?: string;
"networkEndpointDetails"?: model.PrivateEndpointDetails | model.PublicEndpointDetails;
/**
* IDCS access token identifying a stripe and service administrator user.
*
Expand Down Expand Up @@ -79,7 +80,11 @@ export namespace CreateAnalyticsInstanceDetails {
const jsonObj = {
...obj,
...{
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined
"capacity": obj.capacity ? model.Capacity.getJsonObj(obj.capacity) : undefined,

"networkEndpointDetails": obj.networkEndpointDetails
? model.NetworkEndpointDetails.getJsonObj(obj.networkEndpointDetails)
: undefined
}
};

Expand Down
13 changes: 13 additions & 0 deletions lib/analytics/lib/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import * as Capacity from "./capacity";
export import Capacity = Capacity.Capacity;
import * as CapacityType from "./capacity-type";
export import CapacityType = CapacityType.CapacityType;
import * as ChangeAnalyticsInstanceNetworkEndpointDetails from "./change-analytics-instance-network-endpoint-details";
export import ChangeAnalyticsInstanceNetworkEndpointDetails = ChangeAnalyticsInstanceNetworkEndpointDetails.ChangeAnalyticsInstanceNetworkEndpointDetails;
import * as ChangeCompartmentDetails from "./change-compartment-details";
export import ChangeCompartmentDetails = ChangeCompartmentDetails.ChangeCompartmentDetails;
import * as CreateAnalyticsInstanceDetails from "./create-analytics-instance-details";
Expand All @@ -30,6 +32,10 @@ import * as FeatureSet from "./feature-set";
export import FeatureSet = FeatureSet.FeatureSet;
import * as LicenseType from "./license-type";
export import LicenseType = LicenseType.LicenseType;
import * as NetworkEndpointDetails from "./network-endpoint-details";
export import NetworkEndpointDetails = NetworkEndpointDetails.NetworkEndpointDetails;
import * as NetworkEndpointType from "./network-endpoint-type";
export import NetworkEndpointType = NetworkEndpointType.NetworkEndpointType;
import * as ScaleAnalyticsInstanceDetails from "./scale-analytics-instance-details";
export import ScaleAnalyticsInstanceDetails = ScaleAnalyticsInstanceDetails.ScaleAnalyticsInstanceDetails;
import * as SortBy from "./sort-by";
Expand All @@ -38,6 +44,8 @@ import * as SortOrder from "./sort-order";
export import SortOrder = SortOrder.SortOrder;
import * as UpdateAnalyticsInstanceDetails from "./update-analytics-instance-details";
export import UpdateAnalyticsInstanceDetails = UpdateAnalyticsInstanceDetails.UpdateAnalyticsInstanceDetails;
import * as VirtualCloudNetwork from "./virtual-cloud-network";
export import VirtualCloudNetwork = VirtualCloudNetwork.VirtualCloudNetwork;
import * as WorkRequest from "./work-request";
export import WorkRequest = WorkRequest.WorkRequest;
import * as WorkRequestActionResult from "./work-request-action-result";
Expand All @@ -58,3 +66,8 @@ import * as WorkRequestStatus from "./work-request-status";
export import WorkRequestStatus = WorkRequestStatus.WorkRequestStatus;
import * as WorkRequestSummary from "./work-request-summary";
export import WorkRequestSummary = WorkRequestSummary.WorkRequestSummary;

import * as PrivateEndpointDetails from "./private-endpoint-details";
export import PrivateEndpointDetails = PrivateEndpointDetails.PrivateEndpointDetails;
import * as PublicEndpointDetails from "./public-endpoint-details";
export import PublicEndpointDetails = PublicEndpointDetails.PublicEndpointDetails;
Loading