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

opentelekomcloud.getKmsKeyMaterialParametersV1

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 Obtaining CMK Import parameters you can get at documentation portal

    Use this data source to get the data required to import key material into a CMK in OpenTelekomCloud KMS.

    Warning This data source returns parameters for a CMK in Pending_import state. Once the key is successfully imported and the state changes to Enabled, the data source will no longer fetch new parameters and its computed attributes will be nulled. If other resources utilize fields from this data source, consider adding lifecycle { ignore_changes = [...] } to handle state transitions properly.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const params = opentelekomcloud.getKmsKeyMaterialParametersV1({
        keyId: "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
        wrappingAlgorithm: "RSAES_PKCS1_V1_5",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    params = opentelekomcloud.get_kms_key_material_parameters_v1(key_id="0d0466b0-e727-4d9c-b35d-f84bb474a37f",
        wrapping_algorithm="RSAES_PKCS1_V1_5")
    
    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.GetKmsKeyMaterialParametersV1(ctx, &opentelekomcloud.GetKmsKeyMaterialParametersV1Args{
    			KeyId:             "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
    			WrappingAlgorithm: "RSAES_PKCS1_V1_5",
    		}, 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 @params = Opentelekomcloud.GetKmsKeyMaterialParametersV1.Invoke(new()
        {
            KeyId = "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
            WrappingAlgorithm = "RSAES_PKCS1_V1_5",
        });
    
    });
    
    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.GetKmsKeyMaterialParametersV1Args;
    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 params = OpentelekomcloudFunctions.getKmsKeyMaterialParametersV1(GetKmsKeyMaterialParametersV1Args.builder()
                .keyId("0d0466b0-e727-4d9c-b35d-f84bb474a37f")
                .wrappingAlgorithm("RSAES_PKCS1_V1_5")
                .build());
    
        }
    }
    
    variables:
      params:
        fn::invoke:
          function: opentelekomcloud:getKmsKeyMaterialParametersV1
          arguments:
            keyId: 0d0466b0-e727-4d9c-b35d-f84bb474a37f
            wrappingAlgorithm: RSAES_PKCS1_V1_5
    

    Using getKmsKeyMaterialParametersV1

    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 getKmsKeyMaterialParametersV1(args: GetKmsKeyMaterialParametersV1Args, opts?: InvokeOptions): Promise<GetKmsKeyMaterialParametersV1Result>
    function getKmsKeyMaterialParametersV1Output(args: GetKmsKeyMaterialParametersV1OutputArgs, opts?: InvokeOptions): Output<GetKmsKeyMaterialParametersV1Result>
    def get_kms_key_material_parameters_v1(id: Optional[str] = None,
                                           key_id: Optional[str] = None,
                                           sequence: Optional[str] = None,
                                           wrapping_algorithm: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetKmsKeyMaterialParametersV1Result
    def get_kms_key_material_parameters_v1_output(id: Optional[pulumi.Input[str]] = None,
                                           key_id: Optional[pulumi.Input[str]] = None,
                                           sequence: Optional[pulumi.Input[str]] = None,
                                           wrapping_algorithm: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetKmsKeyMaterialParametersV1Result]
    func GetKmsKeyMaterialParametersV1(ctx *Context, args *GetKmsKeyMaterialParametersV1Args, opts ...InvokeOption) (*GetKmsKeyMaterialParametersV1Result, error)
    func GetKmsKeyMaterialParametersV1Output(ctx *Context, args *GetKmsKeyMaterialParametersV1OutputArgs, opts ...InvokeOption) GetKmsKeyMaterialParametersV1ResultOutput

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

    public static class GetKmsKeyMaterialParametersV1 
    {
        public static Task<GetKmsKeyMaterialParametersV1Result> InvokeAsync(GetKmsKeyMaterialParametersV1Args args, InvokeOptions? opts = null)
        public static Output<GetKmsKeyMaterialParametersV1Result> Invoke(GetKmsKeyMaterialParametersV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKmsKeyMaterialParametersV1Result> getKmsKeyMaterialParametersV1(GetKmsKeyMaterialParametersV1Args args, InvokeOptions options)
    public static Output<GetKmsKeyMaterialParametersV1Result> getKmsKeyMaterialParametersV1(GetKmsKeyMaterialParametersV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getKmsKeyMaterialParametersV1:getKmsKeyMaterialParametersV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyId string
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    WrappingAlgorithm string
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    Id string
    Sequence string
    36-byte serial number of the request message.
    KeyId string
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    WrappingAlgorithm string
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    Id string
    Sequence string
    36-byte serial number of the request message.
    keyId String
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    wrappingAlgorithm String
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    id String
    sequence String
    36-byte serial number of the request message.
    keyId string
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    wrappingAlgorithm string
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    id string
    sequence string
    36-byte serial number of the request message.
    key_id str
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    wrapping_algorithm str
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    id str
    sequence str
    36-byte serial number of the request message.
    keyId String
    The ID of the CMK to import key material into. Must be 36 bytes and match regexp ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$.
    wrappingAlgorithm String
    The algorithm to be used for wrapping the imported key material. Valid values are:

    • RSAES_PKCS1_V1_5
    • RSAES_OAEP_SHA_1
    • RSAES_OAEP_SHA_256
    id String
    sequence String
    36-byte serial number of the request message.

    getKmsKeyMaterialParametersV1 Result

    The following output properties are available:

    ExpirationTime double
    The time at which the import token and public key expire.
    Id string
    ImportToken string
    The import token to use in subsequent ImportKey requests.
    KeyId string
    PublicKey string
    The public key to use to encrypt the key material before import (Base64 encoded).
    WrappingAlgorithm string
    Sequence string
    ExpirationTime float64
    The time at which the import token and public key expire.
    Id string
    ImportToken string
    The import token to use in subsequent ImportKey requests.
    KeyId string
    PublicKey string
    The public key to use to encrypt the key material before import (Base64 encoded).
    WrappingAlgorithm string
    Sequence string
    expirationTime Double
    The time at which the import token and public key expire.
    id String
    importToken String
    The import token to use in subsequent ImportKey requests.
    keyId String
    publicKey String
    The public key to use to encrypt the key material before import (Base64 encoded).
    wrappingAlgorithm String
    sequence String
    expirationTime number
    The time at which the import token and public key expire.
    id string
    importToken string
    The import token to use in subsequent ImportKey requests.
    keyId string
    publicKey string
    The public key to use to encrypt the key material before import (Base64 encoded).
    wrappingAlgorithm string
    sequence string
    expiration_time float
    The time at which the import token and public key expire.
    id str
    import_token str
    The import token to use in subsequent ImportKey requests.
    key_id str
    public_key str
    The public key to use to encrypt the key material before import (Base64 encoded).
    wrapping_algorithm str
    sequence str
    expirationTime Number
    The time at which the import token and public key expire.
    id String
    importToken String
    The import token to use in subsequent ImportKey requests.
    keyId String
    publicKey String
    The public key to use to encrypt the key material before import (Base64 encoded).
    wrappingAlgorithm String
    sequence String

    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