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.
Parameters:
-
target_arn
(TargetARN)
–
The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes operation to return to retrieve the TargetARN for specified VolumeARN.
-
initiator_name
(IqnName)
–
The iSCSI initiator that connects to the target.
Raises:
-
InternalServerError
–
An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException
–
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete CHAP credentials
Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.
>>> client.delete_chap_credentials(target_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume', initiator_name='iqn.1991-05.com.microsoft:computername.domain.example.com')
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
| def delete_chap_credentials(
self,
target_arn: "capo_storage_gateway.types.target_arn.TargetARN",
initiator_name: "capo_storage_gateway.types.iqn_name.IqnName",
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.delete_chap_credentials_output.DeleteChapCredentialsOutput":
"""<p>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.</p>
Args:
target_arn: <p>The Amazon Resource Name (ARN) of the iSCSI volume target. Use the <a>DescribeStorediSCSIVolumes</a> operation to return to retrieve the TargetARN for specified VolumeARN.</p>
initiator_name: <p>The iSCSI initiator that connects to the target.</p>
Raises:
capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete CHAP credentials
Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.
>>> client.delete_chap_credentials(target_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume', initiator_name='iqn.1991-05.com.microsoft:computername.domain.example.com')
"""
def _handler(
req: "OperationRequest[capo_storage_gateway.types.delete_chap_credentials_input.DeleteChapCredentialsInput]",
) -> OperationResponse[
"capo_storage_gateway.types.delete_chap_credentials_output.DeleteChapCredentialsOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.delete_chap_credentials
output, http_response = (
capo_storage_gateway._operations.storage_gateway_20130630.delete_chap_credentials.delete_chap_credentials(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteChapCredentials")
)
input_: capo_storage_gateway.types.delete_chap_credentials_input.DeleteChapCredentialsInput = {
"target_arn": target_arn,
"initiator_name": initiator_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|