hsm_configurations
Creates, updates, deletes, gets or lists a hsm_configurations resource.
Overview
| Name | hsm_configurations |
| Type | Resource |
| Id | aws.redshift.hsm_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_hsm_configurations
| Name | Datatype | Description |
|---|---|---|
description | string | A text description of the HSM configuration. |
hsm_configuration_identifier | string | The name of the Amazon Redshift HSM configuration. |
hsm_ip_address | string | The IP address that the Amazon Redshift cluster must use to access the HSM. |
hsm_partition_name | string | The name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys. |
tags | string | The list of tags for the HSM configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_hsm_configurations | select | region | HsmConfigurationIdentifier, MaxRecords, Marker, TagKeys, TagValues | 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. |
create_hsm_configuration | insert | HsmConfigurationIdentifier, HsmIpAddress, HsmPartitionName, HsmPartitionPassword, HsmServerPublicCertificate, region | Description, Tags | 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. |
delete_hsm_configuration | delete | HsmConfigurationIdentifier, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
HsmConfigurationIdentifier | string | The identifier of the Amazon Redshift HSM configuration to be deleted. |
HsmIpAddress | string | The IP address that the Amazon Redshift cluster must use to access the HSM. |
HsmPartitionName | string | The name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys. |
HsmPartitionPassword | string | The password required to access the HSM partition. |
HsmServerPublicCertificate | string | The HSMs public certificate file. When using Cloud HSM, the file name is server.pem. |
region | string | AWS region (default: us-east-1) |
Description | string | A text description of the HSM configuration to be created. |
HsmConfigurationIdentifier | string | The 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. |
Marker | string | An 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. |
MaxRecords | integer | The 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. |
TagKeys | array | A 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. |
TagValues | array | A 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. |
Tags | array | A list of tag instances. |
SELECT examples
- describe_hsm_configurations
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
- create_hsm_configuration
- Manifest
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
;
# Description fields are for documentation purposes
- name: hsm_configurations
props:
- name: HsmConfigurationIdentifier
value: "{{ HsmConfigurationIdentifier }}"
description: Required parameter for the hsm_configurations resource.
- name: HsmIpAddress
value: "{{ HsmIpAddress }}"
description: Required parameter for the hsm_configurations resource.
- name: HsmPartitionName
value: "{{ HsmPartitionName }}"
description: Required parameter for the hsm_configurations resource.
- name: HsmPartitionPassword
value: "{{ HsmPartitionPassword }}"
description: Required parameter for the hsm_configurations resource.
- name: HsmServerPublicCertificate
value: "{{ HsmServerPublicCertificate }}"
description: Required parameter for the hsm_configurations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the hsm_configurations resource.
- name: Description
value: "{{ Description }}"
description: A text description of the HSM configuration to be created.
description: A text description of the HSM configuration to be created.
- name: Tags
value: "{{ Tags }}"
description: A list of tag instances.
description: A list of tag instances.
DELETE examples
- delete_hsm_configuration
Deletes the specified Amazon Redshift HSM configuration.
DELETE FROM aws.redshift.hsm_configurations
WHERE HsmConfigurationIdentifier = '{{ HsmConfigurationIdentifier }}' --required
AND region = '{{ region }}' --required
;