1. Registry
  2. Packages
  3. Scaleway
  4. API Docs
  5. getKeyManagerKey
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
    Deprecated: scaleway.index/getkeymanagerkey.getKeyManagerKey has been deprecated in favor of scaleway.keymanager/getkey.getKey

    Gets information about a Key Manager Key. For more information, refer to the Key Manager API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Create a key and get its information.
    // In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
    const symmetric = new scaleway.keymanager.Key("symmetric", {
        name: "my-kms-key",
        region: "fr-par",
        projectId: "your-project-id",
        usage: "symmetric_encryption",
        algorithm: "aes_256_gcm",
        description: "Key for encrypting secrets",
        tags: [
            "env:prod",
            "kms",
        ],
        unprotected: true,
        rotationPolicy: {
            rotationPeriod: "720h",
        },
    });
    const byID = scaleway.keymanager.getKey({
        keyId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    # Create a key and get its information.
    # In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
    symmetric = scaleway.keymanager.Key("symmetric",
        name="my-kms-key",
        region="fr-par",
        project_id="your-project-id",
        usage="symmetric_encryption",
        algorithm="aes_256_gcm",
        description="Key for encrypting secrets",
        tags=[
            "env:prod",
            "kms",
        ],
        unprotected=True,
        rotation_policy={
            "rotation_period": "720h",
        })
    by_id = scaleway.keymanager.get_key(key_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a key and get its information.
    		// In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
    		_, err := keymanager.NewKey(ctx, "symmetric", &keymanager.KeyArgs{
    			Name:        pulumi.String("my-kms-key"),
    			Region:      pulumi.String("fr-par"),
    			ProjectId:   pulumi.String("your-project-id"),
    			Usage:       pulumi.String("symmetric_encryption"),
    			Algorithm:   pulumi.String("aes_256_gcm"),
    			Description: pulumi.String("Key for encrypting secrets"),
    			Tags: pulumi.StringArray{
    				pulumi.String("env:prod"),
    				pulumi.String("kms"),
    			},
    			Unprotected: pulumi.Bool(true),
    			RotationPolicy: &keymanager.KeyRotationPolicyArgs{
    				RotationPeriod: pulumi.String("720h"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = keymanager.LookupKey(ctx, &keymanager.LookupKeyArgs{
    			KeyId: "11111111-1111-1111-1111-111111111111",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a key and get its information.
        // In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
        var symmetric = new Scaleway.Keymanager.Key("symmetric", new()
        {
            Name = "my-kms-key",
            Region = "fr-par",
            ProjectId = "your-project-id",
            Usage = "symmetric_encryption",
            Algorithm = "aes_256_gcm",
            Description = "Key for encrypting secrets",
            Tags = new[]
            {
                "env:prod",
                "kms",
            },
            Unprotected = true,
            RotationPolicy = new Scaleway.Keymanager.Inputs.KeyRotationPolicyArgs
            {
                RotationPeriod = "720h",
            },
        });
    
        var byID = Scaleway.Keymanager.GetKey.Invoke(new()
        {
            KeyId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.keymanager.Key;
    import com.pulumi.scaleway.keymanager.KeyArgs;
    import com.pulumi.scaleway.keymanager.inputs.KeyRotationPolicyArgs;
    import com.pulumi.scaleway.keymanager.KeymanagerFunctions;
    import com.pulumi.scaleway.keymanager.inputs.GetKeyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Create a key and get its information.
            // In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
            var symmetric = new Key("symmetric", KeyArgs.builder()
                .name("my-kms-key")
                .region("fr-par")
                .projectId("your-project-id")
                .usage("symmetric_encryption")
                .algorithm("aes_256_gcm")
                .description("Key for encrypting secrets")
                .tags(            
                    "env:prod",
                    "kms")
                .unprotected(true)
                .rotationPolicy(KeyRotationPolicyArgs.builder()
                    .rotationPeriod("720h")
                    .build())
                .build());
    
            final var byID = KeymanagerFunctions.getKey(GetKeyArgs.builder()
                .keyId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    resources:
      # Create a key and get its information.
      # In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
      symmetric:
        type: scaleway:keymanager:Key
        properties:
          name: my-kms-key
          region: fr-par
          projectId: your-project-id
          usage: symmetric_encryption
          algorithm: aes_256_gcm
          description: Key for encrypting secrets
          tags:
            - env:prod
            - kms
          unprotected: true
          rotationPolicy:
            rotationPeriod: 720h
    variables:
      byID:
        fn::invoke:
          function: scaleway:keymanager:getKey
          arguments:
            keyId: 11111111-1111-1111-1111-111111111111
    
    pulumi {
      required_providers {
        scaleway = {
          source = "pulumi/scaleway"
        }
      }
    }
    
    data "scaleway_keymanager_getkey" "byID" {
      key_id = "11111111-1111-1111-1111-111111111111"
    }
    
    # Create a key and get its information.
    # In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
    resource "scaleway_keymanager_key" "symmetric" {
      name        = "my-kms-key"
      region      = "fr-par"
      project_id  = "your-project-id"
      usage       = "symmetric_encryption"
      algorithm   = "aes_256_gcm"
      description = "Key for encrypting secrets"
      tags        = ["env:prod", "kms"]
      unprotected = true
      rotation_policy = {
        rotation_period = "720h"
      }
    }
    

    Using getKeyManagerKey

    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 getKeyManagerKey(args: GetKeyManagerKeyArgs, opts?: InvokeOptions): Promise<GetKeyManagerKeyResult>
    function getKeyManagerKeyOutput(args: GetKeyManagerKeyOutputArgs, opts?: InvokeOutputOptions): Output<GetKeyManagerKeyResult>
    def get_key_manager_key(key_id: Optional[str] = None,
                            region: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetKeyManagerKeyResult
    def get_key_manager_key_output(key_id: pulumi.Input[Optional[str]] = None,
                            region: pulumi.Input[Optional[str]] = None,
                            opts: Optional[InvokeOutputOptions] = None) -> Output[GetKeyManagerKeyResult]
    func LookupKeyManagerKey(ctx *Context, args *LookupKeyManagerKeyArgs, opts ...InvokeOption) (*LookupKeyManagerKeyResult, error)
    func LookupKeyManagerKeyOutput(ctx *Context, args *LookupKeyManagerKeyOutputArgs, opts ...InvokeOption) LookupKeyManagerKeyResultOutput

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

    public static class GetKeyManagerKey 
    {
        public static Task<GetKeyManagerKeyResult> InvokeAsync(GetKeyManagerKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetKeyManagerKeyResult> Invoke(GetKeyManagerKeyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetKeyManagerKeyResult> Invoke(GetKeyManagerKeyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetKeyManagerKeyResult> getKeyManagerKey(GetKeyManagerKeyArgs args, InvokeOptions options)
    public static Output<GetKeyManagerKeyResult> getKeyManagerKey(GetKeyManagerKeyArgs args, InvokeOptions options)
    public static Output<GetKeyManagerKeyResult> getKeyManagerKey(GetKeyManagerKeyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: scaleway:index/getKeyManagerKey:getKeyManagerKey
      arguments:
        # arguments dictionary
    data "scaleway_get_key_manager_key" "name" {
        # arguments
    }

    The following arguments are supported:

    KeyId string
    ID of the key to target. Can be a plain UUID or a regional ID.
    Region string
    region) The region in which the key was created.
    KeyId string
    ID of the key to target. Can be a plain UUID or a regional ID.
    Region string
    region) The region in which the key was created.
    key_id string
    ID of the key to target. Can be a plain UUID or a regional ID.
    region string
    region) The region in which the key was created.
    keyId String
    ID of the key to target. Can be a plain UUID or a regional ID.
    region String
    region) The region in which the key was created.
    keyId string
    ID of the key to target. Can be a plain UUID or a regional ID.
    region string
    region) The region in which the key was created.
    key_id str
    ID of the key to target. Can be a plain UUID or a regional ID.
    region str
    region) The region in which the key was created.
    keyId String
    ID of the key to target. Can be a plain UUID or a regional ID.
    region String
    region) The region in which the key was created.

    getKeyManagerKey Result

    The following output properties are available:

    Algorithm string
    CreatedAt string
    Description string
    Id string
    KeyId string
    Locked bool
    Name string
    Origin string
    ProjectId string
    Protected bool
    ProtectionLevel string
    RotatedAt string
    RotationCount int
    RotationPolicies []GetKeyManagerKeyRotationPolicy
    Srn string
    State string
    Tags []string
    Unprotected bool
    UpdatedAt string
    Usage string
    Region string
    algorithm string
    created_at string
    description string
    id string
    key_id string
    locked bool
    name string
    origin string
    project_id string
    protected bool
    protection_level string
    rotated_at string
    rotation_count number
    rotation_policies list(object)
    srn string
    state string
    tags list(string)
    unprotected bool
    updated_at string
    usage string
    region string
    algorithm String
    createdAt String
    description String
    id String
    keyId String
    locked Boolean
    name String
    origin String
    projectId String
    protected_ Boolean
    protectionLevel String
    rotatedAt String
    rotationCount Integer
    rotationPolicies List<GetKeyManagerKeyRotationPolicy>
    srn String
    state String
    tags List<String>
    unprotected Boolean
    updatedAt String
    usage String
    region String
    algorithm string
    createdAt string
    description string
    id string
    keyId string
    locked boolean
    name string
    origin string
    projectId string
    protected boolean
    protectionLevel string
    rotatedAt string
    rotationCount number
    rotationPolicies GetKeyManagerKeyRotationPolicy[]
    srn string
    state string
    tags string[]
    unprotected boolean
    updatedAt string
    usage string
    region string
    algorithm String
    createdAt String
    description String
    id String
    keyId String
    locked Boolean
    name String
    origin String
    projectId String
    protected Boolean
    protectionLevel String
    rotatedAt String
    rotationCount Number
    rotationPolicies List<Property Map>
    srn String
    state String
    tags List<String>
    unprotected Boolean
    updatedAt String
    usage String
    region String

    Supporting Types

    GetKeyManagerKeyRotationPolicy

    NextRotationAt string
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    RotationPeriod string
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    NextRotationAt string
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    RotationPeriod string
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    next_rotation_at string
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    rotation_period string
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    nextRotationAt String
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    rotationPeriod String
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    nextRotationAt string
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    rotationPeriod string
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    next_rotation_at str
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    rotation_period str
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
    nextRotationAt String
    Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
    rotationPeriod String
    Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.60.0
    published on Saturday, Oct 24, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial