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 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>
Copy
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]
Copy
func LookupKmsKey(ctx *Context, args *LookupKmsKeyArgs, opts ...InvokeOption) (*LookupKmsKeyResult, error)
func LookupKmsKeyOutput(ctx *Context, args *LookupKmsKeyOutputArgs, opts ...InvokeOption) LookupKmsKeyResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetKmsKeyResult> getKmsKey(GetKmsKeyArgs args, InvokeOptions options)
public static Output<GetKmsKeyResult> getKmsKey(GetKmsKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getKmsKey:getKmsKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

GetKmsKeyKeyPolicy

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

GetKmsKeyKeyPolicyDualAuthDelete

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

GetKmsKeyKeyPolicyRotation

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