diff --git a/CHANGELOG.md b/CHANGELOG.md index 977cf92c29..c4376e737b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 1.2.3 - 2020-07-14 +### Added +- Support for Instance Principal +- Support for the Blockchain service +- Support for failing over an autonomous database that has Data Guard enabled in the Database service +- Support for switching over an autonomous database that has Data Guard enabled in the Database service +- Support for git configuration sources in the Resource Manager service +- Support for optionally specifying a VCN id on list operations of DHCP options, subnets, security lists, route tables, internet gateways, and local peering gateways in the Networking service + ## 1.2.2 - 2020-07-07 ### Added - Support for registering and deregistering autonomous dedicated databases with Data Safe in the Database service diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 758a511336..4a04cdac7d 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -790,3 +790,706 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------------- + +jsonsebtoken 8.5.1 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2015 Auth0, Inc. (http://auth0.com) +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +4th Party Software dependencies + +jws 3.2.2 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +jwa 1.4.1 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +buffer-equal-constant-time 1.0.1 +------------------------------------------------------------------- +Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License. + +Copyright + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +ecdsa-sig-formatter 1.0.11 +------------------------------------------------------------------- +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 D2L Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and +limitations under the License. + + + +safe-buffer 5.2.0 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +lodash.includes 4.3.0 +------------------------------------------------------------------- +The MIT License (MIT) + +The MIT License + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + + +lodash.isboolean 3.0.3 +------------------------------------------------------------------- +The MIT License (MIT) + +The MIT License + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + + +lodash.isinteger 4.0.4 +------------------------------------------------------------------- +The MIT License (MIT) + +The MIT License + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + + +lodash.isnumber 3.0.3 +------------------------------------------------------------------- +The MIT License (MIT) + +The MIT License + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +lodash.isplainobject 4.0.6 +------------------------------------------------------------------- +The MIT License (MIT) + +The MIT License + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +lodash.isstring 4.0.1 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +lodash.once 4.1.1 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +ms 2.1.2 +------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + +semver 6.3.0 +------------------------------------------------------------------- +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +------------------------------------------------------------------- \ No newline at end of file diff --git a/examples/javascript/instance-principal.js b/examples/javascript/instance-principal.js new file mode 100644 index 0000000000..90cbee3011 --- /dev/null +++ b/examples/javascript/instance-principal.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/* + * This example demostrates the usage of Instance Principal. In order to run this example, this code + * must be in an Oracle Cloud instance. The Instance Principal will utiltize internal resources to + * create an authentication provider. Refer to: + * https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm + * for more details. + */ + +const identity = require("oci-identity"); +const common = require("oci-common"); + +(async () => { + const authenticationProvider = await new common.InstancePrincipalsAuthenticationDetailsProviderBuilder().build(); + try { + const identityClient = await new identity.IdentityClient({ + authenticationDetailsProvider: authenticationProvider + }); + const regions = await identityClient.listRegions({}); + console.log("Regions: ", JSON.stringify(regions)); + } catch (e) { + throw Error(`Failed with error: ${e}`); + } +})(); diff --git a/examples/typescript/instance-principal.ts b/examples/typescript/instance-principal.ts new file mode 100644 index 0000000000..7f6897ca14 --- /dev/null +++ b/examples/typescript/instance-principal.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/* + * This example demostrates the usage of Instance Principal. In order to run this example, this code + * must be in an Oracle Cloud instance. The Instance Principal will utiltize internal resources to + * create an authentication provider. Refer to: + * https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm + * for more details. + */ + +import * as identity from "oci-identity"; +import common = require("oci-common"); + +(async () => { + const authenticationProvider = await new common.InstancePrincipalsAuthenticationDetailsProviderBuilder().build(); + try { + const identityClient = await new identity.IdentityClient({ + authenticationDetailsProvider: authenticationProvider + }); + const regions = await identityClient.listRegions({}); + console.log("Regions: ", JSON.stringify(regions)); + } catch (e) { + throw Error(`Failed with error: ${e}`); + } +})(); diff --git a/index.ts b/index.ts index 4e30030520..a25fbc641d 100755 --- a/index.ts +++ b/index.ts @@ -135,3 +135,4 @@ export import secrets = require("oci-secrets"); export import dataintegration = require("oci-dataintegration"); export import ocvp = require("oci-ocvp"); export import usageapi = require("oci-usageapi"); +export import blockchain = require("oci-blockchain"); diff --git a/lib/analytics/package.json b/lib/analytics/package.json index f49001e8d7..c48d555434 100644 --- a/lib/analytics/package.json +++ b/lib/analytics/package.json @@ -1,6 +1,6 @@ { "name": "oci-analytics", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Analytics Service", "repository": { "type": "git", diff --git a/lib/announcementsservice/package.json b/lib/announcementsservice/package.json index 1be915ddb4..5ff341a0e0 100644 --- a/lib/announcementsservice/package.json +++ b/lib/announcementsservice/package.json @@ -1,6 +1,6 @@ { "name": "oci-announcementsservice", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Announcement Service", "repository": { "type": "git", diff --git a/lib/apigateway/package.json b/lib/apigateway/package.json index 93bbaf8c0f..cc87600dd8 100644 --- a/lib/apigateway/package.json +++ b/lib/apigateway/package.json @@ -1,6 +1,6 @@ { "name": "oci-apigateway", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for API gateway service", "repository": { "type": "git", diff --git a/lib/applicationmigration/package.json b/lib/applicationmigration/package.json index aabc66bd6e..0c8379b51e 100644 --- a/lib/applicationmigration/package.json +++ b/lib/applicationmigration/package.json @@ -1,6 +1,6 @@ { "name": "oci-applicationmigration", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Application Migration service", "repository": { "type": "git", diff --git a/lib/audit/package.json b/lib/audit/package.json index 377fe8470a..58e17d7608 100644 --- a/lib/audit/package.json +++ b/lib/audit/package.json @@ -1,6 +1,6 @@ { "name": "oci-audit", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Audit Service", "repository": { "type": "git", diff --git a/lib/autoscaling/package.json b/lib/autoscaling/package.json index c5dbd4204d..7a6bed795d 100644 --- a/lib/autoscaling/package.json +++ b/lib/autoscaling/package.json @@ -1,6 +1,6 @@ { "name": "oci-autoscaling", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Autoscaling Service", "repository": { "type": "git", diff --git a/lib/bds/package.json b/lib/bds/package.json index fc75e87409..54b7f4a5c3 100644 --- a/lib/bds/package.json +++ b/lib/bds/package.json @@ -1,6 +1,6 @@ { "name": "oci-bds", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for BDS Service", "repository": { "type": "git", diff --git a/lib/blockchain/README.md b/lib/blockchain/README.md new file mode 100644 index 0000000000..eb2072a531 --- /dev/null +++ b/lib/blockchain/README.md @@ -0,0 +1,22 @@ + +# OCI NodeJS client for Blockchain Service + +This module enables you to write code to manage resources for Blockchain Service. + +## Requirements + +To use this module, you must have the following: + +- An Oracle Cloud Infrastructure account. +- A user created in that account, in a group with a policy that grants the desired permissions. This can be a user for yourself, or another person/system that needs to call the API. For an example of how to set up a new user, group, compartment, and policy, see [Adding Users](https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/addingusers.htm). For a list of typical policies you may want to use, see [Common Policies](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm). +- A key pair used for signing API requests, with the public key uploaded to Oracle. Only the user calling the API should be in possession of the private key. For more information, see [Configuring Credentials](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdkgettingstarted.htm#Configure) + +## Installing + +Use the following command to install this module: + +``` +npm install oci-blockchain +``` + +Alternatively you can git clone this repo. diff --git a/lib/blockchain/index.ts b/lib/blockchain/index.ts new file mode 100644 index 0000000000..5a248393f3 --- /dev/null +++ b/lib/blockchain/index.ts @@ -0,0 +1,24 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as requests from "./lib/request"; +import * as models from "./lib/model"; +import * as responses from "./lib/response"; +import * as client from "./lib/client"; +import * as blockchainplatform_waiter from "./lib/blockchainplatform-waiter"; + +export { models }; +export { requests }; +export { responses }; +export import BlockchainPlatformClient = client.BlockchainPlatformClient; +export import BlockchainPlatformWaiter = blockchainplatform_waiter.BlockchainPlatformWaiter; diff --git a/lib/blockchain/lib/blockchainplatform-waiter.ts b/lib/blockchain/lib/blockchainplatform-waiter.ts new file mode 100644 index 0000000000..271761335c --- /dev/null +++ b/lib/blockchain/lib/blockchainplatform-waiter.ts @@ -0,0 +1,96 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as serviceRequests from "./request"; +import * as serviceResponses from "./response"; +import * as models from "./model"; +import { BlockchainPlatformClient } from "./client"; +import { genericWaiter, genericTerminalConditionWaiter, WaiterConfiguration } from "oci-common"; + +export class BlockchainPlatformWaiter { + public constructor( + private client: BlockchainPlatformClient, + private readonly config?: WaiterConfiguration + ) {} + + /** + * Waits forBlockchainPlatform till it reaches any of the provided states + * + * @param request the request to send + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return response returns GetBlockchainPlatformResponse | null (null in case of 404 response) + */ + public async forBlockchainPlatform( + request: serviceRequests.GetBlockchainPlatformRequest, + ...targetStates: models.BlockchainPlatform.LifecycleState[] + ): Promise { + return genericTerminalConditionWaiter( + this.config, + () => this.client.getBlockchainPlatform(request), + response => targetStates.exists(response.blockchainPlatform.lifecycleState), + targetStates.includes(models.BlockchainPlatform.LifecycleState.DELETED) + ); + } + + /** + * Waits forOsn till it reaches any of the provided states + * + * @param request the request to send + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return response returns GetOsnResponse + */ + public async forOsn( + request: serviceRequests.GetOsnRequest, + ...targetStates: models.Osn.LifecycleState[] + ): Promise { + return genericWaiter( + this.config, + () => this.client.getOsn(request), + response => targetStates.exists(response.osn.lifecycleState) + ); + } + + /** + * Waits forPeer till it reaches any of the provided states + * + * @param request the request to send + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return response returns GetPeerResponse + */ + public async forPeer( + request: serviceRequests.GetPeerRequest, + ...targetStates: models.Peer.LifecycleState[] + ): Promise { + return genericWaiter( + this.config, + () => this.client.getPeer(request), + response => targetStates.exists(response.peer.lifecycleState) + ); + } + + /** + * Waits forWorkRequest + * + * @param request the request to send + * @return response returns GetWorkRequestResponse + */ + public async forWorkRequest( + request: serviceRequests.GetWorkRequestRequest + ): Promise { + return genericWaiter( + this.config, + () => this.client.getWorkRequest(request), + response => (response.workRequest.timeFinished ? true : false) + ); + } +} diff --git a/lib/blockchain/lib/client.ts b/lib/blockchain/lib/client.ts new file mode 100644 index 0000000000..4a3c0f43e0 --- /dev/null +++ b/lib/blockchain/lib/client.ts @@ -0,0 +1,1647 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import common = require("oci-common"); +import * as requests from "./request"; +import * as models from "./model"; +import * as responses from "./response"; +import { BlockchainPlatformWaiter } from "./blockchainplatform-waiter"; +import { composeResponse, composeRequest } from "oci-common"; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum BlockchainPlatformApiKeys {} + +export class BlockchainPlatformClient { + protected static serviceEndpointTemplate = "https://blockchain.{region}.oci.{secondLevelDomain}"; + protected "_endpoint": string = ""; + protected "_defaultHeaders": any = {}; + protected "_waiters": BlockchainPlatformWaiter; + + protected _httpClient: common.HttpClient; + + constructor(params: common.AuthParams) { + const requestSigner = params.authenticationDetailsProvider + ? new common.DefaultRequestSigner(params.authenticationDetailsProvider) + : null; + this._httpClient = params.httpClient || new common.FetchHttpClient(requestSigner); + + if ( + params.authenticationDetailsProvider && + common.isRegionProvider(params.authenticationDetailsProvider) + ) { + const provider: common.RegionProvider = params.authenticationDetailsProvider; + if (provider.getRegion()) { + this.region = provider.getRegion(); + } + } + } + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + public set endpoint(endpoint: string) { + this._endpoint = endpoint; + this._endpoint = this._endpoint + "/20191010"; + if (this.logger) this.logger.info(`BlockchainPlatformClient endpoint set to ${this._endpoint}`); + } + + public get logger() { + return common.LOG.logger; + } + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint. + * @param region The region of the service. + */ + public set region(region: common.Region) { + this.endpoint = common.EndpointBuilder.createEndpointFromRegion( + BlockchainPlatformClient.serviceEndpointTemplate, + region + ); + } + + /** + * Sets the regionId to call (ex, 'us-phoenix-1'). + * + * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. + * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 + * and then call {@link #endpoint(String) endpoint}. + * @param regionId The public region ID. + */ + public set regionId(regionId: string) { + this.endpoint = common.EndpointBuilder.createEndpointFromRegionId( + BlockchainPlatformClient.serviceEndpointTemplate, + regionId + ); + } + + /** + * Creates a new BlockchainPlatformWaiter for resources for this service. + * + * @param config The waiter configuration for termination and delay strategy + * @return The service waiters. + */ + public createWaiters(config?: common.WaiterConfiguration): BlockchainPlatformWaiter { + this._waiters = new BlockchainPlatformWaiter(this, config); + return this._waiters; + } + + /** + * Gets the waiters available for resources for this service. + * + * @return The service waiters. + */ + public getWaiters(): BlockchainPlatformWaiter { + if (this._waiters) { + return this._waiters; + } + throw Error("Waiters do not exist. Please create waiters."); + } + + /** + * Change Blockchain Platform Compartment + * @param ChangeBlockchainPlatformCompartmentRequest + * @return ChangeBlockchainPlatformCompartmentResponse + * @throws OciError when an error occurs + */ + public async changeBlockchainPlatformCompartment( + changeBlockchainPlatformCompartmentRequest: requests.ChangeBlockchainPlatformCompartmentRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation BlockchainPlatformClient#changeBlockchainPlatformCompartment." + ); + const pathParams = { + "{blockchainPlatformId}": changeBlockchainPlatformCompartmentRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": changeBlockchainPlatformCompartmentRequest.ifMatch, + "opc-request-id": changeBlockchainPlatformCompartmentRequest.opcRequestId, + "opc-retry-token": changeBlockchainPlatformCompartmentRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/actions/changeCompartment", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + changeBlockchainPlatformCompartmentRequest.changeBlockchainPlatformCompartmentDetails, + "ChangeBlockchainPlatformCompartmentDetails", + models.ChangeBlockchainPlatformCompartmentDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Creates a new Blockchain Platform. + * + * @param CreateBlockchainPlatformRequest + * @return CreateBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async createBlockchainPlatform( + createBlockchainPlatformRequest: requests.CreateBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#createBlockchainPlatform."); + const pathParams = {}; + + const queryParams = {}; + + let headerParams = { + "opc-retry-token": createBlockchainPlatformRequest.opcRetryToken, + "opc-request-id": createBlockchainPlatformRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + createBlockchainPlatformRequest.createBlockchainPlatformDetails, + "CreateBlockchainPlatformDetails", + models.CreateBlockchainPlatformDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Create Blockchain Platform Osn + * @param CreateOsnRequest + * @return CreateOsnResponse + * @throws OciError when an error occurs + */ + public async createOsn( + createOsnRequest: requests.CreateOsnRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#createOsn."); + const pathParams = { + "{blockchainPlatformId}": createOsnRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": createOsnRequest.ifMatch, + "opc-request-id": createOsnRequest.opcRequestId, + "opc-retry-token": createOsnRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/osns", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + createOsnRequest.createOsnDetails, + "CreateOsnDetails", + models.CreateOsnDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Create Blockchain Platform Peer + * @param CreatePeerRequest + * @return CreatePeerResponse + * @throws OciError when an error occurs + */ + public async createPeer( + createPeerRequest: requests.CreatePeerRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#createPeer."); + const pathParams = { + "{blockchainPlatformId}": createPeerRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": createPeerRequest.opcRequestId, + "opc-retry-token": createPeerRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/peers", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + createPeerRequest.createPeerDetails, + "CreatePeerDetails", + models.CreatePeerDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Delete a particular of a Blockchain Platform + * @param DeleteBlockchainPlatformRequest + * @return DeleteBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async deleteBlockchainPlatform( + deleteBlockchainPlatformRequest: requests.DeleteBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#deleteBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": deleteBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": deleteBlockchainPlatformRequest.opcRequestId, + "if-match": deleteBlockchainPlatformRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}", + method: "DELETE", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Delete a particular OSN of a Blockchain Platform + * @param DeleteOsnRequest + * @return DeleteOsnResponse + * @throws OciError when an error occurs + */ + public async deleteOsn( + deleteOsnRequest: requests.DeleteOsnRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#deleteOsn."); + const pathParams = { + "{blockchainPlatformId}": deleteOsnRequest.blockchainPlatformId, + "{osnId}": deleteOsnRequest.osnId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": deleteOsnRequest.opcRequestId, + "if-match": deleteOsnRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}", + method: "DELETE", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Delete a particular peer of a Blockchain Platform + * @param DeletePeerRequest + * @return DeletePeerResponse + * @throws OciError when an error occurs + */ + public async deletePeer( + deletePeerRequest: requests.DeletePeerRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#deletePeer."); + const pathParams = { + "{blockchainPlatformId}": deletePeerRequest.blockchainPlatformId, + "{peerId}": deletePeerRequest.peerId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": deletePeerRequest.opcRequestId, + "if-match": deletePeerRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}", + method: "DELETE", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Attempts to cancel the work request with the given ID. + * @param DeleteWorkRequestRequest + * @return DeleteWorkRequestResponse + * @throws OciError when an error occurs + */ + public async deleteWorkRequest( + deleteWorkRequestRequest: requests.DeleteWorkRequestRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#deleteWorkRequest."); + const pathParams = { + "{workRequestId}": deleteWorkRequestRequest.workRequestId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": deleteWorkRequestRequest.opcRequestId, + "if-match": deleteWorkRequestRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/workRequests/{workRequestId}", + method: "DELETE", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Gets information about a Blockchain Platform identified by the specific id + * @param GetBlockchainPlatformRequest + * @return GetBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async getBlockchainPlatform( + getBlockchainPlatformRequest: requests.GetBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#getBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": getBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": getBlockchainPlatformRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "blockchainPlatform", + bodyModel: "model.BlockchainPlatform", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Gets information about an OSN identified by the specific id + * @param GetOsnRequest + * @return GetOsnResponse + * @throws OciError when an error occurs + */ + public async getOsn(getOsnRequest: requests.GetOsnRequest): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#getOsn."); + const pathParams = { + "{blockchainPlatformId}": getOsnRequest.blockchainPlatformId, + "{osnId}": getOsnRequest.osnId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": getOsnRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "osn", + bodyModel: "model.Osn", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Gets information about a peer identified by the specific id + * @param GetPeerRequest + * @return GetPeerResponse + * @throws OciError when an error occurs + */ + public async getPeer( + getPeerRequest: requests.GetPeerRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#getPeer."); + const pathParams = { + "{blockchainPlatformId}": getPeerRequest.blockchainPlatformId, + "{peerId}": getPeerRequest.peerId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": getPeerRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "peer", + bodyModel: "model.Peer", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Gets the status of the work request with the given ID. + * @param GetWorkRequestRequest + * @return GetWorkRequestResponse + * @throws OciError when an error occurs + */ + public async getWorkRequest( + getWorkRequestRequest: requests.GetWorkRequestRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#getWorkRequest."); + const pathParams = { + "{workRequestId}": getWorkRequestRequest.workRequestId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": getWorkRequestRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/workRequests/{workRequestId}", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "workRequest", + bodyModel: "model.WorkRequest", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("retry-after"), + key: "retryAfter", + dataType: "number" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Returns a list Blockchain Platform Instances in a compartment + * @param ListBlockchainPlatformsRequest + * @return ListBlockchainPlatformsResponse + * @throws OciError when an error occurs + */ + public async listBlockchainPlatforms( + listBlockchainPlatformsRequest: requests.ListBlockchainPlatformsRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#listBlockchainPlatforms."); + const pathParams = {}; + + const queryParams = { + "compartmentId": listBlockchainPlatformsRequest.compartmentId, + "displayName": listBlockchainPlatformsRequest.displayName, + "page": listBlockchainPlatformsRequest.page, + "limit": listBlockchainPlatformsRequest.limit, + "sortOrder": listBlockchainPlatformsRequest.sortOrder, + "sortBy": listBlockchainPlatformsRequest.sortBy, + "lifecycleState": listBlockchainPlatformsRequest.lifecycleState + }; + + let headerParams = { + "opc-request-id": listBlockchainPlatformsRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "blockchainPlatformCollection", + bodyModel: "model.BlockchainPlatformCollection", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * List Blockchain Platform OSNs + * @param ListOsnsRequest + * @return ListOsnsResponse + * @throws OciError when an error occurs + */ + public async listOsns( + listOsnsRequest: requests.ListOsnsRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#listOsns."); + const pathParams = { + "{blockchainPlatformId}": listOsnsRequest.blockchainPlatformId + }; + + const queryParams = { + "displayName": listOsnsRequest.displayName, + "sortOrder": listOsnsRequest.sortOrder, + "sortBy": listOsnsRequest.sortBy, + "page": listOsnsRequest.page, + "limit": listOsnsRequest.limit + }; + + let headerParams = { + "opc-request-id": listOsnsRequest.opcRequestId, + "opc-retry-token": listOsnsRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/osns", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "osnCollection", + bodyModel: "model.OsnCollection", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * List Blockchain Platform Peers + * @param ListPeersRequest + * @return ListPeersResponse + * @throws OciError when an error occurs + */ + public async listPeers( + listPeersRequest: requests.ListPeersRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#listPeers."); + const pathParams = { + "{blockchainPlatformId}": listPeersRequest.blockchainPlatformId + }; + + const queryParams = { + "displayName": listPeersRequest.displayName, + "sortOrder": listPeersRequest.sortOrder, + "sortBy": listPeersRequest.sortBy, + "page": listPeersRequest.page, + "limit": listPeersRequest.limit + }; + + let headerParams = { + "opc-request-id": listPeersRequest.opcRequestId, + "opc-retry-token": listPeersRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/peers", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "peerCollection", + bodyModel: "model.PeerCollection", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Return a (paginated) list of errors for a given work request. + * + * @param ListWorkRequestErrorsRequest + * @return ListWorkRequestErrorsResponse + * @throws OciError when an error occurs + */ + public async listWorkRequestErrors( + listWorkRequestErrorsRequest: requests.ListWorkRequestErrorsRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#listWorkRequestErrors."); + const pathParams = { + "{workRequestId}": listWorkRequestErrorsRequest.workRequestId + }; + + const queryParams = { + "page": listWorkRequestErrorsRequest.page, + "limit": listWorkRequestErrorsRequest.limit + }; + + let headerParams = { + "opc-request-id": listWorkRequestErrorsRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/workRequests/{workRequestId}/errors", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "workRequestErrorCollection", + bodyModel: "model.WorkRequestErrorCollection", + responseHeaders: [ + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Return a (paginated) list of logs for a given work request. + * + * @param ListWorkRequestLogsRequest + * @return ListWorkRequestLogsResponse + * @throws OciError when an error occurs + */ + public async listWorkRequestLogs( + listWorkRequestLogsRequest: requests.ListWorkRequestLogsRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#listWorkRequestLogs."); + const pathParams = { + "{workRequestId}": listWorkRequestLogsRequest.workRequestId + }; + + const queryParams = { + "page": listWorkRequestLogsRequest.page, + "limit": listWorkRequestLogsRequest.limit + }; + + let headerParams = { + "opc-request-id": listWorkRequestLogsRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/workRequests/{workRequestId}/logs", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "workRequestLogEntryCollection", + bodyModel: "model.WorkRequestLogEntryCollection", + responseHeaders: [ + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Lists the work requests in a compartment. + * + * @param ListWorkRequestsRequest + * @return ListWorkRequestsResponse + * @throws OciError when an error occurs + */ + public async listWorkRequests( + listWorkRequestsRequest: requests.ListWorkRequestsRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#listWorkRequests."); + const pathParams = {}; + + const queryParams = { + "compartmentId": listWorkRequestsRequest.compartmentId, + "blockchainPlatformId": listWorkRequestsRequest.blockchainPlatformId, + "sortOrder": listWorkRequestsRequest.sortOrder, + "sortBy": listWorkRequestsRequest.sortBy, + "page": listWorkRequestsRequest.page, + "limit": listWorkRequestsRequest.limit + }; + + let headerParams = { + "opc-request-id": listWorkRequestsRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/workRequests", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "workRequestCollection", + bodyModel: "model.WorkRequestCollection", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Preview Scale Blockchain Platform + * @param PreviewScaleBlockchainPlatformRequest + * @return PreviewScaleBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async previewScaleBlockchainPlatform( + previewScaleBlockchainPlatformRequest: requests.PreviewScaleBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation BlockchainPlatformClient#previewScaleBlockchainPlatform." + ); + const pathParams = { + "{blockchainPlatformId}": previewScaleBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": previewScaleBlockchainPlatformRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/actions/scale/preview", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + previewScaleBlockchainPlatformRequest.scaleBlockchainPlatformDetails, + "ScaleBlockchainPlatformDetails", + models.ScaleBlockchainPlatformDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "scaledBlockchainPlatformPreview", + bodyModel: "model.ScaledBlockchainPlatformPreview", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Scale Blockchain Platform + * @param ScaleBlockchainPlatformRequest + * @return ScaleBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async scaleBlockchainPlatform( + scaleBlockchainPlatformRequest: requests.ScaleBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#scaleBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": scaleBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": scaleBlockchainPlatformRequest.ifMatch, + "opc-request-id": scaleBlockchainPlatformRequest.opcRequestId, + "opc-retry-token": scaleBlockchainPlatformRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/actions/scale", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + scaleBlockchainPlatformRequest.scaleBlockchainPlatformDetails, + "ScaleBlockchainPlatformDetails", + models.ScaleBlockchainPlatformDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Start a Blockchain Platform + * @param StartBlockchainPlatformRequest + * @return StartBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async startBlockchainPlatform( + startBlockchainPlatformRequest: requests.StartBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#startBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": startBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": startBlockchainPlatformRequest.ifMatch, + "opc-request-id": startBlockchainPlatformRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/actions/start", + method: "POST", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Stop a Blockchain Platform + * @param StopBlockchainPlatformRequest + * @return StopBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async stopBlockchainPlatform( + stopBlockchainPlatformRequest: requests.StopBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#stopBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": stopBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": stopBlockchainPlatformRequest.ifMatch, + "opc-request-id": stopBlockchainPlatformRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/actions/stop", + method: "POST", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Update a particular of a Blockchain Platform + * @param UpdateBlockchainPlatformRequest + * @return UpdateBlockchainPlatformResponse + * @throws OciError when an error occurs + */ + public async updateBlockchainPlatform( + updateBlockchainPlatformRequest: requests.UpdateBlockchainPlatformRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation BlockchainPlatformClient#updateBlockchainPlatform."); + const pathParams = { + "{blockchainPlatformId}": updateBlockchainPlatformRequest.blockchainPlatformId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": updateBlockchainPlatformRequest.opcRequestId, + "if-match": updateBlockchainPlatformRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}", + method: "PUT", + bodyContent: common.ObjectSerializer.serialize( + updateBlockchainPlatformRequest.updateBlockchainPlatformDetails, + "UpdateBlockchainPlatformDetails", + models.UpdateBlockchainPlatformDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Update Blockchain Platform OSN + * @param UpdateOsnRequest + * @return UpdateOsnResponse + * @throws OciError when an error occurs + */ + public async updateOsn( + updateOsnRequest: requests.UpdateOsnRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#updateOsn."); + const pathParams = { + "{blockchainPlatformId}": updateOsnRequest.blockchainPlatformId, + "{osnId}": updateOsnRequest.osnId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": updateOsnRequest.ifMatch, + "opc-request-id": updateOsnRequest.opcRequestId, + "opc-retry-token": updateOsnRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}", + method: "PUT", + bodyContent: common.ObjectSerializer.serialize( + updateOsnRequest.updateOsnDetails, + "UpdateOsnDetails", + models.UpdateOsnDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + + /** + * Update Blockchain Platform Peer + * @param UpdatePeerRequest + * @return UpdatePeerResponse + * @throws OciError when an error occurs + */ + public async updatePeer( + updatePeerRequest: requests.UpdatePeerRequest + ): Promise { + if (this.logger) this.logger.debug("Calling operation BlockchainPlatformClient#updatePeer."); + const pathParams = { + "{blockchainPlatformId}": updatePeerRequest.blockchainPlatformId, + "{peerId}": updatePeerRequest.peerId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": updatePeerRequest.ifMatch, + "opc-request-id": updatePeerRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}", + method: "PUT", + bodyContent: common.ObjectSerializer.serialize( + updatePeerRequest.updatePeerDetails, + "UpdatePeerDetails", + models.UpdatePeerDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } +} diff --git a/lib/blockchain/lib/model/availability-domain.ts b/lib/blockchain/lib/model/availability-domain.ts new file mode 100644 index 0000000000..15db3d22bb --- /dev/null +++ b/lib/blockchain/lib/model/availability-domain.ts @@ -0,0 +1,45 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Availability Domains + */ +export interface AvailabilityDomain { + /** + * Availability Domain Identifiers + */ + "ads"?: AvailabilityDomain.Ads; +} + +export namespace AvailabilityDomain { + export enum Ads { + AD1 = "AD1", + AD2 = "AD2", + AD3 = "AD3", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: AvailabilityDomain): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/blockchain-platform-by-hostname.ts b/lib/blockchain/lib/model/blockchain-platform-by-hostname.ts new file mode 100644 index 0000000000..0fedf40f0a --- /dev/null +++ b/lib/blockchain/lib/model/blockchain-platform-by-hostname.ts @@ -0,0 +1,85 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform Instance Details For Hostname. + */ +export interface BlockchainPlatformByHostname { + /** + * unique identifier that is immutable on creation + */ + "id": string; + /** + * Service endpoint URL, valid post-provisioning + */ + "serviceEndpoint"?: string; + /** + * Platform Instance Display name, can be renamed + */ + "displayName": string; + /** + * Compartment Identifier + */ + "compartmentId": string; + /** + * Platform Instance Description + */ + "description"?: string; + /** + * The time the the Platform Instance was created. An RFC3339 formatted datetime string + */ + "timeCreated"?: Date; + /** + * The time the Platform Instance was updated. An RFC3339 formatted datetime string + */ + "timeUpdated"?: Date; + /** + * Role of platform - founder or participant + */ + "platformRole"?: string; + /** + * Type of compute shape - one of Standard, (Enterprise) Small, Medium, Large or Extra Large + */ + "computeShape": string; + /** + * The current state of the Platform Instance. + */ + "lifecycleState"?: string; + /** + * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + */ + "lifeCycleDetails"?: string; + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: `{\"bar-key\": \"value\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; +} + +export namespace BlockchainPlatformByHostname { + export function getJsonObj(obj: BlockchainPlatformByHostname): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/blockchain-platform-collection.ts b/lib/blockchain/lib/model/blockchain-platform-collection.ts new file mode 100644 index 0000000000..639e09a647 --- /dev/null +++ b/lib/blockchain/lib/model/blockchain-platform-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a platform list or search. Contains BlockchainPlatformSummary + */ +export interface BlockchainPlatformCollection { + /** + * Collection of BlockchainPlatformSummary + */ + "items": Array; +} + +export namespace BlockchainPlatformCollection { + export function getJsonObj(obj: BlockchainPlatformCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.BlockchainPlatformSummary.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/blockchain-platform-component-details.ts b/lib/blockchain/lib/model/blockchain-platform-component-details.ts new file mode 100644 index 0000000000..c2e8381541 --- /dev/null +++ b/lib/blockchain/lib/model/blockchain-platform-component-details.ts @@ -0,0 +1,51 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform component details. + */ +export interface BlockchainPlatformComponentDetails { + /** + * List of OSNs + */ + "osns"?: Array; + /** + * List of Peers + */ + "peers"?: Array; +} + +export namespace BlockchainPlatformComponentDetails { + export function getJsonObj(obj: BlockchainPlatformComponentDetails): object { + const jsonObj = { + ...obj, + ...{ + "osns": obj.osns + ? obj.osns.map(item => { + return model.Osn.getJsonObj(item); + }) + : undefined, + "peers": obj.peers + ? obj.peers.map(item => { + return model.Peer.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/blockchain-platform-summary.ts b/lib/blockchain/lib/model/blockchain-platform-summary.ts new file mode 100644 index 0000000000..2c61822b30 --- /dev/null +++ b/lib/blockchain/lib/model/blockchain-platform-summary.ts @@ -0,0 +1,85 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform Instance Summary. + */ +export interface BlockchainPlatformSummary { + /** + * unique identifier that is immutable on creation + */ + "id": string; + /** + * Platform Instance Display name, can be renamed + */ + "displayName": string; + /** + * Compartment Identifier + */ + "compartmentId": string; + /** + * Platform Instance Description + */ + "description"?: string; + /** + * The time the the Platform Instance was created. An RFC3339 formatted datetime string + */ + "timeCreated"?: Date; + /** + * The time the Platform Instance was updated. An RFC3339 formatted datetime string + */ + "timeUpdated"?: Date; + /** + * Role of platform - founder or participant + */ + "platformRole"?: string; + /** + * Type of compute shape - one of Standard, (Enterprise) Small, Medium, Large or Extra Large + */ + "computeShape": string; + /** + * Service endpoint URL, valid post-provisioning + */ + "serviceEndpoint"?: string; + /** + * The current state of the Platform Instance. + */ + "lifecycleState"?: string; + /** + * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + */ + "lifeCycleDetails"?: string; + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: `{\"bar-key\": \"value\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; +} + +export namespace BlockchainPlatformSummary { + export function getJsonObj(obj: BlockchainPlatformSummary): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/blockchain-platform.ts b/lib/blockchain/lib/model/blockchain-platform.ts new file mode 100644 index 0000000000..a2278951d5 --- /dev/null +++ b/lib/blockchain/lib/model/blockchain-platform.ts @@ -0,0 +1,171 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform Instance Description. + */ +export interface BlockchainPlatform { + /** + * unique identifier that is immutable on creation + */ + "id": string; + /** + * Platform Instance Display name, can be renamed + */ + "displayName": string; + /** + * Compartment Identifier + */ + "compartmentId": string; + /** + * Platform Instance Description + */ + "description"?: string; + /** + * Bring your own license + */ + "isByol"?: boolean; + /** + * The time the the Platform Instance was created. An RFC3339 formatted datetime string + */ + "timeCreated"?: Date; + /** + * The time the Platform Instance was updated. An RFC3339 formatted datetime string + */ + "timeUpdated"?: Date; + /** + * The version of the Platform Instance. + */ + "serviceVersion"?: string; + /** + * Role of platform - founder or participant + */ + "platformRole": BlockchainPlatform.PlatformRole; + /** + * Type of compute shape - one of Standard, (Enterprise) Small, Medium, Large or Extra Large + */ + "computeShape": BlockchainPlatform.ComputeShape; + /** + * Service endpoint URL, valid post-provisioning + */ + "serviceEndpoint"?: string; + /** + * The current state of the Platform Instance. + */ + "lifecycleState"?: BlockchainPlatform.LifecycleState; + /** + * An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + */ + "lifecycleDetails"?: string; + /** + * Storage size in TBs + */ + "storageSizeInTBs"?: number; + /** + * Storage used in TBs + */ + "storageUsedInTBs"?: number; + /** + * True for multi-AD blockchain plaforms, false for single-AD + */ + "isMultiAD"?: boolean; + /** + * Number of total OCPUs allocated to the platform cluster + */ + "totalOcpuCapacity"?: number; + "componentDetails"?: model.BlockchainPlatformComponentDetails; + "replicas"?: model.ReplicaDetails; + /** + * List of OcpuUtilization for all hosts + */ + "hostOcpuUtilizationInfo"?: Array; + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: `{\"bar-key\": \"value\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; +} + +export namespace BlockchainPlatform { + export enum PlatformRole { + FOUNDER = "FOUNDER", + PARTICIPANT = "PARTICIPANT", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export enum ComputeShape { + STANDARD = "STANDARD", + ENTERPRISESMALL = "ENTERPRISE_SMALL", + ENTERPRISEMEDIUM = "ENTERPRISE_MEDIUM", + ENTERPRISELARGE = "ENTERPRISE_LARGE", + ENTERPRISEEXTRALARGE = "ENTERPRISE_EXTRA_LARGE", + ENTERPRISECUSTOM = "ENTERPRISE_CUSTOM", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export enum LifecycleState { + CREATING = "CREATING", + UPDATING = "UPDATING", + ACTIVE = "ACTIVE", + DELETING = "DELETING", + DELETED = "DELETED", + SCALING = "SCALING", + INACTIVE = "INACTIVE", + 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. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: BlockchainPlatform): object { + const jsonObj = { + ...obj, + ...{ + "componentDetails": obj.componentDetails + ? model.BlockchainPlatformComponentDetails.getJsonObj(obj.componentDetails) + : undefined, + "replicas": obj.replicas ? model.ReplicaDetails.getJsonObj(obj.replicas) : undefined, + "hostOcpuUtilizationInfo": obj.hostOcpuUtilizationInfo + ? obj.hostOcpuUtilizationInfo.map(item => { + return model.OcpuUtilizationInfo.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/change-blockchain-platform-compartment-details.ts b/lib/blockchain/lib/model/change-blockchain-platform-compartment-details.ts new file mode 100644 index 0000000000..fcfb89f308 --- /dev/null +++ b/lib/blockchain/lib/model/change-blockchain-platform-compartment-details.ts @@ -0,0 +1,35 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Input payload to change a resource's compartment. + * + */ +export interface ChangeBlockchainPlatformCompartmentDetails { + /** + * The OCID of the new compartment. + * + */ + "compartmentId": string; +} + +export namespace ChangeBlockchainPlatformCompartmentDetails { + export function getJsonObj(obj: ChangeBlockchainPlatformCompartmentDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/create-blockchain-platform-details.ts b/lib/blockchain/lib/model/create-blockchain-platform-details.ts new file mode 100644 index 0000000000..02e0ebbb06 --- /dev/null +++ b/lib/blockchain/lib/model/create-blockchain-platform-details.ts @@ -0,0 +1,84 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform details for creating a new service. + */ +export interface CreateBlockchainPlatformDetails { + /** + * Platform Instance Display name, can be renamed + */ + "displayName": string; + /** + * Compartment Identifier + */ + "compartmentId": string; + /** + * Platform Instance Description + */ + "description"?: string; + /** + * Role of platform - founder or participant + */ + "platformRole": string; + /** + * Type of compute shape - one of Standard, (Enterprise) Small, Medium, Large or Extra Large + */ + "computeShape": string; + /** + * Bring your own license + */ + "isByol"?: boolean; + /** + * IDCS access token + */ + "idcsAccessToken"?: string; + /** + * Identifier for a federated user + */ + "federatedUserId"?: string; + /** + * Base64 encoded text in ASCII character set of a Thirdparty CA Certificates archive file. + * The Archive file is a zip file containing third part CA Certificates, + * the ca key and certificate files used when issuing enrollment certificates + * (ECerts) and transaction certificates (TCerts). The chainfile (if it exists) + * contains the certificate chain which should be trusted for this CA, where + * the 1st in the chain is always the root CA certificate. + * File list in zip file [ca-cert.pem,ca-key.pem,ca-chain.pem(optional)]. + * + */ + "caCertArchiveText"?: string; + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: `{\"bar-key\": \"value\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; +} + +export namespace CreateBlockchainPlatformDetails { + export function getJsonObj(obj: CreateBlockchainPlatformDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/create-osn-details.ts b/lib/blockchain/lib/model/create-osn-details.ts new file mode 100644 index 0000000000..8ee55fc7e5 --- /dev/null +++ b/lib/blockchain/lib/model/create-osn-details.ts @@ -0,0 +1,41 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The Ordering Service Node details to be added + */ +export interface CreateOsnDetails { + /** + * Availability Domain to place new OSN + */ + "ad": string; + "ocpuAllocationParam"?: model.OcpuAllocationNumberParam; +} + +export namespace CreateOsnDetails { + export function getJsonObj(obj: CreateOsnDetails): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/create-peer-details.ts b/lib/blockchain/lib/model/create-peer-details.ts new file mode 100644 index 0000000000..08480e58ca --- /dev/null +++ b/lib/blockchain/lib/model/create-peer-details.ts @@ -0,0 +1,49 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The Peer details to be added + */ +export interface CreatePeerDetails { + /** + * Peer role + */ + "role": string; + /** + * peer alias + */ + "alias"?: string; + "ocpuAllocationParam": model.OcpuAllocationNumberParam; + /** + * Availability Domain to place new peer + */ + "ad": string; +} + +export namespace CreatePeerDetails { + export function getJsonObj(obj: CreatePeerDetails): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/index.ts b/lib/blockchain/lib/model/index.ts new file mode 100644 index 0000000000..65f06cf8e6 --- /dev/null +++ b/lib/blockchain/lib/model/index.ts @@ -0,0 +1,87 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as AvailabilityDomain from "./availability-domain"; +export import AvailabilityDomain = AvailabilityDomain.AvailabilityDomain; +import * as BlockchainPlatform from "./blockchain-platform"; +export import BlockchainPlatform = BlockchainPlatform.BlockchainPlatform; +import * as BlockchainPlatformByHostname from "./blockchain-platform-by-hostname"; +export import BlockchainPlatformByHostname = BlockchainPlatformByHostname.BlockchainPlatformByHostname; +import * as BlockchainPlatformCollection from "./blockchain-platform-collection"; +export import BlockchainPlatformCollection = BlockchainPlatformCollection.BlockchainPlatformCollection; +import * as BlockchainPlatformComponentDetails from "./blockchain-platform-component-details"; +export import BlockchainPlatformComponentDetails = BlockchainPlatformComponentDetails.BlockchainPlatformComponentDetails; +import * as BlockchainPlatformSummary from "./blockchain-platform-summary"; +export import BlockchainPlatformSummary = BlockchainPlatformSummary.BlockchainPlatformSummary; +import * as ChangeBlockchainPlatformCompartmentDetails from "./change-blockchain-platform-compartment-details"; +export import ChangeBlockchainPlatformCompartmentDetails = ChangeBlockchainPlatformCompartmentDetails.ChangeBlockchainPlatformCompartmentDetails; +import * as CreateBlockchainPlatformDetails from "./create-blockchain-platform-details"; +export import CreateBlockchainPlatformDetails = CreateBlockchainPlatformDetails.CreateBlockchainPlatformDetails; +import * as CreateOsnDetails from "./create-osn-details"; +export import CreateOsnDetails = CreateOsnDetails.CreateOsnDetails; +import * as CreatePeerDetails from "./create-peer-details"; +export import CreatePeerDetails = CreatePeerDetails.CreatePeerDetails; +import * as MetadataDetails from "./metadata-details"; +export import MetadataDetails = MetadataDetails.MetadataDetails; +import * as ModifyPeerDetails from "./modify-peer-details"; +export import ModifyPeerDetails = ModifyPeerDetails.ModifyPeerDetails; +import * as OcpuAllocationNumberParam from "./ocpu-allocation-number-param"; +export import OcpuAllocationNumberParam = OcpuAllocationNumberParam.OcpuAllocationNumberParam; +import * as OcpuUtilizationInfo from "./ocpu-utilization-info"; +export import OcpuUtilizationInfo = OcpuUtilizationInfo.OcpuUtilizationInfo; +import * as Osn from "./osn"; +export import Osn = Osn.Osn; +import * as OsnCollection from "./osn-collection"; +export import OsnCollection = OsnCollection.OsnCollection; +import * as OsnSummary from "./osn-summary"; +export import OsnSummary = OsnSummary.OsnSummary; +import * as Peer from "./peer"; +export import Peer = Peer.Peer; +import * as PeerCollection from "./peer-collection"; +export import PeerCollection = PeerCollection.PeerCollection; +import * as PeerRole from "./peer-role"; +export import PeerRole = PeerRole.PeerRole; +import * as PeerSummary from "./peer-summary"; +export import PeerSummary = PeerSummary.PeerSummary; +import * as ReplicaDetails from "./replica-details"; +export import ReplicaDetails = ReplicaDetails.ReplicaDetails; +import * as ScaleBlockchainPlatformDetails from "./scale-blockchain-platform-details"; +export import ScaleBlockchainPlatformDetails = ScaleBlockchainPlatformDetails.ScaleBlockchainPlatformDetails; +import * as ScaleStorageDetails from "./scale-storage-details"; +export import ScaleStorageDetails = ScaleStorageDetails.ScaleStorageDetails; +import * as ScaledBlockchainPlatformPreview from "./scaled-blockchain-platform-preview"; +export import ScaledBlockchainPlatformPreview = ScaledBlockchainPlatformPreview.ScaledBlockchainPlatformPreview; +import * as ScaledPlatformMeteringPreview from "./scaled-platform-metering-preview"; +export import ScaledPlatformMeteringPreview = ScaledPlatformMeteringPreview.ScaledPlatformMeteringPreview; +import * as UpdateBlockchainPlatformDetails from "./update-blockchain-platform-details"; +export import UpdateBlockchainPlatformDetails = UpdateBlockchainPlatformDetails.UpdateBlockchainPlatformDetails; +import * as UpdateOsnDetails from "./update-osn-details"; +export import UpdateOsnDetails = UpdateOsnDetails.UpdateOsnDetails; +import * as UpdatePeerDetails from "./update-peer-details"; +export import UpdatePeerDetails = UpdatePeerDetails.UpdatePeerDetails; +import * as WorkRequest from "./work-request"; +export import WorkRequest = WorkRequest.WorkRequest; +import * as WorkRequestCollection from "./work-request-collection"; +export import WorkRequestCollection = WorkRequestCollection.WorkRequestCollection; +import * as WorkRequestError from "./work-request-error"; +export import WorkRequestError = WorkRequestError.WorkRequestError; +import * as WorkRequestErrorCollection from "./work-request-error-collection"; +export import WorkRequestErrorCollection = WorkRequestErrorCollection.WorkRequestErrorCollection; +import * as WorkRequestLogEntry from "./work-request-log-entry"; +export import WorkRequestLogEntry = WorkRequestLogEntry.WorkRequestLogEntry; +import * as WorkRequestLogEntryCollection from "./work-request-log-entry-collection"; +export import WorkRequestLogEntryCollection = WorkRequestLogEntryCollection.WorkRequestLogEntryCollection; +import * as WorkRequestResource from "./work-request-resource"; +export import WorkRequestResource = WorkRequestResource.WorkRequestResource; +import * as WorkRequestSummary from "./work-request-summary"; +export import WorkRequestSummary = WorkRequestSummary.WorkRequestSummary; diff --git a/lib/blockchain/lib/model/metadata-details.ts b/lib/blockchain/lib/model/metadata-details.ts new file mode 100644 index 0000000000..f24c79c559 --- /dev/null +++ b/lib/blockchain/lib/model/metadata-details.ts @@ -0,0 +1,41 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Metadata parameter details + */ +export interface MetadataDetails { + /** + * Metadata param name + */ + "paramName": string; + /** + * Metadata param value. Complex value will be a JSON string. + */ + "paramValue": string; + /** + * Indicates if the value is a JSON string + */ + "isJsonValue": boolean; +} + +export namespace MetadataDetails { + export function getJsonObj(obj: MetadataDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/modify-peer-details.ts b/lib/blockchain/lib/model/modify-peer-details.ts new file mode 100644 index 0000000000..8ff0adbdfa --- /dev/null +++ b/lib/blockchain/lib/model/modify-peer-details.ts @@ -0,0 +1,41 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * peer to modify ocpu allocation + */ +export interface ModifyPeerDetails { + /** + * peer identifier + */ + "peerName": string; + "ocpuAllocationParam": model.OcpuAllocationNumberParam; +} + +export namespace ModifyPeerDetails { + export function getJsonObj(obj: ModifyPeerDetails): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/ocpu-allocation-number-param.ts b/lib/blockchain/lib/model/ocpu-allocation-number-param.ts new file mode 100644 index 0000000000..18897c7400 --- /dev/null +++ b/lib/blockchain/lib/model/ocpu-allocation-number-param.ts @@ -0,0 +1,33 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * OCPU allocation parameter + */ +export interface OcpuAllocationNumberParam { + /** + * Number of OCPU allocation + */ + "ocpuAllocationNumber": number; +} + +export namespace OcpuAllocationNumberParam { + export function getJsonObj(obj: OcpuAllocationNumberParam): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/ocpu-utilization-info.ts b/lib/blockchain/lib/model/ocpu-utilization-info.ts new file mode 100644 index 0000000000..eb68c7df24 --- /dev/null +++ b/lib/blockchain/lib/model/ocpu-utilization-info.ts @@ -0,0 +1,41 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Ocpu utilization for a VM host + */ +export interface OcpuUtilizationInfo { + /** + * Host name of VM + */ + "host"?: string; + /** + * Number of OCPU utilized + */ + "ocpuUtilizationNumber"?: number; + /** + * Number of total OCPU capacity on the host + */ + "ocpuCapacityNumber"?: number; +} + +export namespace OcpuUtilizationInfo { + export function getJsonObj(obj: OcpuUtilizationInfo): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/osn-collection.ts b/lib/blockchain/lib/model/osn-collection.ts new file mode 100644 index 0000000000..b5b6164c42 --- /dev/null +++ b/lib/blockchain/lib/model/osn-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a OSN list or search. Contains OsnSummary + */ +export interface OsnCollection { + /** + * Collection of OsnSummary + */ + "items": Array; +} + +export namespace OsnCollection { + export function getJsonObj(obj: OsnCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.OsnSummary.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/osn-summary.ts b/lib/blockchain/lib/model/osn-summary.ts new file mode 100644 index 0000000000..38a4fd50ae --- /dev/null +++ b/lib/blockchain/lib/model/osn-summary.ts @@ -0,0 +1,37 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * OSN summary information for returning in a list. + */ +export interface OsnSummary { + /** + * OSN identifier + */ + "osnKey"?: string; + /** + * The current state of the OSN. + */ + "lifecycleState"?: string; +} + +export namespace OsnSummary { + export function getJsonObj(obj: OsnSummary): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/osn.ts b/lib/blockchain/lib/model/osn.ts new file mode 100644 index 0000000000..16a7fba244 --- /dev/null +++ b/lib/blockchain/lib/model/osn.ts @@ -0,0 +1,61 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * An Ordering Service Node details + */ +export interface Osn { + /** + * OSN identifier + */ + "osnKey": string; + /** + * Availability Domain of OSN + */ + "ad": string; + "ocpuAllocationParam"?: model.OcpuAllocationNumberParam; + /** + * The current state of the OSN. + */ + "lifecycleState"?: Osn.LifecycleState; +} + +export namespace Osn { + export enum LifecycleState { + ACTIVE = "ACTIVE", + INACTIVE = "INACTIVE", + 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. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: Osn): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/peer-collection.ts b/lib/blockchain/lib/model/peer-collection.ts new file mode 100644 index 0000000000..b6ee79db7f --- /dev/null +++ b/lib/blockchain/lib/model/peer-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a peer list or search. Contains PeerSummary + */ +export interface PeerCollection { + /** + * Collection of PeerSummary + */ + "items": Array; +} + +export namespace PeerCollection { + export function getJsonObj(obj: PeerCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.PeerSummary.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/peer-role.ts b/lib/blockchain/lib/model/peer-role.ts new file mode 100644 index 0000000000..e081e57772 --- /dev/null +++ b/lib/blockchain/lib/model/peer-role.ts @@ -0,0 +1,38 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Peer role + */ +export interface PeerRole { + /** + * Peer role names + */ + "role"?: PeerRole.Role; +} + +export namespace PeerRole { + export enum Role { + MEMBER = "MEMBER", + ADMIN = "ADMIN" + } + + export function getJsonObj(obj: PeerRole): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/peer-summary.ts b/lib/blockchain/lib/model/peer-summary.ts new file mode 100644 index 0000000000..7a22c4fb2b --- /dev/null +++ b/lib/blockchain/lib/model/peer-summary.ts @@ -0,0 +1,37 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Peer summary information for returning in a list. + */ +export interface PeerSummary { + /** + * Peer identifier + */ + "peerKey"?: string; + /** + * The current state of the peer. + */ + "lifecycleState"?: string; +} + +export namespace PeerSummary { + export function getJsonObj(obj: PeerSummary): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/peer.ts b/lib/blockchain/lib/model/peer.ts new file mode 100644 index 0000000000..c8a4be1d6f --- /dev/null +++ b/lib/blockchain/lib/model/peer.ts @@ -0,0 +1,73 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * A Peer details + */ +export interface Peer { + /** + * peer identifier + */ + "peerKey": string; + /** + * Peer role + */ + "role": string; + /** + * peer alias + */ + "alias"?: string; + "ocpuAllocationParam"?: model.OcpuAllocationNumberParam; + /** + * Host on which the Peer exists + */ + "host": string; + /** + * Availability Domain of peer + */ + "ad": string; + /** + * The current state of the peer. + */ + "lifecycleState"?: Peer.LifecycleState; +} + +export namespace Peer { + export enum LifecycleState { + ACTIVE = "ACTIVE", + INACTIVE = "INACTIVE", + 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. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: Peer): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/replica-details.ts b/lib/blockchain/lib/model/replica-details.ts new file mode 100644 index 0000000000..61ef3d053f --- /dev/null +++ b/lib/blockchain/lib/model/replica-details.ts @@ -0,0 +1,41 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Number of replicas of service components like Rest Proxy, CA and Console + */ +export interface ReplicaDetails { + /** + * Number of REST proxy replicas + */ + "proxyCount"?: number; + /** + * Number of CA replicas + */ + "caCount"?: number; + /** + * Number of console replicas + */ + "consoleCount"?: number; +} + +export namespace ReplicaDetails { + export function getJsonObj(obj: ReplicaDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/scale-blockchain-platform-details.ts b/lib/blockchain/lib/model/scale-blockchain-platform-details.ts new file mode 100644 index 0000000000..1248bfa775 --- /dev/null +++ b/lib/blockchain/lib/model/scale-blockchain-platform-details.ts @@ -0,0 +1,90 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Scale operation details for a blockchain platform. The scale operation payload has multiple options + * - Add one or more Ordering Service Node (addOsns) + * - Add one or more Peers (addPeers) + * - Add more replicas of CA, Console and Rest Proxy (addReplicas) + * - Add more storage to the platform (addStorage) + * - Modify the CPU allocation for Peer Nodes (modifyPeers) + * - Remove one or more replicas of CA, Console and Rest Proxy (removeReplicas) + * - Remove one or more Ordering Service Node (removeOsns) + * - Remove one or more Peers (removePeers). + * The scale operation payload must have at least one of the above options. + * + */ +export interface ScaleBlockchainPlatformDetails { + /** + * new OSNs to add + */ + "addOsns"?: Array; + "addReplicas"?: model.ReplicaDetails; + /** + * new Peers to add + */ + "addPeers"?: Array; + "addStorage"?: model.ScaleStorageDetails; + /** + * modify ocpu allocation to existing Peers + */ + "modifyPeers"?: Array; + "removeReplicas"?: model.ReplicaDetails; + /** + * OSN id list to remove + */ + "removeOsns"?: Array; + /** + * Peer id list to remove + */ + "removePeers"?: Array; +} + +export namespace ScaleBlockchainPlatformDetails { + export function getJsonObj(obj: ScaleBlockchainPlatformDetails): object { + const jsonObj = { + ...obj, + ...{ + "addOsns": obj.addOsns + ? obj.addOsns.map(item => { + return model.CreateOsnDetails.getJsonObj(item); + }) + : undefined, + "addReplicas": obj.addReplicas + ? model.ReplicaDetails.getJsonObj(obj.addReplicas) + : undefined, + "addPeers": obj.addPeers + ? obj.addPeers.map(item => { + return model.CreatePeerDetails.getJsonObj(item); + }) + : undefined, + "addStorage": obj.addStorage + ? model.ScaleStorageDetails.getJsonObj(obj.addStorage) + : undefined, + "modifyPeers": obj.modifyPeers + ? obj.modifyPeers.map(item => { + return model.ModifyPeerDetails.getJsonObj(item); + }) + : undefined, + "removeReplicas": obj.removeReplicas + ? model.ReplicaDetails.getJsonObj(obj.removeReplicas) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/scale-storage-details.ts b/lib/blockchain/lib/model/scale-storage-details.ts new file mode 100644 index 0000000000..4014df3dc8 --- /dev/null +++ b/lib/blockchain/lib/model/scale-storage-details.ts @@ -0,0 +1,33 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * storage size to increase + */ +export interface ScaleStorageDetails { + /** + * Storage size in TBs + */ + "storageSizeInTBs": number; +} + +export namespace ScaleStorageDetails { + export function getJsonObj(obj: ScaleStorageDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/scaled-blockchain-platform-preview.ts b/lib/blockchain/lib/model/scaled-blockchain-platform-preview.ts new file mode 100644 index 0000000000..054d2718d9 --- /dev/null +++ b/lib/blockchain/lib/model/scaled-blockchain-platform-preview.ts @@ -0,0 +1,106 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform Instance Description Preview after Scaling. + */ +export interface ScaledBlockchainPlatformPreview { + /** + * unique identifier that is immutable on creation + */ + "id": string; + /** + * Platform Instance Display name, can be renamed + */ + "displayName": string; + /** + * Compartment Identifier + */ + "compartmentId": string; + /** + * Platform Instance Description + */ + "description"?: string; + /** + * Type of compute shape - one of Standard, (Enterprise) Small, Medium, Large or Extra Large + */ + "computeShape": string; + /** + * Storage size in TBs + */ + "storageSizeInTBs"?: number; + /** + * Storage size in TBs post scaling + */ + "storageSizeInTBsPostScaling"?: number; + "componentDetails"?: model.BlockchainPlatformComponentDetails; + "replicas"?: model.ReplicaDetails; + "componentDetailsPostScaling"?: model.BlockchainPlatformComponentDetails; + "replicasPostScaling"?: model.ReplicaDetails; + /** + * List of OcpuUtilization for all hosts + */ + "hostOcpuUtilizationInfo"?: Array; + /** + * List of OcpuUtilization for all hosts after scaling + */ + "hostOcpuUtilizationInfoPostScaling"?: Array; + /** + * Number of new VMs that would be created + */ + "newVmCount"?: number; + "meteringPreview"?: model.ScaledPlatformMeteringPreview; + "scalePayload"?: model.ScaleBlockchainPlatformDetails; +} + +export namespace ScaledBlockchainPlatformPreview { + export function getJsonObj(obj: ScaledBlockchainPlatformPreview): object { + const jsonObj = { + ...obj, + ...{ + "componentDetails": obj.componentDetails + ? model.BlockchainPlatformComponentDetails.getJsonObj(obj.componentDetails) + : undefined, + "replicas": obj.replicas ? model.ReplicaDetails.getJsonObj(obj.replicas) : undefined, + "componentDetailsPostScaling": obj.componentDetailsPostScaling + ? model.BlockchainPlatformComponentDetails.getJsonObj(obj.componentDetailsPostScaling) + : undefined, + "replicasPostScaling": obj.replicasPostScaling + ? model.ReplicaDetails.getJsonObj(obj.replicasPostScaling) + : undefined, + "hostOcpuUtilizationInfo": obj.hostOcpuUtilizationInfo + ? obj.hostOcpuUtilizationInfo.map(item => { + return model.OcpuUtilizationInfo.getJsonObj(item); + }) + : undefined, + "hostOcpuUtilizationInfoPostScaling": obj.hostOcpuUtilizationInfoPostScaling + ? obj.hostOcpuUtilizationInfoPostScaling.map(item => { + return model.OcpuUtilizationInfo.getJsonObj(item); + }) + : undefined, + + "meteringPreview": obj.meteringPreview + ? model.ScaledPlatformMeteringPreview.getJsonObj(obj.meteringPreview) + : undefined, + "scalePayload": obj.scalePayload + ? model.ScaleBlockchainPlatformDetails.getJsonObj(obj.scalePayload) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/scaled-platform-metering-preview.ts b/lib/blockchain/lib/model/scaled-platform-metering-preview.ts new file mode 100644 index 0000000000..eca9728a6f --- /dev/null +++ b/lib/blockchain/lib/model/scaled-platform-metering-preview.ts @@ -0,0 +1,49 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform Metering Preview after Scaling + */ +export interface ScaledPlatformMeteringPreview { + /** + * Number of total OCPU allocation for the blockchain platform + */ + "totalOcpuAllocation"?: number; + /** + * Number of total OCPU allocation for the blockchain platform after Scaling + */ + "totalOcpuAllocationPostScaling"?: number; + /** + * Current Storage metered units in TBs + */ + "storageMeteredUnits"?: number; + /** + * Extra Storage units required in TBs + */ + "extraStorageMeteredUnits"?: number; + /** + * Total Post Scaling Storage metered units in TBs + */ + "storageMeteredUnitsPostScaling"?: number; +} + +export namespace ScaledPlatformMeteringPreview { + export function getJsonObj(obj: ScaledPlatformMeteringPreview): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/update-blockchain-platform-details.ts b/lib/blockchain/lib/model/update-blockchain-platform-details.ts new file mode 100644 index 0000000000..6feb791107 --- /dev/null +++ b/lib/blockchain/lib/model/update-blockchain-platform-details.ts @@ -0,0 +1,59 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Blockchain Platform details for updating a service. + */ +export interface UpdateBlockchainPlatformDetails { + /** + * Platform Description + */ + "description"?: string; + /** + * Storage size in TBs + */ + "storageSizeInTBs"?: number; + "replicas"?: model.ReplicaDetails; + /** + * Number of total OCPUs to allocate + */ + "totalOcpuCapacity"?: number; + /** + * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + * Example: `{\"bar-key\": \"value\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; +} + +export namespace UpdateBlockchainPlatformDetails { + export function getJsonObj(obj: UpdateBlockchainPlatformDetails): object { + const jsonObj = { + ...obj, + ...{ + "replicas": obj.replicas ? model.ReplicaDetails.getJsonObj(obj.replicas) : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/update-osn-details.ts b/lib/blockchain/lib/model/update-osn-details.ts new file mode 100644 index 0000000000..cc8d3bc53f --- /dev/null +++ b/lib/blockchain/lib/model/update-osn-details.ts @@ -0,0 +1,37 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * OSN attributes that can be updated. + */ +export interface UpdateOsnDetails { + "ocpuAllocationParam": model.OcpuAllocationNumberParam; +} + +export namespace UpdateOsnDetails { + export function getJsonObj(obj: UpdateOsnDetails): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/update-peer-details.ts b/lib/blockchain/lib/model/update-peer-details.ts new file mode 100644 index 0000000000..f29dace5ae --- /dev/null +++ b/lib/blockchain/lib/model/update-peer-details.ts @@ -0,0 +1,37 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * peer to modify ocpu allocation + */ +export interface UpdatePeerDetails { + "ocpuAllocationParam": model.OcpuAllocationNumberParam; +} + +export namespace UpdatePeerDetails { + export function getJsonObj(obj: UpdatePeerDetails): object { + const jsonObj = { + ...obj, + ...{ + "ocpuAllocationParam": obj.ocpuAllocationParam + ? model.OcpuAllocationNumberParam.getJsonObj(obj.ocpuAllocationParam) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-collection.ts b/lib/blockchain/lib/model/work-request-collection.ts new file mode 100644 index 0000000000..8a98412b74 --- /dev/null +++ b/lib/blockchain/lib/model/work-request-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a platform list or search. Contains WorkRequestSummary + */ +export interface WorkRequestCollection { + /** + * Collection of WorkRequestSummary + */ + "items": Array; +} + +export namespace WorkRequestCollection { + export function getJsonObj(obj: WorkRequestCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.WorkRequestSummary.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-error-collection.ts b/lib/blockchain/lib/model/work-request-error-collection.ts new file mode 100644 index 0000000000..913ad84b47 --- /dev/null +++ b/lib/blockchain/lib/model/work-request-error-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a platform list or search. Contains WorkRequestError + */ +export interface WorkRequestErrorCollection { + /** + * Collection of WorkRequestError + */ + "items": Array; +} + +export namespace WorkRequestErrorCollection { + export function getJsonObj(obj: WorkRequestErrorCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.WorkRequestError.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-error.ts b/lib/blockchain/lib/model/work-request-error.ts new file mode 100644 index 0000000000..d17437096c --- /dev/null +++ b/lib/blockchain/lib/model/work-request-error.ts @@ -0,0 +1,43 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * An error encountered while executing a work request. + */ +export interface WorkRequestError { + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm) + * + */ + "code": string; + /** + * A human readable description of the issue encountered. + */ + "message": string; + /** + * The time the error occured. An RFC3339 formatted datetime string. + */ + "timestamp": Date; +} + +export namespace WorkRequestError { + export function getJsonObj(obj: WorkRequestError): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-log-entry-collection.ts b/lib/blockchain/lib/model/work-request-log-entry-collection.ts new file mode 100644 index 0000000000..b9a1b937d0 --- /dev/null +++ b/lib/blockchain/lib/model/work-request-log-entry-collection.ts @@ -0,0 +1,42 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Result of a platform lpnist or search. Contains WorkRequestLogEntry + */ +export interface WorkRequestLogEntryCollection { + /** + * Collection of WorkRequestLogEntry + */ + "items": Array; +} + +export namespace WorkRequestLogEntryCollection { + export function getJsonObj(obj: WorkRequestLogEntryCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.WorkRequestLogEntry.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-log-entry.ts b/lib/blockchain/lib/model/work-request-log-entry.ts new file mode 100644 index 0000000000..90f67b3cfd --- /dev/null +++ b/lib/blockchain/lib/model/work-request-log-entry.ts @@ -0,0 +1,37 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * A log message from the execution of a work request. + */ +export interface WorkRequestLogEntry { + /** + * Human-readable log message. + */ + "message": string; + /** + * The time the log message was written. An RFC3339 formatted datetime string + */ + "timestamp": Date; +} + +export namespace WorkRequestLogEntry { + export function getJsonObj(obj: WorkRequestLogEntry): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-resource.ts b/lib/blockchain/lib/model/work-request-resource.ts new file mode 100644 index 0000000000..a2c8da5771 --- /dev/null +++ b/lib/blockchain/lib/model/work-request-resource.ts @@ -0,0 +1,63 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * A resource created or operated on by a work request. + */ +export interface WorkRequestResource { + /** + * The resource type the work request is affects. + */ + "entityType": string; + /** + * The way in which this resource is affected by the work tracked in the work request. + * A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + * work is complete for that resource at which point it will transition to CREATED, UPDATED, + * or DELETED, respectively. + * + */ + "actionType": WorkRequestResource.ActionType; + /** + * The identifier of the resource the work request affects. + */ + "identifier": string; + /** + * The URI path that the user can do a GET on to access the resource metadata + */ + "entityUri"?: string; +} + +export namespace WorkRequestResource { + export enum ActionType { + CREATED = "CREATED", + UPDATED = "UPDATED", + DELETED = "DELETED", + INPROGRESS = "IN_PROGRESS", + RELATED = "RELATED", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: WorkRequestResource): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request-summary.ts b/lib/blockchain/lib/model/work-request-summary.ts new file mode 100644 index 0000000000..4b9ded39d1 --- /dev/null +++ b/lib/blockchain/lib/model/work-request-summary.ts @@ -0,0 +1,99 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * A description of workrequest status + */ +export interface WorkRequestSummary { + /** + * type of the work request + */ + "operationType": WorkRequestSummary.OperationType; + /** + * status of current work request. + */ + "status"?: string; + /** + * The id of the work request. + */ + "id": string; + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + */ + "compartmentId": string; + /** + * The resources affected by this work request. + */ + "resources": Array; + /** + * Percentage of the request completed. + */ + "percentComplete": number; + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + */ + "timeAccepted": Date; + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + */ + "timeStarted"?: Date; + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + */ + "timeFinished"?: Date; +} + +export namespace WorkRequestSummary { + export enum OperationType { + CREATEPLATFORM = "CREATE_PLATFORM", + UPDATEPLATFORM = "UPDATE_PLATFORM", + DELETEPLATFORM = "DELETE_PLATFORM", + SCALEPLATFORM = "SCALE_PLATFORM", + STARTPLATFORM = "START_PLATFORM", + STOPPLATFORM = "STOP_PLATFORM", + CUSTOMIZEPLATFORM = "CUSTOMIZE_PLATFORM", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: WorkRequestSummary): object { + const jsonObj = { + ...obj, + ...{ + "resources": obj.resources + ? obj.resources.map(item => { + return model.WorkRequestResource.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/model/work-request.ts b/lib/blockchain/lib/model/work-request.ts new file mode 100644 index 0000000000..10c623b25b --- /dev/null +++ b/lib/blockchain/lib/model/work-request.ts @@ -0,0 +1,114 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * A description of workrequest status + */ +export interface WorkRequest { + /** + * type of the work request + */ + "operationType": WorkRequest.OperationType; + /** + * status of current work request. + */ + "status": WorkRequest.Status; + /** + * The id of the work request. + */ + "id": string; + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + */ + "compartmentId": string; + /** + * The resources affected by this work request. + */ + "resources": Array; + /** + * Percentage of the request completed. + */ + "percentComplete": number; + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + */ + "timeAccepted": Date; + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + */ + "timeStarted"?: Date; + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + */ + "timeFinished"?: Date; +} + +export namespace WorkRequest { + export enum OperationType { + CREATEPLATFORM = "CREATE_PLATFORM", + UPDATEPLATFORM = "UPDATE_PLATFORM", + DELETEPLATFORM = "DELETE_PLATFORM", + SCALEPLATFORM = "SCALE_PLATFORM", + STARTPLATFORM = "START_PLATFORM", + STOPPLATFORM = "STOP_PLATFORM", + CUSTOMIZEPLATFORM = "CUSTOMIZE_PLATFORM", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export enum Status { + ACCEPTED = "ACCEPTED", + INPROGRESS = "IN_PROGRESS", + FAILED = "FAILED", + SUCCEEDED = "SUCCEEDED", + CANCELING = "CANCELING", + CANCELED = "CANCELED", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: WorkRequest): object { + const jsonObj = { + ...obj, + ...{ + "resources": obj.resources + ? obj.resources.map(item => { + return model.WorkRequestResource.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/blockchain/lib/request/change-blockchain-platform-compartment-request.ts b/lib/blockchain/lib/request/change-blockchain-platform-compartment-request.ts new file mode 100644 index 0000000000..847c3fb0b6 --- /dev/null +++ b/lib/blockchain/lib/request/change-blockchain-platform-compartment-request.ts @@ -0,0 +1,48 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ChangeBlockchainPlatformCompartmentRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Input payload to move the resource to a different compartment. + * + */ + "changeBlockchainPlatformCompartmentDetails": model.ChangeBlockchainPlatformCompartmentDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/blockchain/lib/request/create-blockchain-platform-request.ts b/lib/blockchain/lib/request/create-blockchain-platform-request.ts new file mode 100644 index 0000000000..0dc4cd83c2 --- /dev/null +++ b/lib/blockchain/lib/request/create-blockchain-platform-request.ts @@ -0,0 +1,34 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface CreateBlockchainPlatformRequest { + /** + * Details for the new service. + */ + "createBlockchainPlatformDetails": model.CreateBlockchainPlatformDetails; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/create-osn-request.ts b/lib/blockchain/lib/request/create-osn-request.ts new file mode 100644 index 0000000000..0941e6c5ac --- /dev/null +++ b/lib/blockchain/lib/request/create-osn-request.ts @@ -0,0 +1,48 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface CreateOsnRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Input payload to create blockchain platform OSN. The payload cannot be empty. + * + */ + "createOsnDetails": model.CreateOsnDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/blockchain/lib/request/create-peer-request.ts b/lib/blockchain/lib/request/create-peer-request.ts new file mode 100644 index 0000000000..ab7539de00 --- /dev/null +++ b/lib/blockchain/lib/request/create-peer-request.ts @@ -0,0 +1,39 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface CreatePeerRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Input payload to create a blockchain platform peer. The payload cannot be empty. + * + */ + "createPeerDetails": model.CreatePeerDetails; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/blockchain/lib/request/delete-blockchain-platform-request.ts b/lib/blockchain/lib/request/delete-blockchain-platform-request.ts new file mode 100644 index 0000000000..45d455e13a --- /dev/null +++ b/lib/blockchain/lib/request/delete-blockchain-platform-request.ts @@ -0,0 +1,34 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface DeleteBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/blockchain/lib/request/delete-osn-request.ts b/lib/blockchain/lib/request/delete-osn-request.ts new file mode 100644 index 0000000000..037af627b8 --- /dev/null +++ b/lib/blockchain/lib/request/delete-osn-request.ts @@ -0,0 +1,38 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface DeleteOsnRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * OSN identifier. + */ + "osnId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/blockchain/lib/request/delete-peer-request.ts b/lib/blockchain/lib/request/delete-peer-request.ts new file mode 100644 index 0000000000..73007c546a --- /dev/null +++ b/lib/blockchain/lib/request/delete-peer-request.ts @@ -0,0 +1,38 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface DeletePeerRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Peer identifier. + */ + "peerId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/blockchain/lib/request/delete-work-request-request.ts b/lib/blockchain/lib/request/delete-work-request-request.ts new file mode 100644 index 0000000000..924816211f --- /dev/null +++ b/lib/blockchain/lib/request/delete-work-request-request.ts @@ -0,0 +1,34 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface DeleteWorkRequestRequest { + /** + * The ID of the asynchronous request. + */ + "workRequestId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/blockchain/lib/request/get-blockchain-platform-request.ts b/lib/blockchain/lib/request/get-blockchain-platform-request.ts new file mode 100644 index 0000000000..be50b4eb02 --- /dev/null +++ b/lib/blockchain/lib/request/get-blockchain-platform-request.ts @@ -0,0 +1,25 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface GetBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/get-osn-request.ts b/lib/blockchain/lib/request/get-osn-request.ts new file mode 100644 index 0000000000..a9bac030c0 --- /dev/null +++ b/lib/blockchain/lib/request/get-osn-request.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface GetOsnRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * OSN identifier. + */ + "osnId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/get-peer-request.ts b/lib/blockchain/lib/request/get-peer-request.ts new file mode 100644 index 0000000000..e5a65e5ba9 --- /dev/null +++ b/lib/blockchain/lib/request/get-peer-request.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface GetPeerRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Peer identifier. + */ + "peerId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/get-work-request-request.ts b/lib/blockchain/lib/request/get-work-request-request.ts new file mode 100644 index 0000000000..9bfc53ae66 --- /dev/null +++ b/lib/blockchain/lib/request/get-work-request-request.ts @@ -0,0 +1,25 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface GetWorkRequestRequest { + /** + * The ID of the asynchronous request. + */ + "workRequestId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/index.ts b/lib/blockchain/lib/request/index.ts new file mode 100644 index 0000000000..6f5a5b0421 --- /dev/null +++ b/lib/blockchain/lib/request/index.ts @@ -0,0 +1,63 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as ChangeBlockchainPlatformCompartmentRequest from "./change-blockchain-platform-compartment-request"; +export import ChangeBlockchainPlatformCompartmentRequest = ChangeBlockchainPlatformCompartmentRequest.ChangeBlockchainPlatformCompartmentRequest; +import * as CreateBlockchainPlatformRequest from "./create-blockchain-platform-request"; +export import CreateBlockchainPlatformRequest = CreateBlockchainPlatformRequest.CreateBlockchainPlatformRequest; +import * as CreateOsnRequest from "./create-osn-request"; +export import CreateOsnRequest = CreateOsnRequest.CreateOsnRequest; +import * as CreatePeerRequest from "./create-peer-request"; +export import CreatePeerRequest = CreatePeerRequest.CreatePeerRequest; +import * as DeleteBlockchainPlatformRequest from "./delete-blockchain-platform-request"; +export import DeleteBlockchainPlatformRequest = DeleteBlockchainPlatformRequest.DeleteBlockchainPlatformRequest; +import * as DeleteOsnRequest from "./delete-osn-request"; +export import DeleteOsnRequest = DeleteOsnRequest.DeleteOsnRequest; +import * as DeletePeerRequest from "./delete-peer-request"; +export import DeletePeerRequest = DeletePeerRequest.DeletePeerRequest; +import * as DeleteWorkRequestRequest from "./delete-work-request-request"; +export import DeleteWorkRequestRequest = DeleteWorkRequestRequest.DeleteWorkRequestRequest; +import * as GetBlockchainPlatformRequest from "./get-blockchain-platform-request"; +export import GetBlockchainPlatformRequest = GetBlockchainPlatformRequest.GetBlockchainPlatformRequest; +import * as GetOsnRequest from "./get-osn-request"; +export import GetOsnRequest = GetOsnRequest.GetOsnRequest; +import * as GetPeerRequest from "./get-peer-request"; +export import GetPeerRequest = GetPeerRequest.GetPeerRequest; +import * as GetWorkRequestRequest from "./get-work-request-request"; +export import GetWorkRequestRequest = GetWorkRequestRequest.GetWorkRequestRequest; +import * as ListBlockchainPlatformsRequest from "./list-blockchain-platforms-request"; +export import ListBlockchainPlatformsRequest = ListBlockchainPlatformsRequest.ListBlockchainPlatformsRequest; +import * as ListOsnsRequest from "./list-osns-request"; +export import ListOsnsRequest = ListOsnsRequest.ListOsnsRequest; +import * as ListPeersRequest from "./list-peers-request"; +export import ListPeersRequest = ListPeersRequest.ListPeersRequest; +import * as ListWorkRequestErrorsRequest from "./list-work-request-errors-request"; +export import ListWorkRequestErrorsRequest = ListWorkRequestErrorsRequest.ListWorkRequestErrorsRequest; +import * as ListWorkRequestLogsRequest from "./list-work-request-logs-request"; +export import ListWorkRequestLogsRequest = ListWorkRequestLogsRequest.ListWorkRequestLogsRequest; +import * as ListWorkRequestsRequest from "./list-work-requests-request"; +export import ListWorkRequestsRequest = ListWorkRequestsRequest.ListWorkRequestsRequest; +import * as PreviewScaleBlockchainPlatformRequest from "./preview-scale-blockchain-platform-request"; +export import PreviewScaleBlockchainPlatformRequest = PreviewScaleBlockchainPlatformRequest.PreviewScaleBlockchainPlatformRequest; +import * as ScaleBlockchainPlatformRequest from "./scale-blockchain-platform-request"; +export import ScaleBlockchainPlatformRequest = ScaleBlockchainPlatformRequest.ScaleBlockchainPlatformRequest; +import * as StartBlockchainPlatformRequest from "./start-blockchain-platform-request"; +export import StartBlockchainPlatformRequest = StartBlockchainPlatformRequest.StartBlockchainPlatformRequest; +import * as StopBlockchainPlatformRequest from "./stop-blockchain-platform-request"; +export import StopBlockchainPlatformRequest = StopBlockchainPlatformRequest.StopBlockchainPlatformRequest; +import * as UpdateBlockchainPlatformRequest from "./update-blockchain-platform-request"; +export import UpdateBlockchainPlatformRequest = UpdateBlockchainPlatformRequest.UpdateBlockchainPlatformRequest; +import * as UpdateOsnRequest from "./update-osn-request"; +export import UpdateOsnRequest = UpdateOsnRequest.UpdateOsnRequest; +import * as UpdatePeerRequest from "./update-peer-request"; +export import UpdatePeerRequest = UpdatePeerRequest.UpdatePeerRequest; diff --git a/lib/blockchain/lib/request/list-blockchain-platforms-request.ts b/lib/blockchain/lib/request/list-blockchain-platforms-request.ts new file mode 100644 index 0000000000..700d14d757 --- /dev/null +++ b/lib/blockchain/lib/request/list-blockchain-platforms-request.ts @@ -0,0 +1,66 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListBlockchainPlatformsRequest { + /** + * The ID of the compartment in which to list resources. + */ + "compartmentId": string; + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Example: `My new resource` + * + */ + "displayName"?: string; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; + /** + * The sort order to use, either 'asc' or 'desc'. + */ + "sortOrder"?: ListBlockchainPlatformsRequest.SortOrder; + /** + * The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. + * + */ + "sortBy"?: ListBlockchainPlatformsRequest.SortBy; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * A filter to only return resources that match the given lifecycle state. + * The state value is case-insensitive. + * + */ + "lifecycleState"?: string; +} + +export namespace ListBlockchainPlatformsRequest { + export enum SortOrder { + ASC = "ASC", + DESC = "DESC" + } + + export enum SortBy { + TimeCreated = "timeCreated", + DisplayName = "displayName" + } +} diff --git a/lib/blockchain/lib/request/list-osns-request.ts b/lib/blockchain/lib/request/list-osns-request.ts new file mode 100644 index 0000000000..dc0e0b81d5 --- /dev/null +++ b/lib/blockchain/lib/request/list-osns-request.ts @@ -0,0 +1,69 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListOsnsRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Example: `My new resource` + * + */ + "displayName"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; + /** + * The sort order to use, either 'asc' or 'desc'. + */ + "sortOrder"?: ListOsnsRequest.SortOrder; + /** + * The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. + * + */ + "sortBy"?: ListOsnsRequest.SortBy; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; +} + +export namespace ListOsnsRequest { + export enum SortOrder { + ASC = "ASC", + DESC = "DESC" + } + + export enum SortBy { + TimeCreated = "timeCreated", + DisplayName = "displayName" + } +} diff --git a/lib/blockchain/lib/request/list-peers-request.ts b/lib/blockchain/lib/request/list-peers-request.ts new file mode 100644 index 0000000000..5ec1a2626c --- /dev/null +++ b/lib/blockchain/lib/request/list-peers-request.ts @@ -0,0 +1,69 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListPeersRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Example: `My new resource` + * + */ + "displayName"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; + /** + * The sort order to use, either 'asc' or 'desc'. + */ + "sortOrder"?: ListPeersRequest.SortOrder; + /** + * The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. + * + */ + "sortBy"?: ListPeersRequest.SortBy; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; +} + +export namespace ListPeersRequest { + export enum SortOrder { + ASC = "ASC", + DESC = "DESC" + } + + export enum SortBy { + TimeCreated = "timeCreated", + DisplayName = "displayName" + } +} diff --git a/lib/blockchain/lib/request/list-work-request-errors-request.ts b/lib/blockchain/lib/request/list-work-request-errors-request.ts new file mode 100644 index 0000000000..d936e618b8 --- /dev/null +++ b/lib/blockchain/lib/request/list-work-request-errors-request.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListWorkRequestErrorsRequest { + /** + * The ID of the asynchronous request. + */ + "workRequestId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; +} diff --git a/lib/blockchain/lib/request/list-work-request-logs-request.ts b/lib/blockchain/lib/request/list-work-request-logs-request.ts new file mode 100644 index 0000000000..3faeee10d7 --- /dev/null +++ b/lib/blockchain/lib/request/list-work-request-logs-request.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListWorkRequestLogsRequest { + /** + * The ID of the asynchronous request. + */ + "workRequestId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; +} diff --git a/lib/blockchain/lib/request/list-work-requests-request.ts b/lib/blockchain/lib/request/list-work-requests-request.ts new file mode 100644 index 0000000000..e6a09ba129 --- /dev/null +++ b/lib/blockchain/lib/request/list-work-requests-request.ts @@ -0,0 +1,58 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListWorkRequestsRequest { + /** + * The ID of the compartment in which to list resources. + */ + "compartmentId": string; + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * The sort order to use, either 'asc' or 'desc'. + */ + "sortOrder"?: ListWorkRequestsRequest.SortOrder; + /** + * The field to sort by. Only one sort order may be provided. Default order for TIMESTARTED is descending. Default order for WORKREQUESTID is ascending. If no value is specified TIMESTARTED is default. + * + */ + "sortBy"?: ListWorkRequestsRequest.SortBy; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * The page at which to start retrieving results. + */ + "page"?: string; + /** + * The maximum number of items to return. + */ + "limit"?: number; +} + +export namespace ListWorkRequestsRequest { + export enum SortOrder { + ASC = "ASC", + DESC = "DESC" + } + + export enum SortBy { + TimeStarted = "timeStarted", + WorkRequestId = "workRequestId" + } +} diff --git a/lib/blockchain/lib/request/preview-scale-blockchain-platform-request.ts b/lib/blockchain/lib/request/preview-scale-blockchain-platform-request.ts new file mode 100644 index 0000000000..d6738c4fb8 --- /dev/null +++ b/lib/blockchain/lib/request/preview-scale-blockchain-platform-request.ts @@ -0,0 +1,30 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface PreviewScaleBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Input payload to scaleout blockchain platform. The payload cannot be empty. + * + */ + "scaleBlockchainPlatformDetails": model.ScaleBlockchainPlatformDetails; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/scale-blockchain-platform-request.ts b/lib/blockchain/lib/request/scale-blockchain-platform-request.ts new file mode 100644 index 0000000000..ca34c746f1 --- /dev/null +++ b/lib/blockchain/lib/request/scale-blockchain-platform-request.ts @@ -0,0 +1,48 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ScaleBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Input payload to scaleout blockchain platform. The payload cannot be empty. + * + */ + "scaleBlockchainPlatformDetails": model.ScaleBlockchainPlatformDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/blockchain/lib/request/start-blockchain-platform-request.ts b/lib/blockchain/lib/request/start-blockchain-platform-request.ts new file mode 100644 index 0000000000..26050aefcb --- /dev/null +++ b/lib/blockchain/lib/request/start-blockchain-platform-request.ts @@ -0,0 +1,34 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface StartBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/stop-blockchain-platform-request.ts b/lib/blockchain/lib/request/stop-blockchain-platform-request.ts new file mode 100644 index 0000000000..508418fece --- /dev/null +++ b/lib/blockchain/lib/request/stop-blockchain-platform-request.ts @@ -0,0 +1,34 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface StopBlockchainPlatformRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/request/update-blockchain-platform-request.ts b/lib/blockchain/lib/request/update-blockchain-platform-request.ts new file mode 100644 index 0000000000..b7d8edc581 --- /dev/null +++ b/lib/blockchain/lib/request/update-blockchain-platform-request.ts @@ -0,0 +1,38 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface UpdateBlockchainPlatformRequest { + /** + * The Blockchain Platform fields to update. Fields that are not provided will not be updated. + */ + "updateBlockchainPlatformDetails": model.UpdateBlockchainPlatformDetails; + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/blockchain/lib/request/update-osn-request.ts b/lib/blockchain/lib/request/update-osn-request.ts new file mode 100644 index 0000000000..4b22adf3f8 --- /dev/null +++ b/lib/blockchain/lib/request/update-osn-request.ts @@ -0,0 +1,52 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface UpdateOsnRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * OSN identifier. + */ + "osnId": string; + /** + * Input payload to update a blockchain platform OSN. The payload cannot be empty. + * + */ + "updateOsnDetails": model.UpdateOsnDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; + /** + * 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 + * might be rejected. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/blockchain/lib/request/update-peer-request.ts b/lib/blockchain/lib/request/update-peer-request.ts new file mode 100644 index 0000000000..7ba3c07398 --- /dev/null +++ b/lib/blockchain/lib/request/update-peer-request.ts @@ -0,0 +1,43 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface UpdatePeerRequest { + /** + * Unique service identifier. + */ + "blockchainPlatformId": string; + /** + * Peer identifier. + */ + "peerId": string; + /** + * Input payload to update a blockchain platform peer. The payload cannot be empty. + * + */ + "updatePeerDetails": model.UpdatePeerDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * The client request ID for tracing. + */ + "opcRequestId"?: string; +} diff --git a/lib/blockchain/lib/response/change-blockchain-platform-compartment-response.ts b/lib/blockchain/lib/response/change-blockchain-platform-compartment-response.ts new file mode 100644 index 0000000000..649a740bf7 --- /dev/null +++ b/lib/blockchain/lib/response/change-blockchain-platform-compartment-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ChangeBlockchainPlatformCompartmentResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/create-blockchain-platform-response.ts b/lib/blockchain/lib/response/create-blockchain-platform-response.ts new file mode 100644 index 0000000000..f27055a1d9 --- /dev/null +++ b/lib/blockchain/lib/response/create-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface CreateBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/create-osn-response.ts b/lib/blockchain/lib/response/create-osn-response.ts new file mode 100644 index 0000000000..c669ee9818 --- /dev/null +++ b/lib/blockchain/lib/response/create-osn-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface CreateOsnResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/create-peer-response.ts b/lib/blockchain/lib/response/create-peer-response.ts new file mode 100644 index 0000000000..294d9c439e --- /dev/null +++ b/lib/blockchain/lib/response/create-peer-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface CreatePeerResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/delete-blockchain-platform-response.ts b/lib/blockchain/lib/response/delete-blockchain-platform-response.ts new file mode 100644 index 0000000000..c6c0f93937 --- /dev/null +++ b/lib/blockchain/lib/response/delete-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface DeleteBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/delete-osn-response.ts b/lib/blockchain/lib/response/delete-osn-response.ts new file mode 100644 index 0000000000..fd21a0b8c6 --- /dev/null +++ b/lib/blockchain/lib/response/delete-osn-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface DeleteOsnResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/delete-peer-response.ts b/lib/blockchain/lib/response/delete-peer-response.ts new file mode 100644 index 0000000000..4369ab63b8 --- /dev/null +++ b/lib/blockchain/lib/response/delete-peer-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface DeletePeerResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/delete-work-request-response.ts b/lib/blockchain/lib/response/delete-work-request-response.ts new file mode 100644 index 0000000000..62d2ee3297 --- /dev/null +++ b/lib/blockchain/lib/response/delete-work-request-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface DeleteWorkRequestResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/get-blockchain-platform-response.ts b/lib/blockchain/lib/response/get-blockchain-platform-response.ts new file mode 100644 index 0000000000..aad13a5241 --- /dev/null +++ b/lib/blockchain/lib/response/get-blockchain-platform-response.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface GetBlockchainPlatformResponse { + /** + * For optimistic concurrency control. See `if-match`. + * + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.BlockchainPlatform instance. + */ + "blockchainPlatform": model.BlockchainPlatform; +} diff --git a/lib/blockchain/lib/response/get-osn-response.ts b/lib/blockchain/lib/response/get-osn-response.ts new file mode 100644 index 0000000000..76255e1707 --- /dev/null +++ b/lib/blockchain/lib/response/get-osn-response.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface GetOsnResponse { + /** + * For optimistic concurrency control. See `if-match`. + * + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.Osn instance. + */ + "osn": model.Osn; +} diff --git a/lib/blockchain/lib/response/get-peer-response.ts b/lib/blockchain/lib/response/get-peer-response.ts new file mode 100644 index 0000000000..b156cb4ddc --- /dev/null +++ b/lib/blockchain/lib/response/get-peer-response.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface GetPeerResponse { + /** + * For optimistic concurrency control. See `if-match`. + * + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.Peer instance. + */ + "peer": model.Peer; +} diff --git a/lib/blockchain/lib/response/get-work-request-response.ts b/lib/blockchain/lib/response/get-work-request-response.ts new file mode 100644 index 0000000000..fb19eb60fe --- /dev/null +++ b/lib/blockchain/lib/response/get-work-request-response.ts @@ -0,0 +1,37 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface GetWorkRequestResponse { + /** + * For optimistic concurrency control. See `if-match`. + * + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * A decimal number representing the number of seconds the client should wait before polling this endpoint again. + */ + "retryAfter": number; + /** + * The returned model.WorkRequest instance. + */ + "workRequest": model.WorkRequest; +} diff --git a/lib/blockchain/lib/response/index.ts b/lib/blockchain/lib/response/index.ts new file mode 100644 index 0000000000..d7a3477306 --- /dev/null +++ b/lib/blockchain/lib/response/index.ts @@ -0,0 +1,63 @@ +/** + * Blockchain Platform Control Plane API + * Blockchain Platform Plane API + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as ChangeBlockchainPlatformCompartmentResponse from "./change-blockchain-platform-compartment-response"; +export import ChangeBlockchainPlatformCompartmentResponse = ChangeBlockchainPlatformCompartmentResponse.ChangeBlockchainPlatformCompartmentResponse; +import * as CreateBlockchainPlatformResponse from "./create-blockchain-platform-response"; +export import CreateBlockchainPlatformResponse = CreateBlockchainPlatformResponse.CreateBlockchainPlatformResponse; +import * as CreateOsnResponse from "./create-osn-response"; +export import CreateOsnResponse = CreateOsnResponse.CreateOsnResponse; +import * as CreatePeerResponse from "./create-peer-response"; +export import CreatePeerResponse = CreatePeerResponse.CreatePeerResponse; +import * as DeleteBlockchainPlatformResponse from "./delete-blockchain-platform-response"; +export import DeleteBlockchainPlatformResponse = DeleteBlockchainPlatformResponse.DeleteBlockchainPlatformResponse; +import * as DeleteOsnResponse from "./delete-osn-response"; +export import DeleteOsnResponse = DeleteOsnResponse.DeleteOsnResponse; +import * as DeletePeerResponse from "./delete-peer-response"; +export import DeletePeerResponse = DeletePeerResponse.DeletePeerResponse; +import * as DeleteWorkRequestResponse from "./delete-work-request-response"; +export import DeleteWorkRequestResponse = DeleteWorkRequestResponse.DeleteWorkRequestResponse; +import * as GetBlockchainPlatformResponse from "./get-blockchain-platform-response"; +export import GetBlockchainPlatformResponse = GetBlockchainPlatformResponse.GetBlockchainPlatformResponse; +import * as GetOsnResponse from "./get-osn-response"; +export import GetOsnResponse = GetOsnResponse.GetOsnResponse; +import * as GetPeerResponse from "./get-peer-response"; +export import GetPeerResponse = GetPeerResponse.GetPeerResponse; +import * as GetWorkRequestResponse from "./get-work-request-response"; +export import GetWorkRequestResponse = GetWorkRequestResponse.GetWorkRequestResponse; +import * as ListBlockchainPlatformsResponse from "./list-blockchain-platforms-response"; +export import ListBlockchainPlatformsResponse = ListBlockchainPlatformsResponse.ListBlockchainPlatformsResponse; +import * as ListOsnsResponse from "./list-osns-response"; +export import ListOsnsResponse = ListOsnsResponse.ListOsnsResponse; +import * as ListPeersResponse from "./list-peers-response"; +export import ListPeersResponse = ListPeersResponse.ListPeersResponse; +import * as ListWorkRequestErrorsResponse from "./list-work-request-errors-response"; +export import ListWorkRequestErrorsResponse = ListWorkRequestErrorsResponse.ListWorkRequestErrorsResponse; +import * as ListWorkRequestLogsResponse from "./list-work-request-logs-response"; +export import ListWorkRequestLogsResponse = ListWorkRequestLogsResponse.ListWorkRequestLogsResponse; +import * as ListWorkRequestsResponse from "./list-work-requests-response"; +export import ListWorkRequestsResponse = ListWorkRequestsResponse.ListWorkRequestsResponse; +import * as PreviewScaleBlockchainPlatformResponse from "./preview-scale-blockchain-platform-response"; +export import PreviewScaleBlockchainPlatformResponse = PreviewScaleBlockchainPlatformResponse.PreviewScaleBlockchainPlatformResponse; +import * as ScaleBlockchainPlatformResponse from "./scale-blockchain-platform-response"; +export import ScaleBlockchainPlatformResponse = ScaleBlockchainPlatformResponse.ScaleBlockchainPlatformResponse; +import * as StartBlockchainPlatformResponse from "./start-blockchain-platform-response"; +export import StartBlockchainPlatformResponse = StartBlockchainPlatformResponse.StartBlockchainPlatformResponse; +import * as StopBlockchainPlatformResponse from "./stop-blockchain-platform-response"; +export import StopBlockchainPlatformResponse = StopBlockchainPlatformResponse.StopBlockchainPlatformResponse; +import * as UpdateBlockchainPlatformResponse from "./update-blockchain-platform-response"; +export import UpdateBlockchainPlatformResponse = UpdateBlockchainPlatformResponse.UpdateBlockchainPlatformResponse; +import * as UpdateOsnResponse from "./update-osn-response"; +export import UpdateOsnResponse = UpdateOsnResponse.UpdateOsnResponse; +import * as UpdatePeerResponse from "./update-peer-response"; +export import UpdatePeerResponse = UpdatePeerResponse.UpdatePeerResponse; diff --git a/lib/blockchain/lib/response/list-blockchain-platforms-response.ts b/lib/blockchain/lib/response/list-blockchain-platforms-response.ts new file mode 100644 index 0000000000..eebdcab50c --- /dev/null +++ b/lib/blockchain/lib/response/list-blockchain-platforms-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListBlockchainPlatformsResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * 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. + * + */ + "opcNextPage": string; + /** + * The returned model.BlockchainPlatformCollection instance. + */ + "blockchainPlatformCollection": model.BlockchainPlatformCollection; +} diff --git a/lib/blockchain/lib/response/list-osns-response.ts b/lib/blockchain/lib/response/list-osns-response.ts new file mode 100644 index 0000000000..419c1eece9 --- /dev/null +++ b/lib/blockchain/lib/response/list-osns-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListOsnsResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * 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. + * + */ + "opcNextPage": string; + /** + * The returned model.OsnCollection instance. + */ + "osnCollection": model.OsnCollection; +} diff --git a/lib/blockchain/lib/response/list-peers-response.ts b/lib/blockchain/lib/response/list-peers-response.ts new file mode 100644 index 0000000000..3fb63d08ce --- /dev/null +++ b/lib/blockchain/lib/response/list-peers-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListPeersResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * 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. + * + */ + "opcNextPage": string; + /** + * The returned model.PeerCollection instance. + */ + "peerCollection": model.PeerCollection; +} diff --git a/lib/blockchain/lib/response/list-work-request-errors-response.ts b/lib/blockchain/lib/response/list-work-request-errors-response.ts new file mode 100644 index 0000000000..8142d45c63 --- /dev/null +++ b/lib/blockchain/lib/response/list-work-request-errors-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListWorkRequestErrorsResponse { + /** + * 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. + * + */ + "opcNextPage": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.WorkRequestErrorCollection instance. + */ + "workRequestErrorCollection": model.WorkRequestErrorCollection; +} diff --git a/lib/blockchain/lib/response/list-work-request-logs-response.ts b/lib/blockchain/lib/response/list-work-request-logs-response.ts new file mode 100644 index 0000000000..876386f099 --- /dev/null +++ b/lib/blockchain/lib/response/list-work-request-logs-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListWorkRequestLogsResponse { + /** + * 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. + * + */ + "opcNextPage": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.WorkRequestLogEntryCollection instance. + */ + "workRequestLogEntryCollection": model.WorkRequestLogEntryCollection; +} diff --git a/lib/blockchain/lib/response/list-work-requests-response.ts b/lib/blockchain/lib/response/list-work-requests-response.ts new file mode 100644 index 0000000000..c15d4f9086 --- /dev/null +++ b/lib/blockchain/lib/response/list-work-requests-response.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListWorkRequestsResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * 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. + * + */ + "opcNextPage": string; + /** + * The returned model.WorkRequestCollection instance. + */ + "workRequestCollection": model.WorkRequestCollection; +} diff --git a/lib/blockchain/lib/response/preview-scale-blockchain-platform-response.ts b/lib/blockchain/lib/response/preview-scale-blockchain-platform-response.ts new file mode 100644 index 0000000000..43d262dda4 --- /dev/null +++ b/lib/blockchain/lib/response/preview-scale-blockchain-platform-response.ts @@ -0,0 +1,33 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface PreviewScaleBlockchainPlatformResponse { + /** + * For optimistic concurrency control. See `if-match`. + * + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The returned model.ScaledBlockchainPlatformPreview instance. + */ + "scaledBlockchainPlatformPreview": model.ScaledBlockchainPlatformPreview; +} diff --git a/lib/blockchain/lib/response/scale-blockchain-platform-response.ts b/lib/blockchain/lib/response/scale-blockchain-platform-response.ts new file mode 100644 index 0000000000..1cb1da938f --- /dev/null +++ b/lib/blockchain/lib/response/scale-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ScaleBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/start-blockchain-platform-response.ts b/lib/blockchain/lib/response/start-blockchain-platform-response.ts new file mode 100644 index 0000000000..18c0081def --- /dev/null +++ b/lib/blockchain/lib/response/start-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface StartBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/stop-blockchain-platform-response.ts b/lib/blockchain/lib/response/stop-blockchain-platform-response.ts new file mode 100644 index 0000000000..6dee09c4c5 --- /dev/null +++ b/lib/blockchain/lib/response/stop-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface StopBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; +} diff --git a/lib/blockchain/lib/response/update-blockchain-platform-response.ts b/lib/blockchain/lib/response/update-blockchain-platform-response.ts new file mode 100644 index 0000000000..eb15f56bf1 --- /dev/null +++ b/lib/blockchain/lib/response/update-blockchain-platform-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface UpdateBlockchainPlatformResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/update-osn-response.ts b/lib/blockchain/lib/response/update-osn-response.ts new file mode 100644 index 0000000000..4e59d12e57 --- /dev/null +++ b/lib/blockchain/lib/response/update-osn-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface UpdateOsnResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/lib/response/update-peer-response.ts b/lib/blockchain/lib/response/update-peer-response.ts new file mode 100644 index 0000000000..29735431f8 --- /dev/null +++ b/lib/blockchain/lib/response/update-peer-response.ts @@ -0,0 +1,29 @@ +/** + * + * + * OpenAPI spec version: 20191010 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface UpdatePeerResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + * + */ + "opcWorkRequestId": string; +} diff --git a/lib/blockchain/package.json b/lib/blockchain/package.json new file mode 100644 index 0000000000..dd75b2fcd1 --- /dev/null +++ b/lib/blockchain/package.json @@ -0,0 +1,28 @@ +{ + "name": "oci-blockchain", + "version": "1.2.3", + "description": "OCI NodeJS client for Blockchain Service", + "repository": { + "type": "git", + "url": "https://github.com/oracle/oci-typescript-sdk" + }, + "main": "../../target/lib/blockchain/index.js", + "typings": "../../target/lib/blockchain/index.d.ts", + "scripts": {}, + "author": { + "name": "Oracle Cloud Infrastructure", + "email": "" + }, + "license": "(UPL-1.0 OR Apache-2.0)", + "dependencies": { + "oci-common": "../common" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "contributors": [ + "Jyoti Saini ", + "Joe Levy ", + "Walt Tran " + ] +} diff --git a/lib/blockchain/tsconfig.json b/lib/blockchain/tsconfig.json new file mode 100644 index 0000000000..bf9170b6ce --- /dev/null +++ b/lib/blockchain/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ + "outDir": "target", /* Redirect output structure to the directory. */ + "strict": true, /* Enable all strict type-checking options. */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + } +} \ No newline at end of file diff --git a/lib/budget/package.json b/lib/budget/package.json index d8bb02d51e..9254ed1d84 100644 --- a/lib/budget/package.json +++ b/lib/budget/package.json @@ -1,6 +1,6 @@ { "name": "oci-budget", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Budget Service", "repository": { "type": "git", diff --git a/lib/cims/package.json b/lib/cims/package.json index 115afd0157..043bb6e93c 100644 --- a/lib/cims/package.json +++ b/lib/cims/package.json @@ -1,6 +1,6 @@ { "name": "oci-cims", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Cims ", "repository": { "type": "git", diff --git a/lib/common/index.ts b/lib/common/index.ts index 6546a642d1..5039d5af46 100644 --- a/lib/common/index.ts +++ b/lib/common/index.ts @@ -25,7 +25,7 @@ import { } from "./lib/waiter"; import { RequireOnlyOne, AuthParams } from "./lib/types"; import { HttpRequest } from "./lib/http-request"; - +import InstancePrincipalsAuthenticationDetailsProviderBuilder from "./lib/auth/instance-principals-authentication-detail-provider"; import { paginateRecords, genericPaginateRecords, @@ -84,5 +84,6 @@ export { HttpRequest, ConfigFileAuthenticationDetailsProvider, ConfigFileReader, + InstancePrincipalsAuthenticationDetailsProviderBuilder, LOG }; diff --git a/lib/common/lib/auth/X509-federation-client.ts b/lib/common/lib/auth/X509-federation-client.ts new file mode 100644 index 0000000000..f421e82748 --- /dev/null +++ b/lib/common/lib/auth/X509-federation-client.ts @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import UrlParser = require("url"); +const httpSignature: any = require("http-signature"); +import jssha = require("jssha"); +import FederationClient from "./models/federation-client"; +import SessionKeySupplier from "./models/session-key-supplier"; +import X509CertificateSupplier from "./models/X509-certificate-supplier"; +import SecurityTokenAdapter from "./security-token-adapter"; +import AuthUtils from "./helpers/auth-utils"; +import { RequestSigner } from "../signer"; +import { HttpRequest } from "../http-request"; +import { SignerRequest } from "../signer"; +import { FetchHttpClient } from "../http"; +import { PrivateKey } from "sshpk"; +import { getStringFromRequestBody } from "../helper"; + +/** + * This class gets a security token from the auth service by signing the request with a PKI issued leaf certificate, + * passing along a temporary public key that is bounded to the the security token, and the leaf certificate. + */ + +export default class X509FederationClient implements FederationClient { + securityTokenAdapter: SecurityTokenAdapter; + private retry = 0; + + constructor( + private federationEndpoint: string, + private _tenancyId: string, + private _leafCertificateSupplier: X509CertificateSupplier, + private sessionKeySupplier: SessionKeySupplier, + private intermediateCertificateSuppliers: X509CertificateSupplier[], + private purpose: string + ) { + this.securityTokenAdapter = new SecurityTokenAdapter("", this.sessionKeySupplier); + } + + // Getter for tenancyId + get tenancyId(): string { + return this._tenancyId; + } + + // Getter for leafCerificateSupplier + get leafCertificateSupplier(): X509CertificateSupplier { + return this._leafCertificateSupplier; + } + + /** + * Gets a security token. If there is already a valid token cached, it will be returned. Else this will make a call + * to the auth service to get a new token, using the provided suppliers. + * + * This method is thread-safe. + * @return the security token + * @throws OciError If there is any issue with getting a token from the auth server + */ + async getSecurityToken(): Promise { + if (this.securityTokenAdapter.isValid()) { + return this.securityTokenAdapter.getSecurityToken(); + } + return await this.refreshAndGetSecurityTokenInner(true); + } + + /** + * Return a claim embedded in the security token + * @param key the name of the claim + * @return the value of the claim or null if unable to find + */ + async getStringClaim(key: string): Promise { + await this.refreshAndGetSecurityTokenInner(true); + return this.securityTokenAdapter.getStringClaim(key); + } + + async refreshAndGetSecurityToken(): Promise { + return await this.refreshAndGetSecurityTokenInner(false); + } + + private async refreshAndGetSecurityTokenInner( + doFinalTokenValidityCheck: boolean + ): Promise { + // Check again to see if the JWT is still invalid, unless we want to skip that check + if (!doFinalTokenValidityCheck || !this.securityTokenAdapter.isValid()) { + this.sessionKeySupplier.refreshKeys(); + + // Check if leafCertificateSupplier contains a .refresh() method. If so, call refresh() + if (this._leafCertificateSupplier && this._leafCertificateSupplier.refresh) { + try { + this._leafCertificateSupplier = await this._leafCertificateSupplier.refresh(); + } catch (e) { + throw Error(`Fail to refresh leafCertificateSupplier, error: ${e}`); + } + + // When using default purpose (ex, instance principals), the token request should always be signed with the same tenant id as the certificate. + // For other purposes, the tenant id can be different. + if (this.purpose === "DEFAULT") { + const newTenancyId: string = AuthUtils.getTenantIdFromCertificate( + this._leafCertificateSupplier.getCertificateAndKeyPair().getCertificate() + ); + + if (this.tenancyId != newTenancyId) { + throw Error("The tenancy id should never be changed in cert file!"); + } + } + } + // Loop through each intermediateCertificateSuppliers and refresh them if possible + for (let i = 0; i < this.intermediateCertificateSuppliers.length; i++) { + try { + if (this.intermediateCertificateSuppliers[i].refresh) { + this.intermediateCertificateSuppliers[i] = await this.intermediateCertificateSuppliers[ + i + ].refresh!(); + } + } catch (e) { + throw Error("Cannot refresh the intermediate certification"); + } + } + + this.securityTokenAdapter = await this.getSecurityTokenFromServer(); + + return this.securityTokenAdapter.getSecurityToken(); + } + return this.securityTokenAdapter.getSecurityToken(); + } + + /** + * Gets a security token from the federation server + * @return the security token, which is basically a JWT token string + */ + private async getSecurityTokenFromServer(): Promise { + const keyPair = this.sessionKeySupplier.getKeyPair(); + if (!keyPair) { + throw Error("keyPair for session was not provided"); + } + const publicKey = keyPair.getPublic(); + if (!publicKey) { + throw Error("Public key is not present"); + } + + const certificateAndKeyPair = this.leafCertificateSupplier.getCertificateAndKeyPair(); + if (!certificateAndKeyPair) { + throw Error("Certificate and key pair are not present"); + } + + const leafCertificate = certificateAndKeyPair.getCertificate(); + if (!leafCertificate) { + throw Error("Leaf certificate is not present"); + } + + if (!certificateAndKeyPair.getPrivateKey()) { + throw Error("Leaf certificate's private key is not present"); + } + + try { + let intermediateStrings: string[] = []; + if ( + this.intermediateCertificateSuppliers && + this.intermediateCertificateSuppliers.length > 0 + ) { + this.intermediateCertificateSuppliers.forEach((supplier: X509CertificateSupplier) => { + const supplierCertificateAndKeyPair = supplier.getCertificateAndKeyPair(); + if (supplierCertificateAndKeyPair && supplierCertificateAndKeyPair.getCertificate()) { + intermediateStrings.push( + AuthUtils.sanitizeCertificateString( + supplierCertificateAndKeyPair.getCertificate().toString("pem") + ) + ); + } + }); + } + + // Create request body and call auth service. + const url = this.federationEndpoint + "/v1/x509"; + const requestPayload = { + certificate: AuthUtils.sanitizeCertificateString(leafCertificate.toString("pem")), + purpose: this.purpose, + publicKey: AuthUtils.sanitizeCertificateString(publicKey), + intermediateCertificates: intermediateStrings + }; + + let jsonPayload = JSON.stringify(requestPayload); + jsonPayload = jsonPayload.replace(/\\n/g, ""); + + const requestObj: HttpRequest = { + uri: url, + body: jsonPayload, + method: "POST", + headers: new Headers() + }; + const fingerprint = leafCertificate.fingerprint("sha1").toString("hex"); + const privateKey = certificateAndKeyPair.getPrivateKey() as PrivateKey; + // Instantiate AuthTokenRequestSigner to sign the request + const signer = new AuthTokenRequestSigner(this.tenancyId, fingerprint, privateKey); + const httpClient = new FetchHttpClient(signer); + + // Call Auth Service to get a JSON object which contains the auth token + const response = await httpClient.send(requestObj); + //TODO: Implement retry here + // retry here + if (response.status !== 200) { + if (this.retry < 3) { + this.retry += 1; + return await this.getSecurityTokenFromServer(); + } else { + throw Error(`Failed to call auth service for token, error: ${response}`); + } + } + this.retry = 0; + const securityToken = await response.json(); + return new SecurityTokenAdapter(securityToken.token, this.sessionKeySupplier); + } catch (e) { + throw Error(`Failed to call call Auth service, error: ${e}`); + } + } +} + +// A Signer class for FederationClient +class AuthTokenRequestSigner implements RequestSigner { + constructor( + public tenancyId: String, + public fingerprint: String, + public privateKey: PrivateKey + ) {} + + async signHttpRequest(request: HttpRequest, forceExcludeBody: boolean = false): Promise { + const apiKey = `${this.tenancyId}/fed-x509/${this.fingerprint}`; + const headersToSign = [ + "date", + "(request-target)", + "host", + "content-type", + "content-length", + "x-content-sha256" + ]; + const EMPTY_SHA = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; + + if (!request.headers.has("host")) { + const url = UrlParser.parse(request.uri); + if (url.host) { + request.headers.set("host", url.host); + } else { + throw new Error("Cannot parse host from url"); + } + } + + if (!request.headers.has("x-date")) { + request.headers.set("x-date", new Date().toUTCString()); + } + + if (!request.headers.has("Content-Type")) { + request.headers.set("Content-Type", "application/json"); + } + + let contentLen = 0; + const shaObj = new jssha("SHA-256", "TEXT"); + if (request.body) { + const bodyStringContent: string = await getStringFromRequestBody(request.body); + shaObj.update(bodyStringContent); + request.headers.set("x-content-sha256", shaObj.getHash("B64")); + contentLen = bodyStringContent.length; + } + + if (contentLen === 0) { + // if buffer is empty, it can only be an empty string payload + request.headers.set("x-content-sha256", EMPTY_SHA); + } + + if (!request.headers.has("Content-Length")) { + request.headers.set("Content-Length", `${contentLen}`); + } + + httpSignature.sign(new SignerRequest(request.method, request.uri, request.headers), { + key: this.privateKey.toBuffer("pem", {}), + keyId: apiKey, + headers: headersToSign + }); + + const authorizationHeader = request.headers.get("authorization"); + if (authorizationHeader) { + request.headers.set( + "authorization", + authorizationHeader.replace("Signature ", 'Signature version="1",') + ); + } else { + throw new Error("Unable to sign request"); + } + } +} diff --git a/lib/common/lib/auth/abstract-federation-client-authenticated-details-provider-builder.ts b/lib/common/lib/auth/abstract-federation-client-authenticated-details-provider-builder.ts new file mode 100644 index 0000000000..b9166bf1c2 --- /dev/null +++ b/lib/common/lib/auth/abstract-federation-client-authenticated-details-provider-builder.ts @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * Abstract builder base class for authentication details provider extending + * @param builder class + * @param

