CLI Reference for Oracle Cloud Infrastructure Compute Classic
Total Page:16
File Type:pdf, Size:1020Kb
Oracle® Cloud CLI Reference for Oracle Cloud Infrastructure Compute Classic E79010-09 May 2020 Oracle Cloud CLI Reference for Oracle Cloud Infrastructure Compute Classic, E79010-09 Copyright © 2017, 2020, Oracle and/or its affiliates. Primary Author: Sylaja Kannan Contributors: Kumar Dhanagopal, Anamika Mukherjee, Jeff Welsch, Patrick O’Brien, Andre Scholtz, Varsha Patil, Ponrajkumar Seenivasan, Sandeep Ramesh Kalekar, Yasha Jadwani This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or “commercial computer software documentation” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xiii Related Resources xiii Conventions xiii Part I Getting Started with Compute Classic CLI 1 Preparing to Use the CLI Before You Begin with Compute Classic 1-1 System Requirements and Supported Platforms 1-2 Installing the CLI 1-2 Quick Start 1-3 2 General Syntax of opc compute Commands Global Options 2-1 Service Options 2-5 General CLI Command Actions 2-6 Accessing Context-Sensitive Help at the Command Line 2-6 3 Environment Variables and Profile Files About Environment Variables 3-1 Setting Up Environment Variables and Files 3-3 4 Workflows for Typical Use Cases Adding a Machine Image 4-1 Creating Instances Using an Orchestration 4-2 Deleting and Re-creating Instances 4-3 Cloning an Instance 4-4 iii Setting Up Firewalls Around Instances 4-5 Opening Ports on Instances 4-5 Identifying the Security Rules Applicable to an Instance 4-6 Assigning a Fixed Public IP Address to an Instance 4-7 Finding Out the Public IP Address of an Instance 4-7 Removing the Public IP Address of an Instance 4-8 Providing Block Storage Capacity for an Instance 4-10 Increasing the Size of a Storage Volume 4-10 Part II Command Line Reference 5 Account account list 5-1 account discover 5-2 account get 5-2 6 Access Control List (ACL) acl add 6-1 acl list 6-2 acl get 6-3 acl update 6-3 acl delete 6-4 7 Authentication authentication add 7-1 refresh-token get 7-4 8 Backup backup add 8-1 backup list 8-2 backup get 8-3 backup delete 8-4 9 Backup Configuration backup-configuration add 9-1 backup-configuration list 9-3 iv backup-configuration get 9-5 backup-configuration update 9-6 backup-configuration delete 9-7 10 Image List image-list add 10-1 image-list list 10-2 image-list discover 10-3 image-list get 10-3 image-list update 10-4 image-list delete 10-5 11 Image List Entry image-list-entry add 11-1 image-list-entry get 11-2 image-list-entry delete 11-3 12 Instance Console instance-console get 12-1 13 Instance instance list 13-1 instance discover 13-2 instance get 13-2 instance update 13-3 instance delete 13-6 14 Instance Snapshot snapshot add 14-1 snapshot get 14-3 snapshot list 14-3 snapshot discover 14-4 snapshot delete 14-5 v 15 IP Address Association Used in IP Network ip-address-association add 15-1 ip-address-association list 15-2 ip-address-association get 15-2 ip-address-association update 15-3 ip-address-association delete 15-4 16 IP Address Prefix Set ip-address-prefix-set add 16-1 ip-address-prefix-set get 16-2 ip-address-prefix-set update 16-2 ip-address-prefix-set delete 16-3 ip-address-prefix-set list 16-3 17 IP Address Reservation for IP Network ip-address-reservation add 17-1 ip-address-reservation list 17-2 ip-address-reservation get 17-3 ip-address-reservation update 17-3 ip-address-reservation delete 17-4 18 IP Association ip-association add 18-1 ip-association list 18-2 ip-association discover 18-3 ip-association get 18-4 ip-association delete 18-5 19 IP Network ip-network add 19-1 ip-network list 19-2 ip-network get 19-2 ip-network update 19-3 ip-network delete 19-4 vi 20 IP Network Exchange ip-network-exchange add 20-1 ip-network-exchange list 20-2 ip-network-exchange get 20-2 ip-network-exchange delete 20-3 21 IP Reservation ip-reservation add 21-1 ip-reservation list 21-2 ip-reservation discover 21-2 ip-reservation get 21-3 ip-reservation update 21-4 ip-reservation delete 21-5 22 Launch Plan launch-plan add 22-1 23 Machine Image machine-image add 23-1 machine-image list 23-2 machine-image discover 23-3 machine-image get 23-3 machine-image delete 23-4 24 Orchestration orchestration add 24-1 orchestration list 24-6 orchestration discover 24-7 orchestration get 24-7 orchestration update 24-8 orchestration delete 24-11 25 Orchestration Object orchestration-object add 25-2 orchestration-object list 25-3 orchestration-object get 25-6 vii orchestration-object discover 25-7 orchestration-object update 25-7 orchestration-object delete 25-9 26 Orchestration v2 orchestration-v2 add 26-1 orchestration-v2 list 26-3 orchestration-v2 get 26-4 orchestration-v2 discover 26-5 orchestration-v2 update 26-6 orchestration-v2 delete 26-8 27 OSS Container oss-container add 27-1 oss-container list 27-2 oss-container get 27-3 oss-container discover 27-4 oss-container update 27-4 oss-container delete 27-5 28 Private Gateway private-gateway add 28-1 private-gateway list 28-2 private-gateway get 28-3 private-gateway discover 28-4 private-gateway update 28-4 private-gateway delete 28-5 29 Reboot Instance Request reboot-instance-request add 29-1 reboot-instance-request list 29-2 reboot-instance-request get 29-3 reboot-instance-request discover 29-3 reboot-instance-request delete 29-4 viii 30 Restore restore add 30-1 restore list 30-2 restore get 30-3 restore delete 30-4 31 Route route add 31-1 route list 31-2 route get 31-3 route update 31-3 route delete 31-4 32 Security Application sec-application add 32-1 sec-application list 32-2 sec-application get 32-3 sec-application discover 32-4 sec-application delete 32-5 33 Security Association sec-association add 33-1 sec-association list 33-2 sec-association discover 33-3 sec-association get 33-3 sec-association delete 33-4 34 Security IP List sec-ip-list add 34-1 sec-ip-list list 34-2 sec-ip-list discover 34-3 sec-ip-list get 34-3 sec-ip-list update 34-4 sec-ip-list delete 34-5 ix 35 Security List sec-list add 35-1 sec-list list 35-2 sec-list