ibm 1.84.0 published on Monday, Oct 13, 2025 by ibm-cloud
ibm.getKmsKey
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:
- Instance
Id 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 thekey_name
oralias
. - Endpoint
Type 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.
- Key
Id string - The keyID of the key to be fetched.
- Key
Name 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 thekey_name
oralias
. - Limit double
- The limit till the keys need to be fetched in the instance.
- Instance
Id 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 thekey_name
oralias
. - Endpoint
Type 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.
- Key
Id string - The keyID of the key to be fetched.
- Key
Name 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 thekey_name
oralias
. - Limit float64
- The limit till the keys need to be fetched in the instance.
- instance
Id 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 thekey_name
oralias
. - endpoint
Type 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.
- key
Id String - The keyID of the key to be fetched.
- key
Name 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 thekey_name
oralias
. - limit Double
- The limit till the keys need to be fetched in the instance.
- instance
Id 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 thekey_name
oralias
. - endpoint
Type 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.
- key
Id string - The keyID of the key to be fetched.
- key
Name 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 thekey_name
oralias
. - 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 thekey_name
oralias
. - 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 thekey_name
oralias
. - limit float
- The limit till the keys need to be fetched in the instance.
- instance
Id 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 thekey_name
oralias
. - endpoint
Type 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.
- key
Id String - The keyID of the key to be fetched.
- key
Name 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 thekey_name
oralias
. - 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.
- Instance
Id string - (Required, String) The key-protect instance ID.
- Keys
List<Get
Kms Key Key> - (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 thekey_name
oralias
. - Endpoint
Type string - (Optional, String) The type of the public or private endpoint to be used for fetching keys.
- Key
Id string - Key
Name 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 thekey_name
oralias
. - Limit double
- Id string
- (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
- Instance
Id string - (Required, String) The key-protect instance ID.
- Keys
[]Get
Kms Key Key - (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 thekey_name
oralias
. - Endpoint
Type string - (Optional, String) The type of the public or private endpoint to be used for fetching keys.
- Key
Id string - Key
Name 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 thekey_name
oralias
. - Limit float64
- id String
- (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
- instance
Id String - (Required, String) The key-protect instance ID.
- keys
List<Get
Kms Key Key> - (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 thekey_name
oralias
. - endpoint
Type String - (Optional, String) The type of the public or private endpoint to be used for fetching keys.
- key
Id String - key
Name 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 thekey_name
oralias
. - limit Double
- id string
- (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
- instance
Id string - (Required, String) The key-protect instance ID.
- keys
Get
Kms Key Key[] - (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 thekey_name
oralias
. - endpoint
Type string - (Optional, String) The type of the public or private endpoint to be used for fetching keys.
- key
Id string - key
Name 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 thekey_name
oralias
. - 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[Get
Kms Key Key] - (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 thekey_name
oralias
. - 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 thekey_name
oralias
. - limit float
- id String
- (String) The v4 UUID used to uniquely identify the policy resource, as specified by RFC 4122.
- instance
Id 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 thekey_name
oralias
. - endpoint
Type String - (Optional, String) The type of the public or private endpoint to be used for fetching keys.
- key
Id String - key
Name 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 thekey_name
oralias
. - 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.
- Key
Ring stringId - (String) The ID of the key ring that the key belongs to.
- Name string
- (String) The name for the key.
- Policies
List<Get
Kms Key Key Policy> - Standard
Key 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.
- Key
Ring stringId - (String) The ID of the key ring that the key belongs to.
- Name string
- (String) The name for the key.
- Policies
[]Get
Kms Key Key Policy - 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.
- key
Ring StringId - (String) The ID of the key ring that the key belongs to.
- name String
- (String) The name for the key.
- policies
List<Get
Kms Key Key Policy> - standard
Key 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.
- key
Ring stringId - (String) The ID of the key ring that the key belongs to.
- name string
- (String) The name for the key.
- policies
Get
Kms Key Key Policy[] - standard
Key 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_ strid - (String) The ID of the key ring that the key belongs to.
- name str
- (String) The name for the key.
- policies
Sequence[Get
Kms Key Key Policy] - 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.
- key
Ring StringId - (String) The ID of the key ring that the key belongs to.
- name String
- (String) The name for the key.
- policies List<Property Map>
- standard
Key Boolean - (String) Set the flag true for standard key, and false for root key. Default value is false.
GetKmsKeyKeyPolicy
- Dual
Auth List<GetDeletes Kms Key Key Policy Dual Auth Delete> - (String) The data associated with the dual authorization delete policy.
- Rotations
List<Get
Kms Key Key Policy Rotation> - (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
- Dual
Auth []GetDeletes Kms Key Key Policy Dual Auth Delete - (String) The data associated with the dual authorization delete policy.
- Rotations
[]Get
Kms Key Key Policy Rotation - (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
- dual
Auth List<GetDeletes Kms Key Key Policy Dual Auth Delete> - (String) The data associated with the dual authorization delete policy.
- rotations
List<Get
Kms Key Key Policy Rotation> - (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
- dual
Auth GetDeletes Kms Key Key Policy Dual Auth Delete[] - (String) The data associated with the dual authorization delete policy.
- rotations
Get
Kms Key Key Policy Rotation[] - (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
- dual_
auth_ Sequence[Getdeletes Kms Key Key Policy Dual Auth Delete] - (String) The data associated with the dual authorization delete policy.
- rotations
Sequence[Get
Kms Key Key Policy Rotation] - (String) The key rotation time interval in months, with a minimum of 1, and a maximum of 12.
- dual
Auth List<Property Map>Deletes - (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
- Created
By string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By string - (String) The unique ID for the resource that updated the policy.
- Created
By string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By string - (String) The unique ID for the resource that updated the policy.
- created
By String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update StringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By String - (String) The unique ID for the resource that updated the policy.
- created
By string - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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_ strdate - (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.
- created
By String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update StringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By String - (String) The unique ID for the resource that updated the policy.
GetKmsKeyKeyPolicyRotation
- Created
By string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Interval
Month double - (String) The key rotation time interval in months.
- Last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By string - (String) The unique ID for the resource that updated the policy.
- Created
By string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Interval
Month float64 - (String) The key rotation time interval in months.
- Last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By string - (String) The unique ID for the resource that updated the policy.
- created
By String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month Double - (String) The key rotation time interval in months.
- last
Update StringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By String - (String) The unique ID for the resource that updated the policy.
- created
By string - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month number - (String) The key rotation time interval in months.
- last
Update stringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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_ strdate - (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.
- created
By String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month Number - (String) The key rotation time interval in months.
- last
Update StringDate - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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.