namespace_metadatas
Creates, updates, deletes, gets or lists a namespace_metadatas resource.
Overview​
| Name | namespace_metadatas |
| Type | Resource |
| Id | oci.object_storage.namespace_metadatas |
Fields​
The following fields are returned by SELECT queries:
- get
The default metadata.
| Name | Datatype | Description |
|---|---|---|
defaultS3CompartmentId | string | If the field is set, specifies the default compartment assignment for the Amazon S3 Compatibility API. |
defaultSwiftCompartmentId | string | If the field is set, specifies the default compartment assignment for the Swift API. |
namespace | string | The Object Storage namespace to which the metadata belongs. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | namespaceName, region | opc-client-request-id | 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 /> |
update | update | namespaceName, region | opc-client-request-id | 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 /> |
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.
| Name | Datatype | Description |
|---|---|---|
namespaceName | string | The Object Storage namespace used for the request. |
region | string | OCI 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-id | string | The client request ID for tracing. |
SELECT examples​
- get
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​
- update
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;