1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getKmsKeyV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getKmsKeyV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for KMS key you can get at documentation portal

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const key1 = opentelekomcloud.getKmsKeyV1({
        defaultKeyFlag: "0",
        domainId: "b168fe00ff56492495a7d22974df2d0b",
        keyAlias: "test_key",
        keyDescription: "test key description",
        keyId: "af650527-a0ff-4527-aef3-c493df1f3012",
        keyState: "2",
        origin: "kms",
        realm: "eu-de-01",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    key1 = opentelekomcloud.get_kms_key_v1(default_key_flag="0",
        domain_id="b168fe00ff56492495a7d22974df2d0b",
        key_alias="test_key",
        key_description="test key description",
        key_id="af650527-a0ff-4527-aef3-c493df1f3012",
        key_state="2",
        origin="kms",
        realm="eu-de-01")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.LookupKmsKeyV1(ctx, &opentelekomcloud.LookupKmsKeyV1Args{
    			DefaultKeyFlag: pulumi.StringRef("0"),
    			DomainId:       pulumi.StringRef("b168fe00ff56492495a7d22974df2d0b"),
    			KeyAlias:       pulumi.StringRef("test_key"),
    			KeyDescription: pulumi.StringRef("test key description"),
    			KeyId:          pulumi.StringRef("af650527-a0ff-4527-aef3-c493df1f3012"),
    			KeyState:       pulumi.StringRef("2"),
    			Origin:         pulumi.StringRef("kms"),
    			Realm:          pulumi.StringRef("eu-de-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var key1 = Opentelekomcloud.GetKmsKeyV1.Invoke(new()
        {
            DefaultKeyFlag = "0",
            DomainId = "b168fe00ff56492495a7d22974df2d0b",
            KeyAlias = "test_key",
            KeyDescription = "test key description",
            KeyId = "af650527-a0ff-4527-aef3-c493df1f3012",
            KeyState = "2",
            Origin = "kms",
            Realm = "eu-de-01",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.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 = OpentelekomcloudFunctions.getKmsKeyV1(GetKmsKeyV1Args.builder()
                .defaultKeyFlag("0")
                .domainId("b168fe00ff56492495a7d22974df2d0b")
                .keyAlias("test_key")
                .keyDescription("test key description")
                .keyId("af650527-a0ff-4527-aef3-c493df1f3012")
                .keyState("2")
                .origin("kms")
                .realm("eu-de-01")
                .build());
    
        }
    }
    
    variables:
      key1:
        fn::invoke:
          function: opentelekomcloud:getKmsKeyV1
          arguments:
            defaultKeyFlag: '0'
            domainId: b168fe00ff56492495a7d22974df2d0b
            keyAlias: test_key
            keyDescription: test key description
            keyId: af650527-a0ff-4527-aef3-c493df1f3012
            keyState: '2'
            origin: kms
            realm: eu-de-01
    

    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: opentelekomcloud: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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    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. 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. 1 indicates that the key is waiting to be activated. 2 indicates that the key is enabled. 3 indicates that the key is disabled. 4 indicates that the key is scheduled for deletion. 5 indicates that the key waiting to be imported. 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
    See Argument Reference above.
    DomainId string
    See Argument Reference above.
    ExpirationTime string
    Expiration time.
    Id string
    KeyAlias string
    See Argument Reference above.
    KeyDescription string
    See Argument Reference above.
    KeyId string
    See Argument Reference above.
    KeyState string
    See Argument Reference above.
    Origin string
    See Argument Reference above.
    Realm string
    See Argument Reference above.
    ScheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    CreationDate string
    Creation time (time stamp) of a key.
    DefaultKeyFlag string
    See Argument Reference above.
    DomainId string
    See Argument Reference above.
    ExpirationTime string
    Expiration time.
    Id string
    KeyAlias string
    See Argument Reference above.
    KeyDescription string
    See Argument Reference above.
    KeyId string
    See Argument Reference above.
    KeyState string
    See Argument Reference above.
    Origin string
    See Argument Reference above.
    Realm string
    See Argument Reference above.
    ScheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    creationDate String
    Creation time (time stamp) of a key.
    defaultKeyFlag String
    See Argument Reference above.
    domainId String
    See Argument Reference above.
    expirationTime String
    Expiration time.
    id String
    keyAlias String
    See Argument Reference above.
    keyDescription String
    See Argument Reference above.
    keyId String
    See Argument Reference above.
    keyState String
    See Argument Reference above.
    origin String
    See Argument Reference above.
    realm String
    See Argument Reference above.
    scheduledDeletionDate String
    Scheduled deletion time (time stamp) of a key.
    creationDate string
    Creation time (time stamp) of a key.
    defaultKeyFlag string
    See Argument Reference above.
    domainId string
    See Argument Reference above.
    expirationTime string
    Expiration time.
    id string
    keyAlias string
    See Argument Reference above.
    keyDescription string
    See Argument Reference above.
    keyId string
    See Argument Reference above.
    keyState string
    See Argument Reference above.
    origin string
    See Argument Reference above.
    realm string
    See Argument Reference above.
    scheduledDeletionDate string
    Scheduled deletion time (time stamp) of a key.
    creation_date str
    Creation time (time stamp) of a key.
    default_key_flag str
    See Argument Reference above.
    domain_id str
    See Argument Reference above.
    expiration_time str
    Expiration time.
    id str
    key_alias str
    See Argument Reference above.
    key_description str
    See Argument Reference above.
    key_id str
    See Argument Reference above.
    key_state str
    See Argument Reference above.
    origin str
    See Argument Reference above.
    realm str
    See Argument Reference above.
    scheduled_deletion_date str
    Scheduled deletion time (time stamp) of a key.
    creationDate String
    Creation time (time stamp) of a key.
    defaultKeyFlag String
    See Argument Reference above.
    domainId String
    See Argument Reference above.
    expirationTime String
    Expiration time.
    id String
    keyAlias String
    See Argument Reference above.
    keyDescription String
    See Argument Reference above.
    keyId String
    See Argument Reference above.
    keyState String
    See Argument Reference above.
    origin String
    See Argument Reference above.
    realm String
    See Argument Reference above.
    scheduledDeletionDate String
    Scheduled deletion time (time stamp) of a key.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud