Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-1067-23 Topic 6 Question 21 Discussion

Actual exam question for Oracle's 1Z0-1067-23 exam
Question #: 21
Topic #: 6
[All 1Z0-1067-23 Questions]

Scenario: 3 (Use the OCI CLI to Work with Object Storage from a Compute Instance)

Scenario Description: (Hands-On Performance Exam Certification)

Your company runs a web application in OCI that generates log files. You want to upload these files to OCI Object Storage to meet data retention requirements. Some files need to be retained indefinitely, whereas others can be deleted after 30 days. Use the OCI CLI to create bucket and upload the log directory and create a lifecycle policy rule to delete temporary files after 30 days.

Pre-Configuration:

To fulfill this requirement, you are provided with the following:

Access to an OCI tenancy, an assigned compartment, and OCI credentials

A compute instance with OCI CLI installed and a set of files in ~/dir_to_upload to use

Access to the OCI Console

Required IAM policies

Assumptions:

Perform the tasks by using the OCI CLI on the compute instance.

Use instance principal authentication for all CLI commands; the instance has been given the policies necessary.

Connect to the compute instance using Cloud Shell's private networking and the provided SSH key.

An SSH key pair has been provided to you for the compute instance.

Private Key https://objectstorage.us-ashburn-1.oraclecloud.com/n/tenancyname/b/PBT_Storage/o/PKey.key

Note: Throughout your exam, ensure to use assigned Compartment , User Name and Region.

Complete the following tasks in the provisioned OCI environment:

Task 1: Create a Bucket in Object Storage

Task 2: Upload a Directory's Contents to Object Storage

Task 3: Add a Lifecycle Policy to the Bucket

Show Suggested Answer Hide Answer
Suggested Answer: A

Task 1: Create a Bucket in Object Storage

Create a bucket named CloudOpsBucket_<user id> with the following properties:

Storage tier: Standard

Auto-tiering: Disabled

Object versioning: Enabled

Emit events: Disabled

Keys: Oracle-managed

Visibility: Private

Task 2: Upload a Directory's Contents to Object Storage

Upload the contents of the directory ~/dir_to_upload and its subdirectories to the bucket CloudOpsBucket

Task 3: Add a Lifecycle Policy to the Bucket

Create a lifecycle policy rule that deletes all files from ~/dir_to_upload/temp after 30 days

Task 1:Create a bucket in Object Storage

1. Open Cloud Shell in the console. UnderNetworkalong the top, selectEphemeral Private Network Setup.

2. Select the subnet of the compute instance.

3. SSH into the compute instance using the provided SSH key:

ssh -i /path/to/key opc@

4. In the compute instance, create the bucket with the following command (note that it's one long line):

oci os bucket create -c '<compartment_id>' --name 'CloudOpsBucket' --auth instance_principal --versioning 'Enabled'

Task 2:Upload a directory's contents to Object Storage

1. Upload the contents of the specified directory and subdirectories with the following command (note that it's one long line):

oci os object bulk-upload -bn 'CloudOpsBucket' --src-dir '~/dir_to_upload' --auth instance_principal

Task 3:Add a lifecycle policy to the bucket

1. Create a file named rule.json

2. Add the following content to rule.json:

{'items': [{'action': 'DELETE','is-enabled': true,'name': 'Delete-Rule','object-name-filter': {'exclusion-patterns': null,'inclusion-patterns': null,'inclusion-prefixes': ['temp/']},'target': 'objects','time-amount': 30,'time-unit': 'DAYS'}]}

3. Add the lifecycle policy rule with the following command:

oci os object-lifecycle-policy put -bn 'CloudOpsBucket' --from-json file://rule.json ---auth instance_principal

Top of Form


Contribute your Thoughts:

Lezlie
5 months ago
Alright, time to flex my CLI muscles! Uploading files and setting policies, no problem. I bet I can knock this out in no time.
upvoted 0 times
...
Rolande
5 months ago
Haha, 'OCI CLI' sounds like a weird medical condition. Anyway, this seems doable, as long as the instance has the right permissions set up.
upvoted 0 times
Ma
4 months ago
Definitely, as long as we follow the steps provided, we should be able to complete the tasks without any issues.
upvoted 0 times
...
Rozella
4 months ago
I agree, setting up the right permissions is key to making sure everything runs smoothly.
upvoted 0 times
...
Hana
4 months ago
Yeah, the OCI CLI can be a bit intimidating at first, but it's actually pretty powerful once you get the hang of it.
upvoted 0 times
...
...
Ma
5 months ago
I've practiced using the OCI CLI, so I'm ready for any challenges. Let's do our best in the exam!
upvoted 0 times
...
Rodney
5 months ago
Adding a Lifecycle Policy might be a bit tricky, but I think I can handle it with the OCI CLI.
upvoted 0 times
...
Melodie
5 months ago
I agree, it's a straightforward task. Uploading directory contents should be easy too.
upvoted 0 times
...
Naomi
5 months ago
Wait, we need to upload the files to Object Storage? I thought we just had to create the bucket and policy. This seems a bit more involved than I expected.
upvoted 0 times
...
Shannan
5 months ago
Looks good, I'll definitely give this a try. The step-by-step instructions seem clear and straightforward.
upvoted 0 times
Ailene
4 months ago
Jeanice: I'll upload the directory's contents next.
upvoted 0 times
...
Marguerita
4 months ago
Let's get started with creating the bucket.
upvoted 0 times
...
Jeanice
4 months ago
Yeah, the instructions are pretty clear.
upvoted 0 times
...
Nidia
4 months ago
Yeah, it looks pretty straightforward. Let's give it a shot!
upvoted 0 times
...
Anabel
4 months ago
I'm excited to try this out, the instructions are easy to follow.
upvoted 0 times
...
Belen
5 months ago
I'm excited to try this out!
upvoted 0 times
...
...
Ma
5 months ago
I feel confident about creating a bucket in Object Storage.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77