Skip to main content

hsm_configurations

Creates, updates, deletes, gets or lists a hsm_configurations resource.

Overview

Namehsm_configurations
TypeResource
Idaws.redshift.hsm_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringA text description of the HSM configuration.
hsm_configuration_identifierstringThe name of the Amazon Redshift HSM configuration.
hsm_ip_addressstringThe IP address that the Amazon Redshift cluster must use to access the HSM.
hsm_partition_namestringThe name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys.
tagsstringThe list of tags for the HSM configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_hsm_configurationsselectregionHsmConfigurationIdentifier, MaxRecords, Marker, TagKeys, TagValuesReturns information about the specified Amazon Redshift HSM configuration. If no configuration ID is specified, returns information about all the HSM configurations owned by your Amazon Web Services account. If you specify both tag keys and tag values in the same request, Amazon Redshift returns all HSM connections that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all HSM connections that have any combination of those values are returned. If both tag keys and values are omitted from the request, HSM connections are returned regardless of whether they have tag keys or values associated with them.
create_hsm_configurationinsertHsmConfigurationIdentifier, HsmIpAddress, HsmPartitionName, HsmPartitionPassword, HsmServerPublicCertificate, regionDescription, TagsCreates an HSM configuration that contains the information required by an Amazon Redshift cluster to store and use database encryption keys in a Hardware Security Module (HSM). After creating the HSM configuration, you can specify it as a parameter when creating a cluster. The cluster will then store its encryption keys in the HSM. In addition to creating an HSM configuration, you must also create an HSM client certificate. For more information, go to Hardware Security Modules in the Amazon Redshift Cluster Management Guide.
delete_hsm_configurationdeleteHsmConfigurationIdentifier, regionDeletes the specified Amazon Redshift HSM configuration.

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.

NameDatatypeDescription
HsmConfigurationIdentifierstringThe identifier of the Amazon Redshift HSM configuration to be deleted.
HsmIpAddressstringThe IP address that the Amazon Redshift cluster must use to access the HSM.
HsmPartitionNamestringThe name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys.
HsmPartitionPasswordstringThe password required to access the HSM partition.
HsmServerPublicCertificatestringThe HSMs public certificate file. When using Cloud HSM, the file name is server.pem.
regionstringAWS region (default: us-east-1)
DescriptionstringA text description of the HSM configuration to be created.
HsmConfigurationIdentifierstringThe identifier of a specific Amazon Redshift HSM configuration to be described. If no identifier is specified, information is returned for all HSM configurations owned by your Amazon Web Services account.
MarkerstringAn optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeHsmConfigurations request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.
MaxRecordsintegerThe maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value. Default: 100 Constraints: minimum 20, maximum 100.
TagKeysarrayA tag key or keys for which you want to return all matching HSM configurations that are associated with the specified key or keys. For example, suppose that you have HSM configurations that are tagged with keys called owner and environment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the HSM configurations that have either or both of these tag keys associated with them.
TagValuesarrayA tag value or values for which you want to return all matching HSM configurations that are associated with the specified tag value or values. For example, suppose that you have HSM configurations that are tagged with values called admin and test. If you specify both of these tag values in the request, Amazon Redshift returns a response with the HSM configurations that have either or both of these tag values associated with them.
TagsarrayA list of tag instances.

SELECT examples

Returns information about the specified Amazon Redshift HSM configuration. If no configuration ID is specified, returns information about all the HSM configurations owned by your Amazon Web Services account. If you specify both tag keys and tag values in the same request, Amazon Redshift returns all HSM connections that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all HSM connections that have any combination of those values are returned. If both tag keys and values are omitted from the request, HSM connections are returned regardless of whether they have tag keys or values associated with them.

SELECT
description,
hsm_configuration_identifier,
hsm_ip_address,
hsm_partition_name,
tags
FROM aws.redshift.hsm_configurations
WHERE region = '{{ region }}' -- required
AND HsmConfigurationIdentifier = '{{ HsmConfigurationIdentifier }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
AND TagKeys = '{{ TagKeys }}'
AND TagValues = '{{ TagValues }}'
;

INSERT examples

Creates an HSM configuration that contains the information required by an Amazon Redshift cluster to store and use database encryption keys in a Hardware Security Module (HSM). After creating the HSM configuration, you can specify it as a parameter when creating a cluster. The cluster will then store its encryption keys in the HSM. In addition to creating an HSM configuration, you must also create an HSM client certificate. For more information, go to Hardware Security Modules in the Amazon Redshift Cluster Management Guide.

INSERT INTO aws.redshift.hsm_configurations (
HsmConfigurationIdentifier,
HsmIpAddress,
HsmPartitionName,
HsmPartitionPassword,
HsmServerPublicCertificate,
region,
Description,
Tags
)
SELECT
'{{ HsmConfigurationIdentifier }}',
'{{ HsmIpAddress }}',
'{{ HsmPartitionName }}',
'{{ HsmPartitionPassword }}',
'{{ HsmServerPublicCertificate }}',
'{{ region }}',
'{{ Description }}',
'{{ Tags }}'
RETURNING
description,
hsm_configuration_identifier,
hsm_ip_address,
hsm_partition_name,
tags
;

DELETE examples

Deletes the specified Amazon Redshift HSM configuration.

DELETE FROM aws.redshift.hsm_configurations
WHERE HsmConfigurationIdentifier = '{{ HsmConfigurationIdentifier }}' --required
AND region = '{{ region }}' --required
;