ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud
ibm.getKmsKey
Explore with Pulumi AI
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 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 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 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 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 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 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 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 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 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 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 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 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
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.
- Key
Ring Id 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<GetKms Key Key Policy> - 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. []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.
- Key
Ring Id 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. []GetKms Key Key Policy - 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.
- key
Ring Id 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<GetKms Key Key Policy> - standard
Key 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.
- key
Ring Id 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. GetKms Key Key Policy[] - standard
Key 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[GetKms Key Key Policy] - 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.
- key
Ring Id 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> - standard
Key This property is required. Boolean - (String) Set the flag true for standard key, and false for root key. Default value is false.
GetKmsKeyKeyPolicy
- Dual
Auth Deletes This property is required. List<GetKms Key Key Policy Dual Auth Delete> - (String) The data associated with the dual authorization delete policy.
- Rotations
This property is required. List<GetKms Key Key Policy Rotation> - (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. []GetKms Key Key Policy Dual Auth Delete - (String) The data associated with the dual authorization delete policy.
- Rotations
This property is required. []GetKms Key Key Policy Rotation - (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. List<GetKms Key Key Policy Dual Auth Delete> - (String) The data associated with the dual authorization delete policy.
- rotations
This property is required. List<GetKms Key Key Policy Rotation> - (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. GetKms Key Key Policy Dual Auth Delete[] - (String) The data associated with the dual authorization delete policy.
- rotations
This property is required. GetKms Key Key Policy Rotation[] - (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[GetKms Key Key Policy Dual Auth Delete] - (String) The data associated with the dual authorization delete policy.
- rotations
This property is required. Sequence[GetKms Key Key Policy Rotation] - (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. 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
- Created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By This property is required. string - (String) The unique ID for the resource that updated the policy.
- Created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By This property is required. string - (String) The unique ID for the resource that updated the policy.
- created
By This property is required. String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update Date This property is required. String - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By This property is required. String - (String) The unique ID for the resource that updated the policy.
- created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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.
- created
By This property is required. String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- last
Update Date This property is required. String - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By This property is required. String - (String) The unique ID for the resource that updated the policy.
GetKmsKeyKeyPolicyRotation
- Created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Interval
Month This property is required. double - (String) The key rotation time interval in months.
- Last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By This property is required. string - (String) The unique ID for the resource that updated the policy.
- Created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- Creation
Date 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.
- Interval
Month This property is required. float64 - (String) The key rotation time interval in months.
- Last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- Updated
By This property is required. string - (String) The unique ID for the resource that updated the policy.
- created
By This property is required. String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month This property is required. Double - (String) The key rotation time interval in months.
- last
Update Date This property is required. String - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By This property is required. String - (String) The unique ID for the resource that updated the policy.
- created
By This property is required. string - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month This property is required. number - (String) The key rotation time interval in months.
- last
Update Date This property is required. string - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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.
- created
By This property is required. String - (String) The unique ID for the resource that created the policy.
- creation
Date 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.
- interval
Month This property is required. Number - (String) The key rotation time interval in months.
- last
Update Date This property is required. String - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- updated
By 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.