1. Packages
  2. OVH
  3. API Docs
  4. Okms
  5. getOkmsServiceKeyPem
OVHCloud v2.9.0 published on Friday, Nov 7, 2025 by OVHcloud
ovh logo
OVHCloud v2.9.0 published on Friday, Nov 7, 2025 by OVHcloud

    Use this data source to retrieve information about a KMS service key, in the PEM format.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const keyInfo = ovh.Okms.getOkmsServiceKeyPem({
        okmsId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    key_info = ovh.Okms.get_okms_service_key_pem(okms_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/okms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okms.GetOkmsServiceKeyPem(ctx, &okms.GetOkmsServiceKeyPemArgs{
    			OkmsId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    			Id:     "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var keyInfo = Ovh.Okms.GetOkmsServiceKeyPem.Invoke(new()
        {
            OkmsId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Okms.OkmsFunctions;
    import com.pulumi.ovh.Okms.inputs.GetOkmsServiceKeyPemArgs;
    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 keyInfo = OkmsFunctions.getOkmsServiceKeyPem(GetOkmsServiceKeyPemArgs.builder()
                .okmsId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                .id("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                .build());
    
        }
    }
    
    variables:
      keyInfo:
        fn::invoke:
          function: ovh:Okms:getOkmsServiceKeyPem
          arguments:
            okmsId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    Using getOkmsServiceKeyPem

    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 getOkmsServiceKeyPem(args: GetOkmsServiceKeyPemArgs, opts?: InvokeOptions): Promise<GetOkmsServiceKeyPemResult>
    function getOkmsServiceKeyPemOutput(args: GetOkmsServiceKeyPemOutputArgs, opts?: InvokeOptions): Output<GetOkmsServiceKeyPemResult>
    def get_okms_service_key_pem(id: Optional[str] = None,
                                 okms_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetOkmsServiceKeyPemResult
    def get_okms_service_key_pem_output(id: Optional[pulumi.Input[str]] = None,
                                 okms_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetOkmsServiceKeyPemResult]
    func GetOkmsServiceKeyPem(ctx *Context, args *GetOkmsServiceKeyPemArgs, opts ...InvokeOption) (*GetOkmsServiceKeyPemResult, error)
    func GetOkmsServiceKeyPemOutput(ctx *Context, args *GetOkmsServiceKeyPemOutputArgs, opts ...InvokeOption) GetOkmsServiceKeyPemResultOutput

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

    public static class GetOkmsServiceKeyPem 
    {
        public static Task<GetOkmsServiceKeyPemResult> InvokeAsync(GetOkmsServiceKeyPemArgs args, InvokeOptions? opts = null)
        public static Output<GetOkmsServiceKeyPemResult> Invoke(GetOkmsServiceKeyPemInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOkmsServiceKeyPemResult> getOkmsServiceKeyPem(GetOkmsServiceKeyPemArgs args, InvokeOptions options)
    public static Output<GetOkmsServiceKeyPemResult> getOkmsServiceKeyPem(GetOkmsServiceKeyPemArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:Okms/getOkmsServiceKeyPem:getOkmsServiceKeyPem
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    OkmsId string
    Id string
    OkmsId string
    id String
    okmsId String
    id string
    okmsId string
    id str
    okms_id str
    id String
    okmsId String

    getOkmsServiceKeyPem Result

    The following output properties are available:

    createdAt String
    curve String
    iam Property Map
    id String
    keysPems List<Property Map>
    name String
    okmsId String
    operations List<String>
    size Number
    state String
    type String

    Supporting Types

    GetOkmsServiceKeyPemIam

    DisplayName string
    Resource display name
    Id string
    Unique identifier of the resource
    Tags Dictionary<string, string>
    Resource tags. Tags that were internally computed are prefixed with ovh:
    Urn string
    Unique resource name used in policies
    DisplayName string
    Resource display name
    Id string
    Unique identifier of the resource
    Tags map[string]string
    Resource tags. Tags that were internally computed are prefixed with ovh:
    Urn string
    Unique resource name used in policies
    displayName String
    Resource display name
    id String
    Unique identifier of the resource
    tags Map<String,String>
    Resource tags. Tags that were internally computed are prefixed with ovh:
    urn String
    Unique resource name used in policies
    displayName string
    Resource display name
    id string
    Unique identifier of the resource
    tags {[key: string]: string}
    Resource tags. Tags that were internally computed are prefixed with ovh:
    urn string
    Unique resource name used in policies
    display_name str
    Resource display name
    id str
    Unique identifier of the resource
    tags Mapping[str, str]
    Resource tags. Tags that were internally computed are prefixed with ovh:
    urn str
    Unique resource name used in policies
    displayName String
    Resource display name
    id String
    Unique identifier of the resource
    tags Map<String>
    Resource tags. Tags that were internally computed are prefixed with ovh:
    urn String
    Unique resource name used in policies

    GetOkmsServiceKeyPemKeysPem

    Pem string
    The key in base64 encoded PEM format
    Pem string
    The key in base64 encoded PEM format
    pem String
    The key in base64 encoded PEM format
    pem string
    The key in base64 encoded PEM format
    pem str
    The key in base64 encoded PEM format
    pem String
    The key in base64 encoded PEM format

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v2.9.0 published on Friday, Nov 7, 2025 by OVHcloud
      Meet Neo: Your AI Platform Teammate