diff --git a/CHANGELOG.md b/CHANGELOG.md index abec00686b3..01b15b4dea5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Added - N/A +## 1.2.15 - 2017-09-11 + +### Changed +- Maven packages renamed from "oracle-bmc-*" to "oci-*"" (group id renamed from "com.oracle.bmc.sdk" to "com.oracle.oci.sdk") +- Default configuration file location changed from "~/.oraclebmc/config" to "~/.oci/config"; old location deprecated (see "Deprecated" below) + +### Added +- Support for instance console connections +- Support for Load Balancer health status API +- Support for compartment renaming +- Support for CustomerSecretKeys management + +### Deprecated +- The previous default configuration file location, "~/.oraclebmc/config", has been deprecated: please use "~/.oci/config" instead. The old location still works, if file at new location does not exist. + ## 1.2.13 - 2017-08-10 ### Fixed - Duplicable stream support (https://github.com/oracle/bmcs-java-sdk/issues/11) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0c13e9f07b..d741364f90a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to the Oracle Bare Metal Cloud Services Java SDK +# Contributing to the Oracle Cloud Infrastructure Java SDK -*Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.* +*Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.* Pull requests can be made under [The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html) diff --git a/README.md b/README.md index 33c986e1b71..70a57810085 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Oracle Bare Metal Cloud Services Java SDK +# Oracle Cloud Infrastructure Java SDK [![Build Status](https://travis-ci.org/oracle/bmcs-java-sdk.svg?branch=master)](https://travis-ci.org/oracle/bmcs-java-sdk) ## About -bmcs-java-sdk provides a Java SDK for managing your Oracle Bare Metal Cloud Services resources. +oci-java-sdk provides a Java SDK for managing your Oracle Cloud Infrastructure resources. The project is open source and maintained by Oracle Corp. The home page for the project is [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm). @@ -31,9 +31,9 @@ See [CHANGELOG](/CHANGELOG.md). ## Contributing -bmcs-java-sdk is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details. +oci-java-sdk is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details. -Oracle gratefully acknowledges the contributions to bmcs-java-sdk that have been made by the community. +Oracle gratefully acknowledges the contributions to oci-java-sdk that have been made by the community. ## Known Issues diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index 41c4fbb3dce..6cadbdb4f35 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -3,22 +3,22 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-audit - Oracle Bare Metal Cloud Services SDK - Audit - This project contains the SDK used for Oracle Bare Metal Cloud Audit Service + oci-java-sdk-audit + Oracle Cloud Infrastructure SDK - Audit + This project contains the SDK used for Oracle Cloud Infrastructure Audit Service https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 2fe5b135412..fa08deeb238 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,16 +5,16 @@ - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-bom + oci-java-sdk-bom pom - Oracle Bare Metal Cloud Services SDK - BOM - This project contains the BOM defining the SDK used for Oracle Bare Metal Cloud Services + Oracle Cloud Infrastructure SDK - BOM + This project contains the BOM defining the SDK used for Oracle Cloud Infrastructure https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm @@ -22,42 +22,42 @@ - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 false - com.oracle.bmc.sdk - oracle-bmc-java-sdk-audit - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-audit + 1.2.15 false - com.oracle.bmc.sdk - oracle-bmc-java-sdk-core - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-core + 1.2.15 false - com.oracle.bmc.sdk - oracle-bmc-java-sdk-identity - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-identity + 1.2.15 false - com.oracle.bmc.sdk - oracle-bmc-java-sdk-loadbalancer - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-loadbalancer + 1.2.15 false - com.oracle.bmc.sdk - oracle-bmc-java-sdk-objectstorage - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-objectstorage + 1.2.15 false diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index eab450e3fa5..4b7fa3a6e53 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -3,15 +3,15 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-common - Oracle Bare Metal Cloud Services SDK - Common - This project contains the common runtime components of the SDK used for Oracle Bare Metal Cloud Services + oci-java-sdk-common + Oracle Cloud Infrastructure SDK - Common + This project contains the common runtime components of the SDK used for Oracle Cloud Infrastructure https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm diff --git a/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java b/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java index 5f06bcaf8c6..682e6ac0ae1 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java +++ b/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java @@ -23,16 +23,24 @@ import lombok.RequiredArgsConstructor; /** - * Simple implementation to read BMC configuration files. + * Simple implementation to read OCI configuration files. *

* Note, config files MUST contain a "DEFAULT" profile, else validation * will fail. Additional profiles are optional. */ +@lombok.extern.slf4j.Slf4j public final class ConfigFileReader { /** * Default location of the config file. */ - public static final String DEFAULT_FILE_PATH = "~/.oraclebmc/config"; + public static final String DEFAULT_FILE_PATH = "~/.oci/config"; + + /** + * The fallback default location of the config file. If and only if the {@link #DEFAULT_FILE_PATH} does not exist, + * this fallback default location will be used. + */ + public static final String FALLBACK_DEFAULT_FILE_PATH = "~/.oraclebmc/config"; + private static final String DEFAULT_PROFILE_NAME = "DEFAULT"; /** @@ -56,7 +64,27 @@ public static ConfigFile parseDefault() throws IOException { * if the file could not be read. */ public static ConfigFile parseDefault(@Nullable String profile) throws IOException { - return parse(DEFAULT_FILE_PATH, profile); + File effectiveFile = null; + + File defaultFile = new File(expandUserHome(DEFAULT_FILE_PATH)); + File fallbackDefaultFile = new File(expandUserHome(FALLBACK_DEFAULT_FILE_PATH)); + + if (defaultFile.exists() && defaultFile.isFile()) { + effectiveFile = defaultFile; + } else if (fallbackDefaultFile.exists() && fallbackDefaultFile.isFile()) { + effectiveFile = fallbackDefaultFile; + } + + if (effectiveFile != null) { + LOG.debug("Loading config file from: {}", effectiveFile); + return parse(effectiveFile.getAbsolutePath(), profile); + } else { + throw new IOException( + String.format( + "Can't load the default config from '%s' or '%s' because it does not exist or it is not a file.", + defaultFile.getAbsolutePath(), + fallbackDefaultFile.getAbsolutePath())); + } } /** @@ -149,7 +177,7 @@ public static ConfigFile parse( private ConfigFileReader() {} /** - * ConfigFile represents a simple lookup mechanism for a BMC config file. + * ConfigFile represents a simple lookup mechanism for a OCI config file. */ @RequiredArgsConstructor(access = AccessLevel.PRIVATE) public static final class ConfigFile { diff --git a/bmc-common/src/main/java/com/oracle/bmc/OCID.java b/bmc-common/src/main/java/com/oracle/bmc/OCID.java index e454304bdee..4498ff97658 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/OCID.java +++ b/bmc-common/src/main/java/com/oracle/bmc/OCID.java @@ -6,7 +6,7 @@ import java.util.regex.Pattern; /** - * Oracle Bare Metal Cloud Services unique ID. + * Oracle Cloud Infrastructure unique ID. *

* See documentation. */ diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/BasicAuthenticationDetailsProvider.java b/bmc-common/src/main/java/com/oracle/bmc/auth/BasicAuthenticationDetailsProvider.java index ebb9c47cdca..9eb017fb024 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/BasicAuthenticationDetailsProvider.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/BasicAuthenticationDetailsProvider.java @@ -6,7 +6,7 @@ import java.io.InputStream; /** - * Base interface used provide required information to sign requests to Oracle Bare Metal Services. + * Base interface used provide required information to sign requests to Oracle Cloud Infrastructure. *

* Implementations may choose to provide hints about the cacheability of the keyId and privateKey using * {@link AuthCachingPolicy} (optional). diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/ConfigFileAuthenticationDetailsProvider.java b/bmc-common/src/main/java/com/oracle/bmc/auth/ConfigFileAuthenticationDetailsProvider.java index 096d56aee5d..642aa835957 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/ConfigFileAuthenticationDetailsProvider.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/ConfigFileAuthenticationDetailsProvider.java @@ -15,7 +15,7 @@ /** * Implementation of {@link AuthenticationDetailsProvider} that uses a standard - * BMC configuration file as an input. + * OCI configuration file as an input. */ @ToString public class ConfigFileAuthenticationDetailsProvider implements AuthenticationDetailsProvider { @@ -39,7 +39,7 @@ public ConfigFileAuthenticationDetailsProvider(String profile) throws IOExceptio * Creates a new instance. * * @param configurationFilePath - * path to the BMC configuration file + * path to the OCI configuration file * @param profile * profile to load, optional * @throws IOException diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/DefaultConfigurator.java b/bmc-common/src/main/java/com/oracle/bmc/http/DefaultConfigurator.java index 182553b8854..ae8a6d40181 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/DefaultConfigurator.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/DefaultConfigurator.java @@ -53,7 +53,7 @@ static void setAllowRestrictedHeadersProperty(String previousValue) { + " was explicitly " + "set to " + previousValue - + "; the Oracle BMC SDK needs to set this property to true. Failing..."); + + "; the OCI SDK needs to set this property to true. Failing..."); } System.setProperty(SUN_NET_HTTP_ALLOW_RESTRICTED_HEADERS, "true"); } diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/DefaultRequestSigner.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/DefaultRequestSigner.java index 488b491008b..4e6c7ca13e5 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/DefaultRequestSigner.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/DefaultRequestSigner.java @@ -11,12 +11,12 @@ import lombok.NoArgsConstructor; /** - * Class that exposes a way to create a {@link RequestSigner} for use with BMC. + * Class that exposes a way to create a {@link RequestSigner} for use with OCI. * The returned signers implement signing strategies outlined by the * signing guidelines. *

- * This is only exposed so clients can write REST calls directly against BMCS + * This is only exposed so clients can write REST calls directly against OCI * without using the SDK provided clients, but this class may change without * notice -- users are encouraged to use the SDK provided clients. */ diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/SigningStrategy.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/SigningStrategy.java index e95d661d5d7..157aafbcb12 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/SigningStrategy.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/SigningStrategy.java @@ -13,7 +13,7 @@ import lombok.RequiredArgsConstructor; /** - * Enum for the various signing strategies used by BMC. + * Enum for the various signing strategies used by OCI. */ @InternalSdk @RequiredArgsConstructor diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java index b68abfdc470..459701e8208 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java @@ -94,8 +94,7 @@ public PEMFileRSAPrivateKeySupplier( throw new IllegalArgumentException( "Private key must be in PEM format, was: " + object.getClass()); } else { - throw new IllegalArgumentException( - "Private key must be in PEM format"); + throw new IllegalArgumentException("Private key must be in PEM format"); } this.key = (RSAPrivateKey) converter.getPrivateKey(keyInfo); diff --git a/bmc-common/src/main/java/com/oracle/bmc/util/JavaRuntimeUtils.java b/bmc-common/src/main/java/com/oracle/bmc/util/JavaRuntimeUtils.java index 32de58a4eec..fa8c1aec0b9 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/util/JavaRuntimeUtils.java +++ b/bmc-common/src/main/java/com/oracle/bmc/util/JavaRuntimeUtils.java @@ -61,7 +61,7 @@ static JreVersion parse() { // http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html String[] versionParts = versionString.split("\\."); int featureVersion = Integer.parseInt(versionParts[1]); - // BMC requires TLS1.2, which is only supported on Java7+. + // OCI requires TLS1.2, which is only supported on Java7+. if (featureVersion < 7) { version = JreVersion.Unsupported; } else if (featureVersion == 7) { diff --git a/bmc-common/src/main/java/com/oracle/bmc/waiter/Waiters.java b/bmc-common/src/main/java/com/oracle/bmc/waiter/Waiters.java index 1aa68655df7..03a94052a34 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/waiter/Waiters.java +++ b/bmc-common/src/main/java/com/oracle/bmc/waiter/Waiters.java @@ -21,7 +21,7 @@ public class Waiters { new MaxTimeTerminationStrategy(secondsToMillis(1200)); /** - * The default BMC polling waiter that will be used. Configured using + * The default OCI polling waiter that will be used. Configured using * {@link #DEFAULT_POLLING_TERMINATION_STRATEGY} and * {@link #DEFAULT_POLLING_DELAY_STRATEGY}. */ diff --git a/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java b/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java index 0991d5ca8ba..c15e1c0bc49 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java @@ -8,12 +8,19 @@ import java.io.FileNotFoundException; import java.io.IOException; +import org.junit.Ignore; import org.junit.Test; import com.oracle.bmc.ConfigFileReader.ConfigFile; public class ConfigFileReaderTest { + @Test + @Ignore + public void defaultConfigFile() throws IOException { + ConfigFileReader.parseDefault(); + } + @Test(expected = FileNotFoundException.class) public void noConfigFile() throws IOException { ConfigFileReader.parse("src/test/resources/does_not_exist"); diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java index c5ad79e5158..79c4b835ac1 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java @@ -1,3 +1,6 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ package com.oracle.bmc.http.signing.internal; import org.junit.Test; @@ -14,7 +17,7 @@ * Tests for {@link PEMFileRSAPrivateKeySupplierTest}. */ public class PEMFileRSAPrivateKeySupplierTest { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void ctor_invalidFile() throws IOException { InputStream notAPem = new ByteArrayInputStream(new byte[0]); // not a valid key file diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 5e61249b9f3..fc00ac41de9 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -3,22 +3,22 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-core - Oracle Bare Metal Cloud Services SDK - Core - This project contains the SDK used for Oracle Bare Metal Cloud Core Services + oci-java-sdk-core + Oracle Cloud Infrastructure SDK - Core + This project contains the SDK used for Oracle Cloud Infrastructure Core Services https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/BlockstorageClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/BlockstorageClient.java index 511deccce06..562abd03836 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/BlockstorageClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/BlockstorageClient.java @@ -84,6 +84,19 @@ public BlockstorageClient( com.oracle.bmc.http.signing.RequestSigner requestSigner = requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider); this.client = restClientFactory.create(requestSigner, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("Blockstorage-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); this.waiters = new BlockstorageWaiters(executorService, this); } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index a223e9a812e..41baea1df59 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -39,7 +39,7 @@ public interface Compute extends AutoCloseable { /** * Creates a secondary VNIC and attaches it to the specified instance. * For more information about secondary VNICs, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -112,6 +112,15 @@ public interface Compute extends AutoCloseable { */ CreateImageResponse createImage(CreateImageRequest request); + /** + * Create a console connection for an instance. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CreateInstanceConsoleConnectionResponse createInstanceConsoleConnection( + CreateInstanceConsoleConnectionRequest request); + /** * Deletes the specified console history metadata and the console history data. * @param request The request object containing the details to send @@ -128,6 +137,15 @@ public interface Compute extends AutoCloseable { */ DeleteImageResponse deleteImage(DeleteImageRequest request); + /** + * Delete the console connection for an instance + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection( + DeleteInstanceConsoleConnectionRequest request); + /** * Detaches and deletes the specified secondary VNIC. * This operation cannot be used on the instance's primary VNIC. @@ -143,7 +161,7 @@ public interface Compute extends AutoCloseable { /** * Detaches a storage volume from an instance. You must specify the OCID of the volume attachment. *

- * This is an asynchronous operation; the attachment's `lifecycleState` will change to DETACHING temporarily + * This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily * until the attachment is completely removed. * * @param request The request object containing the details to send @@ -209,6 +227,15 @@ GetConsoleHistoryContentResponse getConsoleHistoryContent( */ GetInstanceResponse getInstance(GetInstanceRequest request); + /** + * Get the details of an instance console connection + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetInstanceConsoleConnectionResponse getInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request); + /** * Gets the information for the specified VNIC attachment. * @@ -290,7 +317,7 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential * {@link #getVnic(GetVnicRequest) getVnic} with the VNIC ID. *

* You can later add secondary VNICs to an instance. For more information, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -318,6 +345,15 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential */ ListImagesResponse listImages(ListImagesRequest request); + /** + * Lists the console connections for the specified compartment or instance that have not been deleted. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListInstanceConsoleConnectionsResponse listInstanceConsoleConnections( + ListInstanceConsoleConnectionsRequest request); + /** * Lists the instances in the specified compartment and the specified Availability Domain. * You can filter the results by specifying an instance name (the list will include all the identically-named @@ -366,7 +402,7 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential * Terminates the specified instance. Any attached VNICs and volumes are automatically detached * when the instance terminates. *

- * This is an asynchronous operation; the instance's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily * until the instance is completely removed. * * @param request The request object containing the details to send diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index 125bc68d052..c542cbb11eb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -39,7 +39,7 @@ public interface ComputeAsync extends AutoCloseable { /** * Creates a secondary VNIC and attaches it to the specified instance. * For more information about secondary VNICs, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * * * @param request The request object containing the details to send @@ -139,6 +139,24 @@ java.util.concurrent.Future createImage( CreateImageRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Create a console connection for an instance. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + createInstanceConsoleConnection( + CreateInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateInstanceConsoleConnectionRequest, + CreateInstanceConsoleConnectionResponse> + handler); + /** * Deletes the specified console history metadata and the console history data. * @@ -169,6 +187,24 @@ java.util.concurrent.Future deleteImage( DeleteImageRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Delete the console connection for an instance + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + deleteInstanceConsoleConnection( + DeleteInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteInstanceConsoleConnectionRequest, + DeleteInstanceConsoleConnectionResponse> + handler); + /** * Detaches and deletes the specified secondary VNIC. * This operation cannot be used on the instance's primary VNIC. @@ -190,7 +226,7 @@ java.util.concurrent.Future detachVnic( /** * Detaches a storage volume from an instance. You must specify the OCID of the volume attachment. *

- * This is an asynchronous operation; the attachment's `lifecycleState` will change to DETACHING temporarily + * This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily * until the attachment is completely removed. * * @@ -296,6 +332,23 @@ java.util.concurrent.Future getInstance( GetInstanceRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Get the details of an instance console connection + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetInstanceConsoleConnectionRequest, + GetInstanceConsoleConnectionResponse> + handler); + /** * Gets the information for the specified VNIC attachment. * @@ -409,7 +462,7 @@ java.util.concurrent.Future instanceAction( * {@link #getVnic(GetVnicRequest, Consumer, Consumer) getVnic} with the VNIC ID. *

* You can later add secondary VNICs to an instance. For more information, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * * * @param request The request object containing the details to send @@ -458,6 +511,24 @@ java.util.concurrent.Future listImages( ListImagesRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Lists the console connections for the specified compartment or instance that have not been deleted. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listInstanceConsoleConnections( + ListInstanceConsoleConnectionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInstanceConsoleConnectionsRequest, + ListInstanceConsoleConnectionsResponse> + handler); + /** * Lists the instances in the specified compartment and the specified Availability Domain. * You can filter the results by specifying an instance name (the list will include all the identically-named @@ -535,7 +606,7 @@ java.util.concurrent.Future listVolumeAttachments * Terminates the specified instance. Any attached VNICs and volumes are automatically detached * when the instance terminates. *

- * This is an asynchronous operation; the instance's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily * until the instance is completely removed. * * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java index bde71d919b8..c09557b2132 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java @@ -205,6 +205,37 @@ public java.util.concurrent.Future createImage( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future + createInstanceConsoleConnection( + CreateInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateInstanceConsoleConnectionRequest, + CreateInstanceConsoleConnectionResponse> + handler) { + LOG.trace("Called async createInstanceConsoleConnection"); + request = CreateInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + CreateInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateInstanceConsoleConnectionResponse> + transformer = CreateInstanceConsoleConnectionConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + request.getCreateInstanceConsoleConnectionDetails(), + request, + onSuccess, + onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future deleteConsoleHistory( DeleteConsoleHistoryRequest request, @@ -250,6 +281,32 @@ public java.util.concurrent.Future deleteImage( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future + deleteInstanceConsoleConnection( + DeleteInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteInstanceConsoleConnectionRequest, + DeleteInstanceConsoleConnectionResponse> + handler) { + LOG.trace("Called async deleteInstanceConsoleConnection"); + request = DeleteInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + DeleteInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteInstanceConsoleConnectionResponse> + transformer = DeleteInstanceConsoleConnectionConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.delete(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future detachVnic( DetachVnicRequest request, @@ -402,6 +459,32 @@ public java.util.concurrent.Future getInstance( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future + getInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetInstanceConsoleConnectionRequest, + GetInstanceConsoleConnectionResponse> + handler) { + LOG.trace("Called async getInstanceConsoleConnection"); + request = GetInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetInstanceConsoleConnectionResponse> + transformer = GetInstanceConsoleConnectionConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getVnicAttachment( GetVnicAttachmentRequest request, @@ -561,6 +644,32 @@ public java.util.concurrent.Future listImages( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future + listInstanceConsoleConnections( + ListInstanceConsoleConnectionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListInstanceConsoleConnectionsRequest, + ListInstanceConsoleConnectionsResponse> + handler) { + LOG.trace("Called async listInstanceConsoleConnections"); + request = ListInstanceConsoleConnectionsConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListInstanceConsoleConnectionsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListInstanceConsoleConnectionsResponse> + transformer = ListInstanceConsoleConnectionsConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future listInstances( ListInstancesRequest request, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java index b0fe31eb667..62f9ae4ae2f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java @@ -84,6 +84,19 @@ public ComputeClient( com.oracle.bmc.http.signing.RequestSigner requestSigner = requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider); this.client = restClientFactory.create(requestSigner, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("Compute-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); this.waiters = new ComputeWaiters(executorService, this); } @@ -179,6 +192,22 @@ public CreateImageResponse createImage(CreateImageRequest request) { return transformer.apply(response); } + @Override + public CreateInstanceConsoleConnectionResponse createInstanceConsoleConnection( + CreateInstanceConsoleConnectionRequest request) { + LOG.trace("Called createInstanceConsoleConnection"); + request = CreateInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + CreateInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateInstanceConsoleConnectionResponse> + transformer = CreateInstanceConsoleConnectionConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateInstanceConsoleConnectionDetails(), request); + return transformer.apply(response); + } + @Override public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryRequest request) { LOG.trace("Called deleteConsoleHistory"); @@ -205,6 +234,21 @@ public DeleteImageResponse deleteImage(DeleteImageRequest request) { return transformer.apply(response); } + @Override + public DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection( + DeleteInstanceConsoleConnectionRequest request) { + LOG.trace("Called deleteInstanceConsoleConnection"); + request = DeleteInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + DeleteInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteInstanceConsoleConnectionResponse> + transformer = DeleteInstanceConsoleConnectionConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } + @Override public DetachVnicResponse detachVnic(DetachVnicRequest request) { LOG.trace("Called detachVnic"); @@ -296,6 +340,21 @@ public GetInstanceResponse getInstance(GetInstanceRequest request) { return transformer.apply(response); } + @Override + public GetInstanceConsoleConnectionResponse getInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request) { + LOG.trace("Called getInstanceConsoleConnection"); + request = GetInstanceConsoleConnectionConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetInstanceConsoleConnectionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetInstanceConsoleConnectionResponse> + transformer = GetInstanceConsoleConnectionConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetVnicAttachmentResponse getVnicAttachment(GetVnicAttachmentRequest request) { LOG.trace("Called getVnicAttachment"); @@ -389,6 +448,21 @@ public ListImagesResponse listImages(ListImagesRequest request) { return transformer.apply(response); } + @Override + public ListInstanceConsoleConnectionsResponse listInstanceConsoleConnections( + ListInstanceConsoleConnectionsRequest request) { + LOG.trace("Called listInstanceConsoleConnections"); + request = ListInstanceConsoleConnectionsConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListInstanceConsoleConnectionsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListInstanceConsoleConnectionsResponse> + transformer = ListInstanceConsoleConnectionsConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public ListInstancesResponse listInstances(ListInstancesRequest request) { LOG.trace("Called listInstances"); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java index 0a37639c29d..00e8f2a0713 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeWaiters.java @@ -201,6 +201,80 @@ public boolean apply(GetInstanceResponse response) { request); } + /** + * Creates a new {@link Waiter} using default configuration. + * + * @param request The request to send. + * @param targetState The desired state to wait for. + * @return A new Waiter instance. + */ + public com.oracle.bmc.waiter.Waiter< + GetInstanceConsoleConnectionRequest, GetInstanceConsoleConnectionResponse> + forInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request, + com.oracle.bmc.core.model.InstanceConsoleConnection.LifecycleState + targetState) { + return forInstanceConsoleConnection( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request The request to send. + * @param targetState The desired state to wait for. + * @param terminationStrategy The {@link TerminationStrategy} to use. + * @param delayStrategy The {@link DelayStrategy} to use. + * @return A new Waiter instance. + */ + public com.oracle.bmc.waiter.Waiter< + GetInstanceConsoleConnectionRequest, GetInstanceConsoleConnectionResponse> + forInstanceConsoleConnection( + GetInstanceConsoleConnectionRequest request, + com.oracle.bmc.core.model.InstanceConsoleConnection.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forInstanceConsoleConnection( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + // Helper method to create a new Waiter for InstanceConsoleConnection. + private com.oracle.bmc.waiter.Waiter< + GetInstanceConsoleConnectionRequest, GetInstanceConsoleConnectionResponse> + forInstanceConsoleConnection( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetInstanceConsoleConnectionRequest request, + final com.oracle.bmc.core.model.InstanceConsoleConnection.LifecycleState + targetState) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetInstanceConsoleConnectionRequest, + GetInstanceConsoleConnectionResponse>() { + @Override + public GetInstanceConsoleConnectionResponse apply( + GetInstanceConsoleConnectionRequest request) { + return client.getInstanceConsoleConnection(request); + } + }, + new com.google.common.base.Predicate< + GetInstanceConsoleConnectionResponse>() { + @Override + public boolean apply(GetInstanceConsoleConnectionResponse response) { + return response.getInstanceConsoleConnection().getLifecycleState() + == targetState; + } + }, + targetState + == com.oracle.bmc.core.model.InstanceConsoleConnection + .LifecycleState.Deleted), + request); + } + /** * Creates a new {@link Waiter} using default configuration. * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java index faaa1bca9fb..2b81baec2cb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java @@ -38,7 +38,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For - * more information, see [Managing IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). + * more information, see [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want * the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec @@ -47,8 +47,8 @@ public interface VirtualNetwork extends AutoCloseable { * compartments and access control, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). * For information about OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *

- * You must provide the public IP address of your on-premise router. See - * [Configuring Your On-Premise Router](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). + * You must provide the public IP address of your on-premises router. See + * [Configuring Your On-Premises Router for an IPSec VPN](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). *

* You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to * be unique, and you can change it. Avoid entering confidential information. @@ -131,7 +131,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new Dynamic Routing Gateway (DRG) in the specified compartment. For more information, - * see [Managing Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). + * see [Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want * the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN, @@ -153,7 +153,7 @@ public interface VirtualNetwork extends AutoCloseable { * Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, * and vice versa. The response includes a `DrgAttachment` object with its own OCID. For more * information about DRGs, see - * [Managing Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). + * [Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). *

* You may optionally specify a *display name* for the attachment, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. @@ -170,7 +170,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new IPSec connection between the specified DRG and CPE. For more information, see - * [Managing IPSec Connections](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). + * [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). *

* In the request, you must include at least one static route to the CPE object (you're allowed a maximum * of 10). For example: 10.0.8.0/16. @@ -186,12 +186,12 @@ public interface VirtualNetwork extends AutoCloseable { * You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. *

- * After creating the IPSec connection, you need to configure your on-premise router + * After creating the IPSec connection, you need to configure your on-premises router * with tunnel-specific information returned by * {@link #getIPSecConnectionDeviceConfig(GetIPSecConnectionDeviceConfigRequest) getIPSecConnectionDeviceConfig}. * For each tunnel, that operation gives you the IP address of Oracle's VPN headend and the shared secret - * (i.e., the pre-shared key). For more information, see - * [Configuring Your On-Premise Router](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). + * (that is, the pre-shared key). For more information, see + * [Configuring Your On-Premises Router for an IPSec VPN](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). *

* To get the status of the tunnels (whether they're up or down), use * {@link #getIPSecConnectionDeviceStatus(GetIPSecConnectionDeviceStatusRequest) getIPSecConnectionDeviceStatus}. @@ -204,7 +204,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new Internet Gateway for the specified VCN. For more information, see - * [Managing Internet Gateways](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). + * [Connectivity to the Internet](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want the Internet * Gateway to reside. Notice that the Internet Gateway doesn't have to be in the same compartment as the VCN or @@ -217,7 +217,7 @@ public interface VirtualNetwork extends AutoCloseable { * does not have to be unique, and you can change it. Avoid entering confidential information. *

* For traffic to flow between a subnet and an Internet Gateway, you must create a route rule accordingly in - * the subnet's route table (e.g., 0.0.0.0/0 > Internet Gateway). See + * the subnet's route table (for example, 0.0.0.0/0 > Internet Gateway). See * {@link #updateRouteTable(UpdateRouteTableRequest) updateRouteTable}. *

* You must specify whether the Internet Gateway is enabled when you create it. If it's disabled, that means no @@ -234,7 +234,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a secondary private IP for the specified VNIC. * For more information about secondary private IPs, see - * [Managing IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + * [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -246,7 +246,7 @@ public interface VirtualNetwork extends AutoCloseable { * Creates a new route table for the specified VCN. In the request you must also include at least one route * rule for the new route table. For information on the number of rules you can have in a route table, see * [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). For general information about route - * tables in your VCN, see [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * tables in your VCN, see [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want the route * table to reside. Notice that the route table doesn't have to be in the same compartment as the VCN, subnets, @@ -289,7 +289,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, * so it's important to think about the size of subnets you need before creating them. - * For more information, see [Managing Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingsubnets.htm). + * For more information, see [VCNs and Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). * For information on the number of subnets you can have in a VCN, see * [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). *

@@ -302,7 +302,7 @@ public interface VirtualNetwork extends AutoCloseable { *

* You may optionally associate a route table with the subnet. If you don't, the subnet will use the * VCN's default route table. For more information about route tables, see - * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). *

* You may optionally associate a security list with the subnet. If you don't, the subnet will use the * VCN's default security list. For more information about security lists, see @@ -310,7 +310,7 @@ public interface VirtualNetwork extends AutoCloseable { *

* You may optionally associate a set of DHCP options with the subnet. If you don't, the subnet will use the * VCN's default set. For more information about DHCP options, see - * [Managing DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). + * [DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). *

* You may optionally specify a *display name* for the subnet, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. @@ -327,12 +327,12 @@ public interface VirtualNetwork extends AutoCloseable { /** * Creates a new Virtual Cloud Network (VCN). For more information, see - * [Managing Virtual Cloud Networks (VCNs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). + * [VCNs and Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). *

* For the VCN you must specify a single, contiguous IPv4 CIDR block. Oracle recommends using one of the * private IP address ranges specified in [RFC 1918](https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, * 172.16/12, and 192.168/16). Example: 172.16.0.0/16. The CIDR block can range from /16 to /30, and it - * must not overlap with your on-premise network. You can't change the size of the VCN after creation. + * must not overlap with your on-premises network. You can't change the size of the VCN after creation. *

* For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to * reside. Consult an Oracle Bare Metal Cloud Services administrator in your organization if you're not sure which @@ -350,7 +350,7 @@ public interface VirtualNetwork extends AutoCloseable { *

* The VCN automatically comes with a default route table, default security list, and default set of DHCP options. * The OCID for each is returned in the response. You can't delete these default objects, but you can change their - * contents (i.e., route rules, etc.) + * contents (that is, change the route rules, security list rules, and so on). *

* The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up an IPSec VPN * or FastConnect. For more information, see @@ -383,7 +383,7 @@ public interface VirtualNetwork extends AutoCloseable { * the traffic to flow through. Make sure you attach the DRG to your * VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise * traffic will not flow. For more information, see - * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -393,7 +393,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous - * operation; the CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely + * operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely * removed. * * @param request The request object containing the details to send @@ -427,7 +427,7 @@ public interface VirtualNetwork extends AutoCloseable { * Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a * VCN's default set of DHCP options. *

- * This is an asynchronous operation; the state of the set of options will switch to TERMINATING temporarily + * This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily * until the set is completely removed. * * @param request The request object containing the details to send @@ -439,7 +439,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise * network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous - * operation; the DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely + * operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely * removed. * * @param request The request object containing the details to send @@ -450,7 +450,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Detaches a DRG from a VCN by deleting the corresponding `DrgAttachment`. This is an asynchronous - * operation; the attachment's `lifecycleState` will change to DETACHING temporarily until the attachment + * operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment * is completely removed. * * @param request The request object containing the details to send @@ -461,12 +461,12 @@ public interface VirtualNetwork extends AutoCloseable { /** * Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and - * on-premise network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. + * on-premises network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. * If you were to delete all the components and then later need to create an IPSec VPN again, you would - * need to configure your on-premise router again with the new information returned from + * need to configure your on-premises router again with the new information returned from * {@link #createIPSecConnection(CreateIPSecConnectionRequest) createIPSecConnection}. *

- * This is an asynchronous operation; the connection's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily * until the connection is completely removed. * * @param request The request object containing the details to send @@ -479,7 +479,7 @@ public interface VirtualNetwork extends AutoCloseable { * Deletes the specified Internet Gateway. The Internet Gateway does not have to be disabled, but * there must not be a route table that lists it as a target. *

- * This is an asynchronous operation; the gateway's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily * until the gateway is completely removed. * * @param request The request object containing the details to send @@ -506,7 +506,7 @@ public interface VirtualNetwork extends AutoCloseable { * Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a * VCN's default route table. *

- * This is an asynchronous operation; the route table's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily * until the route table is completely removed. * * @param request The request object containing the details to send @@ -519,7 +519,7 @@ public interface VirtualNetwork extends AutoCloseable { * Deletes the specified security list, but only if it's not associated with a subnet. You can't delete * a VCN's default security list. *

- * This is an asynchronous operation; the security list's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily * until the security list is completely removed. * * @param request The request object containing the details to send @@ -530,7 +530,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous - * operation; the subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any + * operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any * instances in the subnet, the state will instead change back to AVAILABLE. * * @param request The request object containing the details to send @@ -541,7 +541,7 @@ public interface VirtualNetwork extends AutoCloseable { /** * Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous - * operation; the VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely + * operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely * removed. * * @param request The request object containing the details to send @@ -631,7 +631,7 @@ GetCrossConnectLetterOfAuthorityResponse getCrossConnectLetterOfAuthority( /** * Gets the specified IPSec connection's basic information, including the static routes for the - * on-premise router. If you want the status of the connection (whether it's up or down), use + * on-premises router. If you want the status of the connection (whether it's up or down), use * {@link #getIPSecConnectionDeviceStatus(GetIPSecConnectionDeviceStatusRequest) getIPSecConnectionDeviceStatus}. * * @param request The request object containing the details to send @@ -774,7 +774,7 @@ ListCrossConnectLocationsResponse listCrossConnectLocations( /** * Lists the available port speeds for cross-connects. You need this information - * so you can specify your desired port speed (i.e., shape) when you create a + * so you can specify your desired port speed (that is, shape) when you create a * cross-connect. * * @param request The request object containing the details to send @@ -910,7 +910,7 @@ ListFastConnectProviderServicesResponse listFastConnectProviderServices( /** * Lists the available bandwidth levels for virtual circuits. You need this - * information so you can specify your desired bandwidth level (i.e., shape) + * information so you can specify your desired bandwidth level (that is, shape) * when you create a virtual circuit. *

* For the compartment ID, provide the OCID of your tenancy (the root compartment). @@ -1088,7 +1088,7 @@ ListVirtualCircuitBandwidthShapesResponse listVirtualCircuitBandwidthShapes( *

**Important:** If the virtual circuit is working and in the * PROVISIONED state, updating any of the network-related properties - * (such as the DRG being used, the BGP ASN, etc.) will cause the virtual + * (such as the DRG being used, the BGP ASN, and so on) will cause the virtual * circuit's state to switch to PROVISIONING and the related BGP * session to go down. After Oracle re-provisions the virtual circuit, * its state will return to PROVISIONED. Make sure you confirm that diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java index 73bf33228cd..579bfcb4f3d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java @@ -38,7 +38,7 @@ public interface VirtualNetworkAsync extends AutoCloseable { /** * Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For - * more information, see [Managing IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). + * more information, see [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want * the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec @@ -47,8 +47,8 @@ public interface VirtualNetworkAsync extends AutoCloseable { * compartments and access control, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). * For information about OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). *

- * You must provide the public IP address of your on-premise router. See - * [Configuring Your On-Premise Router](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). + * You must provide the public IP address of your on-premises router. See + * [Configuring Your On-Premises Router for an IPSec VPN](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). *

* You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to * be unique, and you can change it. Avoid entering confidential information. @@ -161,7 +161,7 @@ java.util.concurrent.Future createDhcpOptions( /** * Creates a new Dynamic Routing Gateway (DRG) in the specified compartment. For more information, - * see [Managing Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). + * see [Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want * the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN, @@ -189,7 +189,7 @@ java.util.concurrent.Future createDrg( * Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, * and vice versa. The response includes a `DrgAttachment` object with its own OCID. For more * information about DRGs, see - * [Managing Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). + * [Dynamic Routing Gateways (DRGs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). *

* You may optionally specify a *display name* for the attachment, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. @@ -214,7 +214,7 @@ java.util.concurrent.Future createDrgAttachment( /** * Creates a new IPSec connection between the specified DRG and CPE. For more information, see - * [Managing IPSec Connections](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). + * [IPSec VPNs](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). *

* In the request, you must include at least one static route to the CPE object (you're allowed a maximum * of 10). For example: 10.0.8.0/16. @@ -230,12 +230,12 @@ java.util.concurrent.Future createDrgAttachment( * You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. *

- * After creating the IPSec connection, you need to configure your on-premise router + * After creating the IPSec connection, you need to configure your on-premises router * with tunnel-specific information returned by * {@link #getIPSecConnectionDeviceConfig(GetIPSecConnectionDeviceConfigRequest, Consumer, Consumer) getIPSecConnectionDeviceConfig}. * For each tunnel, that operation gives you the IP address of Oracle's VPN headend and the shared secret - * (i.e., the pre-shared key). For more information, see - * [Configuring Your On-Premise Router](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). + * (that is, the pre-shared key). For more information, see + * [Configuring Your On-Premises Router for an IPSec VPN](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). *

* To get the status of the tunnels (whether they're up or down), use * {@link #getIPSecConnectionDeviceStatus(GetIPSecConnectionDeviceStatusRequest, Consumer, Consumer) getIPSecConnectionDeviceStatus}. @@ -256,7 +256,7 @@ java.util.concurrent.Future createIPSecConnection /** * Creates a new Internet Gateway for the specified VCN. For more information, see - * [Managing Internet Gateways](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). + * [Connectivity to the Internet](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want the Internet * Gateway to reside. Notice that the Internet Gateway doesn't have to be in the same compartment as the VCN or @@ -269,7 +269,7 @@ java.util.concurrent.Future createIPSecConnection * does not have to be unique, and you can change it. Avoid entering confidential information. *

* For traffic to flow between a subnet and an Internet Gateway, you must create a route rule accordingly in - * the subnet's route table (e.g., 0.0.0.0/0 > Internet Gateway). See + * the subnet's route table (for example, 0.0.0.0/0 > Internet Gateway). See * {@link #updateRouteTable(UpdateRouteTableRequest, Consumer, Consumer) updateRouteTable}. *

* You must specify whether the Internet Gateway is enabled when you create it. If it's disabled, that means no @@ -294,7 +294,7 @@ java.util.concurrent.Future createInternetGateway /** * Creates a secondary private IP for the specified VNIC. * For more information about secondary private IPs, see - * [Managing IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + * [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). * * * @param request The request object containing the details to send @@ -313,7 +313,7 @@ java.util.concurrent.Future createPrivateIp( * Creates a new route table for the specified VCN. In the request you must also include at least one route * rule for the new route table. For information on the number of rules you can have in a route table, see * [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). For general information about route - * tables in your VCN, see [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * tables in your VCN, see [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). *

* For the purposes of access control, you must provide the OCID of the compartment where you want the route * table to reside. Notice that the route table doesn't have to be in the same compartment as the VCN, subnets, @@ -371,7 +371,7 @@ java.util.concurrent.Future createSecurityList( /** * Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, * so it's important to think about the size of subnets you need before creating them. - * For more information, see [Managing Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingsubnets.htm). + * For more information, see [VCNs and Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). * For information on the number of subnets you can have in a VCN, see * [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). *

@@ -384,7 +384,7 @@ java.util.concurrent.Future createSecurityList( *

* You may optionally associate a route table with the subnet. If you don't, the subnet will use the * VCN's default route table. For more information about route tables, see - * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). *

* You may optionally associate a security list with the subnet. If you don't, the subnet will use the * VCN's default security list. For more information about security lists, see @@ -392,7 +392,7 @@ java.util.concurrent.Future createSecurityList( *

* You may optionally associate a set of DHCP options with the subnet. If you don't, the subnet will use the * VCN's default set. For more information about DHCP options, see - * [Managing DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). + * [DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). *

* You may optionally specify a *display name* for the subnet, otherwise a default is provided. * It does not have to be unique, and you can change it. Avoid entering confidential information. @@ -416,12 +416,12 @@ java.util.concurrent.Future createSubnet( /** * Creates a new Virtual Cloud Network (VCN). For more information, see - * [Managing Virtual Cloud Networks (VCNs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). + * [VCNs and Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). *

* For the VCN you must specify a single, contiguous IPv4 CIDR block. Oracle recommends using one of the * private IP address ranges specified in [RFC 1918](https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, * 172.16/12, and 192.168/16). Example: 172.16.0.0/16. The CIDR block can range from /16 to /30, and it - * must not overlap with your on-premise network. You can't change the size of the VCN after creation. + * must not overlap with your on-premises network. You can't change the size of the VCN after creation. *

* For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to * reside. Consult an Oracle Bare Metal Cloud Services administrator in your organization if you're not sure which @@ -439,7 +439,7 @@ java.util.concurrent.Future createSubnet( *

* The VCN automatically comes with a default route table, default security list, and default set of DHCP options. * The OCID for each is returned in the response. You can't delete these default objects, but you can change their - * contents (i.e., route rules, etc.) + * contents (that is, change the route rules, security list rules, and so on). *

* The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up an IPSec VPN * or FastConnect. For more information, see @@ -478,7 +478,7 @@ java.util.concurrent.Future createVcn( * the traffic to flow through. Make sure you attach the DRG to your * VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise * traffic will not flow. For more information, see - * [Managing Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + * [Route Tables](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). * * * @param request The request object containing the details to send @@ -496,7 +496,7 @@ java.util.concurrent.Future createVirtualCircuit( /** * Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous - * operation; the CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely + * operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely * removed. * * @@ -552,7 +552,7 @@ java.util.concurrent.Future deleteCrossConnectG * Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a * VCN's default set of DHCP options. *

- * This is an asynchronous operation; the state of the set of options will switch to TERMINATING temporarily + * This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily * until the set is completely removed. * * @@ -572,7 +572,7 @@ java.util.concurrent.Future deleteDhcpOptions( /** * Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise * network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous - * operation; the DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely + * operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely * removed. * * @@ -589,7 +589,7 @@ java.util.concurrent.Future deleteDrg( /** * Detaches a DRG from a VCN by deleting the corresponding `DrgAttachment`. This is an asynchronous - * operation; the attachment's `lifecycleState` will change to DETACHING temporarily until the attachment + * operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment * is completely removed. * * @@ -608,12 +608,12 @@ java.util.concurrent.Future deleteDrgAttachment( /** * Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and - * on-premise network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. + * on-premises network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. * If you were to delete all the components and then later need to create an IPSec VPN again, you would - * need to configure your on-premise router again with the new information returned from + * need to configure your on-premises router again with the new information returned from * {@link #createIPSecConnection(CreateIPSecConnectionRequest, Consumer, Consumer) createIPSecConnection}. *

- * This is an asynchronous operation; the connection's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily * until the connection is completely removed. * * @@ -634,7 +634,7 @@ java.util.concurrent.Future deleteIPSecConnection * Deletes the specified Internet Gateway. The Internet Gateway does not have to be disabled, but * there must not be a route table that lists it as a target. *

- * This is an asynchronous operation; the gateway's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily * until the gateway is completely removed. * * @@ -676,7 +676,7 @@ java.util.concurrent.Future deletePrivateIp( * Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a * VCN's default route table. *

- * This is an asynchronous operation; the route table's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily * until the route table is completely removed. * * @@ -696,7 +696,7 @@ java.util.concurrent.Future deleteRouteTable( * Deletes the specified security list, but only if it's not associated with a subnet. You can't delete * a VCN's default security list. *

- * This is an asynchronous operation; the security list's `lifecycleState` will change to TERMINATING temporarily + * This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily * until the security list is completely removed. * * @@ -715,7 +715,7 @@ java.util.concurrent.Future deleteSecurityList( /** * Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous - * operation; the subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any + * operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any * instances in the subnet, the state will instead change back to AVAILABLE. * * @@ -733,7 +733,7 @@ java.util.concurrent.Future deleteSubnet( /** * Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous - * operation; the VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely + * operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely * removed. * * @@ -895,7 +895,7 @@ java.util.concurrent.Future getDrgAttachment( /** * Gets the specified IPSec connection's basic information, including the static routes for the - * on-premise router. If you want the status of the connection (whether it's up or down), use + * on-premises router. If you want the status of the connection (whether it's up or down), use * {@link #getIPSecConnectionDeviceStatus(GetIPSecConnectionDeviceStatusRequest, Consumer, Consumer) getIPSecConnectionDeviceStatus}. * * @@ -1148,7 +1148,7 @@ java.util.concurrent.Future listCrossConnects( /** * Lists the available port speeds for cross-connects. You need this information - * so you can specify your desired port speed (i.e., shape) when you create a + * so you can specify your desired port speed (that is, shape) when you create a * cross-connect. * * @@ -1373,7 +1373,7 @@ java.util.concurrent.Future listVcns( /** * Lists the available bandwidth levels for virtual circuits. You need this - * information so you can specify your desired bandwidth level (i.e., shape) + * information so you can specify your desired bandwidth level (that is, shape) * when you create a virtual circuit. *

* For the compartment ID, provide the OCID of your tenancy (the root compartment). @@ -1663,7 +1663,7 @@ java.util.concurrent.Future updateVcn( *

**Important:** If the virtual circuit is working and in the * PROVISIONED state, updating any of the network-related properties - * (such as the DRG being used, the BGP ASN, etc.) will cause the virtual + * (such as the DRG being used, the BGP ASN, and so on) will cause the virtual * circuit's state to switch to PROVISIONING and the related BGP * session to go down. After Oracle re-provisions the virtual circuit, * its state will return to PROVISIONED. Make sure you confirm that diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java index 9a69b954cc1..2fc00a6a70d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java @@ -84,6 +84,19 @@ public VirtualNetworkClient( com.oracle.bmc.http.signing.RequestSigner requestSigner = requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider); this.client = restClientFactory.create(requestSigner, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("VirtualNetwork-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); this.waiters = new VirtualNetworkWaiters(executorService, this); } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateInstanceConsoleConnectionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateInstanceConsoleConnectionConverter.java new file mode 100644 index 00000000000..34da12c2147 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateInstanceConsoleConnectionConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateInstanceConsoleConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateInstanceConsoleConnectionRequest interceptRequest( + CreateInstanceConsoleConnectionRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateInstanceConsoleConnectionRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCreateInstanceConsoleConnectionDetails() == null) { + throw new NullPointerException("createInstanceConsoleConnectionDetails is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget().path("/20160918").path("instanceConsoleConnections"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateInstanceConsoleConnectionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateInstanceConsoleConnectionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + CreateInstanceConsoleConnectionResponse>() { + @Override + public CreateInstanceConsoleConnectionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateInstanceConsoleConnectionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + InstanceConsoleConnection>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + InstanceConsoleConnection.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateInstanceConsoleConnectionResponse.Builder builder = + CreateInstanceConsoleConnectionResponse.builder(); + + builder.instanceConsoleConnection(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + CreateInstanceConsoleConnectionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteInstanceConsoleConnectionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteInstanceConsoleConnectionConverter.java new file mode 100644 index 00000000000..e7213a11711 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteInstanceConsoleConnectionConverter.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteInstanceConsoleConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteInstanceConsoleConnectionRequest interceptRequest( + DeleteInstanceConsoleConnectionRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteInstanceConsoleConnectionRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getInstanceConsoleConnectionId() == null) { + throw new NullPointerException("instanceConsoleConnectionId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("instanceConsoleConnections") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceConsoleConnectionId())); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteInstanceConsoleConnectionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteInstanceConsoleConnectionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + DeleteInstanceConsoleConnectionResponse>() { + @Override + public DeleteInstanceConsoleConnectionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteInstanceConsoleConnectionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteInstanceConsoleConnectionResponse.Builder builder = + DeleteInstanceConsoleConnectionResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + DeleteInstanceConsoleConnectionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceConsoleConnectionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceConsoleConnectionConverter.java new file mode 100644 index 00000000000..e60c50593ba --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetInstanceConsoleConnectionConverter.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetInstanceConsoleConnectionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetInstanceConsoleConnectionRequest interceptRequest( + GetInstanceConsoleConnectionRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetInstanceConsoleConnectionRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getInstanceConsoleConnectionId() == null) { + throw new NullPointerException("instanceConsoleConnectionId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("instanceConsoleConnections") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getInstanceConsoleConnectionId())); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetInstanceConsoleConnectionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetInstanceConsoleConnectionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetInstanceConsoleConnectionResponse>() { + @Override + public GetInstanceConsoleConnectionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetInstanceConsoleConnectionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + InstanceConsoleConnection>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + InstanceConsoleConnection.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetInstanceConsoleConnectionResponse.Builder builder = + GetInstanceConsoleConnectionResponse.builder(); + + builder.instanceConsoleConnection(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetInstanceConsoleConnectionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceConsoleConnectionsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceConsoleConnectionsConverter.java new file mode 100644 index 00000000000..28fda34d147 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListInstanceConsoleConnectionsConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListInstanceConsoleConnectionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListInstanceConsoleConnectionsRequest interceptRequest( + ListInstanceConsoleConnectionsRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListInstanceConsoleConnectionsRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCompartmentId() == null) { + throw new NullPointerException("compartmentId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget().path("/20160918").path("instanceConsoleConnections"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getInstanceId() != null) { + target = + target.queryParam( + "instanceId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getInstanceId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListInstanceConsoleConnectionsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListInstanceConsoleConnectionsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ListInstanceConsoleConnectionsResponse>() { + @Override + public ListInstanceConsoleConnectionsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListInstanceConsoleConnectionsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + InstanceConsoleConnection>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListInstanceConsoleConnectionsResponse.Builder builder = + ListInstanceConsoleConnectionsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListInstanceConsoleConnectionsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Cpe.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Cpe.java index 07aadd8b6a8..f95f016826c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Cpe.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Cpe.java @@ -4,9 +4,9 @@ package com.oracle.bmc.core.model; /** - * An object you create when setting up an IPSec VPN between your on-premise network + * An object you create when setting up an IPSec VPN between your on-premises network * and VCN. The `Cpe` is a virtual representation of your Customer-Premises Equipment, - * which is the actual router on-premise at your site at your end of the IPSec VPN connection. + * which is the actual router on-premises at your site at your end of the IPSec VPN connection. * For more information, * see [Overview of the Networking Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). *

@@ -87,7 +87,7 @@ public static Builder builder() { String id; /** - * The public IP address of the on-premise router. + * The public IP address of the on-premises router. **/ @com.fasterxml.jackson.annotation.JsonProperty("ipAddress") @javax.validation.Valid diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateCpeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateCpeDetails.java index 0b9177eceab..1615cfe2671 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateCpeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateCpeDetails.java @@ -56,7 +56,7 @@ public static Builder builder() { String displayName; /** - * The public IP address of the on-premise router. + * The public IP address of the on-premises router. *

* Example: `143.19.23.16` * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConsoleConnectionDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConsoleConnectionDetails.java new file mode 100644 index 00000000000..b1d10ededab --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConsoleConnectionDetails.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Properties used to create an instance console connection. The instance console connection is created + * in the same compartment as the instance. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateInstanceConsoleConnectionDetails.Builder.class +) +public class CreateInstanceConsoleConnectionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + @com.fasterxml.jackson.annotation.JsonProperty("publicKey") + private String publicKey; + + public CreateInstanceConsoleConnectionDetails build() { + return new CreateInstanceConsoleConnectionDetails(instanceId, publicKey); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateInstanceConsoleConnectionDetails o) { + return instanceId(o.getInstanceId()).publicKey(o.getPublicKey()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The host instance OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + String instanceId; + + /** + * An ssh public key that will be used to authenticate the console connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publicKey") + String publicKey; +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateSubnetDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateSubnetDetails.java index 22c1ef1fcf9..ccf8709fc54 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateSubnetDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateSubnetDetails.java @@ -131,7 +131,7 @@ public static Builder builder() { /** * A DNS label for the subnet, used in conjunction with the VNIC's hostname and * VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC - * within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). + * within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). * Must be an alphanumeric string that begins with a letter and is unique within the VCN. * The value cannot be changed. *

@@ -156,7 +156,7 @@ public static Builder builder() { * otherwise during instance launch or VNIC creation (with the * `assignPublicIp` flag in {@link CreateVnicDetails}). * If `prohibitPublicIpOnVnic` is set to true, VNICs created in this - * subnet cannot have public IP addresses (i.e., it's a private + * subnet cannot have public IP addresses (that is, it's a private * subnet). *

* Example: `true` diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java index dce4a137012..7bc79ff1706 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java @@ -74,7 +74,7 @@ public static Builder builder() { /** * A DNS label for the VCN, used in conjunction with the VNIC's hostname and * subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC - * within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). + * within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). * Not required to be unique, but it's a best practice to set unique DNS labels * for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. * The value cannot be changed. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java index 6ee77a4bd76..ebdd9da90d0 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVirtualCircuitDetails.java @@ -81,7 +81,7 @@ public static Builder builder() { /** * The provisioned data rate of the connection. To get a list of the - * available bandwidth levels (i.e., shapes), see + * available bandwidth levels (that is, shapes), see * {@link #listVirtualCircuitBandwidthShapes(ListVirtualCircuitBandwidthShapesRequest) listVirtualCircuitBandwidthShapes}. *

* Example: `10 Gbps` diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java index ecc822d9f09..35ae313fa12 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java @@ -7,7 +7,7 @@ * Contains properties for a VNIC. You use this object when creating the * primary VNIC during instance launch or when creating a secondary VNIC. * For more information about VNICs, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") @@ -60,7 +60,7 @@ public static Builder builder() { /** * Whether the VNIC should be assigned a public IP address. Defaults to whether * the subnet is public or private. If not set and the VNIC is being created - * in a private subnet (i.e., where `prohibitPublicIpOnVnic` = true in the + * in a private subnet (that is, where `prohibitPublicIpOnVnic` = true in the * {@link Subnet}), then no public IP address is assigned. * If not set and the subnet is public (`prohibitPublicIpOnVnic` = false), then * a public IP address is assigned. If set to true and @@ -69,7 +69,7 @@ public static Builder builder() { **Note:** This public IP address is associated with the primary private IP * on the VNIC. Secondary private IPs cannot have public IP * addresses associated with them. For more information, see - * [Managing IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + * [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). *

* Example: `false` * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java index 34e409b480a..eadadbe580c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeDetails.java @@ -81,7 +81,7 @@ public static Builder builder() { String displayName; /** - * The size of the volume in MBs. + * The size of the volume in MBs. The value must be a multiple of 1024. **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInMBs") Long sizeInMBs; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java index 7e52a899619..584a544a14c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnect.java @@ -15,7 +15,7 @@ *

**Note:** If you're a provider who is setting up a physical connection to Oracle so customers * can use FastConnect over the connection, be aware that your connection is modeled the - * same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, etc.). + * same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, and so on). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java index 727f95fb6f0..929a33d3115 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectGroup.java @@ -12,7 +12,7 @@ *

**Note:** If you're a provider who is setting up a physical connection to Oracle so customers * can use FastConnect over the connection, be aware that your connection is modeled the - * same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, etc.). + * same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, and so on). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java index 2a78620d2bd..4ffc9796058 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java @@ -92,7 +92,7 @@ public static Builder builder() { /** * The OCID of the cross-connect or cross-connect group for this mapping. * Specified by the owner of the cross-connect or cross-connect group (the - * customer if the customer is colocated with Oracle; the provider if the + * customer if the customer is colocated with Oracle, or the provider if the * customer is connecting via provider). * **/ @@ -115,7 +115,7 @@ public static Builder builder() { String customerBgpPeeringIp; /** - * The IP address for Oracle's end of the BPG session. Must use a /30 or /31 + * The IP address for Oracle's end of the BGP session. Must use a /30 or /31 * subnet mask. If the session goes from Oracle to a customer's edge router, * the customer specifies this information. If the session goes from Oracle to * a provider's edge router, the provider specifies this. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOption.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOption.java index 22f8ac0da09..05981c385d3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOption.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOption.java @@ -8,7 +8,7 @@ * The two options available to use are {@link DhcpDnsOption} * and {@link DhcpSearchDomainOption}. For more * information, see [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm) - * and [Managing DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). + * and [DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java index 23dbadac384..ae6a27824ed 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpOptions.java @@ -14,7 +14,7 @@ * a search domain name to use for DNS queries. *

* For more information, see [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm) - * and [Managing DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). + * and [DHCP Options](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpSearchDomainOption.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpSearchDomainOption.java index a77cec8d85b..04c586f63cf 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpSearchDomainOption.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/DhcpSearchDomainOption.java @@ -58,7 +58,7 @@ public DhcpSearchDomainOption(java.util.List searchDomainNames) { * If you set {@link DhcpDnsOption} to `VcnLocalPlusInternet`, * and you assign a DNS label to the VCN during creation, the search domain name in the * VCN's default set of DHCP options is automatically set to the VCN domain - * (e.g., `vcn1.oraclevcn.com`). + * (for example, `vcn1.oraclevcn.com`). *

* If you don't want to use a search domain name, omit this option from the * set of DHCP options. Do not include this option with an empty list diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConsoleConnection.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConsoleConnection.java new file mode 100644 index 00000000000..bc49d90c547 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConsoleConnection.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = InstanceConsoleConnection.Builder.class +) +public class InstanceConsoleConnection { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + @com.fasterxml.jackson.annotation.JsonProperty("connectionString") + private String connectionString; + + @com.fasterxml.jackson.annotation.JsonProperty("fingerprint") + private String fingerprint; + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + private String instanceId; + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public InstanceConsoleConnection build() { + return new InstanceConsoleConnection( + compartmentId, connectionString, fingerprint, id, instanceId, lifecycleState); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(InstanceConsoleConnection o) { + return compartmentId(o.getCompartmentId()) + .connectionString(o.getConnectionString()) + .fingerprint(o.getFingerprint()) + .id(o.getId()) + .instanceId(o.getInstanceId()) + .lifecycleState(o.getLifecycleState()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the compartment to contain the ConsoleConnection + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + @javax.validation.constraints.Size(min = 1, max = 255) + String compartmentId; + + /** + * The ssh connection string to the instance console + **/ + @com.fasterxml.jackson.annotation.JsonProperty("connectionString") + String connectionString; + + /** + * The fingerprint of the ssh publicKey. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("fingerprint") + String fingerprint; + + /** + * The OCID of the instance console connection + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The host instance OCID + **/ + @com.fasterxml.jackson.annotation.JsonProperty("instanceId") + String instanceId; + /** + * The current state of the instance console connection. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Active("ACTIVE"), + Creating("CREATING"), + Deleted("DELETED"), + Deleting("DELETING"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The current state of the instance console connection. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java index 825751d0d27..74a9a70f977 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InternetGateway.java @@ -6,7 +6,7 @@ /** * Represents a router that connects the edge of a VCN with the Internet. For an example scenario * that uses an Internet Gateway, see - * [Typical Networking Service Scenarios](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm#three). + * [Typical Networking Service Scenarios](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm#scenarios). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/PrivateIp.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/PrivateIp.java index 37d86f75c6a..1b5e35b1ef1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/PrivateIp.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/PrivateIp.java @@ -15,7 +15,7 @@ *

* You can add *secondary private IPs* to a VNIC after it's created. For more * information, see the `privateIp` operations and also - * [Managing IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + * [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). *

**Note:** Only * {@link #listPrivateIps(ListPrivateIpsRequest) listPrivateIps} and diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java index 2cf16993e87..84ca4f43b0c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityList.java @@ -9,7 +9,7 @@ * in the subnet. The rules can be stateful or stateless. For more information, see * [Security Lists](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). *

- **Important:** Oracle Bare Metal Cloud Services images automatically include firewall rules (e.g., + **Important:** Oracle Bare Metal Cloud Services images automatically include firewall rules (for example, * Linux iptables, Windows firewall). If there are issues with some type of access to an instance, * make sure both the security lists associated with the instance's subnet and the instance's * firewall rules are set correctly. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java index 4d8443c7ea8..14116eba815 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java @@ -8,7 +8,7 @@ * consists of a contiguous range of IP addresses that do not overlap with * other subnets in the VCN. Example: 172.16.1.0/24. For more information, see * [Overview of the Networking Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm) and - * [Managing Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingsubnets.htm). + * [VCNs and Subnets](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see @@ -172,7 +172,7 @@ public static Builder builder() { /** * A DNS label for the subnet, used in conjunction with the VNIC's hostname and * VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC - * within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). + * within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). * Must be an alphanumeric string that begins with a letter and is unique within the VCN. * The value cannot be changed. *

@@ -261,7 +261,7 @@ public static LifecycleState create(String key) { * `assignPublicIp` flag in * {@link CreateVnicDetails}). * If `prohibitPublicIpOnVnic` is set to true, VNICs created in this - * subnet cannot have public IP addresses (i.e., it's a private + * subnet cannot have public IP addresses (that is, it's a private * subnet). *

* Example: `true` diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java index a1aef8a58ee..f4820e45ecd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVirtualCircuitDetails.java @@ -66,7 +66,7 @@ public static Builder builder() { /** * The provisioned data rate of the connection. To get a list of the - * available bandwidth levels (i.e., shapes), see + * available bandwidth levels (that is, shapes), see * {@link #listVirtualCircuitBandwidthShapes(ListVirtualCircuitBandwidthShapesRequest) listVirtualCircuitBandwidthShapes}. *

* To be updated only by the customer who owns the virtual circuit. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java index d70f0ba2566..c7083c541b9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java @@ -146,7 +146,7 @@ public static Builder builder() { /** * A DNS label for the VCN, used in conjunction with the VNIC's hostname and * subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC - * within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). + * within this subnet (for example, `bminstance-1.subnet123.vcn1.oraclevcn.com`). * Must be an alphanumeric string that begins with a letter. * The value cannot be changed. *

diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java index 183b3f51b26..2d88774defd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VirtualCircuit.java @@ -10,7 +10,7 @@ * network connections to provide a single, logical connection between the edge router * on the customer's existing network and a DRG. A customer could have multiple virtual * circuits, for example, to isolate traffic from different parts of their organization - * (one virtual circuit for 10.0.1.0/24; another for 172.16.0.0/16), or to provide redundancy. + * (one virtual circuit for 10.0.1.0/24, another for 172.16.0.0/16), or to provide redundancy. *

* Each virtual circuit is made up of information shared between a customer, Oracle, * and a provider (if the customer is using FastConnect via a provider). Who fills in diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java index daf52b9236a..d0e190d43d0 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java @@ -9,12 +9,12 @@ * through that subnet. Each instance has a *primary VNIC* that is automatically * created and attached during launch. You can add *secondary VNICs* to an * instance after it's launched. For more information, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). *

* Each VNIC has a *primary private IP* that is automatically assigned during launch. * You can add *secondary private IPs* to a VNIC after it's created. For more * information, see {@link #createPrivateIp(CreatePrivateIpRequest) createPrivateIp} and - * [Managing IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + * [IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see @@ -138,7 +138,7 @@ public static Builder builder() { /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) - * (e.g., `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + * (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). * Must be unique across all VNICs in the subnet and comply with * [RFC 952](https://tools.ietf.org/html/rfc952) and * [RFC 1123](https://tools.ietf.org/html/rfc1123). diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VnicAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VnicAttachment.java index c7d9959f875..bbbb955501c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VnicAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VnicAttachment.java @@ -5,7 +5,7 @@ /** * Represents an attachment between a VNIC and an instance. For more information, see - * [Managing Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + * [Virtual Network Interface Cards (VNICs)](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). * **/ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java index 43bda1c5f0c..a4b6cdbbfe9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Volume.java @@ -171,7 +171,7 @@ public static LifecycleState create(String key) { LifecycleState lifecycleState; /** - * The size of the volume in MBs. + * The size of the volume in MBs. The value must be a multiple of 1024. **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInMBs") @javax.validation.Valid diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackup.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackup.java index 959a8fc5fc6..ba0f4fefdcd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackup.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/VolumeBackup.java @@ -169,7 +169,7 @@ public static LifecycleState create(String key) { LifecycleState lifecycleState; /** - * The size of the volume, in MBs. + * The size of the volume, in MBs. The value must be a multiple of 1024. * **/ @com.fasterxml.jackson.annotation.JsonProperty("sizeInMBs") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVnicRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVnicRequest.java index d69ab5175eb..87073a4a9b8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVnicRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVnicRequest.java @@ -18,7 +18,7 @@ public class AttachVnicRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVolumeRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVolumeRequest.java index 846eaee7516..fb9c6685feb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVolumeRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/AttachVolumeRequest.java @@ -18,7 +18,7 @@ public class AttachVolumeRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CaptureConsoleHistoryRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CaptureConsoleHistoryRequest.java index 4d33d6ebd31..8a11c7129ff 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CaptureConsoleHistoryRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CaptureConsoleHistoryRequest.java @@ -18,7 +18,7 @@ public class CaptureConsoleHistoryRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCpeRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCpeRequest.java index 664ecfc7552..2f6e5b2c361 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCpeRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCpeRequest.java @@ -18,7 +18,7 @@ public class CreateCpeRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectGroupRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectGroupRequest.java index 26a986b47c4..fb0fa1afc95 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectGroupRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectGroupRequest.java @@ -18,7 +18,7 @@ public class CreateCrossConnectGroupRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectRequest.java index 0fde268ee45..ab61eddbd6e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateCrossConnectRequest.java @@ -18,7 +18,7 @@ public class CreateCrossConnectRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDhcpOptionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDhcpOptionsRequest.java index 9701bff7d68..5e888ab182f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDhcpOptionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDhcpOptionsRequest.java @@ -18,7 +18,7 @@ public class CreateDhcpOptionsRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgAttachmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgAttachmentRequest.java index 24d773c6724..e4ae0684e8b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgAttachmentRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgAttachmentRequest.java @@ -18,7 +18,7 @@ public class CreateDrgAttachmentRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgRequest.java index fba32e7beab..47a7ae945e8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateDrgRequest.java @@ -18,7 +18,7 @@ public class CreateDrgRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateIPSecConnectionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateIPSecConnectionRequest.java index bc8d741265e..5b90d492054 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateIPSecConnectionRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateIPSecConnectionRequest.java @@ -18,7 +18,7 @@ public class CreateIPSecConnectionRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateImageRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateImageRequest.java index 19d580ded62..ec8cf812500 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateImageRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateImageRequest.java @@ -18,7 +18,7 @@ public class CreateImageRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInstanceConsoleConnectionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInstanceConsoleConnectionRequest.java new file mode 100644 index 00000000000..f8e86053d60 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInstanceConsoleConnectionRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateInstanceConsoleConnectionRequest { + + /** + * Request object for creating an InstanceConsoleConnection + */ + private CreateInstanceConsoleConnectionDetails createInstanceConsoleConnectionDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateInstanceConsoleConnectionRequest o) { + createInstanceConsoleConnectionDetails(o.getCreateInstanceConsoleConnectionDetails()); + opcRetryToken(o.getOpcRetryToken()); + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInternetGatewayRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInternetGatewayRequest.java index bb4e7d6fb3c..1669771429d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInternetGatewayRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateInternetGatewayRequest.java @@ -18,7 +18,7 @@ public class CreateInternetGatewayRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreatePrivateIpRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreatePrivateIpRequest.java index 9818cb94f26..877264af5ea 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreatePrivateIpRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreatePrivateIpRequest.java @@ -18,7 +18,7 @@ public class CreatePrivateIpRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateRouteTableRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateRouteTableRequest.java index 8ec98b2941a..f14b199e356 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateRouteTableRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateRouteTableRequest.java @@ -18,7 +18,7 @@ public class CreateRouteTableRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSecurityListRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSecurityListRequest.java index d3c4aef108b..40366512f2c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSecurityListRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSecurityListRequest.java @@ -18,7 +18,7 @@ public class CreateSecurityListRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSubnetRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSubnetRequest.java index 7ac980a5d8d..bcdce4f5d52 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSubnetRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateSubnetRequest.java @@ -18,7 +18,7 @@ public class CreateSubnetRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVcnRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVcnRequest.java index 2f144cb60dc..4bc8bb56b8b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVcnRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVcnRequest.java @@ -18,7 +18,7 @@ public class CreateVcnRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVirtualCircuitRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVirtualCircuitRequest.java index 37f2b9c6a52..de83ac18839 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVirtualCircuitRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVirtualCircuitRequest.java @@ -18,7 +18,7 @@ public class CreateVirtualCircuitRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeBackupRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeBackupRequest.java index 8f3aa0f0321..76ddebdfba9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeBackupRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeBackupRequest.java @@ -18,7 +18,7 @@ public class CreateVolumeBackupRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeRequest.java index bc84e089695..e9c122bfbfc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateVolumeRequest.java @@ -18,7 +18,7 @@ public class CreateVolumeRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteInstanceConsoleConnectionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteInstanceConsoleConnectionRequest.java new file mode 100644 index 00000000000..feefa0e7da6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteInstanceConsoleConnectionRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteInstanceConsoleConnectionRequest { + + /** + * The OCID of the intance console connection + */ + private String instanceConsoleConnectionId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteInstanceConsoleConnectionRequest o) { + instanceConsoleConnectionId(o.getInstanceConsoleConnectionId()); + ifMatch(o.getIfMatch()); + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ExportImageRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ExportImageRequest.java index 684b972c854..b8dcb6dcd86 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ExportImageRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ExportImageRequest.java @@ -23,7 +23,7 @@ public class ExportImageRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceConsoleConnectionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceConsoleConnectionRequest.java new file mode 100644 index 00000000000..cec1448a260 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetInstanceConsoleConnectionRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetInstanceConsoleConnectionRequest { + + /** + * The OCID of the intance console connection + */ + private String instanceConsoleConnectionId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetInstanceConsoleConnectionRequest o) { + instanceConsoleConnectionId(o.getInstanceConsoleConnectionId()); + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/InstanceActionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/InstanceActionRequest.java index 2b56a025822..0a6ef100174 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/InstanceActionRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/InstanceActionRequest.java @@ -23,7 +23,7 @@ public class InstanceActionRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/LaunchInstanceRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/LaunchInstanceRequest.java index 16e7b66dd28..1bd5537eb7d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/LaunchInstanceRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/LaunchInstanceRequest.java @@ -18,7 +18,7 @@ public class LaunchInstanceRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java new file mode 100644 index 00000000000..2ba868fa942 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListInstanceConsoleConnectionsRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * The OCID of the instance. + */ + private String instanceId; + + /** + * The maximum number of items to return in a paginated \"List\" call. + *

+ * Example: `500` + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInstanceConsoleConnectionsRequest o) { + compartmentId(o.getCompartmentId()); + instanceId(o.getInstanceId()); + limit(o.getLimit()); + page(o.getPage()); + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateImageRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateImageRequest.java index 42beea5daf4..8db99ad1608 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateImageRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateImageRequest.java @@ -23,7 +23,7 @@ public class UpdateImageRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceRequest.java index 526611886e7..5c478675d0e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateInstanceRequest.java @@ -23,7 +23,7 @@ public class UpdateInstanceRequest { /** * A token that uniquely identifies a request so it can be retried in case of a timeout or * server error without risk of executing that same action again. Retry tokens expire after 24 - * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource * has been deleted and purged from the system, then a retry of the original creation request * may be rejected). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateInstanceConsoleConnectionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateInstanceConsoleConnectionResponse.java new file mode 100644 index 00000000000..046559b6f53 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateInstanceConsoleConnectionResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateInstanceConsoleConnectionResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned InstanceConsoleConnection instance. + */ + private InstanceConsoleConnection instanceConsoleConnection; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateInstanceConsoleConnectionResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + instanceConsoleConnection(o.getInstanceConsoleConnection()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteInstanceConsoleConnectionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteInstanceConsoleConnectionResponse.java new file mode 100644 index 00000000000..696ba34ab6b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteInstanceConsoleConnectionResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteInstanceConsoleConnectionResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteInstanceConsoleConnectionResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceConsoleConnectionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceConsoleConnectionResponse.java new file mode 100644 index 00000000000..c7bd5217e3b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetInstanceConsoleConnectionResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetInstanceConsoleConnectionResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned InstanceConsoleConnection instance. + */ + private InstanceConsoleConnection instanceConsoleConnection; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetInstanceConsoleConnectionResponse o) { + opcRequestId(o.getOpcRequestId()); + instanceConsoleConnection(o.getInstanceConsoleConnection()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java new file mode 100644 index 00000000000..a3c3b269042 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListInstanceConsoleConnectionsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of InstanceConsoleConnection instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListInstanceConsoleConnectionsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 99a5198f6d9..ea3be0491ca 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -3,23 +3,23 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-examples - Oracle Bare Metal Cloud Services SDK - Examples - This project contains the examples on how to use the SDK used for Oracle Bare Metal Cloud Services + oci-java-sdk-examples + Oracle Cloud Infrastructure SDK - Examples + This project contains the examples on how to use the SDK used for Oracle Cloud Infrastructure https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-bom - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-bom + 1.2.15 pom import @@ -28,20 +28,20 @@ - com.oracle.bmc.sdk - oracle-bmc-java-sdk-audit + com.oracle.oci.sdk + oci-java-sdk-audit - com.oracle.bmc.sdk - oracle-bmc-java-sdk-core + com.oracle.oci.sdk + oci-java-sdk-core - com.oracle.bmc.sdk - oracle-bmc-java-sdk-identity + com.oracle.oci.sdk + oci-java-sdk-identity - com.oracle.bmc.sdk - oracle-bmc-java-sdk-objectstorage + com.oracle.oci.sdk + oci-java-sdk-objectstorage diff --git a/bmc-examples/src/main/java/CreateInstanceExample.java b/bmc-examples/src/main/java/CreateInstanceExample.java index 7b0b2862693..e8e796f829d 100644 --- a/bmc-examples/src/main/java/CreateInstanceExample.java +++ b/bmc-examples/src/main/java/CreateInstanceExample.java @@ -61,7 +61,7 @@ public static void main(String[] args) throws Exception { String vcnDisplayName = instanceDisplayName + "-vcn"; String internetGatewayDisplayName = instanceDisplayName + "-internet-gateway"; - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/GetImageLatestVersionExample.java b/bmc-examples/src/main/java/GetImageLatestVersionExample.java index 6c6148a67af..7164a34a295 100644 --- a/bmc-examples/src/main/java/GetImageLatestVersionExample.java +++ b/bmc-examples/src/main/java/GetImageLatestVersionExample.java @@ -20,7 +20,7 @@ public static void main(String[] args) throws Exception { String operatingSystem = "Oracle Linux"; String operatingSystemVersion = "6.7"; - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/GetInstancePublicIpExample.java b/bmc-examples/src/main/java/GetInstancePublicIpExample.java index 444eb4d1443..aa2de38abc2 100644 --- a/bmc-examples/src/main/java/GetInstancePublicIpExample.java +++ b/bmc-examples/src/main/java/GetInstancePublicIpExample.java @@ -22,7 +22,7 @@ public static void main(String[] args) throws Exception { String instanceId = "SOME OCID"; String compartmentId = "SOME OCID"; - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/ListAuditEventsExample.java b/bmc-examples/src/main/java/ListAuditEventsExample.java index c41541ae0a0..2f73e9cb976 100644 --- a/bmc-examples/src/main/java/ListAuditEventsExample.java +++ b/bmc-examples/src/main/java/ListAuditEventsExample.java @@ -20,7 +20,7 @@ public static void main(String[] args) throws Exception { Date startTime = null; Date endTime = null; - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/ObjectStorageAsyncExample.java b/bmc-examples/src/main/java/ObjectStorageAsyncExample.java index 825b9fdc824..46c2ea3aeed 100644 --- a/bmc-examples/src/main/java/ObjectStorageAsyncExample.java +++ b/bmc-examples/src/main/java/ObjectStorageAsyncExample.java @@ -20,7 +20,7 @@ public class ObjectStorageAsyncExample { public static void main(String[] args) throws Exception { - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/ObjectStorageSyncExample.java b/bmc-examples/src/main/java/ObjectStorageSyncExample.java index 502fc6c2183..ad6ff84c369 100644 --- a/bmc-examples/src/main/java/ObjectStorageSyncExample.java +++ b/bmc-examples/src/main/java/ObjectStorageSyncExample.java @@ -17,7 +17,7 @@ public class ObjectStorageSyncExample { public static void main(String[] args) throws Exception { - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; AuthenticationDetailsProvider provider = diff --git a/bmc-examples/src/main/java/RawRestCallExample.java b/bmc-examples/src/main/java/RawRestCallExample.java index 1c2e507b593..61d2201d186 100644 --- a/bmc-examples/src/main/java/RawRestCallExample.java +++ b/bmc-examples/src/main/java/RawRestCallExample.java @@ -34,7 +34,7 @@ public static void main(String[] args) throws Exception { // TODO: fill this out String instanceId = null; - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; // 1) Create your auth provider and request signer diff --git a/bmc-examples/src/main/java/UploadObjectExample.java b/bmc-examples/src/main/java/UploadObjectExample.java index 55349501998..1aecfdafe05 100644 --- a/bmc-examples/src/main/java/UploadObjectExample.java +++ b/bmc-examples/src/main/java/UploadObjectExample.java @@ -28,7 +28,7 @@ public class UploadObjectExample { public static void main(String[] args) throws Exception { - String configurationFilePath = "~/.oraclebmc/config"; + String configurationFilePath = "~/.oci/config"; String profile = "DEFAULT"; String namespaceName = null; diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 5dc06d605b7..d7e545f94e6 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -3,22 +3,22 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-identity - Oracle Bare Metal Cloud Services SDK - Identity - This project contains the SDK used for Oracle Bare Metal Cloud Identity Service + oci-java-sdk-identity + Oracle Cloud Infrastructure SDK - Identity + This project contains the SDK used for Oracle Cloud Infrastructure Identity Service https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java index 6fd69a9516d..5e90d4e60c6 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/Identity.java @@ -75,6 +75,25 @@ public interface Identity extends AutoCloseable { */ CreateCompartmentResponse createCompartment(CreateCompartmentRequest request); + /** + * Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 + * compatible API. For information, see + * [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). + *

+ * You must specify a *description* for the secret key (although it can be an empty string). It does not + * have to be unique, and you can change it anytime with + * {@link #updateCustomerSecretKey(UpdateCustomerSecretKeyRequest) updateCustomerSecretKey}. + *

+ * Every user has permission to create a secret key for *their own user ID*. An administrator in your organization + * does not need to write a policy to give users this ability. To compare, administrators who have permission to the + * tenancy can use this operation to create a secret key for any user, including themselves. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CreateCustomerSecretKeyResponse createCustomerSecretKey(CreateCustomerSecretKeyRequest request); + /** * Creates a new group in your tenancy. *

@@ -269,6 +288,15 @@ CreateRegionSubscriptionResponse createRegionSubscription( */ DeleteApiKeyResponse deleteApiKey(DeleteApiKeyRequest request); + /** + * Deletes the specified secret key for the specified user. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteCustomerSecretKeyResponse deleteCustomerSecretKey(DeleteCustomerSecretKeyRequest request); + /** * Deletes the specified group. The group must be empty. * @@ -432,6 +460,16 @@ CreateRegionSubscriptionResponse createRegionSubscription( */ ListCompartmentsResponse listCompartments(ListCompartmentsRequest request); + /** + * Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not + * the secret key itself. The actual secret key is returned only upon creation. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListCustomerSecretKeysResponse listCustomerSecretKeys(ListCustomerSecretKeysRequest request); + /** * Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for * the compartment ID (remember that the tenancy is simply the root compartment). @@ -548,6 +586,15 @@ ListUserGroupMembershipsResponse listUserGroupMemberships( */ UpdateCompartmentResponse updateCompartment(UpdateCompartmentRequest request); + /** + * Updates the specified secret key's description. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + UpdateCustomerSecretKeyResponse updateCustomerSecretKey(UpdateCustomerSecretKeyRequest request); + /** * Updates the specified group. * @param request The request object containing the details to send diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java index 35a98cc15ff..f2b0ac59464 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsync.java @@ -90,6 +90,33 @@ java.util.concurrent.Future createCompartment( CreateCompartmentRequest, CreateCompartmentResponse> handler); + /** + * Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 + * compatible API. For information, see + * [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). + *

+ * You must specify a *description* for the secret key (although it can be an empty string). It does not + * have to be unique, and you can change it anytime with + * {@link #updateCustomerSecretKey(UpdateCustomerSecretKeyRequest, Consumer, Consumer) updateCustomerSecretKey}. + *

+ * Every user has permission to create a secret key for *their own user ID*. An administrator in your organization + * does not need to write a policy to give users this ability. To compare, administrators who have permission to the + * tenancy can use this operation to create a secret key for any user, including themselves. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createCustomerSecretKey( + CreateCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateCustomerSecretKeyRequest, CreateCustomerSecretKeyResponse> + handler); + /** * Creates a new group in your tenancy. *

@@ -349,6 +376,23 @@ java.util.concurrent.Future deleteApiKey( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes the specified secret key for the specified user. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteCustomerSecretKey( + DeleteCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomerSecretKeyRequest, DeleteCustomerSecretKeyResponse> + handler); + /** * Deletes the specified group. The group must be empty. * @@ -631,6 +675,24 @@ java.util.concurrent.Future listCompartments( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not + * the secret key itself. The actual secret key is returned only upon creation. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listCustomerSecretKeys( + ListCustomerSecretKeysRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCustomerSecretKeysRequest, ListCustomerSecretKeysResponse> + handler); + /** * Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for * the compartment ID (remember that the tenancy is simply the root compartment). @@ -827,6 +889,23 @@ java.util.concurrent.Future updateCompartment( UpdateCompartmentRequest, UpdateCompartmentResponse> handler); + /** + * Updates the specified secret key's description. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateCustomerSecretKey( + UpdateCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomerSecretKeyRequest, UpdateCustomerSecretKeyResponse> + handler); + /** * Updates the specified group. * diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java index f9eff04fffa..14e5f323990 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityAsyncClient.java @@ -162,6 +162,34 @@ public java.util.concurrent.Future createCompartment( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future createCustomerSecretKey( + CreateCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateCustomerSecretKeyRequest, CreateCustomerSecretKeyResponse> + handler) { + LOG.trace("Called async createCustomerSecretKey"); + request = CreateCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + CreateCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateCustomerSecretKeyConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + request.getCreateCustomerSecretKeyDetails(), + request, + onSuccess, + onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future createGroup( CreateGroupRequest request, @@ -375,6 +403,29 @@ public java.util.concurrent.Future deleteApiKey( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future deleteCustomerSecretKey( + DeleteCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomerSecretKeyRequest, DeleteCustomerSecretKeyResponse> + handler) { + LOG.trace("Called async deleteCustomerSecretKey"); + request = DeleteCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + DeleteCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteCustomerSecretKeyConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.delete(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future deleteGroup( DeleteGroupRequest request, @@ -746,6 +797,29 @@ public java.util.concurrent.Future listCompartments( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future listCustomerSecretKeys( + ListCustomerSecretKeysRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCustomerSecretKeysRequest, ListCustomerSecretKeysResponse> + handler) { + LOG.trace("Called async listCustomerSecretKeys"); + request = ListCustomerSecretKeysConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListCustomerSecretKeysConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListCustomerSecretKeysConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future listGroups( ListGroupsRequest request, @@ -991,6 +1065,34 @@ public java.util.concurrent.Future updateCompartment( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future updateCustomerSecretKey( + UpdateCustomerSecretKeyRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomerSecretKeyRequest, UpdateCustomerSecretKeyResponse> + handler) { + LOG.trace("Called async updateCustomerSecretKey"); + request = UpdateCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + UpdateCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateCustomerSecretKeyConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + request.getUpdateCustomerSecretKeyDetails(), + request, + onSuccess, + onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future updateGroup( UpdateGroupRequest request, diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java index 089aab69299..b306fb7b124 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/IdentityClient.java @@ -84,6 +84,19 @@ public IdentityClient( com.oracle.bmc.http.signing.RequestSigner requestSigner = requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider); this.client = restClientFactory.create(requestSigner, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("Identity-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); this.waiters = new IdentityWaiters(executorService, this); } @@ -151,6 +164,21 @@ public CreateCompartmentResponse createCompartment(CreateCompartmentRequest requ return transformer.apply(response); } + @Override + public CreateCustomerSecretKeyResponse createCustomerSecretKey( + CreateCustomerSecretKeyRequest request) { + LOG.trace("Called createCustomerSecretKey"); + request = CreateCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + CreateCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateCustomerSecretKeyConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateCustomerSecretKeyDetails(), request); + return transformer.apply(response); + } + @Override public CreateGroupResponse createGroup(CreateGroupRequest request) { LOG.trace("Called createGroup"); @@ -278,6 +306,20 @@ public DeleteApiKeyResponse deleteApiKey(DeleteApiKeyRequest request) { return transformer.apply(response); } + @Override + public DeleteCustomerSecretKeyResponse deleteCustomerSecretKey( + DeleteCustomerSecretKeyRequest request) { + LOG.trace("Called deleteCustomerSecretKey"); + request = DeleteCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + DeleteCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteCustomerSecretKeyConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } + @Override public DeleteGroupResponse deleteGroup(DeleteGroupRequest request) { LOG.trace("Called deleteGroup"); @@ -498,6 +540,20 @@ public ListCompartmentsResponse listCompartments(ListCompartmentsRequest request return transformer.apply(response); } + @Override + public ListCustomerSecretKeysResponse listCustomerSecretKeys( + ListCustomerSecretKeysRequest request) { + LOG.trace("Called listCustomerSecretKeys"); + request = ListCustomerSecretKeysConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListCustomerSecretKeysConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListCustomerSecretKeysConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public ListGroupsResponse listGroups(ListGroupsRequest request) { LOG.trace("Called listGroups"); @@ -643,6 +699,21 @@ public UpdateCompartmentResponse updateCompartment(UpdateCompartmentRequest requ return transformer.apply(response); } + @Override + public UpdateCustomerSecretKeyResponse updateCustomerSecretKey( + UpdateCustomerSecretKeyRequest request) { + LOG.trace("Called updateCustomerSecretKey"); + request = UpdateCustomerSecretKeyConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + UpdateCustomerSecretKeyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateCustomerSecretKeyConverter.fromResponse(); + + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateCustomerSecretKeyDetails(), request); + return transformer.apply(response); + } + @Override public UpdateGroupResponse updateGroup(UpdateGroupRequest request) { LOG.trace("Called updateGroup"); diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/CreateCustomerSecretKeyConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/CreateCustomerSecretKeyConverter.java new file mode 100644 index 00000000000..da6554c8fae --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/CreateCustomerSecretKeyConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateCustomerSecretKeyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateCustomerSecretKeyRequest interceptRequest( + CreateCustomerSecretKeyRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateCustomerSecretKeyRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCreateCustomerSecretKeyDetails() == null) { + throw new NullPointerException("createCustomerSecretKeyDetails is required"); + } + + if (request.getUserId() == null) { + throw new NullPointerException("userId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("users") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUserId())) + .path("customerSecretKeys"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomerSecretKeyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomerSecretKeyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomerSecretKeyResponse>() { + @Override + public CreateCustomerSecretKeyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateCustomerSecretKeyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + CustomerSecretKey>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + CustomerSecretKey.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateCustomerSecretKeyResponse.Builder builder = + CreateCustomerSecretKeyResponse.builder(); + + builder.customerSecretKey(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + CreateCustomerSecretKeyResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/DeleteCustomerSecretKeyConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/DeleteCustomerSecretKeyConverter.java new file mode 100644 index 00000000000..8c14b41f37a --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/DeleteCustomerSecretKeyConverter.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteCustomerSecretKeyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteCustomerSecretKeyRequest interceptRequest( + DeleteCustomerSecretKeyRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteCustomerSecretKeyRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getUserId() == null) { + throw new NullPointerException("userId is required"); + } + + if (request.getCustomerSecretKeyId() == null) { + throw new NullPointerException("customerSecretKeyId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("users") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUserId())) + .path("customerSecretKeys") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomerSecretKeyId())); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomerSecretKeyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomerSecretKeyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomerSecretKeyResponse>() { + @Override + public DeleteCustomerSecretKeyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteCustomerSecretKeyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteCustomerSecretKeyResponse.Builder builder = + DeleteCustomerSecretKeyResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + DeleteCustomerSecretKeyResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListCustomerSecretKeysConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListCustomerSecretKeysConverter.java new file mode 100644 index 00000000000..aa1b828e301 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/ListCustomerSecretKeysConverter.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListCustomerSecretKeysConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListCustomerSecretKeysRequest interceptRequest( + ListCustomerSecretKeysRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListCustomerSecretKeysRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getUserId() == null) { + throw new NullPointerException("userId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("users") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUserId())) + .path("customerSecretKeys"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomerSecretKeysResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomerSecretKeysResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomerSecretKeysResponse>() { + @Override + public ListCustomerSecretKeysResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListCustomerSecretKeysResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + CustomerSecretKeySummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListCustomerSecretKeysResponse.Builder builder = + ListCustomerSecretKeysResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + ListCustomerSecretKeysResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/UpdateCustomerSecretKeyConverter.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/UpdateCustomerSecretKeyConverter.java new file mode 100644 index 00000000000..479486349dd --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/internal/http/UpdateCustomerSecretKeyConverter.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.internal.http; + +import com.oracle.bmc.identity.model.*; +import com.oracle.bmc.identity.requests.*; +import com.oracle.bmc.identity.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateCustomerSecretKeyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateCustomerSecretKeyRequest interceptRequest( + UpdateCustomerSecretKeyRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateCustomerSecretKeyRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getUserId() == null) { + throw new NullPointerException("userId is required"); + } + + if (request.getCustomerSecretKeyId() == null) { + throw new NullPointerException("customerSecretKeyId is required"); + } + + if (request.getUpdateCustomerSecretKeyDetails() == null) { + throw new NullPointerException("updateCustomerSecretKeyDetails is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("users") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getUserId())) + .path("customerSecretKeys") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomerSecretKeyId())); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomerSecretKeyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomerSecretKeyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomerSecretKeyResponse>() { + @Override + public UpdateCustomerSecretKeyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateCustomerSecretKeyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + CustomerSecretKeySummary>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + CustomerSecretKeySummary.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateCustomerSecretKeyResponse.Builder builder = + UpdateCustomerSecretKeyResponse.builder(); + + builder.customerSecretKeySummary(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + UpdateCustomerSecretKeyResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCompartmentDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCompartmentDetails.java index 741fe454360..0d7be7c7034 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCompartmentDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCompartmentDetails.java @@ -51,7 +51,7 @@ public static Builder builder() { /** * The name you assign to the compartment during creation. The name must be unique across all compartments - * in the tenancy and cannot be changed. + * in the tenancy. * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCustomerSecretKeyDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCustomerSecretKeyDetails.java new file mode 100644 index 00000000000..c22d963e1b2 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateCustomerSecretKeyDetails.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCustomerSecretKeyDetails.Builder.class +) +public class CreateCustomerSecretKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public CreateCustomerSecretKeyDetails build() { + return new CreateCustomerSecretKeyDetails(displayName); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCustomerSecretKeyDetails o) { + return displayName(o.getDisplayName()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name you assign to the secret key during creation. Does not have to be unique, and it's changeable. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + @javax.validation.Valid + @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 200) + String displayName; +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateIdentityProviderDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateIdentityProviderDetails.java index 83978165322..f922462e1e6 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateIdentityProviderDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateIdentityProviderDetails.java @@ -52,13 +52,16 @@ public class CreateIdentityProviderDetails { @javax.validation.constraints.Size(min = 1, max = 400) String description; /** - * The identity provider service or product (e.g., Oracle Identity Cloud Service). + * The identity provider service or product. + * Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + * Active Directory Federation Services (ADFS). *

* Example: `IDCS` * **/ public enum ProductType { Idcs("IDCS"), + Adfs("ADFS"), ; private final String value; @@ -89,7 +92,9 @@ public static ProductType create(String key) { } }; /** - * The identity provider service or product (e.g., Oracle Identity Cloud Service). + * The identity provider service or product. + * Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + * Active Directory Federation Services (ADFS). *

* Example: `IDCS` * diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateRegionSubscriptionDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateRegionSubscriptionDetails.java index e75a1a5b940..3c70aba10fd 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateRegionSubscriptionDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CreateRegionSubscriptionDetails.java @@ -39,6 +39,7 @@ public static Builder builder() { * Allowed values are: * - `PHX` * - `IAD` + * - `FRA` *

* Example: `PHX` * diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKey.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKey.java new file mode 100644 index 00000000000..d2a8246c204 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKey.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.model; + +/** + * A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's + * [Amazon S3 compatible API](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/s3compatibleapi.htm). + * A user can have up to two secret keys at a time. + *

+ **Note:** The secret key is always an Oracle-generated string; you can't change it to a string of your choice. + *

+ * For more information, see [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomerSecretKey.Builder.class +) +public class CustomerSecretKey { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("key") + private String key; + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") + private java.util.Date timeExpires; + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + @com.fasterxml.jackson.annotation.JsonProperty("inactiveStatus") + private Long inactiveStatus; + + public CustomerSecretKey build() { + return new CustomerSecretKey( + key, + id, + userId, + displayName, + timeCreated, + timeExpires, + lifecycleState, + inactiveStatus); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomerSecretKey o) { + return key(o.getKey()) + .id(o.getId()) + .userId(o.getUserId()) + .displayName(o.getDisplayName()) + .timeCreated(o.getTimeCreated()) + .timeExpires(o.getTimeExpires()) + .lifecycleState(o.getLifecycleState()) + .inactiveStatus(o.getInactiveStatus()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The secret key. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("key") + String key; + + /** + * The OCID of the secret key. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The OCID of the user the password belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + String userId; + + /** + * The display name you assign to the secret key. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. + *

+ * Example: `2016-08-25T21:10:29.600Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * Date and time when this password will expire, in the format defined by RFC3339. + * Null if it never expires. + *

+ * Example: `2016-08-25T21:10:29.600Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") + java.util.Date timeExpires; + /** + * The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + * CREATING to ACTIVE before using it. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + * CREATING to ACTIVE before using it. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + @javax.validation.constraints.Size(min = 1, max = 64) + LifecycleState lifecycleState; + + /** + * The detailed status of INACTIVE lifecycleState. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inactiveStatus") + Long inactiveStatus; +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKeySummary.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKeySummary.java new file mode 100644 index 00000000000..5b1d10b2e35 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/CustomerSecretKeySummary.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.model; + +/** + * As the name suggests, a `CustomerSecretKeySummary` object contains information about a `CustomerSecretKey`. + * A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's Amazon S3 compatible API. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomerSecretKeySummary.Builder.class +) +public class CustomerSecretKeySummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + @com.fasterxml.jackson.annotation.JsonProperty("userId") + private String userId; + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") + private java.util.Date timeExpires; + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + @com.fasterxml.jackson.annotation.JsonProperty("inactiveStatus") + private Long inactiveStatus; + + public CustomerSecretKeySummary build() { + return new CustomerSecretKeySummary( + id, + userId, + displayName, + timeCreated, + timeExpires, + lifecycleState, + inactiveStatus); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomerSecretKeySummary o) { + return id(o.getId()) + .userId(o.getUserId()) + .displayName(o.getDisplayName()) + .timeCreated(o.getTimeCreated()) + .timeExpires(o.getTimeExpires()) + .lifecycleState(o.getLifecycleState()) + .inactiveStatus(o.getInactiveStatus()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the secret key. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The OCID of the user the password belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("userId") + String userId; + + /** + * The displayName you assign to the secret key. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. + *

+ * Example: `2016-08-25T21:10:29.600Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * Date and time when this password will expire, in the format defined by RFC3339. + * Null if it never expires. + *

+ * Example: `2016-08-25T21:10:29.600Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeExpires") + java.util.Date timeExpires; + /** + * The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + * CREATING to ACTIVE before using it. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Creating("CREATING"), + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + * CREATING to ACTIVE before using it. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + @javax.validation.constraints.Size(min = 1, max = 64) + LifecycleState lifecycleState; + + /** + * The detailed status of INACTIVE lifecycleState. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inactiveStatus") + Long inactiveStatus; +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java index 7c91f319d8d..47888391cf0 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/IdentityProvider.java @@ -75,8 +75,13 @@ public class IdentityProvider { String description; /** - * The identity provider service or product (e.g., Oracle Identity Cloud Service). - * Allowed value: `IDCS`. + * The identity provider service or product. + * Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + * Active Directory Federation Services (ADFS). + *

+ * Allowed values are: + * - `ADFS` + * - `IDCS` *

* Example: `IDCS` * diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java index 77fc769dec7..3dacd9e78a3 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Region.java @@ -50,6 +50,7 @@ public static Builder builder() { * Allowed values are: * - `PHX` * - `IAD` + * - 'FRA' * **/ @com.fasterxml.jackson.annotation.JsonProperty("key") @@ -62,6 +63,7 @@ public static Builder builder() { * Allowed values are: * - `us-phoenix-1` * - `us-ashburn-1` + * - 'de-frankfurt-1' * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java index 5f75fb885f8..cb870cf5c1d 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/RegionSubscription.java @@ -60,6 +60,7 @@ public static Builder builder() { * Allowed values are: * - `PHX` * - `IAD` + * - 'FRA' * **/ @com.fasterxml.jackson.annotation.JsonProperty("regionKey") @@ -74,6 +75,7 @@ public static Builder builder() { * Allowed values are: * - `us-phoenix-1` * - `us-ashburn-1` + * - 'de-frankfurt-1' * **/ @com.fasterxml.jackson.annotation.JsonProperty("regionName") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java index 51529d01cf1..13bc9cc9aee 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/Tenancy.java @@ -78,6 +78,7 @@ public static Builder builder() { * Allowed values are: * - `IAD` * - `PHX` + * - `FRA` * **/ @com.fasterxml.jackson.annotation.JsonProperty("homeRegionKey") diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCompartmentDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCompartmentDetails.java index 9df5ee9f1da..3f947084bec 100644 --- a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCompartmentDetails.java +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCompartmentDetails.java @@ -16,13 +16,16 @@ public static class Builder { @com.fasterxml.jackson.annotation.JsonProperty("description") private String description; + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + public UpdateCompartmentDetails build() { - return new UpdateCompartmentDetails(description); + return new UpdateCompartmentDetails(description, name); } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(UpdateCompartmentDetails o) { - return description(o.getDescription()); + return description(o.getDescription()).name(o.getName()); } } @@ -39,4 +42,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("description") @javax.validation.constraints.Size(min = 1, max = 400) String description; + + /** + * The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + @javax.validation.constraints.Size(min = 1, max = 100) + String name; } diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCustomerSecretKeyDetails.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCustomerSecretKeyDetails.java new file mode 100644 index 00000000000..6be7ab6f523 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/model/UpdateCustomerSecretKeyDetails.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.model; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateCustomerSecretKeyDetails.Builder.class +) +public class UpdateCustomerSecretKeyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public UpdateCustomerSecretKeyDetails build() { + return new UpdateCustomerSecretKeyDetails(displayName); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateCustomerSecretKeyDetails o) { + return displayName(o.getDisplayName()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The description you assign to the secret key. Does not have to be unique, and it's changeable. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/CreateCustomerSecretKeyRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/CreateCustomerSecretKeyRequest.java new file mode 100644 index 00000000000..6a20723ed95 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/CreateCustomerSecretKeyRequest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateCustomerSecretKeyRequest { + + /** + * Request object for creating a new secret key. + */ + private CreateCustomerSecretKeyDetails createCustomerSecretKeyDetails; + + /** + * The OCID of the user. + */ + private String userId; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomerSecretKeyRequest o) { + createCustomerSecretKeyDetails(o.getCreateCustomerSecretKeyDetails()); + userId(o.getUserId()); + opcRetryToken(o.getOpcRetryToken()); + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/DeleteCustomerSecretKeyRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/DeleteCustomerSecretKeyRequest.java new file mode 100644 index 00000000000..efe37da48d3 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/DeleteCustomerSecretKeyRequest.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteCustomerSecretKeyRequest { + + /** + * The OCID of the user. + */ + private String userId; + + /** + * The OCID of the secret key. + */ + private String customerSecretKeyId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCustomerSecretKeyRequest o) { + userId(o.getUserId()); + customerSecretKeyId(o.getCustomerSecretKeyId()); + ifMatch(o.getIfMatch()); + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListCustomerSecretKeysRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListCustomerSecretKeysRequest.java new file mode 100644 index 00000000000..a39fb26a9c4 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/ListCustomerSecretKeysRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListCustomerSecretKeysRequest { + + /** + * The OCID of the user. + */ + private String userId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCustomerSecretKeysRequest o) { + userId(o.getUserId()); + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/UpdateCustomerSecretKeyRequest.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/UpdateCustomerSecretKeyRequest.java new file mode 100644 index 00000000000..d5df0700cdc --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/requests/UpdateCustomerSecretKeyRequest.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.requests; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateCustomerSecretKeyRequest { + + /** + * The OCID of the user. + */ + private String userId; + + /** + * The OCID of the secret key. + */ + private String customerSecretKeyId; + + /** + * Request object for updating a secret key. + */ + private UpdateCustomerSecretKeyDetails updateCustomerSecretKeyDetails; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomerSecretKeyRequest o) { + userId(o.getUserId()); + customerSecretKeyId(o.getCustomerSecretKeyId()); + updateCustomerSecretKeyDetails(o.getUpdateCustomerSecretKeyDetails()); + ifMatch(o.getIfMatch()); + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/CreateCustomerSecretKeyResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/CreateCustomerSecretKeyResponse.java new file mode 100644 index 00000000000..56316bca30a --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/CreateCustomerSecretKeyResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateCustomerSecretKeyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned CustomerSecretKey instance. + */ + private CustomerSecretKey customerSecretKey; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomerSecretKeyResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + customerSecretKey(o.getCustomerSecretKey()); + + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/DeleteCustomerSecretKeyResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/DeleteCustomerSecretKeyResponse.java new file mode 100644 index 00000000000..c3a67469d88 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/DeleteCustomerSecretKeyResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteCustomerSecretKeyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCustomerSecretKeyResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListCustomerSecretKeysResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListCustomerSecretKeysResponse.java new file mode 100644 index 00000000000..048efe07171 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/ListCustomerSecretKeysResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListCustomerSecretKeysResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * A list of CustomerSecretKeySummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCustomerSecretKeysResponse o) { + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/UpdateCustomerSecretKeyResponse.java b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/UpdateCustomerSecretKeyResponse.java new file mode 100644 index 00000000000..6150998d0b2 --- /dev/null +++ b/bmc-identity/src/main/java/com/oracle/bmc/identity/responses/UpdateCustomerSecretKeyResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.identity.responses; + +import com.oracle.bmc.identity.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateCustomerSecretKeyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned CustomerSecretKeySummary instance. + */ + private CustomerSecretKeySummary customerSecretKeySummary; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomerSecretKeyResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + customerSecretKeySummary(o.getCustomerSecretKeySummary()); + + return this; + } + } +} diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index d2f96d9f560..af2d49610ca 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -3,22 +3,22 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-loadbalancer - Oracle Bare Metal Cloud Services SDK - Load Balancer - This project contains the SDK used for Oracle Bare Metal Cloud Load Balancer Service + oci-java-sdk-loadbalancer + Oracle Cloud Infrastructure SDK - Load Balancer + This project contains the SDK used for Oracle Cloud Infrastructure Load Balancer Service https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancer.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancer.java index c48b57c75ab..c84cfdd4c90 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancer.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancer.java @@ -154,6 +154,14 @@ public interface LoadBalancer extends AutoCloseable { */ GetBackendResponse getBackend(GetBackendRequest request); + /** + * Gets the current health status of the specified backend server. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetBackendHealthResponse getBackendHealth(GetBackendHealthRequest request); + /** * Gets the specified backend set's configuration information. * @param request The request object containing the details to send @@ -162,6 +170,14 @@ public interface LoadBalancer extends AutoCloseable { */ GetBackendSetResponse getBackendSet(GetBackendSetRequest request); + /** + * Gets the health status for the specified backend set. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetBackendSetHealthResponse getBackendSetHealth(GetBackendSetHealthRequest request); + /** * Gets the health check policy information for a given load balancer and backend set. * @param request The request object containing the details to send @@ -178,6 +194,14 @@ public interface LoadBalancer extends AutoCloseable { */ GetLoadBalancerResponse getLoadBalancer(GetLoadBalancerRequest request); + /** + * Gets the health status for the specified load balancer. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetLoadBalancerHealthResponse getLoadBalancerHealth(GetLoadBalancerHealthRequest request); + /** * Gets the details of a work request. * @param request The request object containing the details to send @@ -210,6 +234,14 @@ public interface LoadBalancer extends AutoCloseable { */ ListCertificatesResponse listCertificates(ListCertificatesRequest request); + /** + * Lists the summary health statuses for all load balancers in the specified compartment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListLoadBalancerHealthsResponse listLoadBalancerHealths(ListLoadBalancerHealthsRequest request); + /** * Lists all load balancers in the specified compartment. * @param request The request object containing the details to send diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsync.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsync.java index 92672d00d15..ccc69f6fc7b 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsync.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsync.java @@ -234,6 +234,21 @@ java.util.concurrent.Future getBackend( GetBackendRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the current health status of the specified backend server. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getBackendHealth( + GetBackendHealthRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the specified backend set's configuration information. * @@ -249,6 +264,22 @@ java.util.concurrent.Future getBackendSet( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the health status for the specified backend set. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getBackendSetHealth( + GetBackendSetHealthRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetBackendSetHealthRequest, GetBackendSetHealthResponse> + handler); + /** * Gets the health check policy information for a given load balancer and backend set. * @@ -279,6 +310,22 @@ java.util.concurrent.Future getLoadBalancer( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the health status for the specified load balancer. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getLoadBalancerHealth( + GetLoadBalancerHealthRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetLoadBalancerHealthRequest, GetLoadBalancerHealthResponse> + handler); + /** * Gets the details of a work request. * @@ -339,6 +386,22 @@ java.util.concurrent.Future listCertificates( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Lists the summary health statuses for all load balancers in the specified compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listLoadBalancerHealths( + ListLoadBalancerHealthsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListLoadBalancerHealthsRequest, ListLoadBalancerHealthsResponse> + handler); + /** * Lists all load balancers in the specified compartment. * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsyncClient.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsyncClient.java index deb414e4b3b..f19e3eb9eee 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsyncClient.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerAsyncClient.java @@ -362,6 +362,28 @@ public java.util.concurrent.Future getBackend( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future getBackendHealth( + GetBackendHealthRequest request, + com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getBackendHealth"); + request = GetBackendHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetBackendHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetBackendHealthConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getBackendSet( GetBackendSetRequest request, @@ -384,6 +406,29 @@ public java.util.concurrent.Future getBackendSet( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future getBackendSetHealth( + GetBackendSetHealthRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetBackendSetHealthRequest, GetBackendSetHealthResponse> + handler) { + LOG.trace("Called async getBackendSetHealth"); + request = GetBackendSetHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetBackendSetHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetBackendSetHealthConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getHealthChecker( GetHealthCheckerRequest request, @@ -428,6 +473,29 @@ public java.util.concurrent.Future getLoadBalancer( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future getLoadBalancerHealth( + GetLoadBalancerHealthRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetLoadBalancerHealthRequest, GetLoadBalancerHealthResponse> + handler) { + LOG.trace("Called async getLoadBalancerHealth"); + request = GetLoadBalancerHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetLoadBalancerHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetLoadBalancerHealthConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future getWorkRequest( GetWorkRequestRequest request, @@ -516,6 +584,29 @@ public java.util.concurrent.Future listCertificates( return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); } + @Override + public java.util.concurrent.Future listLoadBalancerHealths( + ListLoadBalancerHealthsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListLoadBalancerHealthsRequest, ListLoadBalancerHealthsResponse> + handler) { + LOG.trace("Called async listLoadBalancerHealths"); + request = ListLoadBalancerHealthsConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListLoadBalancerHealthsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListLoadBalancerHealthsConverter.fromResponse(); + + com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>(handler, transformer, request); + com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handler, request); + + java.util.concurrent.Future responseFuture = + client.get(ib, request, onSuccess, onError); + return new com.oracle.bmc.util.internal.TransformingFuture<>(responseFuture, transformer); + } + @Override public java.util.concurrent.Future listLoadBalancers( ListLoadBalancersRequest request, diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerClient.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerClient.java index 7edd6ee8697..78346b711b9 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerClient.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/LoadBalancerClient.java @@ -84,6 +84,19 @@ public LoadBalancerClient( com.oracle.bmc.http.signing.RequestSigner requestSigner = requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider); this.client = restClientFactory.create(requestSigner, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("LoadBalancer-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); this.waiters = new LoadBalancerWaiters(executorService, this); } @@ -270,6 +283,19 @@ public GetBackendResponse getBackend(GetBackendRequest request) { return transformer.apply(response); } + @Override + public GetBackendHealthResponse getBackendHealth(GetBackendHealthRequest request) { + LOG.trace("Called getBackendHealth"); + request = GetBackendHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetBackendHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetBackendHealthConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetBackendSetResponse getBackendSet(GetBackendSetRequest request) { LOG.trace("Called getBackendSet"); @@ -283,6 +309,19 @@ public GetBackendSetResponse getBackendSet(GetBackendSetRequest request) { return transformer.apply(response); } + @Override + public GetBackendSetHealthResponse getBackendSetHealth(GetBackendSetHealthRequest request) { + LOG.trace("Called getBackendSetHealth"); + request = GetBackendSetHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetBackendSetHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetBackendSetHealthConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetHealthCheckerResponse getHealthChecker(GetHealthCheckerRequest request) { LOG.trace("Called getHealthChecker"); @@ -309,6 +348,20 @@ public GetLoadBalancerResponse getLoadBalancer(GetLoadBalancerRequest request) { return transformer.apply(response); } + @Override + public GetLoadBalancerHealthResponse getLoadBalancerHealth( + GetLoadBalancerHealthRequest request) { + LOG.trace("Called getLoadBalancerHealth"); + request = GetLoadBalancerHealthConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + GetLoadBalancerHealthConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetLoadBalancerHealthConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { LOG.trace("Called getWorkRequest"); @@ -361,6 +414,20 @@ public ListCertificatesResponse listCertificates(ListCertificatesRequest request return transformer.apply(response); } + @Override + public ListLoadBalancerHealthsResponse listLoadBalancerHealths( + ListLoadBalancerHealthsRequest request) { + LOG.trace("Called listLoadBalancerHealths"); + request = ListLoadBalancerHealthsConverter.interceptRequest(request); + javax.ws.rs.client.Invocation.Builder ib = + ListLoadBalancerHealthsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListLoadBalancerHealthsConverter.fromResponse(); + + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } + @Override public ListLoadBalancersResponse listLoadBalancers(ListLoadBalancersRequest request) { LOG.trace("Called listLoadBalancers"); diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendHealthConverter.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendHealthConverter.java new file mode 100644 index 00000000000..f9dda13b882 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendHealthConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.internal.http; + +import com.oracle.bmc.loadbalancer.model.*; +import com.oracle.bmc.loadbalancer.requests.*; +import com.oracle.bmc.loadbalancer.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.extern.slf4j.Slf4j +public class GetBackendHealthConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetBackendHealthRequest interceptRequest(GetBackendHealthRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetBackendHealthRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getLoadBalancerId() == null) { + throw new NullPointerException("loadBalancerId is required"); + } + + if (request.getBackendSetName() == null) { + throw new NullPointerException("backendSetName is required"); + } + + if (request.getBackendName() == null) { + throw new NullPointerException("backendName is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20170115") + .path("loadBalancers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getLoadBalancerId())) + .path("backendSets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackendSetName())) + .path("backends") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackendName())) + .path("health"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackendHealthResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackendHealthResponse>() { + @Override + public GetBackendHealthResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetBackendHealthResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + BackendHealth>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + BackendHealth.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetBackendHealthResponse.Builder builder = + GetBackendHealthResponse.builder(); + + builder.backendHealth(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetBackendHealthResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendSetHealthConverter.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendSetHealthConverter.java new file mode 100644 index 00000000000..61b40305bbc --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetBackendSetHealthConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.internal.http; + +import com.oracle.bmc.loadbalancer.model.*; +import com.oracle.bmc.loadbalancer.requests.*; +import com.oracle.bmc.loadbalancer.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.extern.slf4j.Slf4j +public class GetBackendSetHealthConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetBackendSetHealthRequest interceptRequest(GetBackendSetHealthRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetBackendSetHealthRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getLoadBalancerId() == null) { + throw new NullPointerException("loadBalancerId is required"); + } + + if (request.getBackendSetName() == null) { + throw new NullPointerException("backendSetName is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20170115") + .path("loadBalancers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getLoadBalancerId())) + .path("backendSets") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBackendSetName())) + .path("health"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackendSetHealthResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackendSetHealthResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetBackendSetHealthResponse>() { + @Override + public GetBackendSetHealthResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetBackendSetHealthResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + BackendSetHealth>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + BackendSetHealth.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetBackendSetHealthResponse.Builder builder = + GetBackendSetHealthResponse.builder(); + + builder.backendSetHealth(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetBackendSetHealthResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetLoadBalancerHealthConverter.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetLoadBalancerHealthConverter.java new file mode 100644 index 00000000000..44576de3179 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/GetLoadBalancerHealthConverter.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.internal.http; + +import com.oracle.bmc.loadbalancer.model.*; +import com.oracle.bmc.loadbalancer.requests.*; +import com.oracle.bmc.loadbalancer.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.extern.slf4j.Slf4j +public class GetLoadBalancerHealthConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetLoadBalancerHealthRequest interceptRequest( + GetLoadBalancerHealthRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetLoadBalancerHealthRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getLoadBalancerId() == null) { + throw new NullPointerException("loadBalancerId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget() + .path("/20170115") + .path("loadBalancers") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getLoadBalancerId())) + .path("health"); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetLoadBalancerHealthResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetLoadBalancerHealthResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetLoadBalancerHealthResponse>() { + @Override + public GetLoadBalancerHealthResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetLoadBalancerHealthResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + LoadBalancerHealth>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + LoadBalancerHealth.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetLoadBalancerHealthResponse.Builder builder = + GetLoadBalancerHealthResponse.builder(); + + builder.loadBalancerHealth(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetLoadBalancerHealthResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/ListLoadBalancerHealthsConverter.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/ListLoadBalancerHealthsConverter.java new file mode 100644 index 00000000000..49fda430542 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/internal/http/ListLoadBalancerHealthsConverter.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.internal.http; + +import com.oracle.bmc.loadbalancer.model.*; +import com.oracle.bmc.loadbalancer.requests.*; +import com.oracle.bmc.loadbalancer.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.extern.slf4j.Slf4j +public class ListLoadBalancerHealthsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListLoadBalancerHealthsRequest interceptRequest( + ListLoadBalancerHealthsRequest request) { + + return request; + } + + public static javax.ws.rs.client.Invocation.Builder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListLoadBalancerHealthsRequest request) { + if (request == null) { + throw new NullPointerException("request instance is required"); + } + + if (request.getCompartmentId() == null) { + throw new NullPointerException("compartmentId is required"); + } + + javax.ws.rs.client.WebTarget target = + client.getBaseTarget().path("/20170115").path("loadBalancerHealths"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + javax.ws.rs.client.Invocation.Builder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListLoadBalancerHealthsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListLoadBalancerHealthsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListLoadBalancerHealthsResponse>() { + @Override + public ListLoadBalancerHealthsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListLoadBalancerHealthsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + LoadBalancerHealthSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListLoadBalancerHealthsResponse.Builder builder = + ListLoadBalancerHealthsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListLoadBalancerHealthsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java index cdbe33f65ad..5df5af15c70 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Backend.java @@ -96,9 +96,9 @@ public static Builder builder() { String ipAddress; /** - * A name to uniquely identify this backend server in the backend set. + * A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. *

- * Example: `My first backend server` + * Example: `10.10.10.4:8080` * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendHealth.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendHealth.java new file mode 100644 index 00000000000..94cb8568511 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendHealth.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.model; + +/** + * The health status of the specified backend server as reported by the primary and stand-by load balancers. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackendHealth.Builder.class) +public class BackendHealth { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("healthCheckResults") + private java.util.List healthCheckResults; + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + public BackendHealth build() { + return new BackendHealth(healthCheckResults, status); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackendHealth o) { + return healthCheckResults(o.getHealthCheckResults()).status(o.getStatus()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A list of the most recent health check results returned for the specified backend server. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("healthCheckResults") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List healthCheckResults; + /** + * The general health status of the specified backend server as reported by the primary and stand-by load balancers. + *

+ * **OK:** Both health checks returned `OK`. + *

+ * **WARNING:** One health check returned `OK` and one did not. + *

+ * **CRITICAL:** Neither health check returned `OK`. + *

+ * **UNKNOWN:** One or both health checks returned `UNKNOWN`, or the system was unable to retrieve metrics at this time. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Ok("OK"), + Warning("WARNING"), + Critical("CRITICAL"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The general health status of the specified backend server as reported by the primary and stand-by load balancers. + *

+ * **OK:** Both health checks returned `OK`. + *

+ * **WARNING:** One health check returned `OK` and one did not. + *

+ * **CRITICAL:** Neither health check returned `OK`. + *

+ * **UNKNOWN:** One or both health checks returned `UNKNOWN`, or the system was unable to retrieve metrics at this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Status status; +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java index 6e877799ac9..4e458cd01dd 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSet.java @@ -76,7 +76,10 @@ public static Builder builder() { /** * A friendly name for the backend set. It must be unique and it cannot be changed. *

- * Example: `My backend set` + * Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot + * contain spaces. Avoid entering confidential information. + *

+ * Example: `My_backend_set` * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetHealth.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetHealth.java new file mode 100644 index 00000000000..cfb603e1472 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/BackendSetHealth.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.model; + +/** + * The health status details for a backend set. + *

+ * This object does not explicitly enumerate backend servers with a status of `OK`. However, they are included in the + * `totalBackendCount` sum. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BackendSetHealth.Builder.class) +public class BackendSetHealth { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("criticalStateBackendNames") + private java.util.List criticalStateBackendNames; + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + @com.fasterxml.jackson.annotation.JsonProperty("totalBackendCount") + private Integer totalBackendCount; + + @com.fasterxml.jackson.annotation.JsonProperty("unknownStateBackendNames") + private java.util.List unknownStateBackendNames; + + @com.fasterxml.jackson.annotation.JsonProperty("warningStateBackendNames") + private java.util.List warningStateBackendNames; + + public BackendSetHealth build() { + return new BackendSetHealth( + criticalStateBackendNames, + status, + totalBackendCount, + unknownStateBackendNames, + warningStateBackendNames); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BackendSetHealth o) { + return criticalStateBackendNames(o.getCriticalStateBackendNames()) + .status(o.getStatus()) + .totalBackendCount(o.getTotalBackendCount()) + .unknownStateBackendNames(o.getUnknownStateBackendNames()) + .warningStateBackendNames(o.getWarningStateBackendNames()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A list of backend servers that are currently in the `CRITICAL` health state. The list identifies each backend server by + * IP address and port. + *

+ * Example: `1.1.1.1:80` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("criticalStateBackendNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List criticalStateBackendNames; + /** + * Overall health status of the backend set. + *

+ * **OK:** All backend servers in the backend set return a status of `OK`. + *

+ * **WARNING:** Half or more of the backend set's backend servers return a status of `OK` and at least one backend + * server returns a status of `WARNING`, `CRITICAL`, or `UNKNOWN`. + *

+ * **CRITICAL:** Fewer than half of the backend set's backend servers return a status of `OK`. + *

+ * **UNKNOWN:** More than half of the backend set's backend servers return a status of `UNKNOWN`, the system was + * unable to retrieve metrics, or the backend set does not have a listener attached. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Ok("OK"), + Warning("WARNING"), + Critical("CRITICAL"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Overall health status of the backend set. + *

+ * **OK:** All backend servers in the backend set return a status of `OK`. + *

+ * **WARNING:** Half or more of the backend set's backend servers return a status of `OK` and at least one backend + * server returns a status of `WARNING`, `CRITICAL`, or `UNKNOWN`. + *

+ * **CRITICAL:** Fewer than half of the backend set's backend servers return a status of `OK`. + *

+ * **UNKNOWN:** More than half of the backend set's backend servers return a status of `UNKNOWN`, the system was + * unable to retrieve metrics, or the backend set does not have a listener attached. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Status status; + + /** + * The total number of backend servers in this backend set. + *

+ * Example: `5` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalBackendCount") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Integer totalBackendCount; + + /** + * A list of backend servers that are currently in the `UNKNOWN` health state. The list identifies each backend server by + * IP address and port. + *

+ * Example: `1.1.1.5:80` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unknownStateBackendNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List unknownStateBackendNames; + + /** + * A list of backend servers that are currently in the `WARNING` health state. The list identifies each backend server by + * IP address and port. + *

+ * Example: `1.1.1.7:42` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warningStateBackendNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List warningStateBackendNames; +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Certificate.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Certificate.java index c20af13745a..dfe12a445db 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Certificate.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/Certificate.java @@ -66,13 +66,17 @@ public static Builder builder() { /** * A friendly name for the certificate bundle. It must be unique and it cannot be changed. + * Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + * Certificate bundle names cannot contain spaces. Avoid entering confidential information. *

- * Example: `My certificate bundle` + * Example: `My_certificate_bundle` * **/ @com.fasterxml.jackson.annotation.JsonProperty("certificateName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Pattern(regexp = "/^[a-zA-Z0-9_.-]*$/") + @javax.validation.constraints.Size(min = 1, max = 255) String certificateName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CertificateDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CertificateDetails.java index 9ae256e3954..02ce5e515d8 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CertificateDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CertificateDetails.java @@ -75,13 +75,17 @@ public static Builder builder() { /** * A friendly name for the certificate bundle. It must be unique and it cannot be changed. + * Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + * Certificate bundle names cannot contain spaces. Avoid entering confidential information. *

- * Example: `My certificate bundle` + * Example: `My_certificate_bundle` * **/ @com.fasterxml.jackson.annotation.JsonProperty("certificateName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Pattern(regexp = "/^[a-zA-Z0-9_.-]*$/") + @javax.validation.constraints.Size(min = 1, max = 255) String certificateName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java index 8618015c2e6..f0ee7e4f265 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateBackendSetDetails.java @@ -76,12 +76,16 @@ public static Builder builder() { /** * A friendly name for the backend set. It must be unique and it cannot be changed. *

- * Example: `My backend set` + * Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot + * contain spaces. Avoid entering confidential information. + *

+ * Example: `My_backend_set` * **/ @com.fasterxml.jackson.annotation.JsonProperty("name") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 32) String name; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateCertificateDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateCertificateDetails.java index 48e83cf0637..f58e8a6932b 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateCertificateDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateCertificateDetails.java @@ -75,13 +75,17 @@ public static Builder builder() { /** * A friendly name for the certificate bundle. It must be unique and it cannot be changed. + * Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + * Certificate bundle names cannot contain spaces. Avoid entering confidential information. *

- * Example: `My certificate bundle` + * Example: `My_certificate_bundle` * **/ @com.fasterxml.jackson.annotation.JsonProperty("certificateName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Pattern(regexp = "/^[a-zA-Z0-9_.-]*$/") + @javax.validation.constraints.Size(min = 1, max = 255) String certificateName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java index 65dab7c382e..35e89769ecd 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateListenerDetails.java @@ -62,10 +62,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("defaultBackendSetName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 32) String defaultBackendSetName; /** * A friendly name for the listener. It must be unique and it cannot be changed. + * Avoid entering confidential information. *

* Example: `My listener` * @@ -73,6 +75,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("name") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 255) String name; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java index 940342f6741..60fb053b71b 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/CreateLoadBalancerDetails.java @@ -84,10 +84,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 255) String compartmentId; /** * A user-friendly name. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. *

* Example: `My load balancer` * @@ -95,6 +97,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("displayName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 1024) String displayName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckResult.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckResult.java new file mode 100644 index 00000000000..39acd83b668 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckResult.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.model; + +/** + * Information about a single backend server health check result reported by a load balancer. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = HealthCheckResult.Builder.class +) +public class HealthCheckResult { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("healthCheckStatus") + private HealthCheckStatus healthCheckStatus; + + @com.fasterxml.jackson.annotation.JsonProperty("sourceIpAddress") + private String sourceIpAddress; + + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + private String subnetId; + + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + public HealthCheckResult build() { + return new HealthCheckResult(healthCheckStatus, sourceIpAddress, subnetId, timestamp); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(HealthCheckResult o) { + return healthCheckStatus(o.getHealthCheckStatus()) + .sourceIpAddress(o.getSourceIpAddress()) + .subnetId(o.getSubnetId()) + .timestamp(o.getTimestamp()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The result of the most recent health check. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum HealthCheckStatus { + Ok("OK"), + InvalidStatusCode("INVALID_STATUS_CODE"), + TimedOut("TIMED_OUT"), + RegexMismatch("REGEX_MISMATCH"), + ConnectFailed("CONNECT_FAILED"), + IoError("IO_ERROR"), + Offline("OFFLINE"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (HealthCheckStatus v : HealthCheckStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + HealthCheckStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static HealthCheckStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'HealthCheckStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The result of the most recent health check. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("healthCheckStatus") + @javax.validation.Valid + @javax.validation.constraints.NotNull + HealthCheckStatus healthCheckStatus; + + /** + * The IP address of the health check status report provider. This identifier helps you differentiate same-subnet + * (private) load balancers that report health check status. + *

+ * Example: `10.2.0.1` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceIpAddress") + @javax.validation.Valid + @javax.validation.constraints.NotNull + String sourceIpAddress; + + /** + * The OCID of the subnet hosting the load balancer that reported this health check status. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("subnetId") + @javax.validation.Valid + @javax.validation.constraints.NotNull + String subnetId; + + /** + * The date and time the data was retrieved, in the format defined by RFC3339. + *

+ * Example: `2017-06-02T18:28:11+00:00` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.Date timestamp; +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthChecker.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthChecker.java index 2e9a66d5ffd..16047f8127d 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthChecker.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthChecker.java @@ -137,7 +137,8 @@ public static Builder builder() { Integer returnCode; /** - * The maximum timeout before a retry, in milliseconds. Defaults to 3000 (3 seconds). + * The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + * returns within this timeout period. Defaults to 3000 (3 seconds). *

* Example: `6000` * diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckerDetails.java index 1bab2da0672..904fff30b52 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/HealthCheckerDetails.java @@ -113,6 +113,7 @@ public static Builder builder() { * **/ @com.fasterxml.jackson.annotation.JsonProperty("responseBodyRegex") + @javax.validation.constraints.Size(max = 255) String responseBodyRegex; /** @@ -134,7 +135,8 @@ public static Builder builder() { Integer returnCode; /** - * The maximum timeout in milliseconds before a retry. + * The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + * returns within this timeout period. *

* Example: `6000` * @@ -151,5 +153,6 @@ public static Builder builder() { * **/ @com.fasterxml.jackson.annotation.JsonProperty("urlPath") + @javax.validation.constraints.Size(max = 1024) String urlPath; } diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java index b5b13c43a05..7883a32ef36 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/ListenerDetails.java @@ -52,6 +52,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("defaultBackendSetName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 32) String defaultBackendSetName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java index 58cf7555171..cf03fd375d4 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancer.java @@ -10,7 +10,7 @@ * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). - * + *

* For information about endpoints and signing API requests, see * [About the API](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see * [SDKS and Other Tools](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealth.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealth.java new file mode 100644 index 00000000000..db7b6c58f21 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealth.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.model; + +/** + * The health status details for the specified load balancer. + *

+ * This object does not explicitly enumerate backend sets with a status of `OK`. However, they are included in the + * `totalBackendSetCount` sum. + * + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LoadBalancerHealth.Builder.class +) +public class LoadBalancerHealth { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("criticalStateBackendSetNames") + private java.util.List criticalStateBackendSetNames; + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + @com.fasterxml.jackson.annotation.JsonProperty("totalBackendSetCount") + private Integer totalBackendSetCount; + + @com.fasterxml.jackson.annotation.JsonProperty("unknownStateBackendSetNames") + private java.util.List unknownStateBackendSetNames; + + @com.fasterxml.jackson.annotation.JsonProperty("warningStateBackendSetNames") + private java.util.List warningStateBackendSetNames; + + public LoadBalancerHealth build() { + return new LoadBalancerHealth( + criticalStateBackendSetNames, + status, + totalBackendSetCount, + unknownStateBackendSetNames, + warningStateBackendSetNames); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LoadBalancerHealth o) { + return criticalStateBackendSetNames(o.getCriticalStateBackendSetNames()) + .status(o.getStatus()) + .totalBackendSetCount(o.getTotalBackendSetCount()) + .unknownStateBackendSetNames(o.getUnknownStateBackendSetNames()) + .warningStateBackendSetNames(o.getWarningStateBackendSetNames()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A list of backend sets that are currently in the `CRITICAL` health state. The list identifies each backend set by the + * friendly name you assigned when you created it. + *

+ * Example: `My_backend_set` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("criticalStateBackendSetNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List criticalStateBackendSetNames; + /** + * The overall health status of the load balancer. + *

+ * **OK:** All backend sets associated with the load balancer return a status of `OK`. + *

+ * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + * no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + *

+ * **UNKNOWN:** If any one of the following conditions is true: + *

+ * The load balancer life cycle state is not `ACTIVE`. + *

+ * No backend sets are defined for the load balancer. + *

+ * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + * sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * The system could not retrieve metrics for any reason. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Ok("OK"), + Warning("WARNING"), + Critical("CRITICAL"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The overall health status of the load balancer. + *

+ * **OK:** All backend sets associated with the load balancer return a status of `OK`. + *

+ * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + * no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + *

+ * **UNKNOWN:** If any one of the following conditions is true: + *

+ * The load balancer life cycle state is not `ACTIVE`. + *

+ * No backend sets are defined for the load balancer. + *

+ * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + * sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * The system could not retrieve metrics for any reason. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Status status; + + /** + * The total number of backend sets associated with this load balancer. + *

+ * Example: `4` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("totalBackendSetCount") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Integer totalBackendSetCount; + + /** + * A list of backend sets that are currently in the `UNKNOWN` health state. The list identifies each backend set by the + * friendly name you assigned when you created it. + *

+ * Example: `Backend set2` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("unknownStateBackendSetNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List unknownStateBackendSetNames; + + /** + * A list of backend sets that are currently in the `WARNING` health state. The list identifies each backend set by the + * friendly name you assigned when you created it. + *

+ * Example: `Backend set3` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("warningStateBackendSetNames") + @javax.validation.Valid + @javax.validation.constraints.NotNull + java.util.List warningStateBackendSetNames; +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealthSummary.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealthSummary.java new file mode 100644 index 00000000000..c1b63d2c45f --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/LoadBalancerHealthSummary.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.model; + +/** + * A health status summary for the specified load balancer. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LoadBalancerHealthSummary.Builder.class +) +public class LoadBalancerHealthSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + @lombok.Setter + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("loadBalancerId") + private String loadBalancerId; + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + public LoadBalancerHealthSummary build() { + return new LoadBalancerHealthSummary(loadBalancerId, status); + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LoadBalancerHealthSummary o) { + return loadBalancerId(o.getLoadBalancerId()).status(o.getStatus()); + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer the health status is associated with. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("loadBalancerId") + @javax.validation.Valid + @javax.validation.constraints.NotNull + String loadBalancerId; + /** + * The overall health status of the load balancer. + *

+ * **OK:** All backend sets associated with the load balancer return a status of `OK`. + *

+ * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + * no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + *

+ * **UNKNOWN:** If any one of the following conditions is true: + *

+ * The load balancer life cycle state is not `ACTIVE`. + *

+ * No backend sets are defined for the load balancer. + *

+ * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + * sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * The system could not retrieve metrics for any reason. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Ok("OK"), + Warning("WARNING"), + Critical("CRITICAL"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The overall health status of the load balancer. + *

+ * **OK:** All backend sets associated with the load balancer return a status of `OK`. + *

+ * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + * no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + *

+ * **UNKNOWN:** If any one of the following conditions is true: + *

+ * The load balancer life cycle state is not `ACTIVE`. + *

+ * No backend sets are defined for the load balancer. + *

+ * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + * sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + *

+ * The system could not retrieve metrics for any reason. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + @javax.validation.Valid + @javax.validation.constraints.NotNull + Status status; +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfiguration.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfiguration.java index ee669339f85..cd71bc88463 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfiguration.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfiguration.java @@ -47,13 +47,17 @@ public static Builder builder() { /** * A friendly name for the certificate bundle. It must be unique and it cannot be changed. + * Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + * Certificate bundle names cannot contain spaces. Avoid entering confidential information. *

- * Example: `My certificate bundle` + * Example: `My_certificate_bundle` * **/ @com.fasterxml.jackson.annotation.JsonProperty("certificateName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Pattern(regexp = "/^[a-zA-Z0-9_.-]*$/") + @javax.validation.constraints.Size(min = 1, max = 255) String certificateName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfigurationDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfigurationDetails.java index f225e7e9d23..4a2e78d2ef6 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfigurationDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SSLConfigurationDetails.java @@ -46,13 +46,17 @@ public static Builder builder() { /** * A friendly name for the certificate bundle. It must be unique and it cannot be changed. + * Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + * Certificate bundle names cannot contain spaces. Avoid entering confidential information. *

- * Example: `My certificate bundle` + * Example: `My_certificate_bundle` * **/ @com.fasterxml.jackson.annotation.JsonProperty("certificateName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Pattern(regexp = "/^[a-zA-Z0-9_.-]*$/") + @javax.validation.constraints.Size(min = 1, max = 255) String certificateName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SessionPersistenceConfigurationDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SessionPersistenceConfigurationDetails.java index 2ff2723a639..ef0dcfdfec8 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SessionPersistenceConfigurationDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/SessionPersistenceConfigurationDetails.java @@ -6,8 +6,7 @@ /** * The configuration details for implementing session persistence. Session persistence enables the Load Balancing * Service to direct any number of requests that originate from a single logical client to a single backend web server. - *

- * For more information on session persistence, see [Session Persistence](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/sessionpersistence.htm). + * For more information, see [Session Persistence](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/sessionpersistence.htm). *

* To disable session persistence on a running load balancer, use the * {@link #updateBackendSet(UpdateBackendSetRequest) updateBackendSet} operation and specify \"null\" for the @@ -59,6 +58,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("cookieName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 4096) String cookieName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateHealthCheckerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateHealthCheckerDetails.java index 059efde4593..ef98e47b326 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateHealthCheckerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateHealthCheckerDetails.java @@ -118,6 +118,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("responseBodyRegex") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(max = 255) String responseBodyRegex; /** @@ -143,7 +144,8 @@ public static Builder builder() { Integer returnCode; /** - * The maximum timeout in milliseconds before a retry. + * The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + * returns within this timeout period. *

* Example: `6000` * @@ -164,5 +166,6 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("urlPath") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(max = 1024) String urlPath; } diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java index 3e8e43581d1..fe4fda2c3e4 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateListenerDetails.java @@ -55,6 +55,7 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("defaultBackendSetName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 32) String defaultBackendSetName; /** diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java index 538d22474c3..47c63e78fec 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/model/UpdateLoadBalancerDetails.java @@ -38,6 +38,7 @@ public static Builder builder() { /** * The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. + * Avoid entering confidential information. *

* Example: `My load balancer` * @@ -45,5 +46,6 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("displayName") @javax.validation.Valid @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(min = 1, max = 1024) String displayName; } diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/CreateBackendRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/CreateBackendRequest.java index ecc99321865..3956bb72558 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/CreateBackendRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/CreateBackendRequest.java @@ -23,7 +23,7 @@ public class CreateBackendRequest { /** * The name of the backend set to add the backend server to. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendRequest.java index 750d8976727..f5a60e1d1a5 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendRequest.java @@ -18,15 +18,15 @@ public class DeleteBackendRequest { /** * The name of the backend set associated with the backend server. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; /** - * The name of the backend server to remove. + * The IP address and port of the backend server to remove. *

- * Example: `My backend server` + * Example: `1.1.1.7:42` * */ private String backendName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendSetRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendSetRequest.java index d791234db54..9d74d0c6d3d 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendSetRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteBackendSetRequest.java @@ -18,7 +18,7 @@ public class DeleteBackendSetRequest { /** * The name of the backend set to delete. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteCertificateRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteCertificateRequest.java index 6e8c11b05cb..ebb461531f9 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteCertificateRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/DeleteCertificateRequest.java @@ -18,7 +18,7 @@ public class DeleteCertificateRequest { /** * The name of the certificate to delete. *

- * Example: `My certificate` + * Example: `My_certificate_bundle` * */ private String certificateName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendHealthRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendHealthRequest.java new file mode 100644 index 00000000000..60f20b382b8 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendHealthRequest.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.requests; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetBackendHealthRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend server health status to be retrieved. + */ + private String loadBalancerId; + + /** + * The name of the backend set associated with the backend server to retrieve the health status for. + *

+ * Example: `My_backend_set` + * + */ + private String backendSetName; + + /** + * The IP address and port of the backend server to retrieve the health status for. + *

+ * Example: `1.1.1.7:42` + * + */ + private String backendName; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetBackendHealthRequest o) { + loadBalancerId(o.getLoadBalancerId()); + backendSetName(o.getBackendSetName()); + backendName(o.getBackendName()); + opcRequestId(o.getOpcRequestId()); + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendRequest.java index 88cf7a55088..e84795fefef 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendRequest.java @@ -18,15 +18,15 @@ public class GetBackendRequest { /** * The name of the backend set that includes the backend server. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; /** - * The name of the backend server to retrieve. + * The IP address and port of the backend server to retrieve. *

- * Example: `My backend server` + * Example: `1.1.1.7:42` * */ private String backendName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetHealthRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetHealthRequest.java new file mode 100644 index 00000000000..896605fe58c --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetHealthRequest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.requests; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetBackendSetHealthRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set health status to be retrieved. + */ + private String loadBalancerId; + + /** + * The name of the backend set to retrieve the health status for. + *

+ * Example: `My_backend_set` + * + */ + private String backendSetName; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetBackendSetHealthRequest o) { + loadBalancerId(o.getLoadBalancerId()); + backendSetName(o.getBackendSetName()); + opcRequestId(o.getOpcRequestId()); + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetRequest.java index 19158f11ba6..d107ed4e2d2 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetBackendSetRequest.java @@ -18,7 +18,7 @@ public class GetBackendSetRequest { /** * The name of the backend set to retrieve. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetHealthCheckerRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetHealthCheckerRequest.java index bec8d88d8d2..b8d3b1bc4d6 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetHealthCheckerRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetHealthCheckerRequest.java @@ -16,9 +16,9 @@ public class GetHealthCheckerRequest { private String loadBalancerId; /** - * The name of the backend associated with the health check policy to be retrieved. + * The name of the backend set associated with the health check policy to be retrieved. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetLoadBalancerHealthRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetLoadBalancerHealthRequest.java new file mode 100644 index 00000000000..974617b7447 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/GetLoadBalancerHealthRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.requests; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetLoadBalancerHealthRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to return health status for. + */ + private String loadBalancerId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetLoadBalancerHealthRequest o) { + loadBalancerId(o.getLoadBalancerId()); + opcRequestId(o.getOpcRequestId()); + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListBackendsRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListBackendsRequest.java index e8557552607..a62c7b2962c 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListBackendsRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListBackendsRequest.java @@ -18,7 +18,7 @@ public class ListBackendsRequest { /** * The name of the backend set associated with the backend servers. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListLoadBalancerHealthsRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListLoadBalancerHealthsRequest.java new file mode 100644 index 00000000000..1efa525a80d --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/ListLoadBalancerHealthsRequest.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.requests; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListLoadBalancerHealthsRequest { + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to return health status information for. + */ + private String compartmentId; + + /** + * The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The maximum number of items to return in a paginated \"List\" call. + *

+ * Example: `500` + * + */ + private Long limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + *

+ * Example: `3` + * + */ + private String page; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListLoadBalancerHealthsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendRequest.java index 06e54adb06a..dab88afa807 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendRequest.java @@ -23,15 +23,15 @@ public class UpdateBackendRequest { /** * The name of the backend set associated with the backend server. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; /** - * The name of the backend server to update. + * The IP address and port of the backend server to update. *

- * Example: `My backend server` + * Example: `1.1.1.7:42` * */ private String backendName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendSetRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendSetRequest.java index 886e52c54dc..fa18442785d 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendSetRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateBackendSetRequest.java @@ -23,7 +23,7 @@ public class UpdateBackendSetRequest { /** * The name of the backend set to update. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateHealthCheckerRequest.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateHealthCheckerRequest.java index d4210e7ecc5..7f13fb3739f 100644 --- a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateHealthCheckerRequest.java +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/requests/UpdateHealthCheckerRequest.java @@ -23,7 +23,7 @@ public class UpdateHealthCheckerRequest { /** * The name of the backend set associated with the health check policy to be retrieved. *

- * Example: `My backend set` + * Example: `My_backend_set` * */ private String backendSetName; diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendHealthResponse.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendHealthResponse.java new file mode 100644 index 00000000000..9746e8ff440 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendHealthResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.responses; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetBackendHealthResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned BackendHealth instance. + */ + private BackendHealth backendHealth; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetBackendHealthResponse o) { + opcRequestId(o.getOpcRequestId()); + backendHealth(o.getBackendHealth()); + + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendSetHealthResponse.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendSetHealthResponse.java new file mode 100644 index 00000000000..e1a296c1616 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetBackendSetHealthResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.responses; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetBackendSetHealthResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned BackendSetHealth instance. + */ + private BackendSetHealth backendSetHealth; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetBackendSetHealthResponse o) { + opcRequestId(o.getOpcRequestId()); + backendSetHealth(o.getBackendSetHealth()); + + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetLoadBalancerHealthResponse.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetLoadBalancerHealthResponse.java new file mode 100644 index 00000000000..fdb8af2fd52 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/GetLoadBalancerHealthResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.responses; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetLoadBalancerHealthResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned LoadBalancerHealth instance. + */ + private LoadBalancerHealth loadBalancerHealth; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetLoadBalancerHealthResponse o) { + opcRequestId(o.getOpcRequestId()); + loadBalancerHealth(o.getLoadBalancerHealth()); + + return this; + } + } +} diff --git a/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/ListLoadBalancerHealthsResponse.java b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/ListLoadBalancerHealthsResponse.java new file mode 100644 index 00000000000..bedc55092d7 --- /dev/null +++ b/bmc-loadbalancer/src/main/java/com/oracle/bmc/loadbalancer/responses/ListLoadBalancerHealthsResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.loadbalancer.responses; + +import com.oracle.bmc.loadbalancer.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20170115") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListLoadBalancerHealthsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of LoadBalancerHealthSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListLoadBalancerHealthsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 0a618b3a69f..946cc3ce85d 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -3,22 +3,22 @@ 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 ../pom.xml - oracle-bmc-java-sdk-objectstorage - Oracle Bare Metal Cloud Services SDK - Object Storage - This project contains the SDK used for Oracle Bare Metal Cloud Object Storage Service + oci-java-sdk-objectstorage + Oracle Cloud Infrastructure SDK - Object Storage + This project contains the SDK used for Oracle Cloud Infrastructure Object Storage Service https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm - com.oracle.bmc.sdk - oracle-bmc-java-sdk-common - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk-common + 1.2.15 diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index 7d342fab4dd..51a465e6239 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -56,10 +56,6 @@ public interface ObjectStorage extends AutoCloseable { /** * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -171,10 +167,6 @@ GetPreauthenticatedRequestResponse getPreauthenticatedRequest( /** * Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket * and does not contain fields like the user-defined metadata. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -203,10 +195,6 @@ ListMultipartUploadPartsResponse listMultipartUploadParts( /** * Lists the objects in a bucket. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -226,10 +214,6 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( /** * Creates a new object or overwrites an existing one. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * @param request The request object containing the details to send * @return A response object containing details about the completed operation diff --git a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index 34831df6b22..7ddff22c639 100644 --- a/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -72,10 +72,6 @@ java.util.concurrent.Future commitMultipartUpload /** * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * * @param request The request object containing the details to send @@ -272,10 +268,6 @@ java.util.concurrent.Future headObject( /** * Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket * and does not contain fields like the user-defined metadata. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * * @param request The request object containing the details to send @@ -325,10 +317,6 @@ java.util.concurrent.Future listMultipartUploads( /** * Lists the objects in a bucket. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * * @param request The request object containing the details to send @@ -362,10 +350,6 @@ java.util.concurrent.Future listPreauthent /** * Creates a new object or overwrites an existing one. - *

- * To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized, - * talk to an administrator. If you're an administrator who needs to write policies to give users access, see - * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). * * * @param request The request object containing the details to send diff --git a/pom.xml b/pom.xml index b32732bb2ae..0f63142ccb2 100644 --- a/pom.xml +++ b/pom.xml @@ -2,13 +2,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.oracle.bmc.sdk - oracle-bmc-java-sdk - 1.2.13 + com.oracle.oci.sdk + oci-java-sdk + 1.2.15 pom - Oracle Bare Metal Cloud Services SDK - This project contains the SDK used for Oracle Bare Metal Cloud Services + Oracle Cloud Infrastructure SDK + This project contains the SDK used for Oracle Cloud Infrastructure https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm 2016