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

************
apply_schema
************



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

  

  Copies the input published schema, at the specified version, into the  Directory with the same name and version as that of the published schema.

  

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


  **Request Syntax**
  ::

    response = client.apply_schema(
        PublishedSchemaArn='string',
        DirectoryArn='string'
    )
    
  :type PublishedSchemaArn: string
  :param PublishedSchemaArn: **[REQUIRED]** 

    Published schema Amazon Resource Name (ARN) that needs to be copied. For more information, see  arns.

    

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

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

    

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

    
    ::

      {
          'AppliedSchemaArn': 'string',
          'DirectoryArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AppliedSchemaArn** *(string) --* 

        The applied schema ARN that is associated with the copied schema in the  Directory. You can use this ARN to describe the schema information applied on this directory. For more information, see  arns.

        
      

      - **DirectoryArn** *(string) --* 

        The ARN that is associated with the  Directory. For more information, see  arns.

        
  
  **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.SchemaAlreadyExistsException`

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

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

  