1
00:00:00,120 --> 00:00:06,180
In this video, we are going to delete bucket with using the Oculus SDK package.

2
00:00:06,300 --> 00:00:12,390
In order to do that, please open the Visual Studio code and create a new JavaScript file under our

3
00:00:12,390 --> 00:00:15,420
lecture, which is the delete bucket.

4
00:00:16,150 --> 00:00:22,090
But just so we will follow the same steps when creating a pocket for that purpose, I'm going to copy

5
00:00:22,090 --> 00:00:26,020
all commands from the create bucket and paste into the right pocket.

6
00:00:26,020 --> 00:00:27,970
So what we will change.

7
00:00:27,970 --> 00:00:31,270
So basically we will use the rate bucket command.

8
00:00:31,270 --> 00:00:34,360
So that's why I'm going to use the bucket command in here.

9
00:00:34,480 --> 00:00:38,470
And if you import the required the bucket command in here.

10
00:00:38,860 --> 00:00:42,370
So basically the only change is the command.

11
00:00:42,460 --> 00:00:45,520
We will use the bucket command with passing the parameters.

12
00:00:45,520 --> 00:00:50,980
If you check the parameters for the bucket command, you can see that the only required parameter is

13
00:00:50,980 --> 00:00:51,550
bucket name.

14
00:00:51,550 --> 00:00:54,040
So I'm not going to change parameters as well.

15
00:00:54,040 --> 00:00:56,830
So that's all for our operation.

16
00:00:56,830 --> 00:01:02,110
So only the location is not returning one deleting this command.

17
00:01:02,110 --> 00:01:05,950
So that's why I'm changing the data for response object.

18
00:01:05,950 --> 00:01:07,090
And that's it.

19
00:01:07,090 --> 00:01:14,620
I think we can run our delete bucket command for that purpose, go to the required folder structures

20
00:01:15,340 --> 00:01:22,570
and now we are going to run node command which passing to delete bucket as it enter.

21
00:01:23,240 --> 00:01:25,780
So as you can see that we got an exemption.

22
00:01:25,790 --> 00:01:29,120
So the exemption that is bucket not empty.

23
00:01:29,120 --> 00:01:36,380
If you scroll up, you can see the message from the A yes error bucket, not the bucket you try to delete

24
00:01:36,380 --> 00:01:37,460
is not empty.

25
00:01:37,460 --> 00:01:41,360
So that means before deleting any bucket, we should empty our workload.

26
00:01:41,360 --> 00:01:48,710
In order to do that, I'm going to open a management console and see that we have uploaded index HTML

27
00:01:48,710 --> 00:01:50,180
file in the last video.

28
00:01:50,210 --> 00:01:57,710
For that purpose, we should empty the bucket objects first before deleting this bucket.

29
00:01:57,710 --> 00:02:04,640
So select this bucket and click the empty button and I'm going to mutilate the object inside of this

30
00:02:04,640 --> 00:02:05,240
bucket.

31
00:02:05,240 --> 00:02:06,860
We can perform this action also.

32
00:02:07,100 --> 00:02:12,500
Okay, but this time I'm going to use a management console and go to bucket.

33
00:02:12,530 --> 00:02:15,290
Now, see that we don't have an object.

34
00:02:15,290 --> 00:02:20,570
So now we will delete this bucket with using the our Node.js application.

35
00:02:20,570 --> 00:02:25,520
I'm going to run the same command again, not delete bucket hit enter.

36
00:02:25,730 --> 00:02:33,950
So this time we have successful delete or bucket and this is the HTTP status code, it's starting it

37
00:02:33,950 --> 00:02:34,730
to 100.

38
00:02:34,730 --> 00:02:43,100
So if you go back to a console and refresh these buckets, you will see that this bucket will be deleted.

39
00:02:43,310 --> 00:02:43,940
Yes.

40
00:02:43,940 --> 00:02:50,330
As you can see that we have successfully delete our bucket and we perform these command operations.

41
00:02:50,330 --> 00:02:56,810
You can continue to see other commands to perform and interact with Amazon S3, but we will finish this

42
00:02:56,810 --> 00:03:00,440
section and continue with the Amazon S3 hands on lobs.
