Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair. This operation is supported in the 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.
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 describe CHAP credetnitals for an iSCSI
Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.
>>> await client.describe_chap_credentials(target_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume')
Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
| async def describe_chap_credentials(
self,
target_arn: "capo_storage_gateway.types.target_arn.TargetARN",
*,
config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.describe_chap_credentials_output.DescribeChapCredentialsOutput":
"""<p>Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair. This operation is supported in the 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>
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 describe CHAP credetnitals for an iSCSI
Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.
>>> await client.describe_chap_credentials(target_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume')
"""
async def _handler(
req: "AsyncOperationRequest[capo_storage_gateway.types.describe_chap_credentials_input.DescribeChapCredentialsInput]",
) -> AsyncOperationResponse[
"capo_storage_gateway.types.describe_chap_credentials_output.DescribeChapCredentialsOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.describe_chap_credentials
(
output,
http_response,
) = await capo_storage_gateway._operations.storage_gateway_20130630.describe_chap_credentials.async_describe_chap_credentials(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_storage_gateway.types.describe_chap_credentials_output.DescribeChapCredentialsOutput",
) -> dict[str, Any]:
import capo_storage_gateway.types.describe_chap_credentials_output
return capo_storage_gateway.types.describe_chap_credentials_output.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeChapCredentials", redact_output=_redact_output),
)
input_: capo_storage_gateway.types.describe_chap_credentials_input.DescribeChapCredentialsInput = {
"target_arn": target_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|