objects
Creates, updates, deletes, gets or lists an objects resource.
Overview
| Name | objects |
| Type | Resource |
| Id | aws.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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_object | insert | x-amz-data-partition, region, SchemaFacets | 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. | |
attach_object | update | x-amz-data-partition, region, ParentReference, ChildReference, LinkName | Attaches an existing object to another object. An object can be accessed in two ways: Using the path Using ObjectIdentifier | |
detach_object | update | x-amz-data-partition, region, ParentReference, LinkName | Detaches a given object from the parent object. The object that is to be detached from the parent is specified by the link name. | |
delete_object | delete | x-amz-data-partition, region | 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. |
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. |
INSERT examples
- create_object
- Manifest
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
;
# Description fields are for documentation purposes
- name: objects
props:
- name: x-amz-data-partition
value: "{{ x-amz-data-partition }}"
description: Required parameter for the objects resource.
- name: region
value: "{{ region }}"
description: Required parameter for the objects resource.
- name: SchemaFacets
value:
- SchemaArn: "{{ SchemaArn }}"
FacetName: "{{ FacetName }}"
- name: ObjectAttributeList
value:
- Key:
SchemaArn: "{{ SchemaArn }}"
FacetName: "{{ FacetName }}"
Name: "{{ Name }}"
Value:
StringValue: "{{ StringValue }}"
BinaryValue: "{{ BinaryValue }}"
BooleanValue: {{ BooleanValue }}
NumberValue: "{{ NumberValue }}"
DatetimeValue: "{{ DatetimeValue }}"
- name: ParentReference
description: |
The reference that identifies an object.
value:
Selector: "{{ Selector }}"
- name: LinkName
value: "{{ LinkName }}"
UPDATE examples
- attach_object
- detach_object
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;
Detaches a given object from the parent object. The object that is to be detached from the parent is specified by the link name.
UPDATE aws.clouddirectory.objects
SET
ParentReference = '{{ ParentReference }}',
LinkName = '{{ LinkName }}'
WHERE
`x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
AND ParentReference = '{{ ParentReference }}' --required
AND LinkName = '{{ LinkName }}' --required
RETURNING
detached_object_identifier;
DELETE examples
- delete_object
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
;