1. Packages
  2. Ibm Provider
  3. API Docs
  4. getKmsKey
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getKmsKey

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    Example Usage

    Using getKmsKey

    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 getKmsKey(args: GetKmsKeyArgs, opts?: InvokeOptions): Promise<GetKmsKeyResult>
    function getKmsKeyOutput(args: GetKmsKeyOutputArgs, opts?: InvokeOptions): Output<GetKmsKeyResult>
    def get_kms_key(alias: Optional[str] = None,
                    endpoint_type: Optional[str] = None,
                    id: Optional[str] = None,
                    instance_id: Optional[str] = None,
                    key_id: Optional[str] = None,
                    key_name: Optional[str] = None,
                    limit: Optional[float] = None,
                    opts: Optional[InvokeOptions] = None) -> GetKmsKeyResult
    def get_kms_key_output(alias: Optional[pulumi.Input[str]] = None,
                    endpoint_type: Optional[pulumi.Input[str]] = None,
                    id: Optional[pulumi.Input[str]] = None,
                    instance_id: Optional[pulumi.Input[str]] = None,
                    key_id: Optional[pulumi.Input[str]] = None,
                    key_name: Optional[pulumi.Input[str]] = None,
                    limit: Optional[pulumi.Input[float]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetKmsKeyResult]
    func LookupKmsKey(ctx *Context, args *LookupKmsKeyArgs, opts ...InvokeOption) (*LookupKmsKeyResult, error)
    func LookupKmsKeyOutput(ctx *Context, args *LookupKmsKeyOutputArgs, opts ...InvokeOption) LookupKmsKeyResultOutput

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

    public static class GetKmsKey 
    {
        public static Task<GetKmsKeyResult> InvokeAsync(GetKmsKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetKmsKeyResult> Invoke(GetKmsKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKmsKeyResult> getKmsKey(GetKmsKeyArgs args, InvokeOptions options)
    public static Output<GetKmsKeyResult> getKmsKey(GetKmsKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getKmsKey:getKmsKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The key-protect instance ID.
    Alias string
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    EndpointType string
    The type of the public or private endpoint to be used for fetching keys.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    KeyId string
    The keyID of the key to be fetched.
    KeyName string
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    Limit double
    The limit till the keys need to be fetched in the instance.
    InstanceId string
    The key-protect instance ID.
    Alias string
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    EndpointType string
    The type of the public or private endpoint to be used for fetching keys.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    KeyId string
    The keyID of the key to be fetched.
    KeyName string
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    Limit float64
    The limit till the keys need to be fetched in the instance.
    instanceId String
    The key-protect instance ID.
    alias String
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType String
    The type of the public or private endpoint to be used for fetching keys.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyId String
    The keyID of the key to be fetched.
    keyName String
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit Double
    The limit till the keys need to be fetched in the instance.
    instanceId string
    The key-protect instance ID.
    alias string
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType string
    The type of the public or private endpoint to be used for fetching keys.
    id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyId string
    The keyID of the key to be fetched.
    keyName string
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit number
    The limit till the keys need to be fetched in the instance.
    instance_id str
    The key-protect instance ID.
    alias str
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpoint_type str
    The type of the public or private endpoint to be used for fetching keys.
    id str
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    key_id str
    The keyID of the key to be fetched.
    key_name str
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit float
    The limit till the keys need to be fetched in the instance.
    instanceId String
    The key-protect instance ID.
    alias String
    The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType String
    The type of the public or private endpoint to be used for fetching keys.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyId String
    The keyID of the key to be fetched.
    keyName String
    The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit Number
    The limit till the keys need to be fetched in the instance.

    getKmsKey Result

    The following output properties are available:

    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    InstanceId string
    (Required, String) The key-protect instance ID.
    Keys List<GetKmsKeyKey>
    (String) Lists the Keys of HPCS or Key-protect instance.
    Alias string
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    EndpointType string
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    KeyId string
    KeyName string
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    Limit double
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    InstanceId string
    (Required, String) The key-protect instance ID.
    Keys []GetKmsKeyKey
    (String) Lists the Keys of HPCS or Key-protect instance.
    Alias string
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    EndpointType string
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    KeyId string
    KeyName string
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    Limit float64
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    instanceId String
    (Required, String) The key-protect instance ID.
    keys List<GetKmsKeyKey>
    (String) Lists the Keys of HPCS or Key-protect instance.
    alias String
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType String
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    keyId String
    keyName String
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit Double
    id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    instanceId string
    (Required, String) The key-protect instance ID.
    keys GetKmsKeyKey[]
    (String) Lists the Keys of HPCS or Key-protect instance.
    alias string
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType string
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    keyId string
    keyName string
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit number
    id str
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    instance_id str
    (Required, String) The key-protect instance ID.
    keys Sequence[GetKmsKeyKey]
    (String) Lists the Keys of HPCS or Key-protect instance.
    alias str
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpoint_type str
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    key_id str
    key_name str
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit float
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    instanceId String
    (Required, String) The key-protect instance ID.
    keys List<Property Map>
    (String) Lists the Keys of HPCS or Key-protect instance.
    alias String
    (Optional, String) The alias of the key. If you want to retrieve the key by using the key name, use the key_name option. You must provide either the key_name or alias.
    endpointType String
    (Optional, String) The type of the public or private endpoint to be used for fetching keys.
    keyId String
    keyName String
    (Optional, String) The name of the key. If you want to retrieve the key by using the key alias, use the alias option. You must provide either the key_name or alias.
    limit Number

    Supporting Types

    GetKmsKeyKey

    Aliases List<string>
    (String) A list of alias names that are assigned to the key.
    Crn string
    (String) The CRN of the key.
    Description string
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    KeyRingId string
    (String) The ID of the key ring that the key belongs to.
    Name string
    (String) The name for the key.
    Policies List<GetKmsKeyKeyPolicy>
    StandardKey bool
    (String) Set the flag true for standard key, and false for root key. Default value is false.
    Aliases []string
    (String) A list of alias names that are assigned to the key.
    Crn string
    (String) The CRN of the key.
    Description string
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    KeyRingId string
    (String) The ID of the key ring that the key belongs to.
    Name string
    (String) The name for the key.
    Policies []GetKmsKeyKeyPolicy
    StandardKey bool
    (String) Set the flag true for standard key, and false for root key. Default value is false.
    aliases List<String>
    (String) A list of alias names that are assigned to the key.
    crn String
    (String) The CRN of the key.
    description String
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyRingId String
    (String) The ID of the key ring that the key belongs to.
    name String
    (String) The name for the key.
    policies List<GetKmsKeyKeyPolicy>
    standardKey Boolean
    (String) Set the flag true for standard key, and false for root key. Default value is false.
    aliases string[]
    (String) A list of alias names that are assigned to the key.
    crn string
    (String) The CRN of the key.
    description string
    id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyRingId string
    (String) The ID of the key ring that the key belongs to.
    name string
    (String) The name for the key.
    policies GetKmsKeyKeyPolicy[]
    standardKey boolean
    (String) Set the flag true for standard key, and false for root key. Default value is false.
    aliases Sequence[str]
    (String) A list of alias names that are assigned to the key.
    crn str
    (String) The CRN of the key.
    description str
    id str
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    key_ring_id str
    (String) The ID of the key ring that the key belongs to.
    name str
    (String) The name for the key.
    policies Sequence[GetKmsKeyKeyPolicy]
    standard_key bool
    (String) Set the flag true for standard key, and false for root key. Default value is false.
    aliases List<String>
    (String) A list of alias names that are assigned to the key.
    crn String
    (String) The CRN of the key.
    description String
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    keyRingId String
    (String) The ID of the key ring that the key belongs to.
    name String
    (String) The name for the key.
    policies List<Property Map>
    standardKey Boolean
    (String) Set the flag true for standard key, and false for root key. Default value is false.

    GetKmsKeyKeyPolicy

    DualAuthDeletes List<GetKmsKeyKeyPolicyDualAuthDelete>
    (String) The data associated with the dual authorization delete policy.
    Rotations List<GetKmsKeyKeyPolicyRotation>
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
    DualAuthDeletes []GetKmsKeyKeyPolicyDualAuthDelete
    (String) The data associated with the dual authorization delete policy.
    Rotations []GetKmsKeyKeyPolicyRotation
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
    dualAuthDeletes List<GetKmsKeyKeyPolicyDualAuthDelete>
    (String) The data associated with the dual authorization delete policy.
    rotations List<GetKmsKeyKeyPolicyRotation>
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
    dualAuthDeletes GetKmsKeyKeyPolicyDualAuthDelete[]
    (String) The data associated with the dual authorization delete policy.
    rotations GetKmsKeyKeyPolicyRotation[]
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
    dual_auth_deletes Sequence[GetKmsKeyKeyPolicyDualAuthDelete]
    (String) The data associated with the dual authorization delete policy.
    rotations Sequence[GetKmsKeyKeyPolicyRotation]
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
    dualAuthDeletes List<Property Map>
    (String) The data associated with the dual authorization delete policy.
    rotations List<Property Map>
    (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.

    GetKmsKeyKeyPolicyDualAuthDelete

    CreatedBy string
    (String) The unique ID for the resource that created the policy.
    CreationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    Crn string
    (String) The CRN of the key.
    Enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    LastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    UpdatedBy string
    (String) The unique ID for the resource that updated the policy.
    CreatedBy string
    (String) The unique ID for the resource that created the policy.
    CreationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    Crn string
    (String) The CRN of the key.
    Enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    LastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    UpdatedBy string
    (String) The unique ID for the resource that updated the policy.
    createdBy String
    (String) The unique ID for the resource that created the policy.
    creationDate String
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn String
    (String) The CRN of the key.
    enabled Boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    lastUpdateDate String
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy String
    (String) The unique ID for the resource that updated the policy.
    createdBy string
    (String) The unique ID for the resource that created the policy.
    creationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn string
    (String) The CRN of the key.
    enabled boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    lastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy string
    (String) The unique ID for the resource that updated the policy.
    created_by str
    (String) The unique ID for the resource that created the policy.
    creation_date str
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn str
    (String) The CRN of the key.
    enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id str
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    last_update_date str
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updated_by str
    (String) The unique ID for the resource that updated the policy.
    createdBy String
    (String) The unique ID for the resource that created the policy.
    creationDate String
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn String
    (String) The CRN of the key.
    enabled Boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    lastUpdateDate String
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy String
    (String) The unique ID for the resource that updated the policy.

    GetKmsKeyKeyPolicyRotation

    CreatedBy string
    (String) The unique ID for the resource that created the policy.
    CreationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    Crn string
    (String) The CRN of the key.
    Enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    IntervalMonth double
    (String) The key rotation time interval in months.
    LastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    UpdatedBy string
    (String) The unique ID for the resource that updated the policy.
    CreatedBy string
    (String) The unique ID for the resource that created the policy.
    CreationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    Crn string
    (String) The CRN of the key.
    Enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    Id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    IntervalMonth float64
    (String) The key rotation time interval in months.
    LastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    UpdatedBy string
    (String) The unique ID for the resource that updated the policy.
    createdBy String
    (String) The unique ID for the resource that created the policy.
    creationDate String
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn String
    (String) The CRN of the key.
    enabled Boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    intervalMonth Double
    (String) The key rotation time interval in months.
    lastUpdateDate String
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy String
    (String) The unique ID for the resource that updated the policy.
    createdBy string
    (String) The unique ID for the resource that created the policy.
    creationDate string
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn string
    (String) The CRN of the key.
    enabled boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id string
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    intervalMonth number
    (String) The key rotation time interval in months.
    lastUpdateDate string
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy string
    (String) The unique ID for the resource that updated the policy.
    created_by str
    (String) The unique ID for the resource that created the policy.
    creation_date str
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn str
    (String) The CRN of the key.
    enabled bool
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id str
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    interval_month float
    (String) The key rotation time interval in months.
    last_update_date str
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updated_by str
    (String) The unique ID for the resource that updated the policy.
    createdBy String
    (String) The unique ID for the resource that created the policy.
    creationDate String
    (Timestamp) The date the policy was created. The date format follows RFC 3339.
    crn String
    (String) The CRN of the key.
    enabled Boolean
    (String) If set to true, Key Protect enables a dual authorization policy on the key.
    id String
    (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
    intervalMonth Number
    (String) The key rotation time interval in months.
    lastUpdateDate String
    (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
    updatedBy String
    (String) The unique ID for the resource that updated the policy.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud