:doc:`CloudDirectory <../../clouddirectory>` / Client / create_typed_link_facet

***********************
create_typed_link_facet
***********************



.. py:method:: CloudDirectory.Client.create_typed_link_facet(**kwargs)

  

  Creates a  TypedLinkFacet. For more information, see `Typed Links <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2017-01-11/CreateTypedLinkFacet>`_  


  **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',
            ]
        }
    )
    
  :type SchemaArn: string
  :param SchemaArn: **[REQUIRED]** 

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

    

  
  :type Facet: dict
  :param Facet: **[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) --* 

      
  
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CloudDirectory.Client.exceptions.InternalServiceException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidArnException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.RetryableConflictException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ValidationException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.LimitExceededException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.FacetAlreadyExistsException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidRuleException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.FacetValidationException`

  