:doc:`AppRegistry <../../servicecatalog-appregistry>` / Client / disassociate_resource

*********************
disassociate_resource
*********************



.. py:method:: AppRegistry.Client.disassociate_resource(**kwargs)

  

  Disassociates a resource from application. Both the resource and the application can be specified either by ID or name.

   

  **Minimum permissions**

   

  You must have the following permissions to remove a resource that's been associated with an application using the ``APPLY_APPLICATION_TAG`` option for `AssociateResource <https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_AssociateResource.html>`__.

   

  
  * ``tag:GetResources``
   
  * ``tag:UntagResources``
  

   

  You must also have the following permissions if you don't use the ``AWSServiceCatalogAppRegistryFullAccess`` policy. For more information, see `AWSServiceCatalogAppRegistryFullAccess <https://docs.aws.amazon.com/servicecatalog/latest/arguide/full.html>`__ in the AppRegistry Administrator Guide.

   

  
  * ``resource-groups:DisassociateResource``
   
  * ``cloudformation:UpdateStack``
   
  * ``cloudformation:DescribeStacks``
  

   

  .. note::

    

    In addition, you must have the tagging permission defined by the Amazon Web Services service that creates the resource. For more information, see `UntagResources <https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_UntTagResources.html>`__ in the *Resource Groups Tagging API Reference*.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/AWS242AppRegistry-2020-06-24/DisassociateResource>`_  


  **Request Syntax**
  ::

    response = client.disassociate_resource(
        application='string',
        resourceType='CFN_STACK'|'RESOURCE_TAG_VALUE',
        resource='string'
    )
    
  :type application: string
  :param application: **[REQUIRED]** 

    The name or ID of the application.

    

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

    The type of the resource that is being disassociated.

    

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

    The name or ID of the resource.

    

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

    
    ::

      {
          'applicationArn': 'string',
          'resourceArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **applicationArn** *(string) --* 

        The Amazon resource name (ARN) that specifies the application.

        
      

      - **resourceArn** *(string) --* 

        The Amazon resource name (ARN) that specifies the resource.

        
  
  **Exceptions**
  
  *   :py:class:`AppRegistry.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`AppRegistry.Client.exceptions.InternalServerException`

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

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

  