Skip to main content

namespace_metadatas

Creates, updates, deletes, gets or lists a namespace_metadatas resource.

Overview​

Namenamespace_metadatas
TypeResource
Idoci.object_storage.namespace_metadatas

Fields​

The following fields are returned by SELECT queries:

The default metadata.

NameDatatypeDescription
defaultS3CompartmentIdstringIf the field is set, specifies the default compartment assignment for the Amazon S3 Compatibility API.
defaultSwiftCompartmentIdstringIf the field is set, specifies the default compartment assignment for the Swift API.
namespacestringThe Object Storage namespace to which the metadata belongs.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnamespaceName, regionopc-client-request-idGets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and<br />defaultSwiftCompartmentId.<br /><br />Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are<br />not authorized, talk to an administrator. If you are an administrator who needs to write policies<br />to give users access, see<br />[Getting Started with Policies](/Content/Identity/Concepts/policygetstarted.htm).<br />
updateupdatenamespaceName, regionopc-client-request-idBy default, buckets created using the Amazon S3 Compatibility API or the Swift API are created in the root<br />compartment of the Oracle Cloud Infrastructure tenancy.<br /><br />You can change the default Swift/Amazon S3 compartmentId designation to a different compartmentId. All<br />subsequent bucket creations will use the new default compartment, but no previously created<br />buckets will be modified. A user must have OBJECTSTORAGE_NAMESPACE_UPDATE permission to make changes to the default<br />compartments for Amazon S3 and Swift.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namespaceNamestringThe Object Storage namespace used for the request.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
opc-client-request-idstringThe client request ID for tracing.

SELECT examples​

Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and<br />defaultSwiftCompartmentId.<br /><br />Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are<br />not authorized, talk to an administrator. If you are an administrator who needs to write policies<br />to give users access, see<br />[Getting Started with Policies](/Content/Identity/Concepts/policygetstarted.htm).<br />

SELECT
defaultS3CompartmentId,
defaultSwiftCompartmentId,
namespace
FROM oci.object_storage.namespace_metadatas
WHERE namespaceName = '{{ namespaceName }}' -- required
AND region = '{{ region }}' -- required
AND opc-client-request-id = '{{ opc-client-request-id }}'
;

UPDATE examples​

By default, buckets created using the Amazon S3 Compatibility API or the Swift API are created in the root<br />compartment of the Oracle Cloud Infrastructure tenancy.<br /><br />You can change the default Swift/Amazon S3 compartmentId designation to a different compartmentId. All<br />subsequent bucket creations will use the new default compartment, but no previously created<br />buckets will be modified. A user must have OBJECTSTORAGE_NAMESPACE_UPDATE permission to make changes to the default<br />compartments for Amazon S3 and Swift.<br />

UPDATE oci.object_storage.namespace_metadatas
SET
defaultS3CompartmentId = '{{ defaultS3CompartmentId }}',
defaultSwiftCompartmentId = '{{ defaultSwiftCompartmentId }}'
WHERE
namespaceName = '{{ namespaceName }}' --required
AND region = '{{ region }}' --required
AND opc-client-request-id = '{{ opc-client-request-id}}'
RETURNING
defaultS3CompartmentId,
defaultSwiftCompartmentId,
namespace;