:doc:`StorageGateway <../../storagegateway>` / Client / delete_chap_credentials

***********************
delete_chap_credentials
***********************



.. py:method:: StorageGateway.Client.delete_chap_credentials(**kwargs)

  

  Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair. This operation is supported in volume and tape gateway types.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials>`_  


  **Request Syntax**
  ::

    response = client.delete_chap_credentials(
        TargetARN='string',
        InitiatorName='string'
    )
    
  :type TargetARN: string
  :param TargetARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the iSCSI volume target. Use the  DescribeStorediSCSIVolumes operation to return to retrieve the TargetARN for specified VolumeARN.

    

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

    The iSCSI initiator that connects to the target.

    

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

    
    ::

      {
          'TargetARN': 'string',
          'InitiatorName': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      A JSON object containing the following fields:

      
      

      - **TargetARN** *(string) --* 

        The Amazon Resource Name (ARN) of the target.

        
      

      - **InitiatorName** *(string) --* 

        The iSCSI initiator that connects to the target.

        
  
  **Exceptions**
  
  *   :py:class:`StorageGateway.Client.exceptions.InvalidGatewayRequestException`

  
  *   :py:class:`StorageGateway.Client.exceptions.InternalServerError`

  

  **Examples**

  Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.
  ::

    response = client.delete_chap_credentials(
        InitiatorName='iqn.1991-05.com.microsoft:computername.domain.example.com',
        TargetARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'InitiatorName': 'iqn.1991-05.com.microsoft:computername.domain.example.com',
        'TargetARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  