CloudDirectory / Client / create_typed_link_facet
create_typed_link_facet#
- CloudDirectory.Client.create_typed_link_facet(**kwargs)#
Creates a TypedLinkFacet. For more information, see Typed Links.
See also: AWS API Documentation
Request Syntax
response = client.create_typed_link_facet( SchemaArn='string', Facet={ 'Name': 'string', 'Attributes': [ { 'Name': 'string', 'Type': 'STRING'|'BINARY'|'BOOLEAN'|'NUMBER'|'DATETIME'|'VARIANT', 'DefaultValue': { 'StringValue': 'string', 'BinaryValue': b'bytes', 'BooleanValue': True|False, 'NumberValue': 'string', 'DatetimeValue': datetime(2015, 1, 1) }, 'IsImmutable': True|False, 'Rules': { 'string': { 'Type': 'BINARY_LENGTH'|'NUMBER_COMPARISON'|'STRING_FROM_SET'|'STRING_LENGTH', 'Parameters': { 'string': 'string' } } }, 'RequiredBehavior': 'REQUIRED_ALWAYS'|'NOT_REQUIRED' }, ], 'IdentityAttributeOrder': [ 'string', ] } )
- Parameters:
SchemaArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
Facet (dict) –
[REQUIRED]
Facet structure that is associated with the typed link facet.
Name (string) – [REQUIRED]
The unique name of the typed link facet.
Attributes (list) – [REQUIRED]
A set of key-value pairs associated with the typed link. Typed link attributes are used when you have data values that are related to the link itself, and not to one of the two objects being linked. Identity attributes also serve to distinguish the link from others of the same type between the same objects.
(dict) –
A typed link attribute definition.
Name (string) – [REQUIRED]
The unique name of the typed link attribute.
Type (string) – [REQUIRED]
The type of the attribute.
DefaultValue (dict) –
The default value of the attribute (if configured).
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.
IsImmutable (boolean) –
Whether the attribute is mutable or not.
Rules (dict) –
Validation rules that are attached to the attribute definition.
(string) –
(dict) –
Contains an Amazon Resource Name (ARN) and parameters that are associated with the rule.
Type (string) –
The type of attribute validation rule.
Parameters (dict) –
The minimum and maximum parameters that are associated with the rule.
(string) –
(string) –
RequiredBehavior (string) – [REQUIRED]
The required behavior of the
TypedLinkAttributeDefinition
.
IdentityAttributeOrder (list) – [REQUIRED]
The set of attributes that distinguish links made from this facet from each other, in the order of significance. Listing typed links can filter on the values of these attributes. See ListOutgoingTypedLinks and ListIncomingTypedLinks for details.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
CloudDirectory.Client.exceptions.InternalServiceException
CloudDirectory.Client.exceptions.InvalidArnException
CloudDirectory.Client.exceptions.RetryableConflictException
CloudDirectory.Client.exceptions.ValidationException
CloudDirectory.Client.exceptions.LimitExceededException
CloudDirectory.Client.exceptions.AccessDeniedException
CloudDirectory.Client.exceptions.ResourceNotFoundException
CloudDirectory.Client.exceptions.FacetAlreadyExistsException
CloudDirectory.Client.exceptions.InvalidRuleException
CloudDirectory.Client.exceptions.FacetValidationException