1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. getKmsKeyV1
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.getKmsKeyV1

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Use this data source to get the ID of an available FlexibleEngine KMS key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const key1 = flexibleengine.getKmsKeyV1({
        keyAlias: "test_key",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    key1 = flexibleengine.get_kms_key_v1(key_alias="test_key")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.LookupKmsKeyV1(ctx, &flexibleengine.LookupKmsKeyV1Args{
    			KeyAlias: pulumi.StringRef("test_key"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var key1 = Flexibleengine.GetKmsKeyV1.Invoke(new()
        {
            KeyAlias = "test_key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FlexibleengineFunctions;
    import com.pulumi.flexibleengine.inputs.GetKmsKeyV1Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var key1 = FlexibleengineFunctions.getKmsKeyV1(GetKmsKeyV1Args.builder()
                .keyAlias("test_key")
                .build());
    
        }
    }
    
    variables:
      key1:
        fn::invoke:
          function: flexibleengine:getKmsKeyV1
          arguments:
            keyAlias: test_key
    

    Using getKmsKeyV1

    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 getKmsKeyV1(args: GetKmsKeyV1Args, opts?: InvokeOptions): Promise<GetKmsKeyV1Result>
    function getKmsKeyV1Output(args: GetKmsKeyV1OutputArgs, opts?: InvokeOptions): Output<GetKmsKeyV1Result>
    def get_kms_key_v1(default_key_flag: Optional[str] = None,
                       domain_id: Optional[str] = None,
                       id: Optional[str] = None,
                       key_alias: Optional[str] = None,
                       key_description: Optional[str] = None,
                       key_id: Optional[str] = None,
                       key_state: Optional[str] = None,
                       origin: Optional[str] = None,
                       realm: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetKmsKeyV1Result
    def get_kms_key_v1_output(default_key_flag: Optional[pulumi.Input[str]] = None,
                       domain_id: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       key_alias: Optional[pulumi.Input[str]] = None,
                       key_description: Optional[pulumi.Input[str]] = None,
                       key_id: Optional[pulumi.Input[str]] = None,
                       key_state: Optional[pulumi.Input[str]] = None,
                       origin: Optional[pulumi.Input[str]] = None,
                       realm: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetKmsKeyV1Result]
    func LookupKmsKeyV1(ctx *Context, args *LookupKmsKeyV1Args, opts ...InvokeOption) (*LookupKmsKeyV1Result, error)
    func LookupKmsKeyV1Output(ctx *Context, args *LookupKmsKeyV1OutputArgs, opts ...InvokeOption) LookupKmsKeyV1ResultOutput

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

    public static class GetKmsKeyV1 
    {
        public static Task<GetKmsKeyV1Result> InvokeAsync(GetKmsKeyV1Args args, InvokeOptions? opts = null)
        public static Output<GetKmsKeyV1Result> Invoke(GetKmsKeyV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKmsKeyV1Result> getKmsKeyV1(GetKmsKeyV1Args args, InvokeOptions options)
    public static Output<GetKmsKeyV1Result> getKmsKeyV1(GetKmsKeyV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: flexibleengine:index/getKmsKeyV1:getKmsKeyV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DefaultKeyFlag string
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    DomainId string
    ID of a user domain for the key. Changing this gets a new key.
    Id string
    The data source ID in UUID format.
    KeyAlias string
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    KeyDescription string
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    KeyId string
    The globally unique identifier for the key. Changing this gets the new key.
    KeyState string
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    Origin string
    Origin of a key. such as: kms. Changing this gets a new key.
    Realm string
    Region where a key resides. Changing this gets a new key.
    DefaultKeyFlag string
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    DomainId string
    ID of a user domain for the key. Changing this gets a new key.
    Id string
    The data source ID in UUID format.
    KeyAlias string
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    KeyDescription string
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    KeyId string
    The globally unique identifier for the key. Changing this gets the new key.
    KeyState string
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    Origin string
    Origin of a key. such as: kms. Changing this gets a new key.
    Realm string
    Region where a key resides. Changing this gets a new key.
    defaultKeyFlag String
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    domainId String
    ID of a user domain for the key. Changing this gets a new key.
    id String
    The data source ID in UUID format.
    keyAlias String
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    keyDescription String
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    keyId String
    The globally unique identifier for the key. Changing this gets the new key.
    keyState String
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    origin String
    Origin of a key. such as: kms. Changing this gets a new key.
    realm String
    Region where a key resides. Changing this gets a new key.
    defaultKeyFlag string
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    domainId string
    ID of a user domain for the key. Changing this gets a new key.
    id string
    The data source ID in UUID format.
    keyAlias string
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    keyDescription string
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    keyId string
    The globally unique identifier for the key. Changing this gets the new key.
    keyState string
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    origin string
    Origin of a key. such as: kms. Changing this gets a new key.
    realm string
    Region where a key resides. Changing this gets a new key.
    default_key_flag str
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    domain_id str
    ID of a user domain for the key. Changing this gets a new key.
    id str
    The data source ID in UUID format.
    key_alias str
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    key_description str
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    key_id str
    The globally unique identifier for the key. Changing this gets the new key.
    key_state str
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    origin str
    Origin of a key. such as: kms. Changing this gets a new key.
    realm str
    Region where a key resides. Changing this gets a new key.
    defaultKeyFlag String
    Identification of a Master Key. The value "1" indicates a Default Master Key, and the value "0" indicates a key. Changing this gets a new key.
    domainId String
    ID of a user domain for the key. Changing this gets a new key.
    id String
    The data source ID in UUID format.
    keyAlias String
    The alias in which to create the key. It is required when we create a new key. Changing this gets the new key.
    keyDescription String
    The description of the key as viewed in FlexibleEngine console. Changing this gets a new key.
    keyId String
    The globally unique identifier for the key. Changing this gets the new key.
    keyState String
    The state of a key. "2" indicates that the key is enabled. "3" indicates that the key is disabled. "4" indicates that the key is scheduled for deletion. Changing this gets a new key.
    origin String
    Origin of a key. such as: kms. Changing this gets a new key.
    realm String
    Region where a key resides. Changing this gets a new key.

    getKmsKeyV1 Result

    The following output properties are available:

    CreationDate string
    Creation time (time stamp) of a key.
    DefaultKeyFlag string
    DomainId string
    Id string
    The data source ID in UUID format.
    KeyState string
    Origin string
    Realm string
    RotationEnabled bool
    Indicates whether the key rotation is enabled or not.
    RotationInterval double
    The key rotation interval. It's valid when rotation is enabled.
    RotationNumber double
    The total number of key rotations. It's valid when rotation is enabled.
    ScheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    KeyAlias string
    KeyDescription string
    KeyId string
    CreationDate string
    Creation time (time stamp) of a key.
    DefaultKeyFlag string
    DomainId string
    Id string
    The data source ID in UUID format.
    KeyState string
    Origin string
    Realm string
    RotationEnabled bool
    Indicates whether the key rotation is enabled or not.
    RotationInterval float64
    The key rotation interval. It's valid when rotation is enabled.
    RotationNumber float64
    The total number of key rotations. It's valid when rotation is enabled.
    ScheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    KeyAlias string
    KeyDescription string
    KeyId string
    creationDate String
    Creation time (time stamp) of a key.
    defaultKeyFlag String
    domainId String
    id String
    The data source ID in UUID format.
    keyState String
    origin String
    realm String
    rotationEnabled Boolean
    Indicates whether the key rotation is enabled or not.
    rotationInterval Double
    The key rotation interval. It's valid when rotation is enabled.
    rotationNumber Double
    The total number of key rotations. It's valid when rotation is enabled.
    scheduledDeletionDate String
    Scheduled deletion time (time stamp) of a key.
    keyAlias String
    keyDescription String
    keyId String
    creationDate string
    Creation time (time stamp) of a key.
    defaultKeyFlag string
    domainId string
    id string
    The data source ID in UUID format.
    keyState string
    origin string
    realm string
    rotationEnabled boolean
    Indicates whether the key rotation is enabled or not.
    rotationInterval number
    The key rotation interval. It's valid when rotation is enabled.
    rotationNumber number
    The total number of key rotations. It's valid when rotation is enabled.
    scheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    keyAlias string
    keyDescription string
    keyId string
    creation_date str
    Creation time (time stamp) of a key.
    default_key_flag str
    domain_id str
    id str
    The data source ID in UUID format.
    key_state str
    origin str
    realm str
    rotation_enabled bool
    Indicates whether the key rotation is enabled or not.
    rotation_interval float
    The key rotation interval. It's valid when rotation is enabled.
    rotation_number float
    The total number of key rotations. It's valid when rotation is enabled.
    scheduled_deletion_date str
    Scheduled deletion time (time stamp) of a key.
    key_alias str
    key_description str
    key_id str
    creationDate String
    Creation time (time stamp) of a key.
    defaultKeyFlag String
    domainId String
    id String
    The data source ID in UUID format.
    keyState String
    origin String
    realm String
    rotationEnabled Boolean
    Indicates whether the key rotation is enabled or not.
    rotationInterval Number
    The key rotation interval. It's valid when rotation is enabled.
    rotationNumber Number
    The total number of key rotations. It's valid when rotation is enabled.
    scheduledDeletionDate String
    Scheduled deletion time (time stamp) of a key.
    keyAlias String
    keyDescription String
    keyId String

    Package Details

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