Assigning a Key to a Bucket
Assign a Vault master encryption key to a bucket. You can encrypt the data encryption keys that encrypt the objects in a bucket by using your own Vault master encryption key. By default, buckets are encrypted with keys managed by Oracle.
For more information, see Encrypting Data and Overview of Vault
Important
Buckets in a security zone can't use the default encryption key managed by Oracle. You must use your own Vault master encryption key.
Buckets in a security zone can't use the default encryption key managed by Oracle. You must use your own Vault master encryption key.
oci os bucket create --namespace <object_storage_namespace> --name <bucket_name> --compartment-id <target_compartment_id> --kms-key-id <target_key_id>
<target_key_id> is the ID of the key versions that contain the cryptographic material used to encrypt and decrypt data, protecting the data where the data is stored.
For example:
oci os bucket create --namespace MyNamespace --name MyKeyBucket --compartment-id ocid.compartment.oc1..exampleuniqueID --kms-key-id ocid1.key.region1.sea..exampleuniqueID { "data": { "approximate-count": null, "approximate-size": null, "auto-tiering": null, "compartment-id": "ocid.compartment.oc1..exampleuniqueID", "created-by": "ocid1.user.oc1..exampleuniqueID", "defined-tags": {}, "etag": "e7f29fdd-b5f5-42e5-a98b-80883f9f2f32", "freeform-tags": {}, "id": "ocid1.bucket.oc1..exampleuniqueID", "is-read-only": false, "kms-key-id": "ocid1.key.region1.sea..exampleuniqueID", "metadata": {}, "name": "MyKeyBucket", "namespace": "MyNamespace", "object-events-enabled": false, "object-lifecycle-policy-etag": null, "public-access-type": "NoPublicAccess" "replication-enabled": false, "storage-tier": "Standard", "time-created": "2020-06-29T23:00:35.490000+00:00", "versioning": "Disabled" }, "etag": "e7f29fdd-b5f5-42e5-a98b-80883f9f2f32" }
See Overview for more details.
This task is not available in the API.