:doc:`DataZone <../../datazone>` / Client / create_asset_type

*****************
create_asset_type
*****************



.. py:method:: DataZone.Client.create_asset_type(**kwargs)

  

  Creates a custom asset type.

   

  Prerequisites:

   

  
  * The ``formsInput`` field is required, however, can be passed as empty (e.g. ``-forms-input {})``.
   
  * You must have ``CreateAssetType`` permissions.
   
  * The domain-identifier and owning-project-identifier must be valid and active.
   
  * The name of the asset type must be unique within the domain — duplicate names will cause failure.
   
  * JSON input must be valid — incorrect formatting causes Invalid JSON errors.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/datazone-2018-05-10/CreateAssetType>`_  


  **Request Syntax**
  ::

    response = client.create_asset_type(
        domainIdentifier='string',
        name='string',
        description='string',
        formsInput={
            'string': {
                'typeIdentifier': 'string',
                'typeRevision': 'string',
                'required': True|False
            }
        },
        owningProjectIdentifier='string'
    )
    
  :type domainIdentifier: string
  :param domainIdentifier: **[REQUIRED]** 

    The unique identifier of the Amazon DataZone domain where the custom asset type is being created.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the custom asset type.

    

  
  :type description: string
  :param description: 

    The descripton of the custom asset type.

    

  
  :type formsInput: dict
  :param formsInput: **[REQUIRED]** 

    The metadata forms that are to be attached to the custom asset type.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        The details of the form entry.

        

      
        - **typeIdentifier** *(string) --* **[REQUIRED]** 

          The type ID of the form entry.

          

        
        - **typeRevision** *(string) --* **[REQUIRED]** 

          The type revision of the form entry.

          

        
        - **required** *(boolean) --* 

          Specifies whether a form entry is required.

          

        
      


  :type owningProjectIdentifier: string
  :param owningProjectIdentifier: **[REQUIRED]** 

    The identifier of the Amazon DataZone project that is to own the custom asset type.

    

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

    
    ::

      {
          'domainId': 'string',
          'name': 'string',
          'revision': 'string',
          'description': 'string',
          'formsOutput': {
              'string': {
                  'typeName': 'string',
                  'typeRevision': 'string',
                  'required': True|False
              }
          },
          'owningProjectId': 'string',
          'originDomainId': 'string',
          'originProjectId': 'string',
          'createdAt': datetime(2015, 1, 1),
          'createdBy': 'string',
          'updatedAt': datetime(2015, 1, 1),
          'updatedBy': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **domainId** *(string) --* 

        The ID of the Amazon DataZone domain in which the asset type was created.

        
      

      - **name** *(string) --* 

        The name of the asset type.

        
      

      - **revision** *(string) --* 

        The revision of the custom asset type.

        
      

      - **description** *(string) --* 

        The description of the custom asset type.

        
      

      - **formsOutput** *(dict) --* 

        The metadata forms that are attached to the asset type.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            The details of the form entry.

            
            

            - **typeName** *(string) --* 

              The name of the type of the form entry.

              
            

            - **typeRevision** *(string) --* 

              The type revision of the form entry.

              
            

            - **required** *(boolean) --* 

              Specifies whether a form entry is required.

              
        
    
  
      

      - **owningProjectId** *(string) --* 

        The ID of the Amazon DataZone project that currently owns this asset type.

        
      

      - **originDomainId** *(string) --* 

        The ID of the Amazon DataZone domain where the asset type was originally created.

        
      

      - **originProjectId** *(string) --* 

        The ID of the Amazon DataZone project where the asset type was originally created.

        
      

      - **createdAt** *(datetime) --* 

        The timestamp of when the asset type is to be created.

        
      

      - **createdBy** *(string) --* 

        The Amazon DataZone user who creates this custom asset type.

        
      

      - **updatedAt** *(datetime) --* 

        The timestamp of when the custom type was created.

        
      

      - **updatedBy** *(string) --* 

        The Amazon DataZone user that created the custom asset type.

        
  
  **Exceptions**
  
  *   :py:class:`DataZone.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`DataZone.Client.exceptions.ThrottlingException`

  
  *   :py:class:`DataZone.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`DataZone.Client.exceptions.ConflictException`

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

  
  *   :py:class:`DataZone.Client.exceptions.UnauthorizedException`

  