1. Packages
  2. AWS Classic
  3. API Docs
  4. kms
  5. getCustomKeyStore

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.kms.getCustomKeyStore

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Use this data source to get the metadata KMS custom key store. By using this data source, you can reference KMS custom key store without having to hard code the ID as input.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const keystore = aws.kms.getCustomKeyStore({
        customKeyStoreName: "my_cloudhsm",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    keystore = aws.kms.get_custom_key_store(custom_key_store_name="my_cloudhsm")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kms.LookupCustomKeyStore(ctx, &kms.LookupCustomKeyStoreArgs{
    			CustomKeyStoreName: pulumi.StringRef("my_cloudhsm"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var keystore = Aws.Kms.GetCustomKeyStore.Invoke(new()
        {
            CustomKeyStoreName = "my_cloudhsm",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kms.KmsFunctions;
    import com.pulumi.aws.kms.inputs.GetCustomKeyStoreArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var keystore = KmsFunctions.getCustomKeyStore(GetCustomKeyStoreArgs.builder()
                .customKeyStoreName("my_cloudhsm")
                .build());
    
        }
    }
    
    variables:
      keystore:
        fn::invoke:
          Function: aws:kms:getCustomKeyStore
          Arguments:
            customKeyStoreName: my_cloudhsm
    

    Using getCustomKeyStore

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCustomKeyStore(args: GetCustomKeyStoreArgs, opts?: InvokeOptions): Promise<GetCustomKeyStoreResult>
    function getCustomKeyStoreOutput(args: GetCustomKeyStoreOutputArgs, opts?: InvokeOptions): Output<GetCustomKeyStoreResult>
    def get_custom_key_store(custom_key_store_id: Optional[str] = None,
                             custom_key_store_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCustomKeyStoreResult
    def get_custom_key_store_output(custom_key_store_id: Optional[pulumi.Input[str]] = None,
                             custom_key_store_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCustomKeyStoreResult]
    func LookupCustomKeyStore(ctx *Context, args *LookupCustomKeyStoreArgs, opts ...InvokeOption) (*LookupCustomKeyStoreResult, error)
    func LookupCustomKeyStoreOutput(ctx *Context, args *LookupCustomKeyStoreOutputArgs, opts ...InvokeOption) LookupCustomKeyStoreResultOutput

    > Note: This function is named LookupCustomKeyStore in the Go SDK.

    public static class GetCustomKeyStore 
    {
        public static Task<GetCustomKeyStoreResult> InvokeAsync(GetCustomKeyStoreArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomKeyStoreResult> Invoke(GetCustomKeyStoreInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomKeyStoreResult> getCustomKeyStore(GetCustomKeyStoreArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:kms/getCustomKeyStore:getCustomKeyStore
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CustomKeyStoreId string
    The ID for the custom key store.
    CustomKeyStoreName string
    The user-specified friendly name for the custom key store.
    CustomKeyStoreId string
    The ID for the custom key store.
    CustomKeyStoreName string
    The user-specified friendly name for the custom key store.
    customKeyStoreId String
    The ID for the custom key store.
    customKeyStoreName String
    The user-specified friendly name for the custom key store.
    customKeyStoreId string
    The ID for the custom key store.
    customKeyStoreName string
    The user-specified friendly name for the custom key store.
    custom_key_store_id str
    The ID for the custom key store.
    custom_key_store_name str
    The user-specified friendly name for the custom key store.
    customKeyStoreId String
    The ID for the custom key store.
    customKeyStoreName String
    The user-specified friendly name for the custom key store.

    getCustomKeyStore Result

    The following output properties are available:

    CloudHsmClusterId string
    ConnectionState string
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    CreationDate string
    The date and time when the custom key store was created.
    CustomKeyStoreId string
    CustomKeyStoreName string
    Id string
    The provider-assigned unique ID for this managed resource.
    TrustAnchorCertificate string
    The trust anchor certificate of the associated CloudHSM cluster.
    CloudHsmClusterId string
    ConnectionState string
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    CreationDate string
    The date and time when the custom key store was created.
    CustomKeyStoreId string
    CustomKeyStoreName string
    Id string
    The provider-assigned unique ID for this managed resource.
    TrustAnchorCertificate string
    The trust anchor certificate of the associated CloudHSM cluster.
    cloudHsmClusterId String
    connectionState String
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    creationDate String
    The date and time when the custom key store was created.
    customKeyStoreId String
    customKeyStoreName String
    id String
    The provider-assigned unique ID for this managed resource.
    trustAnchorCertificate String
    The trust anchor certificate of the associated CloudHSM cluster.
    cloudHsmClusterId string
    connectionState string
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    creationDate string
    The date and time when the custom key store was created.
    customKeyStoreId string
    customKeyStoreName string
    id string
    The provider-assigned unique ID for this managed resource.
    trustAnchorCertificate string
    The trust anchor certificate of the associated CloudHSM cluster.
    cloud_hsm_cluster_id str
    connection_state str
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    creation_date str
    The date and time when the custom key store was created.
    custom_key_store_id str
    custom_key_store_name str
    id str
    The provider-assigned unique ID for this managed resource.
    trust_anchor_certificate str
    The trust anchor certificate of the associated CloudHSM cluster.
    cloudHsmClusterId String
    connectionState String
    Indicates whether the custom key store is connected to its CloudHSM cluster.
    creationDate String
    The date and time when the custom key store was created.
    customKeyStoreId String
    customKeyStoreName String
    id String
    The provider-assigned unique ID for this managed resource.
    trustAnchorCertificate String
    The trust anchor certificate of the associated CloudHSM cluster.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi