Skip to main content

objects

Creates, updates, deletes, gets or lists an objects resource.

Overview

Nameobjects
TypeResource
Idaws.clouddirectory.objects

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_objectinsertx-amz-data-partition, region, SchemaFacetsCreates an object in a Directory. Additionally attaches the object to a parent, if a parent reference and LinkName is specified. An object is simply a collection of Facet attributes. You can also use this API call to create a policy object, if the facet from which you create the object is a policy facet.
attach_objectupdatex-amz-data-partition, region, ParentReference, ChildReference, LinkNameAttaches an existing object to another object. An object can be accessed in two ways: Using the path Using ObjectIdentifier
detach_objectupdatex-amz-data-partition, region, ParentReference, LinkNameDetaches a given object from the parent object. The object that is to be detached from the parent is specified by the link name.
delete_objectdeletex-amz-data-partition, regionDeletes an object and its associated attributes. Only objects with no children and no parents can be deleted. The maximum number of attributes that can be deleted during an object deletion is 30. For more information, see Amazon Cloud Directory Limits.

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
regionstringAWS region (default: us-east-1)
x-amz-data-partitionstringThe Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.

INSERT examples

Creates an object in a Directory. Additionally attaches the object to a parent, if a parent reference and LinkName is specified. An object is simply a collection of Facet attributes. You can also use this API call to create a policy object, if the facet from which you create the object is a policy facet.

INSERT INTO aws.clouddirectory.objects (
SchemaFacets,
ObjectAttributeList,
ParentReference,
LinkName,
`x-amz-data-partition`,
region
)
SELECT
'{{ SchemaFacets }}' /* required */,
'{{ ObjectAttributeList }}',
'{{ ParentReference }}',
'{{ LinkName }}',
'{{ x-amz-data-partition }}',
'{{ region }}'
RETURNING
object_identifier
;

UPDATE examples

Attaches an existing object to another object. An object can be accessed in two ways: Using the path Using ObjectIdentifier

UPDATE aws.clouddirectory.objects
SET
ParentReference = '{{ ParentReference }}',
ChildReference = '{{ ChildReference }}',
LinkName = '{{ LinkName }}'
WHERE
`x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
AND ParentReference = '{{ ParentReference }}' --required
AND ChildReference = '{{ ChildReference }}' --required
AND LinkName = '{{ LinkName }}' --required
RETURNING
attached_object_identifier;

DELETE examples

Deletes an object and its associated attributes. Only objects with no children and no parents can be deleted. The maximum number of attributes that can be deleted during an object deletion is 30. For more information, see Amazon Cloud Directory Limits.

DELETE FROM aws.clouddirectory.objects
WHERE `x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
;