CloudDirectory / Client / batch_write

batch_write#

CloudDirectory.Client.batch_write(**kwargs)#

Performs all the write operations in a batch. Either all the operations succeed or none.

See also: AWS API Documentation

Request Syntax

response = client.batch_write(
    DirectoryArn='string',
    Operations=[
        {
            'CreateObject': {
                'SchemaFacet': [
                    {
                        'SchemaArn': 'string',
                        'FacetName': 'string'
                    },
                ],
                'ObjectAttributeList': [
                    {
                        'Key': {
                            'SchemaArn': 'string',
                            'FacetName': 'string',
                            'Name': 'string'
                        },
                        'Value': {
                            'StringValue': 'string',
                            'BinaryValue': b'bytes',
                            'BooleanValue': True|False,
                            'NumberValue': 'string',
                            'DatetimeValue': datetime(2015, 1, 1)
                        }
                    },
                ],
                'ParentReference': {
                    'Selector': 'string'
                },
                'LinkName': 'string',
                'BatchReferenceName': 'string'
            },
            'AttachObject': {
                'ParentReference': {
                    'Selector': 'string'
                },
                'ChildReference': {
                    'Selector': 'string'
                },
                'LinkName': 'string'
            },
            'DetachObject': {
                'ParentReference': {
                    'Selector': 'string'
                },
                'LinkName': 'string',
                'BatchReferenceName': 'string'
            },
            'UpdateObjectAttributes': {
                'ObjectReference': {
                    'Selector': 'string'
                },
                'AttributeUpdates': [
                    {
                        'ObjectAttributeKey': {
                            'SchemaArn': 'string',
                            'FacetName': 'string',
                            'Name': 'string'
                        },
                        'ObjectAttributeAction': {
                            'ObjectAttributeActionType': 'CREATE_OR_UPDATE'|'DELETE',
                            'ObjectAttributeUpdateValue': {
                                'StringValue': 'string',
                                'BinaryValue': b'bytes',
                                'BooleanValue': True|False,
                                'NumberValue': 'string',
                                'DatetimeValue': datetime(2015, 1, 1)
                            }
                        }
                    },
                ]
            },
            'DeleteObject': {
                'ObjectReference': {
                    'Selector': 'string'
                }
            },
            'AddFacetToObject': {
                'SchemaFacet': {
                    'SchemaArn': 'string',
                    'FacetName': 'string'
                },
                'ObjectAttributeList': [
                    {
                        'Key': {
                            'SchemaArn': 'string',
                            'FacetName': 'string',
                            'Name': 'string'
                        },
                        'Value': {
                            'StringValue': 'string',
                            'BinaryValue': b'bytes',
                            'BooleanValue': True|False,
                            'NumberValue': 'string',
                            'DatetimeValue': datetime(2015, 1, 1)
                        }
                    },
                ],
                'ObjectReference': {
                    'Selector': 'string'
                }
            },
            'RemoveFacetFromObject': {
                'SchemaFacet': {
                    'SchemaArn': 'string',
                    'FacetName': 'string'
                },
                'ObjectReference': {
                    'Selector': 'string'
                }
            },
            'AttachPolicy': {
                'PolicyReference': {
                    'Selector': 'string'
                },
                'ObjectReference': {
                    'Selector': 'string'
                }
            },
            'DetachPolicy': {
                'PolicyReference': {
                    'Selector': 'string'
                },
                'ObjectReference': {
                    'Selector': 'string'
                }
            },
            'CreateIndex': {
                'OrderedIndexedAttributeList': [
                    {
                        'SchemaArn': 'string',
                        'FacetName': 'string',
                        'Name': 'string'
                    },
                ],
                'IsUnique': True|False,
                'ParentReference': {
                    'Selector': 'string'
                },
                'LinkName': 'string',
                'BatchReferenceName': 'string'
            },
            'AttachToIndex': {
                'IndexReference': {
                    'Selector': 'string'
                },
                'TargetReference': {
                    'Selector': 'string'
                }
            },
            'DetachFromIndex': {
                'IndexReference': {
                    'Selector': 'string'
                },
                'TargetReference': {
                    'Selector': 'string'
                }
            },
            'AttachTypedLink': {
                'SourceObjectReference': {
                    'Selector': 'string'
                },
                'TargetObjectReference': {
                    'Selector': 'string'
                },
                'TypedLinkFacet': {
                    'SchemaArn': 'string',
                    'TypedLinkName': 'string'
                },
                'Attributes': [
                    {
                        'AttributeName': 'string',
                        'Value': {
                            'StringValue': 'string',
                            'BinaryValue': b'bytes',
                            'BooleanValue': True|False,
                            'NumberValue': 'string',
                            'DatetimeValue': datetime(2015, 1, 1)
                        }
                    },
                ]
            },
            'DetachTypedLink': {
                'TypedLinkSpecifier': {
                    'TypedLinkFacet': {
                        'SchemaArn': 'string',
                        'TypedLinkName': 'string'
                    },
                    'SourceObjectReference': {
                        'Selector': 'string'
                    },
                    'TargetObjectReference': {
                        'Selector': 'string'
                    },
                    'IdentityAttributeValues': [
                        {
                            'AttributeName': 'string',
                            'Value': {
                                'StringValue': 'string',
                                'BinaryValue': b'bytes',
                                'BooleanValue': True|False,
                                'NumberValue': 'string',
                                'DatetimeValue': datetime(2015, 1, 1)
                            }
                        },
                    ]
                }
            },
            'UpdateLinkAttributes': {
                'TypedLinkSpecifier': {
                    'TypedLinkFacet': {
                        'SchemaArn': 'string',
                        'TypedLinkName': 'string'
                    },
                    'SourceObjectReference': {
                        'Selector': 'string'
                    },
                    'TargetObjectReference': {
                        'Selector': 'string'
                    },
                    'IdentityAttributeValues': [
                        {
                            'AttributeName': 'string',
                            'Value': {
                                'StringValue': 'string',
                                'BinaryValue': b'bytes',
                                'BooleanValue': True|False,
                                'NumberValue': 'string',
                                'DatetimeValue': datetime(2015, 1, 1)
                            }
                        },
                    ]
                },
                'AttributeUpdates': [
                    {
                        'AttributeKey': {
                            'SchemaArn': 'string',
                            'FacetName': 'string',
                            'Name': 'string'
                        },
                        'AttributeAction': {
                            'AttributeActionType': 'CREATE_OR_UPDATE'|'DELETE',
                            'AttributeUpdateValue': {
                                'StringValue': 'string',
                                'BinaryValue': b'bytes',
                                'BooleanValue': True|False,
                                'NumberValue': 'string',
                                'DatetimeValue': datetime(2015, 1, 1)
                            }
                        }
                    },
                ]
            }
        },
    ]
)
Parameters:
  • DirectoryArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) that is associated with the Directory. For more information, see arns.

  • Operations (list) –

    [REQUIRED]

    A list of operations that are part of the batch.

    • (dict) –

      Represents the output of a BatchWrite operation.

      • CreateObject (dict) –

        Creates an object.

        • SchemaFacet (list) – [REQUIRED]

          A list of FacetArns that will be associated with the object. For more information, see arns.

          • (dict) –

            A facet.

            • SchemaArn (string) –

              The ARN of the schema that contains the facet with no minor component. See arns and In-Place Schema Upgrade for a description of when to provide minor versions. If this value is set, FacetName must also be set.

            • FacetName (string) –

              The name of the facet. If this value is set, SchemaArn must also be set.

        • ObjectAttributeList (list) – [REQUIRED]

          An attribute map, which contains an attribute ARN as the key and attribute value as the map value.

          • (dict) –

            The combination of an attribute key and an attribute value.

            • Key (dict) – [REQUIRED]

              The key of the attribute.

              • SchemaArn (string) – [REQUIRED]

                The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.

              • FacetName (string) – [REQUIRED]

                The name of the facet that the attribute exists within.

              • Name (string) – [REQUIRED]

                The name of the attribute.

            • Value (dict) – [REQUIRED]

              The value of the attribute.

              • StringValue (string) –

                A string data value.

              • BinaryValue (bytes) –

                A binary data value.

              • BooleanValue (boolean) –

                A Boolean data value.

              • NumberValue (string) –

                A number data value.

              • DatetimeValue (datetime) –

                A date and time value.

        • ParentReference (dict) –

          If specified, the parent reference to which this object will be attached.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • LinkName (string) –

          The name of the link.

        • BatchReferenceName (string) –

          The batch reference name. See Transaction Support for more information.

      • AttachObject (dict) –

        Attaches an object to a Directory.

        • ParentReference (dict) – [REQUIRED]

          The parent object reference.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • ChildReference (dict) – [REQUIRED]

          The child object reference that is to be attached to the object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • LinkName (string) – [REQUIRED]

          The name of the link.

      • DetachObject (dict) –

        Detaches an object from a Directory.

        • ParentReference (dict) – [REQUIRED]

          Parent reference from which the object with the specified link name is detached.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • LinkName (string) – [REQUIRED]

          The name of the link.

        • BatchReferenceName (string) –

          The batch reference name. See Transaction Support for more information.

      • UpdateObjectAttributes (dict) –

        Updates a given object’s attributes.

        • ObjectReference (dict) – [REQUIRED]

          Reference that identifies the object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • AttributeUpdates (list) – [REQUIRED]

          Attributes update structure.

          • (dict) –

            Structure that contains attribute update information.

            • ObjectAttributeKey (dict) –

              The key of the attribute being updated.

              • SchemaArn (string) – [REQUIRED]

                The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.

              • FacetName (string) – [REQUIRED]

                The name of the facet that the attribute exists within.

              • Name (string) – [REQUIRED]

                The name of the attribute.

            • ObjectAttributeAction (dict) –

              The action to perform as part of the attribute update.

              • ObjectAttributeActionType (string) –

                A type that can be either Update or Delete.

              • ObjectAttributeUpdateValue (dict) –

                The value that you want to update to.

                • StringValue (string) –

                  A string data value.

                • BinaryValue (bytes) –

                  A binary data value.

                • BooleanValue (boolean) –

                  A Boolean data value.

                • NumberValue (string) –

                  A number data value.

                • DatetimeValue (datetime) –

                  A date and time value.

      • DeleteObject (dict) –

        Deletes an object in a Directory.

        • ObjectReference (dict) – [REQUIRED]

          The reference that identifies the object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • AddFacetToObject (dict) –

        A batch operation that adds a facet to an object.

        • SchemaFacet (dict) – [REQUIRED]

          Represents the facet being added to the object.

          • SchemaArn (string) –

            The ARN of the schema that contains the facet with no minor component. See arns and In-Place Schema Upgrade for a description of when to provide minor versions. If this value is set, FacetName must also be set.

          • FacetName (string) –

            The name of the facet. If this value is set, SchemaArn must also be set.

        • ObjectAttributeList (list) – [REQUIRED]

          The attributes to set on the object.

          • (dict) –

            The combination of an attribute key and an attribute value.

            • Key (dict) – [REQUIRED]

              The key of the attribute.

              • SchemaArn (string) – [REQUIRED]

                The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.

              • FacetName (string) – [REQUIRED]

                The name of the facet that the attribute exists within.

              • Name (string) – [REQUIRED]

                The name of the attribute.

            • Value (dict) – [REQUIRED]

              The value of the attribute.

              • StringValue (string) –

                A string data value.

              • BinaryValue (bytes) –

                A binary data value.

              • BooleanValue (boolean) –

                A Boolean data value.

              • NumberValue (string) –

                A number data value.

              • DatetimeValue (datetime) –

                A date and time value.

        • ObjectReference (dict) – [REQUIRED]

          A reference to the object being mutated.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • RemoveFacetFromObject (dict) –

        A batch operation that removes a facet from an object.

        • SchemaFacet (dict) – [REQUIRED]

          The facet to remove from the object.

          • SchemaArn (string) –

            The ARN of the schema that contains the facet with no minor component. See arns and In-Place Schema Upgrade for a description of when to provide minor versions. If this value is set, FacetName must also be set.

          • FacetName (string) –

            The name of the facet. If this value is set, SchemaArn must also be set.

        • ObjectReference (dict) – [REQUIRED]

          A reference to the object whose facet will be removed.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • AttachPolicy (dict) –

        Attaches a policy object to a regular object. An object can have a limited number of attached policies.

        • PolicyReference (dict) – [REQUIRED]

          The reference that is associated with the policy object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • ObjectReference (dict) – [REQUIRED]

          The reference that identifies the object to which the policy will be attached.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • DetachPolicy (dict) –

        Detaches a policy from a Directory.

        • PolicyReference (dict) – [REQUIRED]

          Reference that identifies the policy object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • ObjectReference (dict) – [REQUIRED]

          Reference that identifies the object whose policy object will be detached.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • CreateIndex (dict) –

        Creates an index object. See Indexing and search for more information.

        • OrderedIndexedAttributeList (list) – [REQUIRED]

          Specifies the attributes that should be indexed on. Currently only a single attribute is supported.

          • (dict) –

            A unique identifier for an attribute.

            • SchemaArn (string) – [REQUIRED]

              The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.

            • FacetName (string) – [REQUIRED]

              The name of the facet that the attribute exists within.

            • Name (string) – [REQUIRED]

              The name of the attribute.

        • IsUnique (boolean) – [REQUIRED]

          Indicates whether the attribute that is being indexed has unique values or not.

        • ParentReference (dict) –

          A reference to the parent object that contains the index object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • LinkName (string) –

          The name of the link between the parent object and the index object.

        • BatchReferenceName (string) –

          The batch reference name. See Transaction Support for more information.

      • AttachToIndex (dict) –

        Attaches the specified object to the specified index.

        • IndexReference (dict) – [REQUIRED]

          A reference to the index that you are attaching the object to.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • TargetReference (dict) – [REQUIRED]

          A reference to the object that you are attaching to the index.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • DetachFromIndex (dict) –

        Detaches the specified object from the specified index.

        • IndexReference (dict) – [REQUIRED]

          A reference to the index object.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • TargetReference (dict) – [REQUIRED]

          A reference to the object being detached from the index.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

      • AttachTypedLink (dict) –

        Attaches a typed link to a specified source and target object. For more information, see Typed Links.

        • SourceObjectReference (dict) – [REQUIRED]

          Identifies the source object that the typed link will attach to.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • TargetObjectReference (dict) – [REQUIRED]

          Identifies the target object that the typed link will attach to.

          • Selector (string) –

            A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

            • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

            • /some/path - Identifies the object based on path

            • #SomeBatchReference - Identifies the object in a batch call

        • TypedLinkFacet (dict) – [REQUIRED]

          Identifies the typed link facet that is associated with the typed link.

          • SchemaArn (string) – [REQUIRED]

            The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

          • TypedLinkName (string) – [REQUIRED]

            The unique name of the typed link facet.

        • Attributes (list) – [REQUIRED]

          A set of attributes that are associated with the typed link.

          • (dict) –

            Identifies the attribute name and value for a typed link.

            • AttributeName (string) – [REQUIRED]

              The attribute name of the typed link.

            • Value (dict) – [REQUIRED]

              The value for the typed link.

              • StringValue (string) –

                A string data value.

              • BinaryValue (bytes) –

                A binary data value.

              • BooleanValue (boolean) –

                A Boolean data value.

              • NumberValue (string) –

                A number data value.

              • DatetimeValue (datetime) –

                A date and time value.

      • DetachTypedLink (dict) –

        Detaches a typed link from a specified source and target object. For more information, see Typed Links.

        • TypedLinkSpecifier (dict) – [REQUIRED]

          Used to accept a typed link specifier as input.

          • TypedLinkFacet (dict) – [REQUIRED]

            Identifies the typed link facet that is associated with the typed link.

            • SchemaArn (string) – [REQUIRED]

              The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

            • TypedLinkName (string) – [REQUIRED]

              The unique name of the typed link facet.

          • SourceObjectReference (dict) – [REQUIRED]

            Identifies the source object that the typed link will attach to.

            • Selector (string) –

              A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

              • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

              • /some/path - Identifies the object based on path

              • #SomeBatchReference - Identifies the object in a batch call

          • TargetObjectReference (dict) – [REQUIRED]

            Identifies the target object that the typed link will attach to.

            • Selector (string) –

              A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

              • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

              • /some/path - Identifies the object based on path

              • #SomeBatchReference - Identifies the object in a batch call

          • IdentityAttributeValues (list) – [REQUIRED]

            Identifies the attribute value to update.

            • (dict) –

              Identifies the attribute name and value for a typed link.

              • AttributeName (string) – [REQUIRED]

                The attribute name of the typed link.

              • Value (dict) – [REQUIRED]

                The value for the typed link.

                • StringValue (string) –

                  A string data value.

                • BinaryValue (bytes) –

                  A binary data value.

                • BooleanValue (boolean) –

                  A Boolean data value.

                • NumberValue (string) –

                  A number data value.

                • DatetimeValue (datetime) –

                  A date and time value.

      • UpdateLinkAttributes (dict) –

        Updates a given object’s attributes.

        • TypedLinkSpecifier (dict) – [REQUIRED]

          Allows a typed link specifier to be accepted as input.

          • TypedLinkFacet (dict) – [REQUIRED]

            Identifies the typed link facet that is associated with the typed link.

            • SchemaArn (string) – [REQUIRED]

              The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

            • TypedLinkName (string) – [REQUIRED]

              The unique name of the typed link facet.

          • SourceObjectReference (dict) – [REQUIRED]

            Identifies the source object that the typed link will attach to.

            • Selector (string) –

              A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

              • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

              • /some/path - Identifies the object based on path

              • #SomeBatchReference - Identifies the object in a batch call

          • TargetObjectReference (dict) – [REQUIRED]

            Identifies the target object that the typed link will attach to.

            • Selector (string) –

              A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

              • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

              • /some/path - Identifies the object based on path

              • #SomeBatchReference - Identifies the object in a batch call

          • IdentityAttributeValues (list) – [REQUIRED]

            Identifies the attribute value to update.

            • (dict) –

              Identifies the attribute name and value for a typed link.

              • AttributeName (string) – [REQUIRED]

                The attribute name of the typed link.

              • Value (dict) – [REQUIRED]

                The value for the typed link.

                • StringValue (string) –

                  A string data value.

                • BinaryValue (bytes) –

                  A binary data value.

                • BooleanValue (boolean) –

                  A Boolean data value.

                • NumberValue (string) –

                  A number data value.

                • DatetimeValue (datetime) –

                  A date and time value.

        • AttributeUpdates (list) – [REQUIRED]

          The attributes update structure.

          • (dict) –

            Structure that contains attribute update information.

            • AttributeKey (dict) –

              The key of the attribute being updated.

              • SchemaArn (string) – [REQUIRED]

                The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.

              • FacetName (string) – [REQUIRED]

                The name of the facet that the attribute exists within.

              • Name (string) – [REQUIRED]

                The name of the attribute.

            • AttributeAction (dict) –

              The action to perform as part of the attribute update.

              • AttributeActionType (string) –

                A type that can be either UPDATE_OR_CREATE or DELETE.

              • AttributeUpdateValue (dict) –

                The value that you want to update to.

                • StringValue (string) –

                  A string data value.

                • BinaryValue (bytes) –

                  A binary data value.

                • BooleanValue (boolean) –

                  A Boolean data value.

                • NumberValue (string) –

                  A number data value.

                • DatetimeValue (datetime) –

                  A date and time value.

Return type:

dict

Returns:

Response Syntax

{
    'Responses': [
        {
            'CreateObject': {
                'ObjectIdentifier': 'string'
            },
            'AttachObject': {
                'attachedObjectIdentifier': 'string'
            },
            'DetachObject': {
                'detachedObjectIdentifier': 'string'
            },
            'UpdateObjectAttributes': {
                'ObjectIdentifier': 'string'
            },
            'DeleteObject': {},
            'AddFacetToObject': {},
            'RemoveFacetFromObject': {},
            'AttachPolicy': {},
            'DetachPolicy': {},
            'CreateIndex': {
                'ObjectIdentifier': 'string'
            },
            'AttachToIndex': {
                'AttachedObjectIdentifier': 'string'
            },
            'DetachFromIndex': {
                'DetachedObjectIdentifier': 'string'
            },
            'AttachTypedLink': {
                'TypedLinkSpecifier': {
                    'TypedLinkFacet': {
                        'SchemaArn': 'string',
                        'TypedLinkName': 'string'
                    },
                    'SourceObjectReference': {
                        'Selector': 'string'
                    },
                    'TargetObjectReference': {
                        'Selector': 'string'
                    },
                    'IdentityAttributeValues': [
                        {
                            'AttributeName': 'string',
                            'Value': {
                                'StringValue': 'string',
                                'BinaryValue': b'bytes',
                                'BooleanValue': True|False,
                                'NumberValue': 'string',
                                'DatetimeValue': datetime(2015, 1, 1)
                            }
                        },
                    ]
                }
            },
            'DetachTypedLink': {},
            'UpdateLinkAttributes': {}
        },
    ]
}

Response Structure

  • (dict) –

    • Responses (list) –

      A list of all the responses for each batch write.

      • (dict) –

        Represents the output of a BatchWrite response operation.

        • CreateObject (dict) –

          Creates an object in a Directory.

          • ObjectIdentifier (string) –

            The ID that is associated with the object.

        • AttachObject (dict) –

          Attaches an object to a Directory.

          • attachedObjectIdentifier (string) –

            The ObjectIdentifier of the object that has been attached.

        • DetachObject (dict) –

          Detaches an object from a Directory.

          • detachedObjectIdentifier (string) –

            The ObjectIdentifier of the detached object.

        • UpdateObjectAttributes (dict) –

          Updates a given object’s attributes.

          • ObjectIdentifier (string) –

            ID that is associated with the object.

        • DeleteObject (dict) –

          Deletes an object in a Directory.

        • AddFacetToObject (dict) –

          The result of an add facet to object batch operation.

        • RemoveFacetFromObject (dict) –

          The result of a batch remove facet from object operation.

        • AttachPolicy (dict) –

          Attaches a policy object to a regular object. An object can have a limited number of attached policies.

        • DetachPolicy (dict) –

          Detaches a policy from a Directory.

        • CreateIndex (dict) –

          Creates an index object. See Indexing and search for more information.

          • ObjectIdentifier (string) –

            The ObjectIdentifier of the index created by this operation.

        • AttachToIndex (dict) –

          Attaches the specified object to the specified index.

          • AttachedObjectIdentifier (string) –

            The ObjectIdentifier of the object that was attached to the index.

        • DetachFromIndex (dict) –

          Detaches the specified object from the specified index.

          • DetachedObjectIdentifier (string) –

            The ObjectIdentifier of the object that was detached from the index.

        • AttachTypedLink (dict) –

          Attaches a typed link to a specified source and target object. For more information, see Typed Links.

          • TypedLinkSpecifier (dict) –

            Returns a typed link specifier as output.

            • TypedLinkFacet (dict) –

              Identifies the typed link facet that is associated with the typed link.

              • SchemaArn (string) –

                The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

              • TypedLinkName (string) –

                The unique name of the typed link facet.

            • SourceObjectReference (dict) –

              Identifies the source object that the typed link will attach to.

              • Selector (string) –

                A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

                • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

                • /some/path - Identifies the object based on path

                • #SomeBatchReference - Identifies the object in a batch call

            • TargetObjectReference (dict) –

              Identifies the target object that the typed link will attach to.

              • Selector (string) –

                A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

                • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

                • /some/path - Identifies the object based on path

                • #SomeBatchReference - Identifies the object in a batch call

            • IdentityAttributeValues (list) –

              Identifies the attribute value to update.

              • (dict) –

                Identifies the attribute name and value for a typed link.

                • AttributeName (string) –

                  The attribute name of the typed link.

                • Value (dict) –

                  The value for the typed link.

                  • StringValue (string) –

                    A string data value.

                  • BinaryValue (bytes) –

                    A binary data value.

                  • BooleanValue (boolean) –

                    A Boolean data value.

                  • NumberValue (string) –

                    A number data value.

                  • DatetimeValue (datetime) –

                    A date and time value.

        • DetachTypedLink (dict) –

          Detaches a typed link from a specified source and target object. For more information, see Typed Links.

        • UpdateLinkAttributes (dict) –

          Represents the output of a BatchWrite response operation.

Exceptions