Create, list, and retrieve secrets using AWS Secrets Manager, with KMS key selection for encryption. Also uses AWS Key Management Service (KMS) to list and describe available encryption keys.
Secrets Manager (TSecretsManagerClient):
ListSecrets,CreateSecret,DescribeSecret,GetSecretValue
Key Management Service (TKMSClient):
ListKeysandDescribeKey(with pagination)ListAliasesto map key aliases to key metadata (with pagination)
LOptions := TSecretsManagerOptions.Create;
LOptions.Region := 'eu-west-1';
Client := TSecretsManagerClient.Create(LOptions);
// Create a secret
LRequest := TSecretsManagerCreateSecretRequest.Create('my-secret', 'super-secret-value');
LRequest.KmsKeyId := LSelectedKey.KeyId;
LResponse := Client.CreateSecret(LRequest);- Open "SecretsManagerConsole.dproj" in Delphi or RAD Studio.
- Select "Run > Run" from the menu or press F9.
- Select a region from the list on the top-left.
- To create a new secret, click the "+" sign on the top-right.
- To view information or retrieve the secret value, double-click a secret in the list.
secretsmanager:ListSecretssecretsmanager:CreateSecretsecretsmanager:DescribeSecretsecretsmanager:GetSecretValuekms:ListKeyskms:DescribeKeykms:ListAliases
