object_attributes
Creates, updates, deletes, gets or lists an object_attributes resource.
Overview
| Name | object_attributes |
| Type | Resource |
| Id | aws.clouddirectory.object_attributes |
Fields
The following fields are returned by SELECT queries:
- get_object_attributes
- list_object_attributes
| Name | Datatype | Description |
|---|---|---|
attributes | array | The attributes that are associated with the object. |
| Name | Datatype | Description |
|---|---|---|
key | object | The key of the attribute. |
value | object | The value of the attribute. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_object_attributes | select | x-amz-data-partition, region | x-amz-consistency-level | Retrieves attributes within a facet that are associated with an object. |
list_object_attributes | select | x-amz-data-partition, region | x-amz-consistency-level | Lists all attributes that are associated with an object. |
update_object_attributes | update | x-amz-data-partition, region, ObjectReference, AttributeUpdates | Updates a given object's attributes. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
x-amz-data-partition | string | The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns. |
x-amz-consistency-level | string | Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object. |
SELECT examples
- get_object_attributes
- list_object_attributes
Retrieves attributes within a facet that are associated with an object.
SELECT
attributes
FROM aws.clouddirectory.object_attributes
WHERE `x-amz-data-partition` = '{{ x-amz-data-partition }}' -- required
AND region = '{{ region }}' -- required
AND `x-amz-consistency-level` = '{{ x-amz-consistency-level }}'
;
Lists all attributes that are associated with an object.
SELECT
key,
value
FROM aws.clouddirectory.object_attributes
WHERE `x-amz-data-partition` = '{{ x-amz-data-partition }}' -- required
AND region = '{{ region }}' -- required
AND `x-amz-consistency-level` = '{{ x-amz-consistency-level }}'
;
UPDATE examples
- update_object_attributes
Updates a given object's attributes.
UPDATE aws.clouddirectory.object_attributes
SET
ObjectReference = '{{ ObjectReference }}',
AttributeUpdates = '{{ AttributeUpdates }}'
WHERE
`x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
AND ObjectReference = '{{ ObjectReference }}' --required
AND AttributeUpdates = '{{ AttributeUpdates }}' --required
RETURNING
object_identifier;