provider class + */ + +import { EndpointBuilder } from "../endpoint-builder"; +import { FetchHttpClient } from "../http"; +import AbstractAuthenticationDetailsProvider from "./models/abstract-authentication-details-provider"; +import X509CertificateSupplier from "./models/X509-certificate-supplier"; +import { Region } from "../region"; +import { Realm } from "../realm"; +import AuthUtils from "./helpers/auth-utils"; +import SessionKeySupplier from "./models/session-key-supplier"; +import FederationClient from "./models/federation-client"; +import X509FederationClient from "./X509-federation-client"; +import SessionKeySupplierImpl from "./session-key-supplier"; +import { + URLBasedX509CertificateSupplier, + ResourceDetails +} from "./url-based-x509-certificate-supplier"; + +export default abstract class AbstractFederationClientAuthenticationDetailsProviderBuilder< + B extends AbstractFederationClientAuthenticationDetailsProviderBuilder, + P extends AbstractAuthenticationDetailsProvider +> { + // url template for auth service. + protected template = "https://auth.{region}.{secondLevelDomain}"; + + // Default base url of metadata service. + protected METADATA_SERVICE_BASE_URL = "http://169.254.169.254/opc/v2/"; + + // The Authorization header value to be sent for requests to the metadata service. + private METADATA_AUTH_HEADERS = "Bearer Oracle"; + private AUTHORIZATION = "Authorization"; + + // Base url of metadata service. + protected _metadataBaseUrl = this.METADATA_SERVICE_BASE_URL; + + // The federation endpoint url. + protected _federationEndpoint: string = ""; + + // The leaf certificate, or null if detecting from instance metadata. + protected _leafCertificateSupplier!: X509CertificateSupplier; + + //Tenancy OCI, or empty string if detecting from instance metadata. + protected _tenancyId: string = ""; + + // Purpose: Specifies the non-default purpose of the session token to be requested. For internal use only. + private _purpose: string = "DEFAULT"; + + // Detected region + protected region!: Region; + + // session key supplier + protected _sessionKeySupplier!: SessionKeySupplier; + + // federation client + protected _federationClient!: FederationClient; + + // intermediate certificate supplier + protected _intermediateCertificateSuppliers!: X509CertificateSupplier[]; + + // metadataBaseUrl getter + get metadataBaseUrl(): string { + return this._metadataBaseUrl; + } + + // federationEndpoint getter + get federationEndpoint(): string { + return this._federationEndpoint; + } + + // LeafCertificateSupplier getter + get leafCertificateSupplier(): X509CertificateSupplier { + return this._leafCertificateSupplier; + } + + // tenancyId getter + get tenancyId(): string { + return this._tenancyId; + } + + // region getter + getRegion(): Region { + return this.region; + } + + // Configure the metadata endpoint to use when retrieving the instance data and principal for federation. + set metadataBaseUrl(metadataBaseUrl: string) { + this._metadataBaseUrl = metadataBaseUrl; + if (this._metadataBaseUrl.substr(-1) != "/") { + this._metadataBaseUrl += "/"; + } + } + + // Configures the custom federationEndpoint to use. + set federationEndpoint(federationEndpoint: string) { + this._federationEndpoint = federationEndpoint; + } + + // Configures the custom leafCertificateSupplier to use. + set leafCertificateSupplier(leafCertificateSupplier: X509CertificateSupplier) { + this._leafCertificateSupplier = leafCertificateSupplier; + } + + // Configure the custom tenancyId to use. + set tenancyId(tenancyId: string) { + this._tenancyId = tenancyId; + } + + // Configure the purpose to use. + set purpose(purpose: string) { + this._purpose = purpose; + } + + // Configures the custom sessionKeySupplier to use. + set sessionKeySupplier(sessionKeySupplier: SessionKeySupplier) { + this._sessionKeySupplier = sessionKeySupplier; + } + + // Configures the set of intermediate certificate suppliers to use, if any. + set intermediateCertificateSuppliers( + intermediateCertificateSuppliers: [X509CertificateSupplier] + ) { + this._intermediateCertificateSuppliers = intermediateCertificateSuppliers; + } + + /** + * Build a new AuthenticationDetailsProvider that uses the FederationClient. + * + * @return A new provider instance. + */ + async build(): Promise

{ + const sessionKeySupplierToUse = this._sessionKeySupplier || new SessionKeySupplierImpl(); + this._sessionKeySupplier = sessionKeySupplierToUse; + this._federationClient = this.createFederationClient(this._sessionKeySupplier); + return this.buildProvider(this._sessionKeySupplier); + } + + /** + * Build the actual provider. + * @param sessionKeySupplierToUse + * @return authentication details provider + */ + protected abstract buildProvider(sessionKeySupplierToUse: SessionKeySupplier): P; + + /** + * Build the Federation Client + * @param sessionKeySupplier + * @return Federation Client + */ + protected createFederationClient(sessionKeySupplier: SessionKeySupplier): FederationClient { + return new X509FederationClient( + this._federationEndpoint, + this._tenancyId, + this._leafCertificateSupplier, + sessionKeySupplier, + this._intermediateCertificateSuppliers, + this._purpose + ); + } + + /** + * Auto-detect endpoint and certificate information using Instance metadata. + */ + protected async autoDetectUsingMetadataUrl(): Promise { + await this.autoDetectEndpointUsingMetadataUrl(); + await this.autoDetectCertificatesUsingMetadataUrl(); + } + /** + * Auto detects the endpoint that should be used when talking to OCI Auth, if no endpoint + * has been configured already. + * @return The auto-detected, or currently set, auth endpoint. + */ + protected async autoDetectEndpointUsingMetadataUrl(): Promise { + if (this._federationEndpoint === "") { + const url: string = this._metadataBaseUrl + "instance/region"; + let headers = new Headers(); + headers.append("accept", "text/plain"); + headers.append("Content-Type", "application/json"); + headers.append(this.AUTHORIZATION, this.METADATA_AUTH_HEADERS); + const httpClient = new FetchHttpClient(null); + const response = await httpClient.send({ + uri: url, + method: "GET", + headers: headers + }); + // regionStr can be a shortCode or regionId + const regionStr: string = await response.text(); + + const regionId: string = Region.getRegionIdFromShortCode(regionStr); + try { + // Try to get region off regionId + this.region = Region.fromRegionId(regionId); + } catch (e) { + console.log(` + failed reason: ${e}, + Region not supported by this version of the SDK, registering region ${regionId} under OC1 + `); + this.region = Region.register(regionId, Realm.OC1); + } + + try { + const endpoint = EndpointBuilder.createEndpointFromRegion( + this.template, + this.region //TODO: Find out why there is a type mismatch + ); + this._federationEndpoint = endpoint; + } catch (e) { + throw Error(`Endpoint for auth service is not known in region ${this.region}`); + } + } + return this._federationEndpoint; + } + /** + * Auto detects and configures the certificates needed using Instance metadata. + * + */ + protected async autoDetectCertificatesUsingMetadataUrl(): Promise { + try { + if (!this._leafCertificateSupplier) { + this._leafCertificateSupplier = await new URLBasedX509CertificateSupplier( + this.getMetaDataResourceDetail("identity/cert.pem"), + this.getMetaDataResourceDetail("identity/key.pem"), + null + ).refresh(); + } + + if (this._tenancyId === "") { + this._tenancyId = AuthUtils.getTenantIdFromCertificate( + this._leafCertificateSupplier.getCertificateAndKeyPair().getCertificate() + ); + } + + if (!this._intermediateCertificateSuppliers) { + this._intermediateCertificateSuppliers = [ + await new URLBasedX509CertificateSupplier( + this.getMetaDataResourceDetail("identity/intermediate.pem"), + null, + null + ).refresh() + ]; + } + } catch (e) { + throw Error("Failed to autoDetectCertificatesUsingMetadataUrl"); + } + } + + getMetaDataResourceDetail(path: string) { + const url: string = this._metadataBaseUrl + path; + let headers = new Headers(); + headers.append(this.AUTHORIZATION, this.METADATA_AUTH_HEADERS); + return new ResourceDetails(url, headers); + } +} diff --git a/lib/common/lib/auth/abstract-requesting-authentication-detail-provider.ts b/lib/common/lib/auth/abstract-requesting-authentication-detail-provider.ts new file mode 100644 index 0000000000..a09418e50b --- /dev/null +++ b/lib/common/lib/auth/abstract-requesting-authentication-detail-provider.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import { AuthenticationDetailsProvider } from "./auth"; +import FederationClient from "./models/federation-client"; +import SessionKeySupplier from "./models/session-key-supplier"; + +/** + * Base class for authentication details providers that make remote requests. + */ +export default abstract class AbstractRequestingAuthenticationDetailsProvider + implements AuthenticationDetailsProvider { + constructor( + protected federationClient: FederationClient, + protected sessionKeySupplier: SessionKeySupplier + ) {} + + async getKeyId(): Promise { + return "ST$" + (await this.federationClient.getSecurityToken()); + } + + getPrivateKey(): string { + return this.sessionKeySupplier.getKeyPair().getPrivate(); + } + + getPassphrase(): null { + return null; + } +} diff --git a/lib/common/lib/auth/auth.ts b/lib/common/lib/auth/auth.ts index 381910831d..7d937f0294 100644 --- a/lib/common/lib/auth/auth.ts +++ b/lib/common/lib/auth/auth.ts @@ -1,18 +1,19 @@ -import { Region } from "../region"; - /** * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ +import { Region } from "../region"; +import AbstractAuthenticationDetailsProvider from "./models/abstract-authentication-details-provider"; + /** * An interface provides the authentication details. */ -export interface AuthenticationDetailsProvider { +export interface AuthenticationDetailsProvider extends AbstractAuthenticationDetailsProvider { /** * Get the key id to sign the http request. */ - getKeyId(): string; + getKeyId(): Promise; /** * Get the private key to sign the http request. @@ -70,7 +71,7 @@ export class SimpleAuthenticationDetailsProvider /** * Get the key id to sign the http request. */ - public getKeyId(): string { + public async getKeyId(): Promise { return this.tenancy + "/" + this.user + "/" + this.fingerprint; } diff --git a/lib/common/lib/auth/certificate-and-privatekey-pair.ts b/lib/common/lib/auth/certificate-and-privatekey-pair.ts new file mode 100644 index 0000000000..db5608ae5f --- /dev/null +++ b/lib/common/lib/auth/certificate-and-privatekey-pair.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import { Certificate, PrivateKey } from "sshpk"; +export default class CertificateAndPrivateKeyPair { + constructor(private certificate: Certificate, private privateKey: PrivateKey | null) {} + + getCertificate(): Certificate { + return this.certificate; + } + + getPrivateKey(): PrivateKey | null { + return this.privateKey; + } +} diff --git a/lib/common/lib/auth/config-file-auth.ts b/lib/common/lib/auth/config-file-auth.ts index a9fc394bb7..cdaf4142d2 100644 --- a/lib/common/lib/auth/config-file-auth.ts +++ b/lib/common/lib/auth/config-file-auth.ts @@ -82,8 +82,8 @@ export class ConfigFileAuthenticationDetailsProvider /** * Get the key id to sign the http request. */ - public getKeyId(): string { - return this.delegate.getKeyId(); + public async getKeyId(): Promise { + return await this.delegate.getKeyId(); } /** diff --git a/lib/common/lib/auth/helpers/auth-utils.ts b/lib/common/lib/auth/helpers/auth-utils.ts new file mode 100644 index 0000000000..5b9a322a9b --- /dev/null +++ b/lib/common/lib/auth/helpers/auth-utils.ts @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import { Certificate, Identity } from "sshpk"; + +/** + * Utilities dealing with authorization. + */ +export default class AuthUtils { + /** + * Get the tenant id from the given certificate. + * @param certificate the given certificate. + * @return the tenant id. + */ + static getTenantIdFromCertificate(certificate: Certificate): string { + let tenancyId = ""; + + /* Note: We currently have a newer version of sshpk that don't match the same version + * as the @types/sshpk. Because of the mismatch version, the types dont quite match + * Microsoft have not updated their types file. To get around temporarily, cast "any" + */ + const OPC_TENANT = "opc-tenant:"; + const OPC_IDENTITY = "opc-identity:"; + try { + const subjects: any = certificate.subjects as any; + for (let subject of subjects) { + const components = subject.components as any; + for (let component of components) { + if (component.value.includes(OPC_TENANT)) { + const str = component.value; + tenancyId = str.slice(str.indexOf(OPC_TENANT) + OPC_TENANT.length); + return tenancyId; + } + if (component.value.includes(OPC_IDENTITY)) { + const str = component.value; + tenancyId = str.slice(str.indexOf(OPC_IDENTITY) + OPC_IDENTITY.length); + return tenancyId; + } + } + } + if (!tenancyId) { + throw Error("The certificate does not contain tenant id."); + } + } catch (e) { + throw Error("Failed to parse tenancyId from certificate"); + } + return tenancyId; + } + + static sanitizeCertificateString(certificate: string): string { + return certificate + .replace("-----BEGIN CERTIFICATE-----", "") + .replace("-----END CERTIFICATE-----", "") + .replace("-----BEGIN PUBLIC KEY-----", "") + .replace("-----END PUBLIC KEY-----", "") + .replace("\n", ""); + } +} diff --git a/lib/common/lib/auth/instance-principals-authentication-detail-provider.ts b/lib/common/lib/auth/instance-principals-authentication-detail-provider.ts new file mode 100644 index 0000000000..84b7787bfe --- /dev/null +++ b/lib/common/lib/auth/instance-principals-authentication-detail-provider.ts @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import { Region } from "../region"; +import { RegionProvider } from "./auth"; +import FederationClient from "./models/federation-client"; +import RefreshableOnNotAuthenticatedProvider from "./models/refreshable-on-not-authenticaticated-provider"; +import AbstractRequestingAuthenticationDetailsProvider from "./abstract-requesting-authentication-detail-provider"; +import AbstractFederationClientAuthenticationDetailsProviderBuilder from "./abstract-federation-client-authenticated-details-provider-builder"; +import SessionKeySupplier from "./models/session-key-supplier"; +import X509CertificateSupplier from "./models/X509-certificate-supplier"; + +class InstancePrincipalsAuthenticationDetailsProvider + extends AbstractRequestingAuthenticationDetailsProvider + implements RegionProvider, RefreshableOnNotAuthenticatedProvider { + constructor( + protected federationClient: FederationClient, + protected sessionKeySupplier: SessionKeySupplier, + protected region: Region + ) { + super(federationClient, sessionKeySupplier); + } + /** + * Refreshes the authentication data used by the provider + * @return the refreshed authentication data + */ + async refresh(): Promise { + return await this.federationClient.refreshAndGetSecurityToken(); + } + + // region getter + getRegion(): Region { + return this.region!; + } + + /** + * Creates a new InstancePrincipalsAuthenticationDetailsProviderBuilder. + * @return A new builder instance. + */ + static builder(): InstancePrincipalsAuthenticationDetailsProviderBuilder { + return new InstancePrincipalsAuthenticationDetailsProviderBuilder(); + } +} + +export default class InstancePrincipalsAuthenticationDetailsProviderBuilder extends AbstractFederationClientAuthenticationDetailsProviderBuilder< + InstancePrincipalsAuthenticationDetailsProviderBuilder, + InstancePrincipalsAuthenticationDetailsProvider +> { + constructor() { + super(); + } + + async build(): Promise { + await this.autoDetectUsingMetadataUrl(); + return await super.build(); + } + + protected buildProvider( + sessionKeySupplierToUse: SessionKeySupplier + ): InstancePrincipalsAuthenticationDetailsProvider { + return new InstancePrincipalsAuthenticationDetailsProvider( + this._federationClient, + sessionKeySupplierToUse, + this.region + ); + } + + set federationEndpoint(federationEndpoint: string) { + super._federationEndpoint = federationEndpoint; + } + + set leafCertificateSupplier(leafCertificateSupplier: X509CertificateSupplier) { + super._leafCertificateSupplier = leafCertificateSupplier; + } +} diff --git a/lib/common/lib/auth/key-pair.ts b/lib/common/lib/auth/key-pair.ts new file mode 100644 index 0000000000..32d2bf7df3 --- /dev/null +++ b/lib/common/lib/auth/key-pair.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * This class is a simple holder for a key pair (a public key and a + * private key). + */ + +export default class KeyPair { + constructor(private publicKey: string, private privateKey: string) {} + + getPublic(): string { + return this.publicKey; + } + + getPrivate(): string { + return this.privateKey; + } +} diff --git a/lib/common/lib/auth/models/X509-certificate-supplier.ts b/lib/common/lib/auth/models/X509-certificate-supplier.ts new file mode 100644 index 0000000000..e8122f1b12 --- /dev/null +++ b/lib/common/lib/auth/models/X509-certificate-supplier.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import CertificateAndPrivateKeyPair from "../certificate-and-privatekey-pair"; + +/** + * An interface to provide X509 certificate for a federated client. + */ + +export default interface X509CertificateSupplier { + /** + * Returns the X509 certificate and private key. The X509 certificate will always + * be valid. The private key may be null for intermediate certificates. For leaf + * certificates, the private key will always be valid. + * @return an object with the certificate and private key pair. + */ + getCertificateAndKeyPair(): CertificateAndPrivateKeyPair; + + /** + * optional refresh method. + * @return the object + */ + refresh?(): any; +} diff --git a/lib/common/lib/auth/models/abstract-authentication-details-provider.ts b/lib/common/lib/auth/models/abstract-authentication-details-provider.ts new file mode 100644 index 0000000000..f4932deac7 --- /dev/null +++ b/lib/common/lib/auth/models/abstract-authentication-details-provider.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * Root interface for classes providing some information needed to authenticate + * requests. + */ +export default interface AbstractAuthenticationDetailsProvider {} diff --git a/lib/common/lib/auth/models/federation-client.ts b/lib/common/lib/auth/models/federation-client.ts new file mode 100644 index 0000000000..a622fd776c --- /dev/null +++ b/lib/common/lib/auth/models/federation-client.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * Defines a basic interface for a federation endpoint that provides + * a security token for authentication. + */ + +export default interface FederationClient { + /** + * Gets a security token from the federation endpoint. May use a cached token if + * it judged to still be valid. + * @return A security token that can be used to authenticate requests. + */ + getSecurityToken(): Promise; + + /** + * Gets a security token from the federation endpoint. This will always retreive + * a new token from the federation endpoint and does not use a cached token. + * @return A security token that can be used to authenticate requests. + */ + refreshAndGetSecurityToken(): Promise; + + /** + * Get a claim embedded in the security token. May use the cached token if it is + * judged to still be valid. + */ + getStringClaim(key: string): Promise; +} diff --git a/lib/common/lib/auth/models/refreshable-on-not-authenticaticated-provider.ts b/lib/common/lib/auth/models/refreshable-on-not-authenticaticated-provider.ts new file mode 100644 index 0000000000..f147c11227 --- /dev/null +++ b/lib/common/lib/auth/models/refreshable-on-not-authenticaticated-provider.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * For authentication providers with refreshable authentication data (e.g. those which wrap a security + * token received from a remote service), this interface flags that when a caller receives a + * NotAuthenticated error (HTTP 401) that they can refresh the authentication data and retry their request. + * + * Consistent HTTP 401s would indicate that there is potentially an issue outside the issued token, so only + * making a single retry is suggested. + * + * @param The type of authentication data held by the provider (e.g. for security tokens this could be + * a string) + */ +export default interface RefreshableOnNotAuthenticatedProvider { + /** + * Refreshes the authentication data used by the provider + * + * @return the refreshed authentication data + */ + refresh(): Promise; +} diff --git a/lib/common/lib/auth/models/refreshable.ts b/lib/common/lib/auth/models/refreshable.ts new file mode 100644 index 0000000000..6697b40510 --- /dev/null +++ b/lib/common/lib/auth/models/refreshable.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * Objects such as credentials may optionally implement this + * interface to provide the capability to refresh itself. + * For example, a credential with a particular time-restricted lifespan + * may implement this interface to allow callers to refresh the time period + * for which it is valid. + * + */ + +export default interface Refreshable { + /** + * Determine if this Object is current. + * @return true if this object is currently current, false otherwise. + */ + isCurrent(): boolean; + + /** + * Update or extend the validity period for an Object. + */ + refresh(): void; +} diff --git a/lib/common/lib/auth/models/session-key-supplier.ts b/lib/common/lib/auth/models/session-key-supplier.ts new file mode 100644 index 0000000000..8bee7094d6 --- /dev/null +++ b/lib/common/lib/auth/models/session-key-supplier.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import KeyPair from "../key-pair"; +/** + * A session key supplier is responsible for providing public/private key pairs that will be used to both + * fetch federated service tokens and to sign individual requests to OCI. + *

+ * The returned keys should not change unless there as been a call to refreshKeys(). + */ + +export default interface SessionKeySupplier { + /** + * Returns the current RSA key pair. + * @return The RSA key pair. + */ + getKeyPair(): KeyPair; + + /** + * If the auth service-issued security token expires, the federation client will try to re-generate a new set of keys + * by calling this method. The implementer should create a new pair of keys for security reasons. + * + * Refreshing keys should not be a long-running blocking call. You can refresh keys in an async thread and return from + * this method immediately. When the async process is done refreshing the keys, the client code will automatically + * pick up the latest set of keys and update the security token accordingly + */ + refreshKeys(): void; +} diff --git a/lib/common/lib/auth/security-token-adapter.ts b/lib/common/lib/auth/security-token-adapter.ts new file mode 100644 index 0000000000..d2201e13e6 --- /dev/null +++ b/lib/common/lib/auth/security-token-adapter.ts @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import SessionKeySupplier from "./models/session-key-supplier"; +import JWT from "jsonwebtoken"; +/** + * Helper class to store security token and sessionKeySupplier + * contain methods to check if token is expired and needs to be refreshed + */ + +export default class SecurityTokenAdapter { + private jwt: { [key: string]: any } | null = null; + + constructor(private securityToken: string, private sessionKeySupplier: SessionKeySupplier) { + this.jwt = this.securityToken ? this.parse(this.securityToken) : null; + } + + /** + * Getter for securityToken + * @returns securityToken + */ + getSecurityToken(): string { + return this.securityToken; + } + + /** + * Helper method to verify token's secret matches publicKey string + * then parse token string into an complete object (header, payload, signature) + * @param token: string + * @returns payload: object + */ + parse(token: string) { + try { + const payload = JWT.decode(token, { complete: true }); + return payload as object; + } catch (e) { + throw Error(`Failed to decode token, error: ${e}`); + } + } + + /** + * Checks to see current token exists, and if so, check expiration time + * @return true if valid + */ + isValid(): boolean { + const secondsSinceEpoch = Math.round(Date.now() / 1000); + if (this.jwt == null) { + return false; + } else if (this.jwt.payload && this.jwt.payload.exp < secondsSinceEpoch) { + return true; + } + return false; + } + + /** + * Return a claim from the token given a key if it exist, else return null + * @param key: string + * @return value of the claim + */ + getStringClaim(key: string): string | null { + if (this.jwt == null) { + return null; + } + return this.jwt.payload[key] ? this.jwt.payload[key] : null; + } +} diff --git a/lib/common/lib/auth/session-key-supplier.ts b/lib/common/lib/auth/session-key-supplier.ts new file mode 100644 index 0000000000..8c219541df --- /dev/null +++ b/lib/common/lib/auth/session-key-supplier.ts @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +/** + * This is a helper class to generate in-memory temporary session keys. + *

+ * The thread safety of this class is ensured + */ + +import { generateKeyPairSync } from "crypto"; +import SessionKeySupplier from "./models/session-key-supplier"; +import KeyPair from "./key-pair"; + +export default class SessionKeySupplierImpl implements SessionKeySupplier { + private keyPair: KeyPair; + + constructor() { + const { privateKey, publicKey } = generateKeyPairSync("rsa", { + modulusLength: 2048, + publicExponent: 65537, + publicKeyEncoding: { + type: "spki", + format: "pem" + }, + privateKeyEncoding: { + type: "pkcs8", + format: "pem" + } + }); + this.keyPair = new KeyPair(publicKey, privateKey); + } + + getKeyPair(): KeyPair { + return this.keyPair; + } + + refreshKeys(): void { + const { privateKey, publicKey } = generateKeyPairSync("rsa", { + modulusLength: 2048, + publicExponent: 65537, + publicKeyEncoding: { + type: "spki", + format: "pem" + }, + privateKeyEncoding: { + type: "pkcs8", + format: "pem" + } + }); + this.keyPair = new KeyPair(publicKey, privateKey); + } +} diff --git a/lib/common/lib/auth/url-based-x509-certificate-supplier.ts b/lib/common/lib/auth/url-based-x509-certificate-supplier.ts new file mode 100644 index 0000000000..cd6fee2283 --- /dev/null +++ b/lib/common/lib/auth/url-based-x509-certificate-supplier.ts @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import { parsePrivateKey, parseCertificate, Certificate, PrivateKey } from "sshpk"; +import { FetchHttpClient } from "../http"; +import X509CertificateSupplier from "./models/X509-certificate-supplier"; +import CertificateAndPrivateKeyPair from "./certificate-and-privatekey-pair"; +import Refreshable from "./models/refreshable"; +import { getStringFromResponseBody } from "../helper"; +/** + * A class that retrieves certificate based on metadata service url + */ + +export class URLBasedX509CertificateSupplier implements X509CertificateSupplier, Refreshable { + private certificateAndKeyPair!: CertificateAndPrivateKeyPair; + constructor( + private certificateDetails: ResourceDetails, + private privateKeyDetails: ResourceDetails | null, + private privateKeyPassphraseCharacters: string | null + ) {} + + /** + * So far we don't care whether the certificate is current or not. + * @return false always. + */ + isCurrent(): boolean { + return false; + } + + /** + * A method to refresh the X509 certificate and return the certificate + * @returns Promise + */ + async refresh(): Promise { + const certificate: Certificate = await this.readRawCertificate(this.certificateDetails); + const privateKey: PrivateKey | null = await this.readPrivateKey( + this.privateKeyDetails, + this.privateKeyPassphraseCharacters + ); + this.certificateAndKeyPair = new CertificateAndPrivateKeyPair(certificate, privateKey); + return this; + } + + async readRawCertificate(certificateDetails: ResourceDetails): Promise { + const certificateStream = await certificateDetails.send(); + // Convert responseStream to actual certificate string + const certificateString = await getStringFromResponseBody(certificateStream.body); + const certificate = parseCertificate(certificateString, "pem"); + return certificate; + } + + async readPrivateKey( + privateKeyResourceDetails: ResourceDetails | null, + privateKeyPassphrase: string | null + ): Promise { + let options = {}; + if (!privateKeyResourceDetails || !privateKeyResourceDetails.getUrl()) { + return null; + } + if (privateKeyPassphrase) { + Object.assign(options, { passphrase: privateKeyPassphrase }); + } + try { + const privateKeyStream = await privateKeyResourceDetails.send(); + // Convert privateKeyStream to privateKey string + const privateKeyString = await getStringFromResponseBody(privateKeyStream.body); + const privateKey = parsePrivateKey(privateKeyString, "auto", options); + return privateKey; + } catch (e) { + throw Error(`Unable to obtain private key, error: , ${e}`); + } + } + + getCertificateAndKeyPair(): CertificateAndPrivateKeyPair { + return this.certificateAndKeyPair; + } +} + +export class ResourceDetails { + constructor(private url: string, private headers: Headers) {} + + async send(): Promise { + const httpClient = new FetchHttpClient(null); + const response = await httpClient.send({ + uri: this.url, + method: "GET", + headers: this.headers + }); + return response; + } + + getUrl(): string { + return this.url; + } +} diff --git a/lib/common/lib/helper.ts b/lib/common/lib/helper.ts index 70febdddb4..26d2e1b20d 100644 --- a/lib/common/lib/helper.ts +++ b/lib/common/lib/helper.ts @@ -56,6 +56,26 @@ export function convertStringToType(str: string | null, expectedType: string): a return Range.parse(str); } } +// get string content from response body +export async function getStringFromResponseBody(body: any): Promise { + if (typeof body === "string") { + return body as string; + } + + if (body instanceof Readable) { + // body is a stream type + return readStringFromReadable(body); + } else if (body instanceof Blob) { + // body is a blob type + return readStringFromBlob(body); + } else if (body instanceof ReadableStream) { + // body is a fetch readableStream type + return readStringFromFetchReadableStream(body); + } else { + // unknown type, unable to read body content for signing, reject it + throw new Error("Unable to read body content to sign the request"); + } +} // read string from Readable asynchronously, return a string content of it export async function readStringFromReadable(readable: Readable): Promise { @@ -192,3 +212,24 @@ export function formatDateToRFC3339(date: Date): string { "Z" ); } + +// get string content from body +export async function getStringFromRequestBody(body: any): Promise { + if (typeof body === "string") { + return body as string; + } + + if (body instanceof Readable) { + // body is a stream type + return readStringFromReadable(body); + } else if (body instanceof Blob) { + // body is a blob type + return readStringFromBlob(body); + } else if (body instanceof ReadableStream) { + // body is a fetch readableStream type + return readStringFromFetchReadableStream(body); + } else { + // unknown type, unable to read body content for signing, reject it + throw new Error("Unable to read body content to sign the request"); + } +} diff --git a/lib/common/lib/region.ts b/lib/common/lib/region.ts index 960ae59976..e7caa73808 100644 --- a/lib/common/lib/region.ts +++ b/lib/common/lib/region.ts @@ -23,6 +23,33 @@ export class Region { return this._regionId; } + private static REGIONS_SHORT_NAMES: { [key: string]: string } = { + "phx": "us-phoenix-1", + "iad": "us-ashburn-1", + "fra": "eu-frankfurt-1", + "lhr": "uk-london-1", + "yyz": "ca-toronto-1", + "gru": "sa-saopaulo-1", + "ams": "eu-amsterdam-1", + "jed": "me-jeddah-1", + "kix": "ap-osaka-1", + "ltn": "uk-gov-london-1", + "nrt": "ap-tokyo-1", + "icn": "ap-seoul-1", + "hyd": "ap-hyderabad-1", + "bom": "ap-mumbai-1", + "yny": "ap-chuncheon-1", + "syd": "ap-sydney-1", + "mel": "ap-melbourne-1", + "yul": "ca-montreal-1", + "zrh": "eu-zurich-1", + "lfi": "us-langley-1", + "luf": "us-luke-1", + "ric": "us-gov-ashburn-1", + "pia": "us-gov-chicago-1", + "tus": "us-gov-phoenix-1" + }; + private static KNOWN_REGIONS: Map = new Map(); private constructor(regionId: string, realm: Realm) { @@ -71,7 +98,6 @@ export class Region { public static register(regionId: string, realm: Realm): Region { if (!regionId) throw Error("RegionId can not be empty or undefined"); - regionId = (regionId.trim() as any).toLocaleLowerCase("en-US"); const region = Region.KNOWN_REGIONS.get(regionId); if (region) { @@ -88,4 +114,17 @@ export class Region { } return new Region(regionId, realm); } + + /** + * Function to get regionId based regionStr: regionStr can be a short code or regionId + * if it is a regionStr then we want to return the corresponding regionId + * @param regionStr + * @return regionId + */ + public static getRegionIdFromShortCode(regionStr: string): string { + regionStr = regionStr.toLocaleLowerCase(); + return Region.REGIONS_SHORT_NAMES[regionStr] + ? Region.REGIONS_SHORT_NAMES[regionStr] + : regionStr; + } } diff --git a/lib/common/lib/signer.ts b/lib/common/lib/signer.ts index 4ae791c799..73d3e30da5 100644 --- a/lib/common/lib/signer.ts +++ b/lib/common/lib/signer.ts @@ -4,7 +4,7 @@ */ import auth = require("./auth/auth"); -import helper = require("./helper"); +import { getStringFromRequestBody } from "./helper"; import jssha = require("jssha"); import { parsePrivateKey } from "sshpk"; import UrlParser = require("url"); @@ -21,7 +21,7 @@ const HEADER_CONTENT_TYPE = "Content-Type"; // We have to manually define that value here to avoid hanging forever const EMPTY_SHA = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; -class SignerRequest { +export class SignerRequest { method: string; path?: string | null; constructor(method: Method, url: string, private headers: Headers) { @@ -56,7 +56,7 @@ export class DefaultRequestSigner implements RequestSigner { private static readonly headersToSign = ["x-date", "(request-target)", "host"]; private static readonly methodsThatRequireExtraHeaders = ["POST", "PUT", "PATCH"]; - private readonly privateKeyBuffer: Buffer; + private privateKeyBuffer: Buffer; /** * Construct an instance of [[DefaultRequestSigner]]. @@ -67,6 +67,7 @@ export class DefaultRequestSigner implements RequestSigner { if (this.authenticationDetailsProvider.getPassphrase()) { Object.assign(options, { passphrase: this.authenticationDetailsProvider.getPassphrase() }); } + this.privateKeyBuffer = parsePrivateKey( this.authenticationDetailsProvider.getPrivateKey(), "auto", @@ -81,6 +82,11 @@ export class DefaultRequestSigner implements RequestSigner { */ async signHttpRequest(request: HttpRequest, forceExcludeBody: boolean = false) { // Populate missing headers required for signing + let options = {}; + if (this.authenticationDetailsProvider.getPassphrase()) { + Object.assign(options, { passphrase: this.authenticationDetailsProvider.getPassphrase() }); + } + if (!request.headers.has("host")) { const url = UrlParser.parse(request.uri); if (url.host) { @@ -128,10 +134,16 @@ export class DefaultRequestSigner implements RequestSigner { HEADER_CONTENT_SHA ); } + const keyId = await this.authenticationDetailsProvider.getKeyId(); + this.privateKeyBuffer = parsePrivateKey( + this.authenticationDetailsProvider.getPrivateKey(), + "auto", + options + ).toBuffer("pem", {}); httpSignature.sign(new SignerRequest(request.method, request.uri, request.headers), { key: this.privateKeyBuffer, - keyId: this.authenticationDetailsProvider.getKeyId(), + keyId: keyId, headers: headersToSign }); @@ -146,24 +158,3 @@ export class DefaultRequestSigner implements RequestSigner { } } } - -// get string content from body -async function getStringFromRequestBody(body: any): Promise { - if (typeof body === "string") { - return body as string; - } - - if (body instanceof Readable) { - // body is a stream type - return helper.readStringFromReadable(body); - } else if (body instanceof Blob) { - // body is a blob type - return helper.readStringFromBlob(body); - } else if (body instanceof ReadableStream) { - // body is a fetch readableStream type - return helper.readStringFromFetchReadableStream(body); - } else { - // unknown type, unable to read body content for signing, reject it - throw new Error("Unable to read body content to sign the request"); - } -} diff --git a/lib/common/package.json b/lib/common/package.json index de0366a50d..4150a558cd 100644 --- a/lib/common/package.json +++ b/lib/common/package.json @@ -1,6 +1,6 @@ { "name": "oci-common", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI Common module for NodeJS", "repository": { "type": "git", @@ -22,12 +22,14 @@ "es6-promise": "4.2.6", "http-signature": "1.3.1", "isomorphic-fetch": "2.2.1", + "jsonwebtoken": "8.5.1", "jssha": "2.4.1", "sshpk": "1.16.1", "uuid": "3.3.3" }, "devDependencies": { "@types/chai": "^4.1.7", + "@types/jsonwebtoken": "^8.5.0", "@types/jssha": "^2.0.0", "@types/mocha": "^5.2.5", "@types/sshpk": "^1.10.3", diff --git a/lib/containerengine/package.json b/lib/containerengine/package.json index 4810b73dba..b816098052 100644 --- a/lib/containerengine/package.json +++ b/lib/containerengine/package.json @@ -1,6 +1,6 @@ { "name": "oci-containerengine", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Container Engine", "repository": { "type": "git", diff --git a/lib/core/lib/client.ts b/lib/core/lib/client.ts index c1a2cb5015..b6247c4a30 100644 --- a/lib/core/lib/client.ts +++ b/lib/core/lib/client.ts @@ -5893,6 +5893,14 @@ When you launch an instance, it is automatically attached to a virtual *

You can later add secondary VNICs to an instance. For more information, see * [Virtual Network Interface Cards (VNICs)](https://docs.cloud.oracle.com/Content/Network/Tasks/managingVNICs.htm). +*

+To launch an instance from a Marketplace image listing, you must provide the image ID of the +* listing resource version that you want, but you also must subscribe to the listing before you try +* to launch the instance. To subscribe to the listing, use the {@link #getAppCatalogListingAgreements(GetAppCatalogListingAgreementsRequest) getAppCatalogListingAgreements} +* operation to get the signature for the terms of use agreement for the desired listing resource version. +* Then, call {@link #createAppCatalogSubscription(CreateAppCatalogSubscriptionRequest) createAppCatalogSubscription} +* with the signature. To get the image ID for the LaunchInstance operation, call +* {@link #getAppCatalogListingResourceVersion(GetAppCatalogListingResourceVersionRequest) getAppCatalogListingResourceVersion}. * * @param LaunchInstanceRequest * @return LaunchInstanceResponse @@ -9609,11 +9617,19 @@ When you delete a cluster network, all of its resources are permanently deleted, } /** - * Terminate the specified instance pool. - * @param TerminateInstancePoolRequest - * @return TerminateInstancePoolResponse - * @throws OciError when an error occurs - */ + * Terminate the specified instance pool. +*

+**Warning:** When you delete an instance pool, the resources that were created by the pool are permanently +* deleted, including associated instances, attached boot volumes, and block volumes. +*

+If an autoscaling configuration applies to the instance pool, the autoscaling configuration will be deleted +* asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using +* the `DeleteAutoScalingConfiguration` operation in the Autoscaling API. +* + * @param TerminateInstancePoolRequest + * @return TerminateInstancePoolResponse + * @throws OciError when an error occurs + */ public async terminateInstancePool( terminateInstancePoolRequest: requests.TerminateInstancePoolRequest ): Promise { @@ -17819,6 +17835,7 @@ For information about generating CPE configuration content, see these operations /** * Lists the sets of DHCP options in the specified VCN and specified compartment. + * If the VCN ID is not provided, then the list includes the sets of DHCP options from all VCNs in the specified compartment. * The response includes the default set of options that automatically comes with each VCN, * plus any other sets you've created. * @@ -18617,6 +18634,7 @@ For more information about virtual circuits, see [FastConnect Overview](https:// /** * Lists the internet gateways in the specified VCN and the specified compartment. + * If the VCN ID is not provided, then the list includes the internet gateways from all VCNs in the specified compartment. * * @param ListInternetGatewaysRequest * @return ListInternetGatewaysResponse @@ -18799,8 +18817,8 @@ For more information about virtual circuits, see [FastConnect Overview](https:// } /** - * Lists the local peering gateways (LPGs) for the specified VCN and compartment - * (the LPG's compartment). + * Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. + * If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment. * * @param ListLocalPeeringGatewaysRequest * @return ListLocalPeeringGatewaysResponse @@ -19541,9 +19559,10 @@ To list the ephemeral public IPs assigned to private IPs: } /** - * Lists the route tables in the specified VCN and specified compartment. The response - * includes the default route table that automatically comes with each VCN, plus any route tables - * you've created. + * Lists the route tables in the specified VCN and specified compartment. + * If the VCN ID is not provided, then the list includes the route tables from all VCNs in the specified compartment. + * The response includes the default route table that automatically comes with + * each VCN in the specified compartment, plus any route tables you've created. * * @param ListRouteTablesRequest * @return ListRouteTablesResponse @@ -19633,6 +19652,7 @@ To list the ephemeral public IPs assigned to private IPs: /** * Lists the security lists in the specified VCN and compartment. + * If the VCN ID is not provided, then the list includes the security lists from all VCNs in the specified compartment. * * @param ListSecurityListsRequest * @return ListSecurityListsResponse @@ -19896,6 +19916,7 @@ To list the ephemeral public IPs assigned to private IPs: /** * Lists the subnets in the specified VCN and the specified compartment. + * If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment. * * @param ListSubnetsRequest * @return ListSubnetsResponse diff --git a/lib/core/lib/model/create-subnet-details.ts b/lib/core/lib/model/create-subnet-details.ts index cbdcf19e7f..61c6382fa7 100644 --- a/lib/core/lib/model/create-subnet-details.ts +++ b/lib/core/lib/model/create-subnet-details.ts @@ -38,7 +38,10 @@ Example: `Uocm:PHX-AD-1` */ "availabilityDomain"?: string; /** - * The CIDR IP address range of the subnet. + * The CIDR IP address range of the subnet. The CIDR must maintain the following rules - +*

+a. The CIDR block is valid and correctly formatted. +* b. The new range is within one of the parent VCN ranges. *

Example: `10.0.1.0/24` * diff --git a/lib/core/lib/model/create-vcn-details.ts b/lib/core/lib/model/create-vcn-details.ts index 710ebaee4a..cba3002f94 100644 --- a/lib/core/lib/model/create-vcn-details.ts +++ b/lib/core/lib/model/create-vcn-details.ts @@ -21,11 +21,10 @@ import common = require("oci-common"); export interface CreateVcnDetails { /** - * The CIDR IP address block of the VCN. -*

-Example: `10.0.0.0/16` -* - */ + * The CIDR IP address block of the VCN. + * Example: `10.0.0.0/16` + * + */ "cidrBlock": string; /** * The OCID of the compartment to contain the VCN. diff --git a/lib/core/lib/model/create-vlan-details.ts b/lib/core/lib/model/create-vlan-details.ts index 9edb1f255b..d911146329 100644 --- a/lib/core/lib/model/create-vlan-details.ts +++ b/lib/core/lib/model/create-vlan-details.ts @@ -29,7 +29,9 @@ Example: `Uocm:PHX-AD-1` "availabilityDomain": string; /** * The range of IPv4 addresses that will be used for layer 3 communication with -* hosts outside the VLAN. +* hosts outside the VLAN. The CIDR must maintain the following rules - +*

+a. The CIDR block is valid and correctly formatted. *

Example: `192.0.2.0/24` * diff --git a/lib/core/lib/model/create-vnic-details.ts b/lib/core/lib/model/create-vnic-details.ts index 42debefde0..376e445336 100644 --- a/lib/core/lib/model/create-vnic-details.ts +++ b/lib/core/lib/model/create-vnic-details.ts @@ -48,6 +48,9 @@ export interface CreateVnicDetails { * [Public IP Addresses](https://docs.cloud.oracle.com/Content/Network/Tasks/managingpublicIPs.htm). *

Example: `false` +*

+If you specify a `vlanId`, the `assignPublicIp` is required to be set to false. See +* {@link Vlan}. * */ "assignPublicIp"?: boolean; @@ -94,6 +97,9 @@ When launching an instance, use this `hostnameLabel` instead * If you provide both, the values must match. *

Example: `bminstance-1` +*

+If you specify a `vlanId`, the `hostnameLabel` cannot be specified. vnics on a Vlan +* can not be assigned a hostname See {@link Vlan}. * */ "hostnameLabel"?: string; @@ -102,7 +108,7 @@ Example: `bminstance-1` * information about NSGs, see * {@link NetworkSecurityGroup}. *

-If a `vlanId` is specified, the `nsgIds` is ignored. The `vlanId` +If a `vlanId` is specified, the `nsgIds` cannot be specified. The `vlanId` * indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, * all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. * See {@link Vlan}. @@ -120,7 +126,7 @@ If a `vlanId` is specified, the `nsgIds` is ignored. The `vlanId` * {@link #getPrivateIp(GetPrivateIpRequest) getPrivateIp}. *

-* If you specify a `vlanId`, the `privateIp` is ignored. +* If you specify a `vlanId`, the `privateIp` cannot be specified. * See {@link Vlan}. *

Example: `10.0.3.3` @@ -134,7 +140,7 @@ Example: `10.0.3.3` * [Using a Private IP as a Route Target](https://docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm#privateip). *

-* If you specify a `vlanId`, the `skipSourceDestCheck` is ignored because the +* If you specify a `vlanId`, the `skipSourceDestCheck` cannot be specified because the * source/destination check is always disabled for VNICs in a VLAN. See * {@link Vlan}. *

diff --git a/lib/core/lib/model/instance-configuration-launch-instance-details.ts b/lib/core/lib/model/instance-configuration-launch-instance-details.ts index bd1141d449..2918a1ca2a 100644 --- a/lib/core/lib/model/instance-configuration-launch-instance-details.ts +++ b/lib/core/lib/model/instance-configuration-launch-instance-details.ts @@ -20,9 +20,12 @@ import * as model from "../model"; import common = require("oci-common"); /** - * See Instance launch details - {@link LaunchInstanceDetails} - * - */ +* Instance launch details for creating an instance from an instance configuration. Use the `sourceDetails` +* parameter to specify whether a boot volume or an image should be used to launch a new instance. +*

+See {@link LaunchInstanceDetails} for more information. +* +*/ export interface InstanceConfigurationLaunchInstanceDetails { /** * The availability domain of the instance. @@ -202,6 +205,10 @@ Dedicated VM hosts can be used when launching individual instances from an insta * */ "launchMode"?: InstanceConfigurationLaunchInstanceDetails.LaunchMode; + /** + * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. + * + */ "launchOptions"?: model.InstanceConfigurationLaunchOptions; "agentConfig"?: model.InstanceConfigurationLaunchInstanceAgentConfigDetails; /** diff --git a/lib/core/lib/model/instance-configuration-launch-options.ts b/lib/core/lib/model/instance-configuration-launch-options.ts index f0bc66664e..d31f12cf38 100644 --- a/lib/core/lib/model/instance-configuration-launch-options.ts +++ b/lib/core/lib/model/instance-configuration-launch-options.ts @@ -20,7 +20,8 @@ import * as model from "../model"; import common = require("oci-common"); /** - * Options for tuning compatibility and performance of VM shapes. + * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any + * default values. * */ export interface InstanceConfigurationLaunchOptions { @@ -67,7 +68,9 @@ export interface InstanceConfigurationLaunchOptions { */ "remoteDataVolumeType"?: InstanceConfigurationLaunchOptions.RemoteDataVolumeType; /** - * Whether to enable in-transit encryption for the boot volume's paravirtualized attachment. The default value is false. + * Deprecated. Instead use `isPvEncryptionInTransitEnabled` in + * {@link #instanceConfigurationLaunchInstanceDetails(InstanceConfigurationLaunchInstanceDetailsRequest) instanceConfigurationLaunchInstanceDetails}. + * */ "isPvEncryptionInTransitEnabled"?: boolean; /** diff --git a/lib/core/lib/model/instance.ts b/lib/core/lib/model/instance.ts index 346003d8c5..20bd5e53d9 100644 --- a/lib/core/lib/model/instance.ts +++ b/lib/core/lib/model/instance.ts @@ -141,6 +141,10 @@ For more information about iPXE, see http://ipxe.org. * */ "launchMode"?: Instance.LaunchMode; + /** + * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. + * + */ "launchOptions"?: model.LaunchOptions; /** * The current state of the instance. diff --git a/lib/core/lib/model/launch-instance-details.ts b/lib/core/lib/model/launch-instance-details.ts index ce887edaf8..1a1c18b3f9 100644 --- a/lib/core/lib/model/launch-instance-details.ts +++ b/lib/core/lib/model/launch-instance-details.ts @@ -43,7 +43,7 @@ Example: `Uocm:PHX-AD-1` */ "createVnicDetails"?: model.CreateVnicDetails; /** - * The OCID of dedicated VM host. + * The OCID of the dedicated VM host. * */ "dedicatedVmHostId"?: string; @@ -137,6 +137,11 @@ For more information about iPXE, see http://ipxe.org. * */ "ipxeScript"?: string; + /** + * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any + * default values. + * + */ "launchOptions"?: model.LaunchOptions; /** * Custom metadata key/value pairs that you provide, such as the SSH public key diff --git a/lib/core/lib/model/launch-options.ts b/lib/core/lib/model/launch-options.ts index 6f41ccfbad..a8fd1b9766 100644 --- a/lib/core/lib/model/launch-options.ts +++ b/lib/core/lib/model/launch-options.ts @@ -20,7 +20,8 @@ import * as model from "../model"; import common = require("oci-common"); /** - * Options for tuning compatibility and performance of VM shapes. + * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any + * default values. * */ export interface LaunchOptions { @@ -67,7 +68,9 @@ export interface LaunchOptions { */ "remoteDataVolumeType"?: LaunchOptions.RemoteDataVolumeType; /** - * Whether to enable in-transit encryption for the boot volume's paravirtualized attachment. The default value is false. + * Deprecated. Instead use `isPvEncryptionInTransitEnabled` in + * {@link #launchInstanceDetails(LaunchInstanceDetailsRequest) launchInstanceDetails}. + * */ "isPvEncryptionInTransitEnabled"?: boolean; /** diff --git a/lib/core/lib/request/list-dhcp-options-request.ts b/lib/core/lib/request/list-dhcp-options-request.ts index 096d21a413..e851936a4b 100644 --- a/lib/core/lib/request/list-dhcp-options-request.ts +++ b/lib/core/lib/request/list-dhcp-options-request.ts @@ -21,7 +21,7 @@ export interface ListDhcpOptionsRequest { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. */ - "vcnId": string; + "vcnId"?: string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see diff --git a/lib/core/lib/request/list-internet-gateways-request.ts b/lib/core/lib/request/list-internet-gateways-request.ts index efcbbb716c..d4bf4157ea 100644 --- a/lib/core/lib/request/list-internet-gateways-request.ts +++ b/lib/core/lib/request/list-internet-gateways-request.ts @@ -21,7 +21,7 @@ export interface ListInternetGatewaysRequest { /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. */ - "vcnId": string; + "vcnId"?: string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see diff --git a/lib/core/lib/request/list-local-peering-gateways-request.ts b/lib/core/lib/request/list-local-peering-gateways-request.ts index a272c4a79e..6e2809cf3e 100644 --- a/lib/core/lib/request/list-local-peering-gateways-request.ts +++ b/lib/core/lib/request/list-local-peering-gateways-request.ts @@ -18,10 +18,6 @@ export interface ListLocalPeeringGatewaysRequest { * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. */ "compartmentId": string; - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. - */ - "vcnId": string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see @@ -38,4 +34,8 @@ Example: `50` * */ "page"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. + */ + "vcnId"?: string; } diff --git a/lib/core/lib/request/list-route-tables-request.ts b/lib/core/lib/request/list-route-tables-request.ts index 5b2f434e8b..ad2455d781 100644 --- a/lib/core/lib/request/list-route-tables-request.ts +++ b/lib/core/lib/request/list-route-tables-request.ts @@ -18,10 +18,6 @@ export interface ListRouteTablesRequest { * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. */ "compartmentId": string; - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. - */ - "vcnId": string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see @@ -38,6 +34,10 @@ Example: `50` * */ "page"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. + */ + "vcnId"?: string; /** * A filter to return only resources that match the given display name exactly. * diff --git a/lib/core/lib/request/list-security-lists-request.ts b/lib/core/lib/request/list-security-lists-request.ts index 90e7547aa8..3d0a2c597d 100644 --- a/lib/core/lib/request/list-security-lists-request.ts +++ b/lib/core/lib/request/list-security-lists-request.ts @@ -18,10 +18,6 @@ export interface ListSecurityListsRequest { * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. */ "compartmentId": string; - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. - */ - "vcnId": string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see @@ -38,6 +34,10 @@ Example: `50` * */ "page"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. + */ + "vcnId"?: string; /** * A filter to return only resources that match the given display name exactly. * diff --git a/lib/core/lib/request/list-subnets-request.ts b/lib/core/lib/request/list-subnets-request.ts index e09ed8736a..346a02eda1 100644 --- a/lib/core/lib/request/list-subnets-request.ts +++ b/lib/core/lib/request/list-subnets-request.ts @@ -18,10 +18,6 @@ export interface ListSubnetsRequest { * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. */ "compartmentId": string; - /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. - */ - "vcnId": string; /** * For list pagination. The maximum number of results per page, or items to return in a paginated * \"List\" call. For important details about how pagination works, see @@ -38,6 +34,10 @@ Example: `50` * */ "page"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN. + */ + "vcnId"?: string; /** * A filter to return only resources that match the given display name exactly. * diff --git a/lib/core/package.json b/lib/core/package.json index 5d3c93220e..5b6a3d351b 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -1,6 +1,6 @@ { "name": "oci-core", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Core", "repository": { "type": "git", diff --git a/lib/database/lib/client.ts b/lib/database/lib/client.ts index 3237148777..55c212e2d8 100644 --- a/lib/database/lib/client.ts +++ b/lib/database/lib/client.ts @@ -2813,6 +2813,73 @@ Oracle recommends that you use the `performFinalBackup` parameter to back up any } } + /** + * Initiates a failover the specified Autonomous Database to a standby. + * + * @param FailOverAutonomousDatabaseRequest + * @return FailOverAutonomousDatabaseResponse + * @throws OciError when an error occurs + */ + public async failOverAutonomousDatabase( + failOverAutonomousDatabaseRequest: requests.FailOverAutonomousDatabaseRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation DatabaseClient#failOverAutonomousDatabase."); + const pathParams = { + "{autonomousDatabaseId}": failOverAutonomousDatabaseRequest.autonomousDatabaseId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": failOverAutonomousDatabaseRequest.ifMatch, + "opc-retry-token": failOverAutonomousDatabaseRequest.opcRetryToken, + "opc-request-id": failOverAutonomousDatabaseRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/autonomousDatabases/{autonomousDatabaseId}/actions/failover", + method: "POST", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "autonomousDatabase", + bodyModel: "model.AutonomousDatabase", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Performs a failover to transition the standby database identified by the `databaseId` parameter into the * specified Data Guard association's primary role after the existing primary database fails or becomes unreachable. @@ -5350,7 +5417,8 @@ An initial database is created on the DB system based on the request parameters "dbWorkload": listAutonomousDatabasesRequest.dbWorkload, "dbVersion": listAutonomousDatabasesRequest.dbVersion, "isFreeTier": listAutonomousDatabasesRequest.isFreeTier, - "displayName": listAutonomousDatabasesRequest.displayName + "displayName": listAutonomousDatabasesRequest.displayName, + "isDataGuardEnabled": listAutonomousDatabasesRequest.isDataGuardEnabled }; let headerParams = { @@ -8401,6 +8469,73 @@ An initial database is created on the DB system based on the request parameters } } + /** + * Initiates a switchover of the specified Autonomous Database to the associated standby database. Applicable only to databases with Autonomous Data Guard enabled. + * + * @param SwitchoverAutonomousDatabaseRequest + * @return SwitchoverAutonomousDatabaseResponse + * @throws OciError when an error occurs + */ + public async switchoverAutonomousDatabase( + switchoverAutonomousDatabaseRequest: requests.SwitchoverAutonomousDatabaseRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation DatabaseClient#switchoverAutonomousDatabase."); + const pathParams = { + "{autonomousDatabaseId}": switchoverAutonomousDatabaseRequest.autonomousDatabaseId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": switchoverAutonomousDatabaseRequest.ifMatch, + "opc-retry-token": switchoverAutonomousDatabaseRequest.opcRetryToken, + "opc-request-id": switchoverAutonomousDatabaseRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/autonomousDatabases/{autonomousDatabaseId}/actions/switchover", + method: "POST", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "autonomousDatabase", + bodyModel: "model.AutonomousDatabase", + responseHeaders: [ + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + }, + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-work-request-id"), + key: "opcWorkRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Performs a switchover to transition the primary database of a Data Guard association into a standby role. The * standby database associated with the `dataGuardAssociationId` assumes the primary database role. diff --git a/lib/database/lib/model/autonomous-database-standby-summary.ts b/lib/database/lib/model/autonomous-database-standby-summary.ts new file mode 100644 index 0000000000..ba038cbe3e --- /dev/null +++ b/lib/database/lib/model/autonomous-database-standby-summary.ts @@ -0,0 +1,71 @@ +/** + * Database Service API + * The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see [Overview of the Database Service](/iaas/Content/Database/Concepts/databaseoverview.htm). + + * OpenAPI spec version: 20160918 + * Contact: sic_dbaas_cp_us_grp@oracle.com + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Autonomous Data Guard standby database details. + * + */ +export interface AutonomousDatabaseStandbySummary { + /** + * The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover. + */ + "lagTimeInSeconds"?: number; + /** + * The current state of the Autonomous Database. + */ + "lifecycleState"?: AutonomousDatabaseStandbySummary.LifecycleState; + /** + * Additional information about the current lifecycle state. + */ + "lifecycleDetails"?: string; +} + +export namespace AutonomousDatabaseStandbySummary { + export enum LifecycleState { + PROVISIONING = "PROVISIONING", + AVAILABLE = "AVAILABLE", + STOPPING = "STOPPING", + STOPPED = "STOPPED", + STARTING = "STARTING", + TERMINATING = "TERMINATING", + TERMINATED = "TERMINATED", + UNAVAILABLE = "UNAVAILABLE", + RESTOREINPROGRESS = "RESTORE_IN_PROGRESS", + RESTOREFAILED = "RESTORE_FAILED", + BACKUPINPROGRESS = "BACKUP_IN_PROGRESS", + SCALEINPROGRESS = "SCALE_IN_PROGRESS", + AVAILABLENEEDSATTENTION = "AVAILABLE_NEEDS_ATTENTION", + UPDATING = "UPDATING", + MAINTENANCEINPROGRESS = "MAINTENANCE_IN_PROGRESS", + RESTARTING = "RESTARTING", + RECREATING = "RECREATING", + ROLECHANGEINPROGRESS = "ROLE_CHANGE_IN_PROGRESS", + UPGRADING = "UPGRADING", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: AutonomousDatabaseStandbySummary): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/database/lib/model/autonomous-database-summary.ts b/lib/database/lib/model/autonomous-database-summary.ts index d8273aaced..0eaee96aed 100644 --- a/lib/database/lib/model/autonomous-database-summary.ts +++ b/lib/database/lib/model/autonomous-database-summary.ts @@ -200,6 +200,23 @@ To add the whitelist VCN specific subnet or IP, use a semicoln ';' as a delimina * The date and time when maintenance will end. */ "timeMaintenanceEnd"?: Date; + /** + * The timestamp of the last switchover operation for the Autonomous Database. + */ + "timeOfLastSwitchover"?: Date; + /** + * The timestamp of the last failover operation. + */ + "timeOfLastFailover"?: Date; + /** + * Indicates whether the Autonomous Database has Data Guard enabled. + */ + "isDataGuardEnabled"?: boolean; + /** + * Indicates the number of seconds of data loss for a Data Guard failover. + */ + "failedDataRecoveryInSeconds"?: number; + "standbyDb"?: model.AutonomousDatabaseStandbySummary; /** * List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. */ @@ -224,6 +241,8 @@ export namespace AutonomousDatabaseSummary { UPDATING = "UPDATING", MAINTENANCEINPROGRESS = "MAINTENANCE_IN_PROGRESS", RESTARTING = "RESTARTING", + RECREATING = "RECREATING", + ROLECHANGEINPROGRESS = "ROLE_CHANGE_IN_PROGRESS", UPGRADING = "UPGRADING", /** @@ -289,6 +308,10 @@ export namespace AutonomousDatabaseSummary { : undefined, "connectionUrls": obj.connectionUrls ? model.AutonomousDatabaseConnectionUrls.getJsonObj(obj.connectionUrls) + : undefined, + + "standbyDb": obj.standbyDb + ? model.AutonomousDatabaseStandbySummary.getJsonObj(obj.standbyDb) : undefined } }; diff --git a/lib/database/lib/model/autonomous-database.ts b/lib/database/lib/model/autonomous-database.ts index 18bebabaa9..728ffa5453 100644 --- a/lib/database/lib/model/autonomous-database.ts +++ b/lib/database/lib/model/autonomous-database.ts @@ -198,6 +198,23 @@ To add the whitelist VCN specific subnet or IP, use a semicoln ';' as a delimina * The date and time when maintenance will end. */ "timeMaintenanceEnd"?: Date; + /** + * The timestamp of the last switchover operation for the Autonomous Database. + */ + "timeOfLastSwitchover"?: Date; + /** + * The timestamp of the last failover operation. + */ + "timeOfLastFailover"?: Date; + /** + * Indicates whether the Autonomous Database has Data Guard enabled. + */ + "isDataGuardEnabled"?: boolean; + /** + * Indicates the number of seconds of data loss for a Data Guard failover. + */ + "failedDataRecoveryInSeconds"?: number; + "standbyDb"?: model.AutonomousDatabaseStandbySummary; /** * List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. */ @@ -222,6 +239,8 @@ export namespace AutonomousDatabase { UPDATING = "UPDATING", MAINTENANCEINPROGRESS = "MAINTENANCE_IN_PROGRESS", RESTARTING = "RESTARTING", + RECREATING = "RECREATING", + ROLECHANGEINPROGRESS = "ROLE_CHANGE_IN_PROGRESS", UPGRADING = "UPGRADING", /** @@ -287,6 +306,10 @@ export namespace AutonomousDatabase { : undefined, "connectionUrls": obj.connectionUrls ? model.AutonomousDatabaseConnectionUrls.getJsonObj(obj.connectionUrls) + : undefined, + + "standbyDb": obj.standbyDb + ? model.AutonomousDatabaseStandbySummary.getJsonObj(obj.standbyDb) : undefined } }; diff --git a/lib/database/lib/model/create-autonomous-container-database-details.ts b/lib/database/lib/model/create-autonomous-container-database-details.ts index 2c64f7ff93..67bca8c320 100644 --- a/lib/database/lib/model/create-autonomous-container-database-details.ts +++ b/lib/database/lib/model/create-autonomous-container-database-details.ts @@ -29,7 +29,7 @@ export interface CreateAutonomousContainerDatabaseDetails { */ "dbUniqueName"?: string; /** - * The service level agreement type of the Autonomous Container Database. The default is STANDARD. For a mission critical Autonomous Container Database, the specified Autonomous Exadata Infrastructure must be associated with a remote Autonomous Exadata Infrastructure. + * The service level agreement type of the Autonomous Container Database. The default is STANDARD. For an autonomous dataguard Autonomous Container Database, the specified Autonomous Exadata Infrastructure must be associated with a remote Autonomous Exadata Infrastructure. */ "serviceLevelAgreementType"?: CreateAutonomousContainerDatabaseDetails.ServiceLevelAgreementType; /** diff --git a/lib/database/lib/model/create-autonomous-database-base.ts b/lib/database/lib/model/create-autonomous-database-base.ts index 749728ad75..3449fc8901 100644 --- a/lib/database/lib/model/create-autonomous-database-base.ts +++ b/lib/database/lib/model/create-autonomous-database-base.ts @@ -93,6 +93,10 @@ export interface CreateAutonomousDatabaseBase { * */ "whitelistedIps"?: Array; + /** + * Indicates whether the Autonomous Database has Data Guard enabled. + */ + "isDataGuardEnabled"?: boolean; /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. *

diff --git a/lib/database/lib/model/db-system-shape-summary.ts b/lib/database/lib/model/db-system-shape-summary.ts index e8ec08f5ec..d0d09f33b8 100644 --- a/lib/database/lib/model/db-system-shape-summary.ts +++ b/lib/database/lib/model/db-system-shape-summary.ts @@ -16,13 +16,13 @@ import * as model from "../model"; import common = require("oci-common"); /** - * The shape of the DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. - * For a description of shapes, see [DB System Launch Options](https://docs.cloud.oracle.com/Content/Database/References/launchoptions.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 [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). - * - */ +* The shape of the DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. +*

+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.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). +* +*/ export interface DbSystemShapeSummary { /** * The name of the shape used for the DB system. diff --git a/lib/database/lib/model/index.ts b/lib/database/lib/model/index.ts index 85dc8fd0d0..b136591ad5 100644 --- a/lib/database/lib/model/index.ts +++ b/lib/database/lib/model/index.ts @@ -46,6 +46,8 @@ import * as AutonomousDatabaseConnectionUrls from "./autonomous-database-connect export import AutonomousDatabaseConnectionUrls = AutonomousDatabaseConnectionUrls.AutonomousDatabaseConnectionUrls; import * as AutonomousDatabaseConsoleTokenDetails from "./autonomous-database-console-token-details"; export import AutonomousDatabaseConsoleTokenDetails = AutonomousDatabaseConsoleTokenDetails.AutonomousDatabaseConsoleTokenDetails; +import * as AutonomousDatabaseStandbySummary from "./autonomous-database-standby-summary"; +export import AutonomousDatabaseStandbySummary = AutonomousDatabaseStandbySummary.AutonomousDatabaseStandbySummary; import * as AutonomousDatabaseSummary from "./autonomous-database-summary"; export import AutonomousDatabaseSummary = AutonomousDatabaseSummary.AutonomousDatabaseSummary; import * as AutonomousDatabaseWallet from "./autonomous-database-wallet"; diff --git a/lib/database/lib/model/update-autonomous-database-details.ts b/lib/database/lib/model/update-autonomous-database-details.ts index 187babc08d..59573f45f7 100644 --- a/lib/database/lib/model/update-autonomous-database-details.ts +++ b/lib/database/lib/model/update-autonomous-database-details.ts @@ -86,6 +86,10 @@ Example: `{\"Department\": \"Finance\"}` * */ "isAutoScalingEnabled"?: boolean; + /** + * Indicates whether the Autonomous Database has Data Guard enabled. + */ + "isDataGuardEnabled"?: boolean; /** * A valid Oracle Database version for Autonomous Database. */ diff --git a/lib/database/lib/request/fail-over-autonomous-database-request.ts b/lib/database/lib/request/fail-over-autonomous-database-request.ts new file mode 100644 index 0000000000..7b8641e23a --- /dev/null +++ b/lib/database/lib/request/fail-over-autonomous-database-request.ts @@ -0,0 +1,42 @@ +/** + * + * + * OpenAPI spec version: 20160918 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface FailOverAutonomousDatabaseRequest { + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + "autonomousDatabaseId": string; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * 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). + * + */ + "opcRetryToken"?: string; + /** + * Unique identifier for the request. + * + */ + "opcRequestId"?: string; +} diff --git a/lib/database/lib/request/index.ts b/lib/database/lib/request/index.ts index 4221c87709..097cffeb81 100644 --- a/lib/database/lib/request/index.ts +++ b/lib/database/lib/request/index.ts @@ -94,6 +94,8 @@ import * as DownloadExadataInfrastructureConfigFileRequest from "./download-exad export import DownloadExadataInfrastructureConfigFileRequest = DownloadExadataInfrastructureConfigFileRequest.DownloadExadataInfrastructureConfigFileRequest; import * as DownloadVmClusterNetworkConfigFileRequest from "./download-vm-cluster-network-config-file-request"; export import DownloadVmClusterNetworkConfigFileRequest = DownloadVmClusterNetworkConfigFileRequest.DownloadVmClusterNetworkConfigFileRequest; +import * as FailOverAutonomousDatabaseRequest from "./fail-over-autonomous-database-request"; +export import FailOverAutonomousDatabaseRequest = FailOverAutonomousDatabaseRequest.FailOverAutonomousDatabaseRequest; import * as FailoverDataGuardAssociationRequest from "./failover-data-guard-association-request"; export import FailoverDataGuardAssociationRequest = FailoverDataGuardAssociationRequest.FailoverDataGuardAssociationRequest; import * as GenerateAutonomousDataWarehouseWalletRequest from "./generate-autonomous-data-warehouse-wallet-request"; @@ -250,6 +252,8 @@ import * as StopAutonomousDataWarehouseRequest from "./stop-autonomous-data-ware export import StopAutonomousDataWarehouseRequest = StopAutonomousDataWarehouseRequest.StopAutonomousDataWarehouseRequest; import * as StopAutonomousDatabaseRequest from "./stop-autonomous-database-request"; export import StopAutonomousDatabaseRequest = StopAutonomousDatabaseRequest.StopAutonomousDatabaseRequest; +import * as SwitchoverAutonomousDatabaseRequest from "./switchover-autonomous-database-request"; +export import SwitchoverAutonomousDatabaseRequest = SwitchoverAutonomousDatabaseRequest.SwitchoverAutonomousDatabaseRequest; import * as SwitchoverDataGuardAssociationRequest from "./switchover-data-guard-association-request"; export import SwitchoverDataGuardAssociationRequest = SwitchoverDataGuardAssociationRequest.SwitchoverDataGuardAssociationRequest; import * as TerminateAutonomousContainerDatabaseRequest from "./terminate-autonomous-container-database-request"; diff --git a/lib/database/lib/request/list-autonomous-databases-request.ts b/lib/database/lib/request/list-autonomous-databases-request.ts index a3701c1ce1..50de42a48c 100644 --- a/lib/database/lib/request/list-autonomous-databases-request.ts +++ b/lib/database/lib/request/list-autonomous-databases-request.ts @@ -72,6 +72,10 @@ export interface ListAutonomousDatabasesRequest { * */ "opcRequestId"?: string; + /** + * A filter to return only resources that have Data Guard enabled. + */ + "isDataGuardEnabled"?: boolean; } export namespace ListAutonomousDatabasesRequest { diff --git a/lib/database/lib/request/switchover-autonomous-database-request.ts b/lib/database/lib/request/switchover-autonomous-database-request.ts new file mode 100644 index 0000000000..46df1c589f --- /dev/null +++ b/lib/database/lib/request/switchover-autonomous-database-request.ts @@ -0,0 +1,42 @@ +/** + * + * + * OpenAPI spec version: 20160918 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface SwitchoverAutonomousDatabaseRequest { + /** + * The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + */ + "autonomousDatabaseId": string; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * 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). + * + */ + "opcRetryToken"?: string; + /** + * Unique identifier for the request. + * + */ + "opcRequestId"?: string; +} diff --git a/lib/database/lib/response/fail-over-autonomous-database-response.ts b/lib/database/lib/response/fail-over-autonomous-database-response.ts new file mode 100644 index 0000000000..5e851be933 --- /dev/null +++ b/lib/database/lib/response/fail-over-autonomous-database-response.ts @@ -0,0 +1,37 @@ +/** + * + * + * OpenAPI spec version: 20160918 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface FailOverAutonomousDatabaseResponse { + /** + * For optimistic concurrency control. See `if-match`. + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + "opcWorkRequestId": string; + /** + * The returned model.AutonomousDatabase instance. + */ + "autonomousDatabase": model.AutonomousDatabase; +} diff --git a/lib/database/lib/response/index.ts b/lib/database/lib/response/index.ts index 45022636db..bde038e356 100644 --- a/lib/database/lib/response/index.ts +++ b/lib/database/lib/response/index.ts @@ -94,6 +94,8 @@ import * as DownloadExadataInfrastructureConfigFileResponse from "./download-exa export import DownloadExadataInfrastructureConfigFileResponse = DownloadExadataInfrastructureConfigFileResponse.DownloadExadataInfrastructureConfigFileResponse; import * as DownloadVmClusterNetworkConfigFileResponse from "./download-vm-cluster-network-config-file-response"; export import DownloadVmClusterNetworkConfigFileResponse = DownloadVmClusterNetworkConfigFileResponse.DownloadVmClusterNetworkConfigFileResponse; +import * as FailOverAutonomousDatabaseResponse from "./fail-over-autonomous-database-response"; +export import FailOverAutonomousDatabaseResponse = FailOverAutonomousDatabaseResponse.FailOverAutonomousDatabaseResponse; import * as FailoverDataGuardAssociationResponse from "./failover-data-guard-association-response"; export import FailoverDataGuardAssociationResponse = FailoverDataGuardAssociationResponse.FailoverDataGuardAssociationResponse; import * as GenerateAutonomousDataWarehouseWalletResponse from "./generate-autonomous-data-warehouse-wallet-response"; @@ -250,6 +252,8 @@ import * as StopAutonomousDataWarehouseResponse from "./stop-autonomous-data-war export import StopAutonomousDataWarehouseResponse = StopAutonomousDataWarehouseResponse.StopAutonomousDataWarehouseResponse; import * as StopAutonomousDatabaseResponse from "./stop-autonomous-database-response"; export import StopAutonomousDatabaseResponse = StopAutonomousDatabaseResponse.StopAutonomousDatabaseResponse; +import * as SwitchoverAutonomousDatabaseResponse from "./switchover-autonomous-database-response"; +export import SwitchoverAutonomousDatabaseResponse = SwitchoverAutonomousDatabaseResponse.SwitchoverAutonomousDatabaseResponse; import * as SwitchoverDataGuardAssociationResponse from "./switchover-data-guard-association-response"; export import SwitchoverDataGuardAssociationResponse = SwitchoverDataGuardAssociationResponse.SwitchoverDataGuardAssociationResponse; import * as TerminateAutonomousContainerDatabaseResponse from "./terminate-autonomous-container-database-response"; diff --git a/lib/database/lib/response/switchover-autonomous-database-response.ts b/lib/database/lib/response/switchover-autonomous-database-response.ts new file mode 100644 index 0000000000..dc45d7fc16 --- /dev/null +++ b/lib/database/lib/response/switchover-autonomous-database-response.ts @@ -0,0 +1,37 @@ +/** + * + * + * OpenAPI spec version: 20160918 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface SwitchoverAutonomousDatabaseResponse { + /** + * For optimistic concurrency control. See `if-match`. + */ + "etag": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + "opcRequestId": string; + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} with a work request OCID to track the status of the request. + * + */ + "opcWorkRequestId": string; + /** + * The returned model.AutonomousDatabase instance. + */ + "autonomousDatabase": model.AutonomousDatabase; +} diff --git a/lib/database/package.json b/lib/database/package.json index 49c98e1fd3..50eaaba2b1 100644 --- a/lib/database/package.json +++ b/lib/database/package.json @@ -1,6 +1,6 @@ { "name": "oci-database", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Database", "repository": { "type": "git", diff --git a/lib/datacatalog/package.json b/lib/datacatalog/package.json index e8a0e1da38..ad54766405 100644 --- a/lib/datacatalog/package.json +++ b/lib/datacatalog/package.json @@ -1,6 +1,6 @@ { "name": "oci-datacatalog", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Data catalogue Service", "repository": { "type": "git", diff --git a/lib/dataflow/package.json b/lib/dataflow/package.json index 020c05ace0..4da2b472c6 100644 --- a/lib/dataflow/package.json +++ b/lib/dataflow/package.json @@ -1,6 +1,6 @@ { "name": "oci-dataflow", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Dataflow service", "repository": { "type": "git", diff --git a/lib/dataintegration/package.json b/lib/dataintegration/package.json index 90013fdc5f..da0f1096dc 100644 --- a/lib/dataintegration/package.json +++ b/lib/dataintegration/package.json @@ -1,6 +1,6 @@ { "name": "oci-dataintegration", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Data Integration Service", "repository": { "type": "git", diff --git a/lib/datasafe/package.json b/lib/datasafe/package.json index 80b737eb98..a7f536e669 100644 --- a/lib/datasafe/package.json +++ b/lib/datasafe/package.json @@ -1,6 +1,6 @@ { "name": "oci-datasafe", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Data Safe ", "repository": { "type": "git", diff --git a/lib/datascience/package.json b/lib/datascience/package.json index 43ce4e510c..f52d1be0e1 100644 --- a/lib/datascience/package.json +++ b/lib/datascience/package.json @@ -1,6 +1,6 @@ { "name": "oci-datascience", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Data Science Service", "repository": { "type": "git", diff --git a/lib/dns/package.json b/lib/dns/package.json index 1895c1a431..b35ec3703f 100644 --- a/lib/dns/package.json +++ b/lib/dns/package.json @@ -1,6 +1,6 @@ { "name": "oci-dns", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for DNS", "repository": { "type": "git", diff --git a/lib/dts/package.json b/lib/dts/package.json index ef2e668608..b5ac97a5e8 100644 --- a/lib/dts/package.json +++ b/lib/dts/package.json @@ -1,6 +1,6 @@ { "name": "oci-dts", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Dts Service", "repository": { "type": "git", diff --git a/lib/email/package.json b/lib/email/package.json index ed22e93344..e285a55151 100644 --- a/lib/email/package.json +++ b/lib/email/package.json @@ -1,6 +1,6 @@ { "name": "oci-email", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Email", "repository": { "type": "git", diff --git a/lib/events/package.json b/lib/events/package.json index 3d275fafc7..19501c26df 100644 --- a/lib/events/package.json +++ b/lib/events/package.json @@ -1,6 +1,6 @@ { "name": "oci-events", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Events Service", "repository": { "type": "git", diff --git a/lib/filestorage/package.json b/lib/filestorage/package.json index 718a948349..1515d99f64 100644 --- a/lib/filestorage/package.json +++ b/lib/filestorage/package.json @@ -1,6 +1,6 @@ { "name": "oci-filestorage", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for File Storage", "repository": { "type": "git", diff --git a/lib/functions/package.json b/lib/functions/package.json index 1af24cd461..d2ba083551 100644 --- a/lib/functions/package.json +++ b/lib/functions/package.json @@ -1,6 +1,6 @@ { "name": "oci-functions", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Functions", "repository": { "type": "git", diff --git a/lib/healthchecks/package.json b/lib/healthchecks/package.json index f2fd1365fa..a22809b486 100644 --- a/lib/healthchecks/package.json +++ b/lib/healthchecks/package.json @@ -1,6 +1,6 @@ { "name": "oci-healthchecks", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Healthchecks Service", "repository": { "type": "git", diff --git a/lib/identity/package.json b/lib/identity/package.json index b958b9072f..a2984ca8fa 100644 --- a/lib/identity/package.json +++ b/lib/identity/package.json @@ -1,6 +1,6 @@ { "name": "oci-identity", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Identity", "repository": { "type": "git", diff --git a/lib/integration/package.json b/lib/integration/package.json index 360bbb4638..1d76ec28ed 100644 --- a/lib/integration/package.json +++ b/lib/integration/package.json @@ -1,6 +1,6 @@ { "name": "oci-integration", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Integration service", "repository": { "type": "git", diff --git a/lib/keymanagement/package.json b/lib/keymanagement/package.json index 069905291b..198643a933 100644 --- a/lib/keymanagement/package.json +++ b/lib/keymanagement/package.json @@ -1,6 +1,6 @@ { "name": "oci-keymanagement", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Key Management", "repository": { "type": "git", diff --git a/lib/limits/package.json b/lib/limits/package.json index aba6ae24d0..7a436b74b4 100644 --- a/lib/limits/package.json +++ b/lib/limits/package.json @@ -1,6 +1,6 @@ { "name": "oci-limits", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Limits Service", "repository": { "type": "git", diff --git a/lib/loadbalancer/package.json b/lib/loadbalancer/package.json index defd35aee7..1f67b0c308 100644 --- a/lib/loadbalancer/package.json +++ b/lib/loadbalancer/package.json @@ -1,6 +1,6 @@ { "name": "oci-loadbalancer", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Load Balancer", "repository": { "type": "git", diff --git a/lib/marketplace/package.json b/lib/marketplace/package.json index 902064aba0..815ad571df 100644 --- a/lib/marketplace/package.json +++ b/lib/marketplace/package.json @@ -1,6 +1,6 @@ { "name": "oci-marketplace", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Marketplace Service", "repository": { "type": "git", diff --git a/lib/monitoring/package.json b/lib/monitoring/package.json index d55824555a..06bf135437 100644 --- a/lib/monitoring/package.json +++ b/lib/monitoring/package.json @@ -1,6 +1,6 @@ { "name": "oci-monitoring", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Monitoring", "repository": { "type": "git", diff --git a/lib/mysql/package.json b/lib/mysql/package.json index 92516a0195..3b4ad8a450 100644 --- a/lib/mysql/package.json +++ b/lib/mysql/package.json @@ -1,6 +1,6 @@ { "name": "oci-mysql", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Mysql ", "repository": { "type": "git", diff --git a/lib/nosql/package.json b/lib/nosql/package.json index cc9330ec18..f5062055bc 100644 --- a/lib/nosql/package.json +++ b/lib/nosql/package.json @@ -1,6 +1,6 @@ { "name": "oci-nosql", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Nosql Service", "repository": { "type": "git", diff --git a/lib/objectstorage/package.json b/lib/objectstorage/package.json index 60fb982e5f..e4beca386e 100644 --- a/lib/objectstorage/package.json +++ b/lib/objectstorage/package.json @@ -1,6 +1,6 @@ { "name": "oci-objectstorage", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for ObjectStorage", "repository": { "type": "git", diff --git a/lib/oce/package.json b/lib/oce/package.json index bdf83f89db..b6757fdbbe 100644 --- a/lib/oce/package.json +++ b/lib/oce/package.json @@ -1,6 +1,6 @@ { "name": "oci-oce", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for OCE Service", "repository": { "type": "git", diff --git a/lib/ocvp/package.json b/lib/ocvp/package.json index 6b5ffcb47c..fb6aeaa5f8 100644 --- a/lib/ocvp/package.json +++ b/lib/ocvp/package.json @@ -1,6 +1,6 @@ { "name": "oci-ocvp", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Ocvp Service", "repository": { "type": "git", diff --git a/lib/oda/package.json b/lib/oda/package.json index e30fdf85f6..9f3257efeb 100644 --- a/lib/oda/package.json +++ b/lib/oda/package.json @@ -1,6 +1,6 @@ { "name": "oci-oda", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Oda Service", "repository": { "type": "git", diff --git a/lib/ons/package.json b/lib/ons/package.json index aa745ffe14..7b21ca4b8e 100644 --- a/lib/ons/package.json +++ b/lib/ons/package.json @@ -1,6 +1,6 @@ { "name": "oci-ons", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for ONS", "repository": { "type": "git", diff --git a/lib/osmanagement/package.json b/lib/osmanagement/package.json index aa6c512227..674249e084 100644 --- a/lib/osmanagement/package.json +++ b/lib/osmanagement/package.json @@ -1,6 +1,6 @@ { "name": "oci-osmanagement", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for OS Management", "repository": { "type": "git", diff --git a/lib/resourcemanager/index.ts b/lib/resourcemanager/index.ts index 0c527df964..de2d795d18 100644 --- a/lib/resourcemanager/index.ts +++ b/lib/resourcemanager/index.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/client.ts b/lib/resourcemanager/lib/client.ts index e75229eb9d..d05001a0d0 100644 --- a/lib/resourcemanager/lib/client.ts +++ b/lib/resourcemanager/lib/client.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -168,6 +172,71 @@ export class ResourceManagerClient { } } + /** + * Moves a configuration source provider into a different compartment within the same tenancy. + * For information about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @param ChangeConfigurationSourceProviderCompartmentRequest + * @return ChangeConfigurationSourceProviderCompartmentResponse + * @throws OciError when an error occurs + */ + public async changeConfigurationSourceProviderCompartment( + changeConfigurationSourceProviderCompartmentRequest: requests.ChangeConfigurationSourceProviderCompartmentRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation ResourceManagerClient#changeConfigurationSourceProviderCompartment." + ); + const pathParams = { + "{configurationSourceProviderId}": + changeConfigurationSourceProviderCompartmentRequest.configurationSourceProviderId + }; + + const queryParams = {}; + + let headerParams = { + "if-match": changeConfigurationSourceProviderCompartmentRequest.ifMatch, + "opc-request-id": changeConfigurationSourceProviderCompartmentRequest.opcRequestId, + "opc-retry-token": changeConfigurationSourceProviderCompartmentRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: + "/configurationSourceProviders/{configurationSourceProviderId}/actions/changeCompartment", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + changeConfigurationSourceProviderCompartmentRequest.changeConfigurationSourceProviderCompartmentDetails, + "ChangeConfigurationSourceProviderCompartmentDetails", + models.ChangeConfigurationSourceProviderCompartmentDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Moves a Stack and it's associated Jobs into a different compartment. * @param ChangeStackCompartmentRequest @@ -231,6 +300,74 @@ export class ResourceManagerClient { } } + /** + * Creates a configuration source provider in the specified compartment. + * For more information, see + * [To create a configuration source provider](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#CreateConfigurationSourceProvider). + * + * @param CreateConfigurationSourceProviderRequest + * @return CreateConfigurationSourceProviderResponse + * @throws OciError when an error occurs + */ + public async createConfigurationSourceProvider( + createConfigurationSourceProviderRequest: requests.CreateConfigurationSourceProviderRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation ResourceManagerClient#createConfigurationSourceProvider." + ); + const pathParams = {}; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": createConfigurationSourceProviderRequest.opcRequestId, + "opc-retry-token": createConfigurationSourceProviderRequest.opcRetryToken + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/configurationSourceProviders", + method: "POST", + bodyContent: common.ObjectSerializer.serialize( + createConfigurationSourceProviderRequest.createConfigurationSourceProviderDetails, + "CreateConfigurationSourceProviderDetails", + models.CreateConfigurationSourceProviderDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "configurationSourceProvider", + bodyModel: "model.ConfigurationSourceProvider", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Creates a job. * @param CreateJobRequest @@ -296,7 +433,8 @@ export class ResourceManagerClient { /** * Creates a stack in the specified compartment. * Specify the compartment using the compartment ID. - * For more information, see [Create a Stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/usingconsole.htm#CreateStack). + * For more information, see + * [To create a stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#CreateStack). * * @param CreateStackRequest * @return CreateStackResponse @@ -358,6 +496,61 @@ export class ResourceManagerClient { } } + /** + * Deletes the specified configuration source provider. + * @param DeleteConfigurationSourceProviderRequest + * @return DeleteConfigurationSourceProviderResponse + * @throws OciError when an error occurs + */ + public async deleteConfigurationSourceProvider( + deleteConfigurationSourceProviderRequest: requests.DeleteConfigurationSourceProviderRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation ResourceManagerClient#deleteConfigurationSourceProvider." + ); + const pathParams = { + "{configurationSourceProviderId}": + deleteConfigurationSourceProviderRequest.configurationSourceProviderId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": deleteConfigurationSourceProviderRequest.opcRequestId, + "if-match": deleteConfigurationSourceProviderRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/configurationSourceProviders/{configurationSourceProviderId}", + method: "DELETE", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Deletes the specified stack object. * @param DeleteStackRequest @@ -466,6 +659,66 @@ export class ResourceManagerClient { } } + /** + * Gets the properties of the specified configuration source provider. + * @param GetConfigurationSourceProviderRequest + * @return GetConfigurationSourceProviderResponse + * @throws OciError when an error occurs + */ + public async getConfigurationSourceProvider( + getConfigurationSourceProviderRequest: requests.GetConfigurationSourceProviderRequest + ): Promise { + if (this.logger) + this.logger.debug("Calling operation ResourceManagerClient#getConfigurationSourceProvider."); + const pathParams = { + "{configurationSourceProviderId}": + getConfigurationSourceProviderRequest.configurationSourceProviderId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": getConfigurationSourceProviderRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/configurationSourceProviders/{configurationSourceProviderId}", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "configurationSourceProvider", + bodyModel: "model.ConfigurationSourceProvider", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Returns the specified job along with the job details. * @param GetJobRequest @@ -1002,6 +1255,77 @@ export class ResourceManagerClient { } } + /** + * Lists configuration source providers according to the specified filter. + * - For `compartmentId`, lists all configuration source providers in the matching compartment. + * - For `configurationSourceProviderId`, lists the matching configuration source provider. + * + * @param ListConfigurationSourceProvidersRequest + * @return ListConfigurationSourceProvidersResponse + * @throws OciError when an error occurs + */ + public async listConfigurationSourceProviders( + listConfigurationSourceProvidersRequest: requests.ListConfigurationSourceProvidersRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation ResourceManagerClient#listConfigurationSourceProviders." + ); + const pathParams = {}; + + const queryParams = { + "compartmentId": listConfigurationSourceProvidersRequest.compartmentId, + "configurationSourceProviderId": + listConfigurationSourceProvidersRequest.configurationSourceProviderId, + "displayName": listConfigurationSourceProvidersRequest.displayName, + "sortBy": listConfigurationSourceProvidersRequest.sortBy, + "sortOrder": listConfigurationSourceProvidersRequest.sortOrder, + "limit": listConfigurationSourceProvidersRequest.limit, + "page": listConfigurationSourceProvidersRequest.page + }; + + let headerParams = { + "opc-request-id": listConfigurationSourceProvidersRequest.opcRequestId + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/configurationSourceProviders", + method: "GET", + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "configurationSourceProviderCollection", + bodyModel: "model.ConfigurationSourceProviderCollection", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("opc-next-page"), + key: "opcNextPage", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Returns a list of jobs in a stack or compartment, ordered by time created. *

@@ -1577,6 +1901,77 @@ export class ResourceManagerClient { return paginateResponses(request, req => this.listWorkRequests(req)); } + /** + * Updates the properties of the specified configuration source provider. + * For more information, see + * [To update a configuration source provider](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#UpdateConfigurationSourceProvider). + * + * @param UpdateConfigurationSourceProviderRequest + * @return UpdateConfigurationSourceProviderResponse + * @throws OciError when an error occurs + */ + public async updateConfigurationSourceProvider( + updateConfigurationSourceProviderRequest: requests.UpdateConfigurationSourceProviderRequest + ): Promise { + if (this.logger) + this.logger.debug( + "Calling operation ResourceManagerClient#updateConfigurationSourceProvider." + ); + const pathParams = { + "{configurationSourceProviderId}": + updateConfigurationSourceProviderRequest.configurationSourceProviderId + }; + + const queryParams = {}; + + let headerParams = { + "opc-request-id": updateConfigurationSourceProviderRequest.opcRequestId, + "if-match": updateConfigurationSourceProviderRequest.ifMatch + }; + + const request = await composeRequest({ + baseEndpoint: this._endpoint, + defaultHeaders: this._defaultHeaders, + path: "/configurationSourceProviders/{configurationSourceProviderId}", + method: "PUT", + bodyContent: common.ObjectSerializer.serialize( + updateConfigurationSourceProviderRequest.updateConfigurationSourceProviderDetails, + "UpdateConfigurationSourceProviderDetails", + models.UpdateConfigurationSourceProviderDetails.getJsonObj + ), + pathParams: pathParams, + headerParams: headerParams, + queryParams: queryParams + }); + + const response = await this._httpClient.send(request); + if (response.status && response.status >= 200 && response.status <= 299) { + const sdkResponse = composeResponse({ + responseObject: {}, + body: await response.json(), + bodyKey: "configurationSourceProvider", + bodyModel: "model.ConfigurationSourceProvider", + responseHeaders: [ + { + value: response.headers.get("opc-request-id"), + key: "opcRequestId", + dataType: "string" + }, + { + value: response.headers.get("etag"), + key: "etag", + dataType: "string" + } + ] + }); + + return sdkResponse; + } else { + const errBody = await common.handleErrorBody(response); + throw common.handleErrorResponse(response, errBody); + } + } + /** * Updates the specified job. * @param UpdateJobRequest @@ -1645,8 +2040,9 @@ export class ResourceManagerClient { * Updates the specified stack object. * Use `UpdateStack` when you update your Terraform configuration * and want your changes to be reflected in the execution plan. - * For more information, see [Update a Stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/usingconsole.htm#UpdateStack) and - * [Edit or Delete a Stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/usingconsole.htm#EditStack). + * For more information, see + * [To update a stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#UpdateStack) and + * [To edit a stack](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#EditStack). * * @param UpdateStackRequest * @return UpdateStackResponse diff --git a/lib/resourcemanager/lib/model/apply-job-operation-details-summary.ts b/lib/resourcemanager/lib/model/apply-job-operation-details-summary.ts index 6d49beb9c7..34147dc053 100644 --- a/lib/resourcemanager/lib/model/apply-job-operation-details-summary.ts +++ b/lib/resourcemanager/lib/model/apply-job-operation-details-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/apply-job-operation-details.ts b/lib/resourcemanager/lib/model/apply-job-operation-details.ts index 5f83da34a4..1f2cc718cf 100644 --- a/lib/resourcemanager/lib/model/apply-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/apply-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/apply-job-plan-resolution.ts b/lib/resourcemanager/lib/model/apply-job-plan-resolution.ts index 412dfe56f5..78e8faecad 100644 --- a/lib/resourcemanager/lib/model/apply-job-plan-resolution.ts +++ b/lib/resourcemanager/lib/model/apply-job-plan-resolution.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/change-configuration-source-provider-compartment-details.ts b/lib/resourcemanager/lib/model/change-configuration-source-provider-compartment-details.ts new file mode 100644 index 0000000000..17b69d9c30 --- /dev/null +++ b/lib/resourcemanager/lib/model/change-configuration-source-provider-compartment-details.ts @@ -0,0 +1,40 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The details for moving a configuration source provider to a different compartment. + * + */ +export interface ChangeConfigurationSourceProviderCompartmentDetails { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + * to move the configuration source provider to. + * + */ + "compartmentId": string; +} + +export namespace ChangeConfigurationSourceProviderCompartmentDetails { + export function getJsonObj(obj: ChangeConfigurationSourceProviderCompartmentDetails): object { + const jsonObj = { ...obj, ...{} }; + + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/change-stack-compartment-details.ts b/lib/resourcemanager/lib/model/change-stack-compartment-details.ts index b2ff06e03d..fa6c101c7b 100644 --- a/lib/resourcemanager/lib/model/change-stack-compartment-details.ts +++ b/lib/resourcemanager/lib/model/change-stack-compartment-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -19,7 +23,7 @@ import common = require("oci-common"); */ export interface ChangeStackCompartmentDetails { /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment * into which the Stack should be moved. * */ diff --git a/lib/resourcemanager/lib/model/config-source-record.ts b/lib/resourcemanager/lib/model/config-source-record.ts new file mode 100644 index 0000000000..79123f5448 --- /dev/null +++ b/lib/resourcemanager/lib/model/config-source-record.ts @@ -0,0 +1,51 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Information about the Terraform configuration. + * + */ +export interface ConfigSourceRecord { + "configSourceRecordType": string; +} + +export namespace ConfigSourceRecord { + export function getJsonObj(obj: ConfigSourceRecord): object { + const jsonObj = { ...obj, ...{} }; + + if ("configSourceRecordType" in obj && obj.configSourceRecordType) { + switch (obj.configSourceRecordType) { + case "GIT_CONFIG_SOURCE": + return model.GitConfigSourceRecord.getJsonObj( + (jsonObj), + true + ); + case "ZIP_UPLOAD": + return model.ZipUploadConfigSourceRecord.getJsonObj( + (jsonObj), + true + ); + default: + throw Error("Unknown value for: " + obj.configSourceRecordType); + } + } + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/config-source.ts b/lib/resourcemanager/lib/model/config-source.ts index 4e2c1c3e2d..41a326342e 100644 --- a/lib/resourcemanager/lib/model/config-source.ts +++ b/lib/resourcemanager/lib/model/config-source.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -35,6 +39,8 @@ export namespace ConfigSource { if ("configSourceType" in obj && obj.configSourceType) { switch (obj.configSourceType) { + case "GIT_CONFIG_SOURCE": + return model.GitConfigSource.getJsonObj((jsonObj), true); case "ZIP_UPLOAD": return model.ZipUploadConfigSource.getJsonObj( (jsonObj), diff --git a/lib/resourcemanager/lib/model/configuration-source-provider-collection.ts b/lib/resourcemanager/lib/model/configuration-source-provider-collection.ts new file mode 100644 index 0000000000..bde72162f0 --- /dev/null +++ b/lib/resourcemanager/lib/model/configuration-source-provider-collection.ts @@ -0,0 +1,47 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Collection of configuration source providers. + * + */ +export interface ConfigurationSourceProviderCollection { + /** + * Collection of configuration source providers. + */ + "items"?: Array; +} + +export namespace ConfigurationSourceProviderCollection { + export function getJsonObj(obj: ConfigurationSourceProviderCollection): object { + const jsonObj = { + ...obj, + ...{ + "items": obj.items + ? obj.items.map(item => { + return model.ConfigurationSourceProviderSummary.getJsonObj(item); + }) + : undefined + } + }; + + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/configuration-source-provider-summary.ts b/lib/resourcemanager/lib/model/configuration-source-provider-summary.ts new file mode 100644 index 0000000000..a161628c47 --- /dev/null +++ b/lib/resourcemanager/lib/model/configuration-source-provider-summary.ts @@ -0,0 +1,94 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Summary information for a configuration source provider. + * + */ +export interface ConfigurationSourceProviderSummary { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + */ + "id"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the configuration source provider is located. + */ + "compartmentId"?: string; + /** + * Human-readable display name for the configuration source provider. + */ + "displayName"?: string; + /** + * General description of the configuration source provider. + */ + "description"?: string; + /** + * The date and time when the configuration source provider was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * + */ + "timeCreated"?: Date; + /** + * Current state of the specified configuration source provider. +* For more information about configuration source provider lifecycle states in Resource Manager, see +* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#CSPStates). +*

+Allowable values: +* - ACTIVE +* + */ + "lifecycleState"?: string; + /** + * Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Department\": \"Finance\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; + + "configSourceProviderType": string; +} + +export namespace ConfigurationSourceProviderSummary { + export function getJsonObj(obj: ConfigurationSourceProviderSummary): object { + const jsonObj = { ...obj, ...{} }; + + if ("configSourceProviderType" in obj && obj.configSourceProviderType) { + switch (obj.configSourceProviderType) { + case "GITLAB_ACCESS_TOKEN": + return model.GitlabAccessTokenConfigurationSourceProviderSummary.getJsonObj( + (jsonObj), + true + ); + default: + throw Error("Unknown value for: " + obj.configSourceProviderType); + } + } + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/configuration-source-provider.ts b/lib/resourcemanager/lib/model/configuration-source-provider.ts new file mode 100644 index 0000000000..b9084898ba --- /dev/null +++ b/lib/resourcemanager/lib/model/configuration-source-provider.ts @@ -0,0 +1,103 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The properties that define a configuration source provider. + * For more information, see + * [Managing Configuration Source Providers](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/managingstacksandjobs.htm#ManagingConfigurationSourceProviders). + * + */ +export interface ConfigurationSourceProvider { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + */ + "id"?: string; + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the configuration source provider is located. + */ + "compartmentId"?: string; + /** + * Human-readable display name for the configuration source provider. + */ + "displayName"?: string; + /** + * Description of the configuration source provider. + */ + "description"?: string; + /** + * The date and time when the configuration source provider was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * + */ + "timeCreated"?: Date; + /** + * The current lifecycle state of the configuration source provider. + * For more information about configuration source provider lifecycle states in Resource Manager, see + * [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#CSPStates). + * + */ + "lifecycleState"?: ConfigurationSourceProvider.LifecycleState; + /** + * Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Department\": \"Finance\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; + + "configSourceProviderType": string; +} + +export namespace ConfigurationSourceProvider { + export enum LifecycleState { + ACTIVE = "ACTIVE", + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UNKNOWN_VALUE = "UNKNOWN_VALUE" + } + + export function getJsonObj(obj: ConfigurationSourceProvider): object { + const jsonObj = { ...obj, ...{} }; + + if ("configSourceProviderType" in obj && obj.configSourceProviderType) { + switch (obj.configSourceProviderType) { + case "GITLAB_ACCESS_TOKEN": + return model.GitlabAccessTokenConfigurationSourceProvider.getJsonObj( + (jsonObj), + true + ); + default: + throw Error("Unknown value for: " + obj.configSourceProviderType); + } + } + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/create-apply-job-operation-details.ts b/lib/resourcemanager/lib/model/create-apply-job-operation-details.ts index 95676cc1ee..b5d597b667 100644 --- a/lib/resourcemanager/lib/model/create-apply-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/create-apply-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-config-source-details.ts b/lib/resourcemanager/lib/model/create-config-source-details.ts index d2d94f51e0..5589f89456 100644 --- a/lib/resourcemanager/lib/model/create-config-source-details.ts +++ b/lib/resourcemanager/lib/model/create-config-source-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -40,6 +44,11 @@ export namespace CreateConfigSourceDetails { (jsonObj), true ); + case "GIT_CONFIG_SOURCE": + return model.CreateGitConfigSourceDetails.getJsonObj( + (jsonObj), + true + ); default: throw Error("Unknown value for: " + obj.configSourceType); } diff --git a/lib/resourcemanager/lib/model/create-configuration-source-provider-details.ts b/lib/resourcemanager/lib/model/create-configuration-source-provider-details.ts new file mode 100644 index 0000000000..e6c782896d --- /dev/null +++ b/lib/resourcemanager/lib/model/create-configuration-source-provider-details.ts @@ -0,0 +1,75 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The details for creating a configuration source provider. + * + */ +export interface CreateConfigurationSourceProviderDetails { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where + * you want to create the configuration source provider. + * + */ + "compartmentId"?: string; + /** + * Human-readable name of the configuration source provider. Avoid entering confidential information. + */ + "displayName"?: string; + /** + * Description of the configuration source provider. Avoid entering confidential information. + */ + "description"?: string; + /** + * Free-form tags associated with the resource. Each tag is a key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Department\": \"Finance\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; + + "configSourceProviderType": string; +} + +export namespace CreateConfigurationSourceProviderDetails { + export function getJsonObj(obj: CreateConfigurationSourceProviderDetails): object { + const jsonObj = { ...obj, ...{} }; + + if ("configSourceProviderType" in obj && obj.configSourceProviderType) { + switch (obj.configSourceProviderType) { + case "GITLAB_ACCESS_TOKEN": + return model.CreateGitlabAccessTokenConfigurationSourceProviderDetails.getJsonObj( + (jsonObj), + true + ); + default: + throw Error("Unknown value for: " + obj.configSourceProviderType); + } + } + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/create-destroy-job-operation-details.ts b/lib/resourcemanager/lib/model/create-destroy-job-operation-details.ts index db5751dfa1..43b17ba8a5 100644 --- a/lib/resourcemanager/lib/model/create-destroy-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/create-destroy-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-git-config-source-details.ts b/lib/resourcemanager/lib/model/create-git-config-source-details.ts new file mode 100644 index 0000000000..e29eed2733 --- /dev/null +++ b/lib/resourcemanager/lib/model/create-git-config-source-details.ts @@ -0,0 +1,56 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Details for uploading the configuration Git information. + * + */ +export interface CreateGitConfigSourceDetails extends model.CreateConfigSourceDetails { + /** + * Unique identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) + * for the Git configuration source. + * + */ + "configurationSourceProviderId": string; + /** + * The URL of the Git repository. + */ + "repositoryUrl"?: string; + /** + * The name of the branch within the Git repository. + */ + "branchName"?: string; + + "configSourceType": string; +} + +export namespace CreateGitConfigSourceDetails { + export function getJsonObj(obj: CreateGitConfigSourceDetails, isParentJsonObj?: boolean): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.CreateConfigSourceDetails.getJsonObj(obj) as CreateGitConfigSourceDetails)), + ...{} + }; + + return jsonObj; + } + export const configSourceType = "GIT_CONFIG_SOURCE"; +} diff --git a/lib/resourcemanager/lib/model/create-gitlab-access-token-configuration-source-provider-details.ts b/lib/resourcemanager/lib/model/create-gitlab-access-token-configuration-source-provider-details.ts new file mode 100644 index 0000000000..48cf36d5a0 --- /dev/null +++ b/lib/resourcemanager/lib/model/create-gitlab-access-token-configuration-source-provider-details.ts @@ -0,0 +1,59 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The details for creating a configuration source provider of the type `GITLAB_ACCESS_TOKEN`. + * This type corresponds to a configuration source provider in GitLab that is authenticated with a personal access token. + * + */ +export interface CreateGitlabAccessTokenConfigurationSourceProviderDetails + extends model.CreateConfigurationSourceProviderDetails { + /** + * The Git service API endpoint. + * Example: `https://gitlab.com/api/v3/` + * + */ + "apiEndpoint": string; + /** + * The personal access token to be configured on the Git repository. Avoid entering confidential information. + */ + "accessToken": string; + + "configSourceProviderType": string; +} + +export namespace CreateGitlabAccessTokenConfigurationSourceProviderDetails { + export function getJsonObj( + obj: CreateGitlabAccessTokenConfigurationSourceProviderDetails, + isParentJsonObj?: boolean + ): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.CreateConfigurationSourceProviderDetails.getJsonObj( + obj + ) as CreateGitlabAccessTokenConfigurationSourceProviderDetails)), + ...{} + }; + + return jsonObj; + } + export const configSourceProviderType = "GITLAB_ACCESS_TOKEN"; +} diff --git a/lib/resourcemanager/lib/model/create-import-tf-state-job-operation-details.ts b/lib/resourcemanager/lib/model/create-import-tf-state-job-operation-details.ts index d36df9bd5f..4ecd1fb508 100644 --- a/lib/resourcemanager/lib/model/create-import-tf-state-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/create-import-tf-state-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-job-details.ts b/lib/resourcemanager/lib/model/create-job-details.ts index e4d6ca095e..d679129d7d 100644 --- a/lib/resourcemanager/lib/model/create-job-details.ts +++ b/lib/resourcemanager/lib/model/create-job-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-job-operation-details.ts b/lib/resourcemanager/lib/model/create-job-operation-details.ts index e057ccf804..72f049c4d4 100644 --- a/lib/resourcemanager/lib/model/create-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/create-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-plan-job-operation-details.ts b/lib/resourcemanager/lib/model/create-plan-job-operation-details.ts index 1e997b4d78..a1535c79fc 100644 --- a/lib/resourcemanager/lib/model/create-plan-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/create-plan-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/create-stack-details.ts b/lib/resourcemanager/lib/model/create-stack-details.ts index dccc69a23b..f31fc861ad 100644 --- a/lib/resourcemanager/lib/model/create-stack-details.ts +++ b/lib/resourcemanager/lib/model/create-stack-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -30,7 +34,7 @@ export interface CreateStackDetails { * Description of the stack. */ "description"?: string; - "configSource": model.CreateZipUploadConfigSourceDetails; + "configSource": model.CreateZipUploadConfigSourceDetails | model.CreateGitConfigSourceDetails; /** * Terraform variables associated with this resource. * Maximum number of variables supported is 100. diff --git a/lib/resourcemanager/lib/model/create-zip-upload-config-source-details.ts b/lib/resourcemanager/lib/model/create-zip-upload-config-source-details.ts index c9846c9ede..b8bbe3fa78 100644 --- a/lib/resourcemanager/lib/model/create-zip-upload-config-source-details.ts +++ b/lib/resourcemanager/lib/model/create-zip-upload-config-source-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/destroy-job-operation-details-summary.ts b/lib/resourcemanager/lib/model/destroy-job-operation-details-summary.ts index 40276916d5..c43119902b 100644 --- a/lib/resourcemanager/lib/model/destroy-job-operation-details-summary.ts +++ b/lib/resourcemanager/lib/model/destroy-job-operation-details-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/destroy-job-operation-details.ts b/lib/resourcemanager/lib/model/destroy-job-operation-details.ts index 5cc7bc68a6..0a8fb3cf04 100644 --- a/lib/resourcemanager/lib/model/destroy-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/destroy-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/failure-details.ts b/lib/resourcemanager/lib/model/failure-details.ts index 5ee3bf7982..78c482c5c5 100644 --- a/lib/resourcemanager/lib/model/failure-details.ts +++ b/lib/resourcemanager/lib/model/failure-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -33,6 +37,8 @@ export namespace FailureDetails { INVALIDWORKINGDIRECTORY = "INVALID_WORKING_DIRECTORY", JOBTIMEOUT = "JOB_TIMEOUT", TERRAFORMCONFIGVIRUSFOUND = "TERRAFORM_CONFIG_VIRUS_FOUND", + TERRAFORMGITCLONEFAILURE = "TERRAFORM_GIT_CLONE_FAILURE", + TERRAFORMGITCHECKOUTFAILURE = "TERRAFORM_GIT_CHECKOUT_FAILURE", /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/lib/resourcemanager/lib/model/git-config-source-record.ts b/lib/resourcemanager/lib/model/git-config-source-record.ts new file mode 100644 index 0000000000..0611135345 --- /dev/null +++ b/lib/resourcemanager/lib/model/git-config-source-record.ts @@ -0,0 +1,60 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Metadata about the Git configuration source. + * + */ +export interface GitConfigSourceRecord extends model.ConfigSourceRecord { + /** + * Unique identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) + * for the Git configuration source. + * + */ + "configurationSourceProviderId": string; + /** + * The URL of the Git repository. + */ + "repositoryUrl"?: string; + /** + * The name of the branch within the Git repository. + */ + "branchName"?: string; + /** + * The unique identifier (SHA-1 hash) of the individual change to the Git repository. + */ + "commitId"?: string; + + "configSourceRecordType": string; +} + +export namespace GitConfigSourceRecord { + export function getJsonObj(obj: GitConfigSourceRecord, isParentJsonObj?: boolean): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.ConfigSourceRecord.getJsonObj(obj) as GitConfigSourceRecord)), + ...{} + }; + + return jsonObj; + } + export const configSourceRecordType = "GIT_CONFIG_SOURCE"; +} diff --git a/lib/resourcemanager/lib/model/git-config-source.ts b/lib/resourcemanager/lib/model/git-config-source.ts new file mode 100644 index 0000000000..bba67fb991 --- /dev/null +++ b/lib/resourcemanager/lib/model/git-config-source.ts @@ -0,0 +1,53 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Metadata about the Git configuration source. + * + */ +export interface GitConfigSource extends model.ConfigSource { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Git configuration source. + * + */ + "configurationSourceProviderId": string; + /** + * The URL of the Git repository for the configuration source. + */ + "repositoryUrl"?: string; + /** + * The name of the branch in the Git repository for the configuration source. + */ + "branchName"?: string; + + "configSourceType": string; +} + +export namespace GitConfigSource { + export function getJsonObj(obj: GitConfigSource, isParentJsonObj?: boolean): object { + const jsonObj = { + ...(isParentJsonObj ? obj : (model.ConfigSource.getJsonObj(obj) as GitConfigSource)), + ...{} + }; + + return jsonObj; + } + export const configSourceType = "GIT_CONFIG_SOURCE"; +} diff --git a/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider-summary.ts b/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider-summary.ts new file mode 100644 index 0000000000..7d280dfa97 --- /dev/null +++ b/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider-summary.ts @@ -0,0 +1,55 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Summary information for a configuration source provider of the type `GITLAB_ACCESS_TOKEN`. + * This type corresponds to a configuration source provider in GitLab that is authenticated with a personal access token. + * + */ +export interface GitlabAccessTokenConfigurationSourceProviderSummary + extends model.ConfigurationSourceProviderSummary { + /** + * The Git service API endpoint. + * Example: `https://gitlab.com/api/v3/` + * + */ + "apiEndpoint"?: string; + + "configSourceProviderType": string; +} + +export namespace GitlabAccessTokenConfigurationSourceProviderSummary { + export function getJsonObj( + obj: GitlabAccessTokenConfigurationSourceProviderSummary, + isParentJsonObj?: boolean + ): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.ConfigurationSourceProviderSummary.getJsonObj( + obj + ) as GitlabAccessTokenConfigurationSourceProviderSummary)), + ...{} + }; + + return jsonObj; + } + export const configSourceProviderType = "GITLAB_ACCESS_TOKEN"; +} diff --git a/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider.ts b/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider.ts new file mode 100644 index 0000000000..5469308305 --- /dev/null +++ b/lib/resourcemanager/lib/model/gitlab-access-token-configuration-source-provider.ts @@ -0,0 +1,59 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The properties that define a configuration source provider of the type `GITLAB_ACCESS_TOKEN`. + * This type corresponds to a configuration source provider in GitLab that is authenticated with a personal access token. + * + */ +export interface GitlabAccessTokenConfigurationSourceProvider + extends model.ConfigurationSourceProvider { + /** + * The Git service API endpoint. + * Example: `https://gitlab.com/api/v3/` + * + */ + "apiEndpoint"?: string; + /** + * The personal access token configured on the Git repository. + */ + "accessToken"?: string; + + "configSourceProviderType": string; +} + +export namespace GitlabAccessTokenConfigurationSourceProvider { + export function getJsonObj( + obj: GitlabAccessTokenConfigurationSourceProvider, + isParentJsonObj?: boolean + ): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.ConfigurationSourceProvider.getJsonObj( + obj + ) as GitlabAccessTokenConfigurationSourceProvider)), + ...{} + }; + + return jsonObj; + } + export const configSourceProviderType = "GITLAB_ACCESS_TOKEN"; +} diff --git a/lib/resourcemanager/lib/model/import-tf-state-job-operation-details-summary.ts b/lib/resourcemanager/lib/model/import-tf-state-job-operation-details-summary.ts index a01ea247d2..f9fbf53c93 100644 --- a/lib/resourcemanager/lib/model/import-tf-state-job-operation-details-summary.ts +++ b/lib/resourcemanager/lib/model/import-tf-state-job-operation-details-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/import-tf-state-job-operation-details.ts b/lib/resourcemanager/lib/model/import-tf-state-job-operation-details.ts index 9e420e2b72..05ca1042b0 100644 --- a/lib/resourcemanager/lib/model/import-tf-state-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/import-tf-state-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/index.ts b/lib/resourcemanager/lib/model/index.ts index 3d49e241d9..840588a744 100644 --- a/lib/resourcemanager/lib/model/index.ts +++ b/lib/resourcemanager/lib/model/index.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -13,12 +17,24 @@ import * as ApplyJobPlanResolution from "./apply-job-plan-resolution"; export import ApplyJobPlanResolution = ApplyJobPlanResolution.ApplyJobPlanResolution; +import * as ChangeConfigurationSourceProviderCompartmentDetails from "./change-configuration-source-provider-compartment-details"; +export import ChangeConfigurationSourceProviderCompartmentDetails = ChangeConfigurationSourceProviderCompartmentDetails.ChangeConfigurationSourceProviderCompartmentDetails; import * as ChangeStackCompartmentDetails from "./change-stack-compartment-details"; export import ChangeStackCompartmentDetails = ChangeStackCompartmentDetails.ChangeStackCompartmentDetails; import * as ConfigSource from "./config-source"; export import ConfigSource = ConfigSource.ConfigSource; +import * as ConfigSourceRecord from "./config-source-record"; +export import ConfigSourceRecord = ConfigSourceRecord.ConfigSourceRecord; +import * as ConfigurationSourceProvider from "./configuration-source-provider"; +export import ConfigurationSourceProvider = ConfigurationSourceProvider.ConfigurationSourceProvider; +import * as ConfigurationSourceProviderCollection from "./configuration-source-provider-collection"; +export import ConfigurationSourceProviderCollection = ConfigurationSourceProviderCollection.ConfigurationSourceProviderCollection; +import * as ConfigurationSourceProviderSummary from "./configuration-source-provider-summary"; +export import ConfigurationSourceProviderSummary = ConfigurationSourceProviderSummary.ConfigurationSourceProviderSummary; import * as CreateConfigSourceDetails from "./create-config-source-details"; export import CreateConfigSourceDetails = CreateConfigSourceDetails.CreateConfigSourceDetails; +import * as CreateConfigurationSourceProviderDetails from "./create-configuration-source-provider-details"; +export import CreateConfigurationSourceProviderDetails = CreateConfigurationSourceProviderDetails.CreateConfigurationSourceProviderDetails; import * as CreateJobDetails from "./create-job-details"; export import CreateJobDetails = CreateJobDetails.CreateJobDetails; import * as CreateJobOperationDetails from "./create-job-operation-details"; @@ -51,6 +67,8 @@ import * as TerraformVersionSummary from "./terraform-version-summary"; export import TerraformVersionSummary = TerraformVersionSummary.TerraformVersionSummary; import * as UpdateConfigSourceDetails from "./update-config-source-details"; export import UpdateConfigSourceDetails = UpdateConfigSourceDetails.UpdateConfigSourceDetails; +import * as UpdateConfigurationSourceProviderDetails from "./update-configuration-source-provider-details"; +export import UpdateConfigurationSourceProviderDetails = UpdateConfigurationSourceProviderDetails.UpdateConfigurationSourceProviderDetails; import * as UpdateJobDetails from "./update-job-details"; export import UpdateJobDetails = UpdateJobDetails.UpdateJobDetails; import * as UpdateStackDetails from "./update-stack-details"; @@ -74,6 +92,10 @@ import * as CreateApplyJobOperationDetails from "./create-apply-job-operation-de export import CreateApplyJobOperationDetails = CreateApplyJobOperationDetails.CreateApplyJobOperationDetails; import * as CreateDestroyJobOperationDetails from "./create-destroy-job-operation-details"; export import CreateDestroyJobOperationDetails = CreateDestroyJobOperationDetails.CreateDestroyJobOperationDetails; +import * as CreateGitConfigSourceDetails from "./create-git-config-source-details"; +export import CreateGitConfigSourceDetails = CreateGitConfigSourceDetails.CreateGitConfigSourceDetails; +import * as CreateGitlabAccessTokenConfigurationSourceProviderDetails from "./create-gitlab-access-token-configuration-source-provider-details"; +export import CreateGitlabAccessTokenConfigurationSourceProviderDetails = CreateGitlabAccessTokenConfigurationSourceProviderDetails.CreateGitlabAccessTokenConfigurationSourceProviderDetails; import * as CreateImportTfStateJobOperationDetails from "./create-import-tf-state-job-operation-details"; export import CreateImportTfStateJobOperationDetails = CreateImportTfStateJobOperationDetails.CreateImportTfStateJobOperationDetails; import * as CreatePlanJobOperationDetails from "./create-plan-job-operation-details"; @@ -84,6 +106,14 @@ import * as DestroyJobOperationDetails from "./destroy-job-operation-details"; export import DestroyJobOperationDetails = DestroyJobOperationDetails.DestroyJobOperationDetails; import * as DestroyJobOperationDetailsSummary from "./destroy-job-operation-details-summary"; export import DestroyJobOperationDetailsSummary = DestroyJobOperationDetailsSummary.DestroyJobOperationDetailsSummary; +import * as GitConfigSource from "./git-config-source"; +export import GitConfigSource = GitConfigSource.GitConfigSource; +import * as GitConfigSourceRecord from "./git-config-source-record"; +export import GitConfigSourceRecord = GitConfigSourceRecord.GitConfigSourceRecord; +import * as GitlabAccessTokenConfigurationSourceProvider from "./gitlab-access-token-configuration-source-provider"; +export import GitlabAccessTokenConfigurationSourceProvider = GitlabAccessTokenConfigurationSourceProvider.GitlabAccessTokenConfigurationSourceProvider; +import * as GitlabAccessTokenConfigurationSourceProviderSummary from "./gitlab-access-token-configuration-source-provider-summary"; +export import GitlabAccessTokenConfigurationSourceProviderSummary = GitlabAccessTokenConfigurationSourceProviderSummary.GitlabAccessTokenConfigurationSourceProviderSummary; import * as ImportTfStateJobOperationDetails from "./import-tf-state-job-operation-details"; export import ImportTfStateJobOperationDetails = ImportTfStateJobOperationDetails.ImportTfStateJobOperationDetails; import * as ImportTfStateJobOperationDetailsSummary from "./import-tf-state-job-operation-details-summary"; @@ -92,7 +122,13 @@ import * as PlanJobOperationDetails from "./plan-job-operation-details"; export import PlanJobOperationDetails = PlanJobOperationDetails.PlanJobOperationDetails; import * as PlanJobOperationDetailsSummary from "./plan-job-operation-details-summary"; export import PlanJobOperationDetailsSummary = PlanJobOperationDetailsSummary.PlanJobOperationDetailsSummary; +import * as UpdateGitConfigSourceDetails from "./update-git-config-source-details"; +export import UpdateGitConfigSourceDetails = UpdateGitConfigSourceDetails.UpdateGitConfigSourceDetails; +import * as UpdateGitlabAccessTokenConfigurationSourceProviderDetails from "./update-gitlab-access-token-configuration-source-provider-details"; +export import UpdateGitlabAccessTokenConfigurationSourceProviderDetails = UpdateGitlabAccessTokenConfigurationSourceProviderDetails.UpdateGitlabAccessTokenConfigurationSourceProviderDetails; import * as UpdateZipUploadConfigSourceDetails from "./update-zip-upload-config-source-details"; export import UpdateZipUploadConfigSourceDetails = UpdateZipUploadConfigSourceDetails.UpdateZipUploadConfigSourceDetails; import * as ZipUploadConfigSource from "./zip-upload-config-source"; export import ZipUploadConfigSource = ZipUploadConfigSource.ZipUploadConfigSource; +import * as ZipUploadConfigSourceRecord from "./zip-upload-config-source-record"; +export import ZipUploadConfigSourceRecord = ZipUploadConfigSourceRecord.ZipUploadConfigSourceRecord; diff --git a/lib/resourcemanager/lib/model/job-operation-details-summary.ts b/lib/resourcemanager/lib/model/job-operation-details-summary.ts index 73e0407cce..1ff4adc741 100644 --- a/lib/resourcemanager/lib/model/job-operation-details-summary.ts +++ b/lib/resourcemanager/lib/model/job-operation-details-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/job-operation-details.ts b/lib/resourcemanager/lib/model/job-operation-details.ts index 6f19aa8dab..2f91623a7c 100644 --- a/lib/resourcemanager/lib/model/job-operation-details.ts +++ b/lib/resourcemanager/lib/model/job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/job-summary.ts b/lib/resourcemanager/lib/model/job-summary.ts index 1b78eb28f7..7b3fb69b41 100644 --- a/lib/resourcemanager/lib/model/job-summary.ts +++ b/lib/resourcemanager/lib/model/job-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -52,16 +56,22 @@ export interface JobSummary { "resolvedPlanJobId"?: string; /** * The date and time the job was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeCreated"?: Date; /** * The date and time the job succeeded or failed. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeFinished"?: Date; /** * Current state of the specified job. -* For more information about resource states in Resource Manager, see -* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts). +* For more information about job lifecycle states in Resource Manager, see +* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#JobStates). *

Allowable values: * - ACCEPTED diff --git a/lib/resourcemanager/lib/model/job.ts b/lib/resourcemanager/lib/model/job.ts index f1fd9136ae..e388b3844b 100644 --- a/lib/resourcemanager/lib/model/job.ts +++ b/lib/resourcemanager/lib/model/job.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -60,17 +64,23 @@ export interface Job { */ "resolvedPlanJobId"?: string; /** - * The date and time at which the job was created. + * The date and time when the job was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeCreated"?: Date; /** - * The date and time at which the job stopped running, irrespective of whether the job ran successfully. + * The date and time when the job stopped running, irrespective of whether the job ran successfully. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeFinished"?: Date; /** * Current state of the specified job. - * For more information about resource states in Resource Manager, see - * [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts). + * For more information about job lifecycle states in Resource Manager, see + * [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#JobStates). * */ "lifecycleState"?: Job.LifecycleState; @@ -87,6 +97,7 @@ export interface Job { * */ "variables"?: { [key: string]: string }; + "configSource"?: model.GitConfigSourceRecord | model.ZipUploadConfigSourceRecord; /** * Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace. * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). @@ -145,6 +156,10 @@ export namespace Job { "failureDetails": obj.failureDetails ? model.FailureDetails.getJsonObj(obj.failureDetails) + : undefined, + + "configSource": obj.configSource + ? model.ConfigSourceRecord.getJsonObj(obj.configSource) : undefined } }; diff --git a/lib/resourcemanager/lib/model/log-entry.ts b/lib/resourcemanager/lib/model/log-entry.ts index 3d4f8509e0..d20197620d 100644 --- a/lib/resourcemanager/lib/model/log-entry.ts +++ b/lib/resourcemanager/lib/model/log-entry.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -27,7 +31,10 @@ export interface LogEntry { */ "level"?: LogEntry.Level; /** - * Date and time of the log entry. + * The date and time of the log entry. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timestamp"?: Date; /** diff --git a/lib/resourcemanager/lib/model/plan-job-operation-details-summary.ts b/lib/resourcemanager/lib/model/plan-job-operation-details-summary.ts index 7490205c5c..efb3c40f68 100644 --- a/lib/resourcemanager/lib/model/plan-job-operation-details-summary.ts +++ b/lib/resourcemanager/lib/model/plan-job-operation-details-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/plan-job-operation-details.ts b/lib/resourcemanager/lib/model/plan-job-operation-details.ts index 6fd98ad086..d4fb811397 100644 --- a/lib/resourcemanager/lib/model/plan-job-operation-details.ts +++ b/lib/resourcemanager/lib/model/plan-job-operation-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/stack-resource-drift-collection.ts b/lib/resourcemanager/lib/model/stack-resource-drift-collection.ts index 4c76d64a1e..3411b40cfb 100644 --- a/lib/resourcemanager/lib/model/stack-resource-drift-collection.ts +++ b/lib/resourcemanager/lib/model/stack-resource-drift-collection.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/stack-resource-drift-summary.ts b/lib/resourcemanager/lib/model/stack-resource-drift-summary.ts index 70565e45bf..2918ba0491 100644 --- a/lib/resourcemanager/lib/model/stack-resource-drift-summary.ts +++ b/lib/resourcemanager/lib/model/stack-resource-drift-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -65,8 +69,9 @@ export interface StackResourceDriftSummary { */ "expectedProperties"?: { [key: string]: string }; /** - * Date and time when the drift detection was executed. Format defined by RFC3339. - * Example: 2020-01-25T21:10:29.600Z + * The date and time when the drift detection was executed. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` * */ "timeDriftChecked"?: Date; diff --git a/lib/resourcemanager/lib/model/stack-summary.ts b/lib/resourcemanager/lib/model/stack-summary.ts index 4531831729..16c80aed43 100644 --- a/lib/resourcemanager/lib/model/stack-summary.ts +++ b/lib/resourcemanager/lib/model/stack-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -36,13 +40,16 @@ export interface StackSummary { */ "description"?: string; /** - * Date and time at which the stack was created. + * The date and time when the stack was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeCreated"?: Date; /** * The current lifecycle state of the stack. -* For more information about resource states in Resource Manager, see -* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts). +* For more information about stack lifecycle states in Resource Manager, see +* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#StackStates). *

Allowable values: * - CREATING diff --git a/lib/resourcemanager/lib/model/stack.ts b/lib/resourcemanager/lib/model/stack.ts index 39c532c1e4..9f2bf951d3 100644 --- a/lib/resourcemanager/lib/model/stack.ts +++ b/lib/resourcemanager/lib/model/stack.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -38,16 +42,19 @@ export interface Stack { "description"?: string; /** * The date and time at which the stack was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeCreated"?: Date; /** * The current lifecycle state of the stack. - * For more information about resource states in Resource Manager, see - * [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts). + * For more information about stack lifecycle states in Resource Manager, see + * [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#StackStates). * */ "lifecycleState"?: Stack.LifecycleState; - "configSource"?: model.ZipUploadConfigSource; + "configSource"?: model.GitConfigSource | model.ZipUploadConfigSource; /** * Terraform variables associated with this resource. * Maximum number of variables supported is 100. @@ -68,8 +75,9 @@ export interface Stack { */ "stackDriftStatus"?: Stack.StackDriftStatus; /** - * Date and time when the drift detection was last executed. Format is defined by RFC3339. - * Example: 2020-01-25T21:10:29.600Z + * The date and time when the drift detection was last executed. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` * */ "timeDriftLastChecked"?: Date; diff --git a/lib/resourcemanager/lib/model/terraform-version-collection.ts b/lib/resourcemanager/lib/model/terraform-version-collection.ts index 55c19f2a20..898d5ef150 100644 --- a/lib/resourcemanager/lib/model/terraform-version-collection.ts +++ b/lib/resourcemanager/lib/model/terraform-version-collection.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/terraform-version-summary.ts b/lib/resourcemanager/lib/model/terraform-version-summary.ts index 90b245740e..cbd773f25a 100644 --- a/lib/resourcemanager/lib/model/terraform-version-summary.ts +++ b/lib/resourcemanager/lib/model/terraform-version-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/update-config-source-details.ts b/lib/resourcemanager/lib/model/update-config-source-details.ts index 6a37eeafed..7b31739c51 100644 --- a/lib/resourcemanager/lib/model/update-config-source-details.ts +++ b/lib/resourcemanager/lib/model/update-config-source-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -33,6 +37,11 @@ export namespace UpdateConfigSourceDetails { if ("configSourceType" in obj && obj.configSourceType) { switch (obj.configSourceType) { + case "GIT_CONFIG_SOURCE": + return model.UpdateGitConfigSourceDetails.getJsonObj( + (jsonObj), + true + ); case "ZIP_UPLOAD": return model.UpdateZipUploadConfigSourceDetails.getJsonObj( (jsonObj), diff --git a/lib/resourcemanager/lib/model/update-configuration-source-provider-details.ts b/lib/resourcemanager/lib/model/update-configuration-source-provider-details.ts new file mode 100644 index 0000000000..21b9c70c09 --- /dev/null +++ b/lib/resourcemanager/lib/model/update-configuration-source-provider-details.ts @@ -0,0 +1,69 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The details for updating a configuration source provider. + * + */ +export interface UpdateConfigurationSourceProviderDetails { + /** + * Human-readable name of the configuration source provider. Avoid entering confidential information. + */ + "displayName"?: string; + /** + * Description of the configuration source provider. Avoid entering confidential information. + */ + "description"?: string; + /** + * Free-form tags associated with the resource. Each tag is a key-value pair with no predefined name, type, or namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Department\": \"Finance\"}` + * + */ + "freeformTags"?: { [key: string]: string }; + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + */ + "definedTags"?: { [key: string]: { [key: string]: any } }; + + "configSourceProviderType": string; +} + +export namespace UpdateConfigurationSourceProviderDetails { + export function getJsonObj(obj: UpdateConfigurationSourceProviderDetails): object { + const jsonObj = { ...obj, ...{} }; + + if ("configSourceProviderType" in obj && obj.configSourceProviderType) { + switch (obj.configSourceProviderType) { + case "GITLAB_ACCESS_TOKEN": + return model.UpdateGitlabAccessTokenConfigurationSourceProviderDetails.getJsonObj( + (jsonObj), + true + ); + default: + throw Error("Unknown value for: " + obj.configSourceProviderType); + } + } + return jsonObj; + } +} diff --git a/lib/resourcemanager/lib/model/update-git-config-source-details.ts b/lib/resourcemanager/lib/model/update-git-config-source-details.ts new file mode 100644 index 0000000000..72d45ba0c6 --- /dev/null +++ b/lib/resourcemanager/lib/model/update-git-config-source-details.ts @@ -0,0 +1,55 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Updates property details for the configuration git information. + */ +export interface UpdateGitConfigSourceDetails extends model.UpdateConfigSourceDetails { + /** + * Unique identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) + * for the Git configuration source. + * + */ + "configurationSourceProviderId": string; + /** + * The URL of the Git repository. + */ + "repositoryUrl"?: string; + /** + * The name of the branch within the Git repository. + */ + "branchName"?: string; + + "configSourceType": string; +} + +export namespace UpdateGitConfigSourceDetails { + export function getJsonObj(obj: UpdateGitConfigSourceDetails, isParentJsonObj?: boolean): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.UpdateConfigSourceDetails.getJsonObj(obj) as UpdateGitConfigSourceDetails)), + ...{} + }; + + return jsonObj; + } + export const configSourceType = "GIT_CONFIG_SOURCE"; +} diff --git a/lib/resourcemanager/lib/model/update-gitlab-access-token-configuration-source-provider-details.ts b/lib/resourcemanager/lib/model/update-gitlab-access-token-configuration-source-provider-details.ts new file mode 100644 index 0000000000..fc848573a4 --- /dev/null +++ b/lib/resourcemanager/lib/model/update-gitlab-access-token-configuration-source-provider-details.ts @@ -0,0 +1,59 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * The details for updating a configuration source provider of the type `GITLAB_ACCESS_TOKEN`. + * This type corresponds to a configuration source provider in GitLab that is authenticated with a personal access token. + * + */ +export interface UpdateGitlabAccessTokenConfigurationSourceProviderDetails + extends model.UpdateConfigurationSourceProviderDetails { + /** + * The Git service API endpoint. + * Example: `https://gitlab.com/api/v3/` + * + */ + "apiEndpoint"?: string; + /** + * The personal access token to be configured on the Git repository. + */ + "accessToken"?: string; + + "configSourceProviderType": string; +} + +export namespace UpdateGitlabAccessTokenConfigurationSourceProviderDetails { + export function getJsonObj( + obj: UpdateGitlabAccessTokenConfigurationSourceProviderDetails, + isParentJsonObj?: boolean + ): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.UpdateConfigurationSourceProviderDetails.getJsonObj( + obj + ) as UpdateGitlabAccessTokenConfigurationSourceProviderDetails)), + ...{} + }; + + return jsonObj; + } + export const configSourceProviderType = "GITLAB_ACCESS_TOKEN"; +} diff --git a/lib/resourcemanager/lib/model/update-job-details.ts b/lib/resourcemanager/lib/model/update-job-details.ts index 817237d65e..2f919c8861 100644 --- a/lib/resourcemanager/lib/model/update-job-details.ts +++ b/lib/resourcemanager/lib/model/update-job-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/update-stack-details.ts b/lib/resourcemanager/lib/model/update-stack-details.ts index 6864357fe7..08a4b12531 100644 --- a/lib/resourcemanager/lib/model/update-stack-details.ts +++ b/lib/resourcemanager/lib/model/update-stack-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -27,7 +31,7 @@ export interface UpdateStackDetails { * Description of the stack. */ "description"?: string; - "configSource"?: model.UpdateZipUploadConfigSourceDetails; + "configSource"?: model.UpdateGitConfigSourceDetails | model.UpdateZipUploadConfigSourceDetails; /** * Terraform variables associated with this resource. * The maximum number of variables supported is 100. @@ -50,7 +54,7 @@ export interface UpdateStackDetails { "freeformTags"?: { [key: string]: string }; /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. - * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * */ diff --git a/lib/resourcemanager/lib/model/update-zip-upload-config-source-details.ts b/lib/resourcemanager/lib/model/update-zip-upload-config-source-details.ts index f4b08738bb..f0ee1dbc86 100644 --- a/lib/resourcemanager/lib/model/update-zip-upload-config-source-details.ts +++ b/lib/resourcemanager/lib/model/update-zip-upload-config-source-details.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/work-request-error.ts b/lib/resourcemanager/lib/model/work-request-error.ts index 665d345d14..15da28bfd9 100644 --- a/lib/resourcemanager/lib/model/work-request-error.ts +++ b/lib/resourcemanager/lib/model/work-request-error.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -27,7 +31,10 @@ export interface WorkRequestError { */ "message": string; /** - * The time the error happened. + * The date and time when the error happened. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timestamp": Date; } diff --git a/lib/resourcemanager/lib/model/work-request-log-entry.ts b/lib/resourcemanager/lib/model/work-request-log-entry.ts index 544388e7c6..5a80758693 100644 --- a/lib/resourcemanager/lib/model/work-request-log-entry.ts +++ b/lib/resourcemanager/lib/model/work-request-log-entry.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -23,7 +27,10 @@ export interface WorkRequestLogEntry { */ "message": string; /** - * The time the log message was written. + * The date and time when the log message was written. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timestamp": Date; } diff --git a/lib/resourcemanager/lib/model/work-request-resource.ts b/lib/resourcemanager/lib/model/work-request-resource.ts index 7714cd190d..92615ff1a7 100644 --- a/lib/resourcemanager/lib/model/work-request-resource.ts +++ b/lib/resourcemanager/lib/model/work-request-resource.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/model/work-request-summary.ts b/lib/resourcemanager/lib/model/work-request-summary.ts index ea4ac75c49..f7ab395e45 100644 --- a/lib/resourcemanager/lib/model/work-request-summary.ts +++ b/lib/resourcemanager/lib/model/work-request-summary.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -43,15 +47,24 @@ export interface WorkRequestSummary { */ "percentComplete": number; /** - * When the work request was created. + * The date and time when the work request was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeAccepted": Date; /** - * When the work request transitioned from ACCEPTED to IN_PROGRESS. + * The date and time when the work request transitioned from ACCEPTED to IN_PROGRESS. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeStarted"?: Date; /** - * When the work request reached a terminal state (FAILED or SUCCEEDED). + * The date and time when the work request reached a terminal state (FAILED or SUCCEEDED). + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeFinished"?: Date; } diff --git a/lib/resourcemanager/lib/model/work-request.ts b/lib/resourcemanager/lib/model/work-request.ts index 36bad17200..5c939fc411 100644 --- a/lib/resourcemanager/lib/model/work-request.ts +++ b/lib/resourcemanager/lib/model/work-request.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -43,15 +47,24 @@ export interface WorkRequest { */ "percentComplete": number; /** - * When the work request was created. + * The date and time when the work request was created. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeAccepted": Date; /** - * When the work request transitioned from ACCEPTED to IN_PROGRESS. + * The date and time when the work request transitioned from ACCEPTED to IN_PROGRESS. + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeStarted"?: Date; /** - * When the work request reached a terminal state (FAILED or SUCCEEDED). + * The date and time when the work request reached a terminal state (FAILED or SUCCEEDED). + * Format is defined by RFC3339. + * Example: `2020-01-25T21:10:29.600Z` + * */ "timeFinished"?: Date; } diff --git a/lib/resourcemanager/lib/model/zip-upload-config-source-record.ts b/lib/resourcemanager/lib/model/zip-upload-config-source-record.ts new file mode 100644 index 0000000000..7f0ec94faf --- /dev/null +++ b/lib/resourcemanager/lib/model/zip-upload-config-source-record.ts @@ -0,0 +1,41 @@ +/** + * Resource Manager API + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +/** + * Information about the user-provided file used for the Terraform configuration. + * + */ +export interface ZipUploadConfigSourceRecord extends model.ConfigSourceRecord { + "configSourceRecordType": string; +} + +export namespace ZipUploadConfigSourceRecord { + export function getJsonObj(obj: ZipUploadConfigSourceRecord, isParentJsonObj?: boolean): object { + const jsonObj = { + ...(isParentJsonObj + ? obj + : (model.ConfigSourceRecord.getJsonObj(obj) as ZipUploadConfigSourceRecord)), + ...{} + }; + + return jsonObj; + } + export const configSourceRecordType = "ZIP_UPLOAD"; +} diff --git a/lib/resourcemanager/lib/model/zip-upload-config-source.ts b/lib/resourcemanager/lib/model/zip-upload-config-source.ts index cb49874231..703f702bce 100644 --- a/lib/resourcemanager/lib/model/zip-upload-config-source.ts +++ b/lib/resourcemanager/lib/model/zip-upload-config-source.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. diff --git a/lib/resourcemanager/lib/request/change-configuration-source-provider-compartment-request.ts b/lib/resourcemanager/lib/request/change-configuration-source-provider-compartment-request.ts new file mode 100644 index 0000000000..588355fc04 --- /dev/null +++ b/lib/resourcemanager/lib/request/change-configuration-source-provider-compartment-request.ts @@ -0,0 +1,48 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ChangeConfigurationSourceProviderCompartmentRequest { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + * + */ + "configurationSourceProviderId": string; + /** + * Defines the properties of changeConfigurationSourceProviderCompartment operation. + */ + "changeConfigurationSourceProviderCompartmentDetails": model.ChangeConfigurationSourceProviderCompartmentDetails; + /** + * 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. + * + */ + "ifMatch"?: string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of retrying the same action. 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. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/resourcemanager/lib/request/create-configuration-source-provider-request.ts b/lib/resourcemanager/lib/request/create-configuration-source-provider-request.ts new file mode 100644 index 0000000000..fef9ac6f0a --- /dev/null +++ b/lib/resourcemanager/lib/request/create-configuration-source-provider-request.ts @@ -0,0 +1,36 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface CreateConfigurationSourceProviderRequest { + /** + * The properties for creating a ConfigurationSourceProvider. + */ + "createConfigurationSourceProviderDetails": model.CreateGitlabAccessTokenConfigurationSourceProviderDetails; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of retrying the same action. 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. + * + */ + "opcRetryToken"?: string; +} diff --git a/lib/resourcemanager/lib/request/delete-configuration-source-provider-request.ts b/lib/resourcemanager/lib/request/delete-configuration-source-provider-request.ts new file mode 100644 index 0000000000..03e15c3294 --- /dev/null +++ b/lib/resourcemanager/lib/request/delete-configuration-source-provider-request.ts @@ -0,0 +1,35 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface DeleteConfigurationSourceProviderRequest { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + * + */ + "configurationSourceProviderId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/resourcemanager/lib/request/get-configuration-source-provider-request.ts b/lib/resourcemanager/lib/request/get-configuration-source-provider-request.ts new file mode 100644 index 0000000000..9cc2d36813 --- /dev/null +++ b/lib/resourcemanager/lib/request/get-configuration-source-provider-request.ts @@ -0,0 +1,28 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface GetConfigurationSourceProviderRequest { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + * + */ + "configurationSourceProviderId": string; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; +} diff --git a/lib/resourcemanager/lib/request/get-job-logs-request.ts b/lib/resourcemanager/lib/request/get-job-logs-request.ts index f5a05894e9..0ed4ce35e9 100644 --- a/lib/resourcemanager/lib/request/get-job-logs-request.ts +++ b/lib/resourcemanager/lib/request/get-job-logs-request.ts @@ -53,11 +53,15 @@ export interface GetJobLogsRequest { "page"?: string; /** * Time stamp specifying the lower time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: `2020-01-01T12:00:00.000Z` * */ "timestampGreaterThanOrEqualTo"?: Date; /** * Time stamp specifying the upper time limit for which logs are returned in a query. + * Format is defined by RFC3339. + * Example: `2020-02-01T12:00:00.000Z` * */ "timestampLessThanOrEqualTo"?: Date; diff --git a/lib/resourcemanager/lib/request/index.ts b/lib/resourcemanager/lib/request/index.ts index 79554e8098..ee130e6d1c 100644 --- a/lib/resourcemanager/lib/request/index.ts +++ b/lib/resourcemanager/lib/request/index.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -13,16 +17,24 @@ import * as CancelJobRequest from "./cancel-job-request"; export import CancelJobRequest = CancelJobRequest.CancelJobRequest; +import * as ChangeConfigurationSourceProviderCompartmentRequest from "./change-configuration-source-provider-compartment-request"; +export import ChangeConfigurationSourceProviderCompartmentRequest = ChangeConfigurationSourceProviderCompartmentRequest.ChangeConfigurationSourceProviderCompartmentRequest; import * as ChangeStackCompartmentRequest from "./change-stack-compartment-request"; export import ChangeStackCompartmentRequest = ChangeStackCompartmentRequest.ChangeStackCompartmentRequest; +import * as CreateConfigurationSourceProviderRequest from "./create-configuration-source-provider-request"; +export import CreateConfigurationSourceProviderRequest = CreateConfigurationSourceProviderRequest.CreateConfigurationSourceProviderRequest; import * as CreateJobRequest from "./create-job-request"; export import CreateJobRequest = CreateJobRequest.CreateJobRequest; import * as CreateStackRequest from "./create-stack-request"; export import CreateStackRequest = CreateStackRequest.CreateStackRequest; +import * as DeleteConfigurationSourceProviderRequest from "./delete-configuration-source-provider-request"; +export import DeleteConfigurationSourceProviderRequest = DeleteConfigurationSourceProviderRequest.DeleteConfigurationSourceProviderRequest; import * as DeleteStackRequest from "./delete-stack-request"; export import DeleteStackRequest = DeleteStackRequest.DeleteStackRequest; import * as DetectStackDriftRequest from "./detect-stack-drift-request"; export import DetectStackDriftRequest = DetectStackDriftRequest.DetectStackDriftRequest; +import * as GetConfigurationSourceProviderRequest from "./get-configuration-source-provider-request"; +export import GetConfigurationSourceProviderRequest = GetConfigurationSourceProviderRequest.GetConfigurationSourceProviderRequest; import * as GetJobRequest from "./get-job-request"; export import GetJobRequest = GetJobRequest.GetJobRequest; import * as GetJobLogsRequest from "./get-job-logs-request"; @@ -41,6 +53,8 @@ import * as GetStackTfStateRequest from "./get-stack-tf-state-request"; export import GetStackTfStateRequest = GetStackTfStateRequest.GetStackTfStateRequest; import * as GetWorkRequestRequest from "./get-work-request-request"; export import GetWorkRequestRequest = GetWorkRequestRequest.GetWorkRequestRequest; +import * as ListConfigurationSourceProvidersRequest from "./list-configuration-source-providers-request"; +export import ListConfigurationSourceProvidersRequest = ListConfigurationSourceProvidersRequest.ListConfigurationSourceProvidersRequest; import * as ListJobsRequest from "./list-jobs-request"; export import ListJobsRequest = ListJobsRequest.ListJobsRequest; import * as ListStackResourceDriftDetailsRequest from "./list-stack-resource-drift-details-request"; @@ -55,6 +69,8 @@ import * as ListWorkRequestLogsRequest from "./list-work-request-logs-request"; export import ListWorkRequestLogsRequest = ListWorkRequestLogsRequest.ListWorkRequestLogsRequest; import * as ListWorkRequestsRequest from "./list-work-requests-request"; export import ListWorkRequestsRequest = ListWorkRequestsRequest.ListWorkRequestsRequest; +import * as UpdateConfigurationSourceProviderRequest from "./update-configuration-source-provider-request"; +export import UpdateConfigurationSourceProviderRequest = UpdateConfigurationSourceProviderRequest.UpdateConfigurationSourceProviderRequest; import * as UpdateJobRequest from "./update-job-request"; export import UpdateJobRequest = UpdateJobRequest.UpdateJobRequest; import * as UpdateStackRequest from "./update-stack-request"; diff --git a/lib/resourcemanager/lib/request/list-configuration-source-providers-request.ts b/lib/resourcemanager/lib/request/list-configuration-source-providers-request.ts new file mode 100644 index 0000000000..5314e95399 --- /dev/null +++ b/lib/resourcemanager/lib/request/list-configuration-source-providers-request.ts @@ -0,0 +1,74 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface ListConfigurationSourceProvidersRequest { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; + /** + * A filter to return only resources that exist in the compartment, identified by [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + */ + "compartmentId"?: string; + /** + * A filter to return only configuration source providers that match the provided [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + * + */ + "configurationSourceProviderId"?: string; + /** + * A filter to return only resources that match the specified display name. + * + */ + "displayName"?: string; + /** + * The field to use when sorting returned resources. + * By default, `TIMECREATED` is ordered descending. + * By default, `DISPLAYNAME` is ordered ascending. Note that you can sort only on one field. + * + */ + "sortBy"?: ListConfigurationSourceProvidersRequest.SortBy; + /** + * The sort order to use when sorting returned resources. Ascending (`ASC`) or descending (`DESC`). + * + */ + "sortOrder"?: ListConfigurationSourceProvidersRequest.SortOrder; + /** + * The number of items returned in a paginated `List` call. For information about pagination, see + * [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + "limit"?: number; + /** + * The value of the `opc-next-page` response header from the preceding `List` call. + * For information about pagination, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + "page"?: string; +} + +export namespace ListConfigurationSourceProvidersRequest { + export enum SortBy { + TIMECREATED = "TIMECREATED", + DISPLAYNAME = "DISPLAYNAME" + } + + export enum SortOrder { + ASC = "ASC", + DESC = "DESC" + } +} diff --git a/lib/resourcemanager/lib/request/list-stacks-request.ts b/lib/resourcemanager/lib/request/list-stacks-request.ts index 217619d1a4..abb073e8d3 100644 --- a/lib/resourcemanager/lib/request/list-stacks-request.ts +++ b/lib/resourcemanager/lib/request/list-stacks-request.ts @@ -33,7 +33,8 @@ export interface ListStacksRequest { /** * A filter that returns only those resources that match the specified * lifecycle state. The state value is case-insensitive. -* For more information about stack lifecycle states, see [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#StackStates). +* For more information about stack lifecycle states, see +* [Key Concepts](https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#StackStates). *

Allowable values: * - CREATING diff --git a/lib/resourcemanager/lib/request/update-configuration-source-provider-request.ts b/lib/resourcemanager/lib/request/update-configuration-source-provider-request.ts new file mode 100644 index 0000000000..c7aa447367 --- /dev/null +++ b/lib/resourcemanager/lib/request/update-configuration-source-provider-request.ts @@ -0,0 +1,40 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); +export interface UpdateConfigurationSourceProviderRequest { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the configuration source provider. + * + */ + "configurationSourceProviderId": string; + /** + * Updated information provided for the ConfigurationSourceProvider. + * + */ + "updateConfigurationSourceProviderDetails": model.UpdateGitlabAccessTokenConfigurationSourceProviderDetails; + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + */ + "opcRequestId"?: string; + /** + * 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. + * + */ + "ifMatch"?: string; +} diff --git a/lib/resourcemanager/lib/resourcemanager-waiter.ts b/lib/resourcemanager/lib/resourcemanager-waiter.ts index 5ff5d404b6..4739eb24bd 100644 --- a/lib/resourcemanager/lib/resourcemanager-waiter.ts +++ b/lib/resourcemanager/lib/resourcemanager-waiter.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -23,6 +27,24 @@ export class ResourceManagerWaiter { private readonly config?: WaiterConfiguration ) {} + /** + * Waits forConfigurationSourceProvider till it reaches any of the provided states + * + * @param request the request to send + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return response returns GetConfigurationSourceProviderResponse + */ + public async forConfigurationSourceProvider( + request: serviceRequests.GetConfigurationSourceProviderRequest, + ...targetStates: models.ConfigurationSourceProvider.LifecycleState[] + ): Promise { + return genericWaiter( + this.config, + () => this.client.getConfigurationSourceProvider(request), + response => targetStates.exists(response.configurationSourceProvider.lifecycleState) + ); + } + /** * Waits forJob till it reaches any of the provided states * diff --git a/lib/resourcemanager/lib/response/change-configuration-source-provider-compartment-response.ts b/lib/resourcemanager/lib/response/change-configuration-source-provider-compartment-response.ts new file mode 100644 index 0000000000..4368b0701c --- /dev/null +++ b/lib/resourcemanager/lib/response/change-configuration-source-provider-compartment-response.ts @@ -0,0 +1,22 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ChangeConfigurationSourceProviderCompartmentResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; +} diff --git a/lib/resourcemanager/lib/response/change-stack-compartment-response.ts b/lib/resourcemanager/lib/response/change-stack-compartment-response.ts index d8480d2d05..13062297dd 100644 --- a/lib/resourcemanager/lib/response/change-stack-compartment-response.ts +++ b/lib/resourcemanager/lib/response/change-stack-compartment-response.ts @@ -20,7 +20,7 @@ export interface ChangeStackCompartmentResponse { */ "opcRequestId": string; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. */ "opcWorkRequestId": string; } diff --git a/lib/resourcemanager/lib/response/create-configuration-source-provider-response.ts b/lib/resourcemanager/lib/response/create-configuration-source-provider-response.ts new file mode 100644 index 0000000000..6df044eecc --- /dev/null +++ b/lib/resourcemanager/lib/response/create-configuration-source-provider-response.ts @@ -0,0 +1,30 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface CreateConfigurationSourceProviderResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; + /** + * For optimistic concurrency control. See `if-match`. + */ + "etag": string; + /** + * The returned model.ConfigurationSourceProvider instance. + */ + "configurationSourceProvider": model.ConfigurationSourceProvider; +} diff --git a/lib/resourcemanager/lib/response/delete-configuration-source-provider-response.ts b/lib/resourcemanager/lib/response/delete-configuration-source-provider-response.ts new file mode 100644 index 0000000000..fa1b15ab6f --- /dev/null +++ b/lib/resourcemanager/lib/response/delete-configuration-source-provider-response.ts @@ -0,0 +1,22 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface DeleteConfigurationSourceProviderResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; +} diff --git a/lib/resourcemanager/lib/response/detect-stack-drift-response.ts b/lib/resourcemanager/lib/response/detect-stack-drift-response.ts index eb1f7a6f0c..2447447fcd 100644 --- a/lib/resourcemanager/lib/response/detect-stack-drift-response.ts +++ b/lib/resourcemanager/lib/response/detect-stack-drift-response.ts @@ -20,7 +20,7 @@ export interface DetectStackDriftResponse { */ "opcRequestId": string; /** - * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. */ "opcWorkRequestId": string; } diff --git a/lib/resourcemanager/lib/response/get-configuration-source-provider-response.ts b/lib/resourcemanager/lib/response/get-configuration-source-provider-response.ts new file mode 100644 index 0000000000..7cb4cfc6a1 --- /dev/null +++ b/lib/resourcemanager/lib/response/get-configuration-source-provider-response.ts @@ -0,0 +1,30 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface GetConfigurationSourceProviderResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; + /** + * For optimistic concurrency control. See `if-match`. + */ + "etag": string; + /** + * The returned model.ConfigurationSourceProvider instance. + */ + "configurationSourceProvider": model.ConfigurationSourceProvider; +} diff --git a/lib/resourcemanager/lib/response/index.ts b/lib/resourcemanager/lib/response/index.ts index eb45997a61..0c44833f1f 100644 --- a/lib/resourcemanager/lib/response/index.ts +++ b/lib/resourcemanager/lib/response/index.ts @@ -1,8 +1,12 @@ /** * Resource Manager API - * API for the Resource Manager service. Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. For more information, see [Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * API for the Resource Manager service. +Use this API to install, configure, and manage resources via the "infrastructure-as-code" model. +For more information, see +[Overview of Resource Manager](/iaas/Content/ResourceManager/Concepts/resourcemanager.htm). + * OpenAPI spec version: 20180917 - * + * * * NOTE: This class is auto generated by OracleSDKGenerator. * Do not edit the class manually. @@ -13,16 +17,24 @@ import * as CancelJobResponse from "./cancel-job-response"; export import CancelJobResponse = CancelJobResponse.CancelJobResponse; +import * as ChangeConfigurationSourceProviderCompartmentResponse from "./change-configuration-source-provider-compartment-response"; +export import ChangeConfigurationSourceProviderCompartmentResponse = ChangeConfigurationSourceProviderCompartmentResponse.ChangeConfigurationSourceProviderCompartmentResponse; import * as ChangeStackCompartmentResponse from "./change-stack-compartment-response"; export import ChangeStackCompartmentResponse = ChangeStackCompartmentResponse.ChangeStackCompartmentResponse; +import * as CreateConfigurationSourceProviderResponse from "./create-configuration-source-provider-response"; +export import CreateConfigurationSourceProviderResponse = CreateConfigurationSourceProviderResponse.CreateConfigurationSourceProviderResponse; import * as CreateJobResponse from "./create-job-response"; export import CreateJobResponse = CreateJobResponse.CreateJobResponse; import * as CreateStackResponse from "./create-stack-response"; export import CreateStackResponse = CreateStackResponse.CreateStackResponse; +import * as DeleteConfigurationSourceProviderResponse from "./delete-configuration-source-provider-response"; +export import DeleteConfigurationSourceProviderResponse = DeleteConfigurationSourceProviderResponse.DeleteConfigurationSourceProviderResponse; import * as DeleteStackResponse from "./delete-stack-response"; export import DeleteStackResponse = DeleteStackResponse.DeleteStackResponse; import * as DetectStackDriftResponse from "./detect-stack-drift-response"; export import DetectStackDriftResponse = DetectStackDriftResponse.DetectStackDriftResponse; +import * as GetConfigurationSourceProviderResponse from "./get-configuration-source-provider-response"; +export import GetConfigurationSourceProviderResponse = GetConfigurationSourceProviderResponse.GetConfigurationSourceProviderResponse; import * as GetJobResponse from "./get-job-response"; export import GetJobResponse = GetJobResponse.GetJobResponse; import * as GetJobLogsResponse from "./get-job-logs-response"; @@ -41,6 +53,8 @@ import * as GetStackTfStateResponse from "./get-stack-tf-state-response"; export import GetStackTfStateResponse = GetStackTfStateResponse.GetStackTfStateResponse; import * as GetWorkRequestResponse from "./get-work-request-response"; export import GetWorkRequestResponse = GetWorkRequestResponse.GetWorkRequestResponse; +import * as ListConfigurationSourceProvidersResponse from "./list-configuration-source-providers-response"; +export import ListConfigurationSourceProvidersResponse = ListConfigurationSourceProvidersResponse.ListConfigurationSourceProvidersResponse; import * as ListJobsResponse from "./list-jobs-response"; export import ListJobsResponse = ListJobsResponse.ListJobsResponse; import * as ListStackResourceDriftDetailsResponse from "./list-stack-resource-drift-details-response"; @@ -55,6 +69,8 @@ import * as ListWorkRequestLogsResponse from "./list-work-request-logs-response" export import ListWorkRequestLogsResponse = ListWorkRequestLogsResponse.ListWorkRequestLogsResponse; import * as ListWorkRequestsResponse from "./list-work-requests-response"; export import ListWorkRequestsResponse = ListWorkRequestsResponse.ListWorkRequestsResponse; +import * as UpdateConfigurationSourceProviderResponse from "./update-configuration-source-provider-response"; +export import UpdateConfigurationSourceProviderResponse = UpdateConfigurationSourceProviderResponse.UpdateConfigurationSourceProviderResponse; import * as UpdateJobResponse from "./update-job-response"; export import UpdateJobResponse = UpdateJobResponse.UpdateJobResponse; import * as UpdateStackResponse from "./update-stack-response"; diff --git a/lib/resourcemanager/lib/response/list-configuration-source-providers-response.ts b/lib/resourcemanager/lib/response/list-configuration-source-providers-response.ts new file mode 100644 index 0000000000..d9f17b7795 --- /dev/null +++ b/lib/resourcemanager/lib/response/list-configuration-source-providers-response.ts @@ -0,0 +1,36 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface ListConfigurationSourceProvidersResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; + /** + * Retrieves the next page of paginated list items. If the `opc-next-page` + * header appears in the response, additional pages of results remain. + * To receive the next page, include the header value in the `page` param. + * If the `opc-next-page` header does not appear in the response, there + * are no more list items to get. For more information about list pagination, + * see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + "opcNextPage": string; + /** + * The returned model.ConfigurationSourceProviderCollection instance. + */ + "configurationSourceProviderCollection": model.ConfigurationSourceProviderCollection; +} diff --git a/lib/resourcemanager/lib/response/update-configuration-source-provider-response.ts b/lib/resourcemanager/lib/response/update-configuration-source-provider-response.ts new file mode 100644 index 0000000000..e3862a7f26 --- /dev/null +++ b/lib/resourcemanager/lib/response/update-configuration-source-provider-response.ts @@ -0,0 +1,30 @@ +/** + * + * + * OpenAPI spec version: 20180917 + * + * + * NOTE: This class is auto generated by OracleSDKGenerator. + * Do not edit the class manually. + * + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ + +import * as model from "../model"; +import common = require("oci-common"); + +export interface UpdateConfigurationSourceProviderResponse { + /** + * Unique identifier for the request. + */ + "opcRequestId": string; + /** + * For optimistic concurrency control. See `if-match`. + */ + "etag": string; + /** + * The returned model.ConfigurationSourceProvider instance. + */ + "configurationSourceProvider": model.ConfigurationSourceProvider; +} diff --git a/lib/resourcemanager/package.json b/lib/resourcemanager/package.json index db1528501e..0bad7a478d 100644 --- a/lib/resourcemanager/package.json +++ b/lib/resourcemanager/package.json @@ -1,6 +1,6 @@ { "name": "oci-resourcemanager", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Resource manager Service", "repository": { "type": "git", diff --git a/lib/resourcesearch/package.json b/lib/resourcesearch/package.json index 2e2f6b9043..0a8446041c 100644 --- a/lib/resourcesearch/package.json +++ b/lib/resourcesearch/package.json @@ -1,6 +1,6 @@ { "name": "oci-resourcesearch", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for resource research Service", "repository": { "type": "git", diff --git a/lib/secrets/package.json b/lib/secrets/package.json index aa04b57618..1054b4934b 100644 --- a/lib/secrets/package.json +++ b/lib/secrets/package.json @@ -1,6 +1,6 @@ { "name": "oci-secrets", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Secrets Service", "repository": { "type": "git", diff --git a/lib/streaming/package.json b/lib/streaming/package.json index 8391ee420a..fdc0ae817a 100644 --- a/lib/streaming/package.json +++ b/lib/streaming/package.json @@ -1,6 +1,6 @@ { "name": "oci-streaming", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Streaming", "repository": { "type": "git", diff --git a/lib/usageapi/package.json b/lib/usageapi/package.json index ebba8703c8..ff6083793b 100644 --- a/lib/usageapi/package.json +++ b/lib/usageapi/package.json @@ -1,6 +1,6 @@ { "name": "oci-usageapi", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Usage Api Service", "repository": { "type": "git", diff --git a/lib/vault/package.json b/lib/vault/package.json index b0c9f110a1..82808f911f 100644 --- a/lib/vault/package.json +++ b/lib/vault/package.json @@ -1,6 +1,6 @@ { "name": "oci-vault", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for Vault Service", "repository": { "type": "git", diff --git a/lib/waas/package.json b/lib/waas/package.json index 06eb464b4e..e9a116cb09 100644 --- a/lib/waas/package.json +++ b/lib/waas/package.json @@ -1,6 +1,6 @@ { "name": "oci-waas", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for WAAS", "repository": { "type": "git", diff --git a/lib/workrequests/package.json b/lib/workrequests/package.json index 23cfb3190f..ea963d73e1 100644 --- a/lib/workrequests/package.json +++ b/lib/workrequests/package.json @@ -1,6 +1,6 @@ { "name": "oci-workrequests", - "version": "1.2.2", + "version": "1.2.3", "description": "OCI NodeJS client for WorkRequests", "repository": { "type": "git", diff --git a/package.json b/package.json index 7e10b22528..5ffc7b3aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oci-sdk", - "version": "1.2.2", + "version": "1.2.3", "author": { "name": "Oracle Cloud Infrastructure", "email": "" @@ -70,7 +70,8 @@ "oci-secrets": "file:lib/secrets", "oci-dataintegration": "file:lib/dataintegration", "oci-ocvp": "file:lib/ocvp", - "oci-usageapi": "file:lib/usageapi" + "oci-usageapi": "file:lib/usageapi", + "oci-blockchain": "file:lib/blockchain" }, "publishConfig": { "registry": "https://registry.npmjs.org" @@ -86,6 +87,7 @@ "devDependencies": { "@types/chai": "^4.1.7", "@types/isomorphic-fetch": "0.0.35", + "@types/jsonwebtoken": "^8.5.0", "@types/jssha": "^2.0.0", "@types/mocha": "^5.2.5", "@types/sshpk": "^1.10.3", @@ -98,6 +100,7 @@ "http-signature": "1.3.0", "husky": "^3.0.3", "isomorphic-fetch": "2.2.1", + "jsonwebtoken": "8.5.1", "jssha": "2.4.1", "karma": "^4.1.0", "karma-chai": "^0.1.0",