:doc:`ResilienceHub <../../resiliencehub>` / Client / import_resources_to_draft_app_version

*************************************
import_resources_to_draft_app_version
*************************************



.. py:method:: ResilienceHub.Client.import_resources_to_draft_app_version(**kwargs)

  

  Imports resources to Resilience Hub application draft version from different input sources. For more information about the input sources supported by Resilience Hub, see `Discover the structure and describe your Resilience Hub application <https://docs.aws.amazon.com/resilience-hub/latest/userguide/discover-structure.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/resiliencehub-2020-04-30/ImportResourcesToDraftAppVersion>`_  


  **Request Syntax**
  ::

    response = client.import_resources_to_draft_app_version(
        appArn='string',
        eksSources=[
            {
                'eksClusterArn': 'string',
                'namespaces': [
                    'string',
                ]
            },
        ],
        importStrategy='AddOnly'|'ReplaceAll',
        sourceArns=[
            'string',
        ],
        terraformSources=[
            {
                's3StateFileUrl': 'string'
            },
        ]
    )
    
  :type appArn: string
  :param appArn: **[REQUIRED]** 

    Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:app/ ``app-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

    

  
  :type eksSources: list
  :param eksSources: 

    The input sources of the Amazon Elastic Kubernetes Service resources you need to import.

    

  
    - *(dict) --* 

      The input source of the Amazon Elastic Kubernetes Service cluster.

      

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

        Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn: ``aws``:eks: ``region``: ``account-id``:cluster/ ``cluster-name``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

        

      
      - **namespaces** *(list) --* **[REQUIRED]** 

        The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.

        

      
        - *(string) --* 

        
    
    

  :type importStrategy: string
  :param importStrategy: 

    The import strategy you would like to set to import resources into Resilience Hub application.

    

  
  :type sourceArns: list
  :param sourceArns: 

    The Amazon Resource Names (ARNs) for the resources.

    

  
    - *(string) --* 

    

  :type terraformSources: list
  :param terraformSources: 

    A list of terraform file s3 URLs you need to import.

    

  
    - *(dict) --* 

      The Terraform s3 state file you need to import.

      

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

        The URL of the Terraform s3 state file you need to import.

        

      
    

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

    
    ::

      {
          'appArn': 'string',
          'appVersion': 'string',
          'eksSources': [
              {
                  'eksClusterArn': 'string',
                  'namespaces': [
                      'string',
                  ]
              },
          ],
          'sourceArns': [
              'string',
          ],
          'status': 'Pending'|'InProgress'|'Failed'|'Success',
          'terraformSources': [
              {
                  's3StateFileUrl': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **appArn** *(string) --* 

        Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:app/ ``app-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

        
      

      - **appVersion** *(string) --* 

        The version of the application.

        
      

      - **eksSources** *(list) --* 

        The input sources of the Amazon Elastic Kubernetes Service resources you have imported.

        
        

        - *(dict) --* 

          The input source of the Amazon Elastic Kubernetes Service cluster.

          
          

          - **eksClusterArn** *(string) --* 

            Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn: ``aws``:eks: ``region``: ``account-id``:cluster/ ``cluster-name``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

            
          

          - **namespaces** *(list) --* 

            The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.

            
            

            - *(string) --* 
        
      
    
      

      - **sourceArns** *(list) --* 

        The Amazon Resource Names (ARNs) for the resources you have imported.

        
        

        - *(string) --* 
    
      

      - **status** *(string) --* 

        Status of the action.

        
      

      - **terraformSources** *(list) --* 

        A list of terraform file s3 URLs you have imported.

        
        

        - *(dict) --* 

          The Terraform s3 state file you need to import.

          
          

          - **s3StateFileUrl** *(string) --* 

            The URL of the Terraform s3 state file you need to import.

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

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

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

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

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

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

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

  