Context / Client / create_change_set
create_change_set¶
- Context.Client.create_change_set(**kwargs)¶
Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of
put,update, ordelete.See also: AWS API Documentation
Request Syntax
response = client.create_change_set( clientToken='string', accessControlConfig={ 'accessControlList': [ { 'access': 'ALLOW'|'DENY', 'principalId': 'string', 'principalType': 'USER'|'GROUP' }, ] }, agentContextId='string', operations=[ { 'put': { 'entity': { 'nodeId': 'string', 'edgeId': { 'from': 'string', 'to': 'string' } }, 'properties': { 'string': { 'stringValue': 'string', 'intValue': 123, 'longValue': 123, 'boolValue': True|False, 'floatValue': ..., 'doubleValue': 123.0, 'stringListValue': [ 'string', ], 'intListValue': [ 123, ], 'longListValue': [ 123, ], 'floatListValue': [ ..., ], 'doubleListValue': [ 123.0, ], 'boolListValue': [ True|False, ] } } }, 'update': { 'entity': { 'nodeId': 'string', 'edgeId': { 'from': 'string', 'to': 'string' } }, 'properties': { 'string': { 'stringValue': 'string', 'intValue': 123, 'longValue': 123, 'boolValue': True|False, 'floatValue': ..., 'doubleValue': 123.0, 'stringListValue': [ 'string', ], 'intListValue': [ 123, ], 'longListValue': [ 123, ], 'floatListValue': [ ..., ], 'doubleListValue': [ 123.0, ], 'boolListValue': [ True|False, ] } } }, 'delete': { 'entity': { 'nodeId': 'string', 'edgeId': { 'from': 'string', 'to': 'string' } }, 'properties': { 'string': { 'stringValue': 'string', 'intValue': 123, 'longValue': 123, 'boolValue': True|False, 'floatValue': ..., 'doubleValue': 123.0, 'stringListValue': [ 'string', ], 'intListValue': [ 123, ], 'longListValue': [ 123, ], 'floatListValue': [ ..., ], 'doubleListValue': [ 123.0, ], 'boolListValue': [ True|False, ] } } } }, ] )
- Parameters:
clientToken (string) –
A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.
This field is autopopulated if not provided.
accessControlConfig (dict) –
Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty
accessControlListlets nobody read them.accessControlList (list) –
Entries, each allowing or denying one principal.
(dict) –
Allows or denies one end user or group, or every reader (
*).access (string) – [REQUIRED]
Specifies whether the principal can see the information.
Valid values:
ALLOW- Access is allowed.DENY- Access is denied.
principalId (string) – [REQUIRED]
The principal’s opaque user or group ID, or
*for every reader authorized on the resource.principalType (string) –
Specifies whether
principalIdnames a user or a group. Required unlessprincipalIdis*, where it is ignored.Valid values:
USER- An end user.GROUP- A group of end users.
agentContextId (string) –
[REQUIRED]
The agent context to change, by its ID or ARN.
operations (list) –
[REQUIRED]
The operations to write, each a
ChangeSetOperation, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails withValidationException.(dict) –
One operation of a change set. Exactly one member is set.
CreateChangeSettakes it as the operation to write,ListChangeSetOperationsreturns it, andUpdateChangeSettakes it to name an operation to remove. Operation values are customer content. A member set beside an unknown one is used and the unknown one is ignored, as anauthorizationmember is ignored. An item with no member set, or two, is refused withValidationException. A client built from an older model receives a member it does not know as an unknown member.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
put,update,delete.put (dict) –
Writes a node or edge in full. Creates it if it does not exist.
entity (dict) –
Names the edge to write in
entity.edgeId. Required for an edge. Omit it to write a node: a node’s ID comes from its properties, so AWS Context ignoresentity.nodeId.ListChangeSetOperationsreturns a node put’sentity.nodeIdas a placeholder of the form~operations/<index>, which isn’t the node’s ID in the agent context.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
nodeId,edgeId.nodeId (string) –
The ID of the node. For an ontology schema node, use its
iri:reference, which every write accepts.edgeId (dict) –
The edge, identified by the IDs of its start and end nodes. The edge type is in
properties.edgeType.from (string) – [REQUIRED]
The ID of the node where the edge starts.
to (string) – [REQUIRED]
The ID of the node where the edge ends.
properties (dict) – [REQUIRED]
Up to 50 properties.
{}when there are none. A node requiresnodeType. An edge requiresedgeType.ListChangeSetOperationsreturns the operation’s properties as stored, plusedgeTypeon an edge and the recordednodeType/nodeNameon a node (a writtennodeType, or a name undernodeName,name,titleordisplayName, wins), in key order after those. AWS Context doesn’t list stored keys that aren’t customer content (aws:*,~*, and an edge’s identity keys), or a property cut by the 50-entry cap.UpdateChangeSetcannot remove such an item.(string) –
(dict) –
The value of a property on a node or an edge in an agent context. Exactly one member is set, and the member that is set determines the value’s type.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue,intValue,longValue,boolValue,floatValue,doubleValue,stringListValue,intListValue,longListValue,floatListValue,doubleListValue,boolListValue.stringValue (string) –
A string value, up to 2,048 characters.
intValue (integer) –
A 32-bit signed integer value.
longValue (integer) –
A 64-bit signed integer value.
boolValue (boolean) –
A Boolean value.
floatValue (float) –
A single-precision (32-bit) floating-point value.
doubleValue (float) –
A double-precision (64-bit) floating-point value.
stringListValue (list) –
A list of up to 1,000 string values, each up to 2,048 characters.
(string) –
intListValue (list) –
A list of up to 1,000 32-bit signed integer values.
(integer) –
longListValue (list) –
A list of up to 1,000 64-bit signed integer values.
(integer) –
floatListValue (list) –
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) –
doubleListValue (list) –
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) –
boolListValue (list) –
A list of up to 1,000 Boolean values.
(boolean) –
update (dict) –
Changes the properties of a node or edge. Like
put, it creates a node that doesn’t exist, and every reader of the agent context can read the node unless the request specifiesaccessControlConfig.entity (dict) – [REQUIRED]
The node or edge to change. A node’s ID is built from its
nodeTypeand identity properties, soentity.nodeIdis a placeholder that must differ for each node in one write.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
nodeId,edgeId.nodeId (string) –
The ID of the node. For an ontology schema node, use its
iri:reference, which every write accepts.edgeId (dict) –
The edge, identified by the IDs of its start and end nodes. The edge type is in
properties.edgeType.from (string) – [REQUIRED]
The ID of the node where the edge starts.
to (string) – [REQUIRED]
The ID of the node where the edge ends.
properties (dict) – [REQUIRED]
The properties to set, up to 50.
{}when there are none.ListChangeSetOperationslists them as it lists those ofPutOperation.(string) –
(dict) –
The value of a property on a node or an edge in an agent context. Exactly one member is set, and the member that is set determines the value’s type.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue,intValue,longValue,boolValue,floatValue,doubleValue,stringListValue,intListValue,longListValue,floatListValue,doubleListValue,boolListValue.stringValue (string) –
A string value, up to 2,048 characters.
intValue (integer) –
A 32-bit signed integer value.
longValue (integer) –
A 64-bit signed integer value.
boolValue (boolean) –
A Boolean value.
floatValue (float) –
A single-precision (32-bit) floating-point value.
doubleValue (float) –
A double-precision (64-bit) floating-point value.
stringListValue (list) –
A list of up to 1,000 string values, each up to 2,048 characters.
(string) –
intListValue (list) –
A list of up to 1,000 32-bit signed integer values.
(integer) –
longListValue (list) –
A list of up to 1,000 64-bit signed integer values.
(integer) –
floatListValue (list) –
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) –
doubleListValue (list) –
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) –
boolListValue (list) –
A list of up to 1,000 Boolean values.
(boolean) –
delete (dict) –
Removes a node or edge. A deleted node takes its unowned edges.
entity (dict) – [REQUIRED]
The node or edge to remove.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
nodeId,edgeId.nodeId (string) –
The ID of the node. For an ontology schema node, use its
iri:reference, which every write accepts.edgeId (dict) –
The edge, identified by the IDs of its start and end nodes. The edge type is in
properties.edgeType.from (string) – [REQUIRED]
The ID of the node where the edge starts.
to (string) – [REQUIRED]
The ID of the node where the edge ends.
properties (dict) –
An edge delete requires
edgeType, which with the two node IDs names the edge. A node delete ignorespropertieson input, so a listed delete can be sent back. A property value over theMetadatainput limit (a long list property of the deleted node) is refused before it is ignored.ListChangeSetOperationsreturns the properties the entity had when the change was made: a node’snodeTypeandnodeName, an edge’sedgeType.(string) –
(dict) –
The value of a property on a node or an edge in an agent context. Exactly one member is set, and the member that is set determines the value’s type.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue,intValue,longValue,boolValue,floatValue,doubleValue,stringListValue,intListValue,longListValue,floatListValue,doubleListValue,boolListValue.stringValue (string) –
A string value, up to 2,048 characters.
intValue (integer) –
A 32-bit signed integer value.
longValue (integer) –
A 64-bit signed integer value.
boolValue (boolean) –
A Boolean value.
floatValue (float) –
A single-precision (32-bit) floating-point value.
doubleValue (float) –
A double-precision (64-bit) floating-point value.
stringListValue (list) –
A list of up to 1,000 string values, each up to 2,048 characters.
(string) –
intListValue (list) –
A list of up to 1,000 32-bit signed integer values.
(integer) –
longListValue (list) –
A list of up to 1,000 64-bit signed integer values.
(integer) –
floatListValue (list) –
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) –
doubleListValue (list) –
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) –
boolListValue (list) –
A list of up to 1,000 Boolean values.
(boolean) –
- Return type:
dict
- Returns:
Response Syntax
{ 'status': 'DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED', 'accessControl': 'ACL_RESTRICTED'|'NO_ACL', 'id': 'string' }
Response Structure
(dict) –
The response of CreateChangeSet.
status (string) –
PENDING (held for curator review) or PUBLISHED (applied). A replay reports the change set’s current one.
accessControl (string) –
See
AccessControl. The service returns it on every response.Valid values:
ACL_RESTRICTED- Only an allowed end user can read the content (its operations), and the change set can’t be edited. Every caller can read its metadata, and its proposal’stitlenames no nodes or edges.NO_ACL- Every caller can read the content.
id (string) –
The ID of the change set, which AWS Context assigns. The create is idempotent on
clientToken: a retry with the same token returns the same change set. Treat this ID as opaque, and don’t assume any relationship toclientToken.
Exceptions