chap_credentials
Creates, updates, deletes, gets or lists a chap_credentials resource.
Overview
| Name | chap_credentials |
| Type | Resource |
| Id | aws.storagegateway.chap_credentials |
Fields
The following fields are returned by SELECT queries:
- describe_chap_credentials
| Name | Datatype | Description |
|---|---|---|
chap_credentials | array | An array of ChapInfo objects that represent CHAP credentials. Each object in the array contains CHAP credential information for one target-initiator pair. If no CHAP credentials are set, an empty array is returned. CHAP credential information is provided in a JSON object with the following fields: InitiatorName: The iSCSI initiator that connects to the target. SecretToAuthenticateInitiator: The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target. SecretToAuthenticateTarget: The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client). TargetARN: The Amazon Resource Name (ARN) of the storage volume. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_chap_credentials | select | region | 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. | |
update_chap_credentials | update | region, TargetARN, SecretToAuthenticateInitiator, InitiatorName | Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target. By default, a gateway does not have CHAP enabled; however, for added security, you might use it. This operation is supported in the volume and tape gateway types. When you update CHAP credentials, all existing connections on the target are closed and initiators must reconnect with the new credentials. | |
delete_chap_credentials | delete | region | 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
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_chap_credentials
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.
SELECT
chap_credentials
FROM aws.storagegateway.chap_credentials
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_chap_credentials
Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target. By default, a gateway does not have CHAP enabled; however, for added security, you might use it. This operation is supported in the volume and tape gateway types. When you update CHAP credentials, all existing connections on the target are closed and initiators must reconnect with the new credentials.
UPDATE aws.storagegateway.chap_credentials
SET
TargetARN = '{{ TargetARN }}',
SecretToAuthenticateInitiator = '{{ SecretToAuthenticateInitiator }}',
InitiatorName = '{{ InitiatorName }}',
SecretToAuthenticateTarget = '{{ SecretToAuthenticateTarget }}'
WHERE
region = '{{ region }}' --required
AND TargetARN = '{{ TargetARN }}' --required
AND SecretToAuthenticateInitiator = '{{ SecretToAuthenticateInitiator }}' --required
AND InitiatorName = '{{ InitiatorName }}' --required
RETURNING
initiator_name,
target_arn;
DELETE examples
- delete_chap_credentials
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.
DELETE FROM aws.storagegateway.chap_credentials
WHERE region = '{{ region }}' --required
;