OVHCloud v2.0.7 published on Wednesday, Mar 19, 2025 by OVHcloud
ovh.Okms.getOkmsServiceKey
Explore with Pulumi AI
Use this data source to retrieve information about a KMS service key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const keyInfo = ovh.Okms.getOkmsServiceKey({
    id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    okmsId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
});
import pulumi
import pulumi_ovh as ovh
key_info = ovh.Okms.get_okms_service_key(id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    okms_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.GetOkmsServiceKey(ctx, &okms.GetOkmsServiceKeyArgs{
			Id:     "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
			OkmsId: "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.GetOkmsServiceKey.Invoke(new()
    {
        Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        OkmsId = "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.GetOkmsServiceKeyArgs;
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.getOkmsServiceKey(GetOkmsServiceKeyArgs.builder()
            .id("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
            .okmsId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
            .build());
    }
}
variables:
  keyInfo:
    fn::invoke:
      function: ovh:Okms:getOkmsServiceKey
      arguments:
        id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        okmsId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Using getOkmsServiceKey
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 getOkmsServiceKey(args: GetOkmsServiceKeyArgs, opts?: InvokeOptions): Promise<GetOkmsServiceKeyResult>
function getOkmsServiceKeyOutput(args: GetOkmsServiceKeyOutputArgs, opts?: InvokeOptions): Output<GetOkmsServiceKeyResult>def get_okms_service_key(id: Optional[str] = None,
                         okms_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOkmsServiceKeyResult
def get_okms_service_key_output(id: Optional[pulumi.Input[str]] = None,
                         okms_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetOkmsServiceKeyResult]func GetOkmsServiceKey(ctx *Context, args *GetOkmsServiceKeyArgs, opts ...InvokeOption) (*GetOkmsServiceKeyResult, error)
func GetOkmsServiceKeyOutput(ctx *Context, args *GetOkmsServiceKeyOutputArgs, opts ...InvokeOption) GetOkmsServiceKeyResultOutput> Note: This function is named GetOkmsServiceKey in the Go SDK.
public static class GetOkmsServiceKey 
{
    public static Task<GetOkmsServiceKeyResult> InvokeAsync(GetOkmsServiceKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetOkmsServiceKeyResult> Invoke(GetOkmsServiceKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetOkmsServiceKeyResult> getOkmsServiceKey(GetOkmsServiceKeyArgs args, InvokeOptions options)
public static Output<GetOkmsServiceKeyResult> getOkmsServiceKey(GetOkmsServiceKeyArgs args, InvokeOptions options)
fn::invoke:
  function: ovh:Okms/getOkmsServiceKey:getOkmsServiceKey
  arguments:
    # arguments dictionaryThe following arguments are supported:
getOkmsServiceKey Result
The following output properties are available:
- created_at str
- curve str
- iam
okms.Get Okms Service Key Iam 
- id str
- name str
- okms_id str
- operations Sequence[str]
- size float
- state str
- type str
Supporting Types
GetOkmsServiceKeyIam    
- DisplayName string
- Resource display name
- Id string
- ID of the service key
- 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
- ID of the service key
- 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
- ID of the service key
- 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
- ID of the service key
- {[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
- ID of the service key
- 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
- ID of the service key
- Map<String>
- Resource tags. Tags that were internally computed are prefixed with ovh:
- urn String
- Unique resource name used in policies
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ovhTerraform Provider.