1. Packages
  2. AWS
  3. API Docs
  4. quicksight
  5. KeyRegistration
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

aws.quicksight.KeyRegistration

Explore with Pulumi AI

aws logo
AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi

    Registers customer managed keys in a Amazon QuickSight account.

    Deletion of this resource clears all CMK registrations from a QuickSight account. QuickSight then uses AWS owned keys to encrypt your resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.quicksight.KeyRegistration("example", {keyRegistrations: [
        {
            keyArn: example1.arn,
        },
        {
            keyArn: example2.arn,
            defaultKey: true,
        },
    ]});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.quicksight.KeyRegistration("example", key_registrations=[
        {
            "key_arn": example1["arn"],
        },
        {
            "key_arn": example2["arn"],
            "default_key": True,
        },
    ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/quicksight"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := quicksight.NewKeyRegistration(ctx, "example", &quicksight.KeyRegistrationArgs{
    			KeyRegistrations: quicksight.KeyRegistrationKeyRegistrationArray{
    				&quicksight.KeyRegistrationKeyRegistrationArgs{
    					KeyArn: pulumi.Any(example1.Arn),
    				},
    				&quicksight.KeyRegistrationKeyRegistrationArgs{
    					KeyArn:     pulumi.Any(example2.Arn),
    					DefaultKey: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Quicksight.KeyRegistration("example", new()
        {
            KeyRegistrations = new[]
            {
                new Aws.Quicksight.Inputs.KeyRegistrationKeyRegistrationArgs
                {
                    KeyArn = example1.Arn,
                },
                new Aws.Quicksight.Inputs.KeyRegistrationKeyRegistrationArgs
                {
                    KeyArn = example2.Arn,
                    DefaultKey = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.quicksight.KeyRegistration;
    import com.pulumi.aws.quicksight.KeyRegistrationArgs;
    import com.pulumi.aws.quicksight.inputs.KeyRegistrationKeyRegistrationArgs;
    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) {
            var example = new KeyRegistration("example", KeyRegistrationArgs.builder()
                .keyRegistrations(            
                    KeyRegistrationKeyRegistrationArgs.builder()
                        .keyArn(example1.arn())
                        .build(),
                    KeyRegistrationKeyRegistrationArgs.builder()
                        .keyArn(example2.arn())
                        .defaultKey(true)
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:quicksight:KeyRegistration
        properties:
          keyRegistrations:
            - keyArn: ${example1.arn}
            - keyArn: ${example2.arn}
              defaultKey: true
    

    Create KeyRegistration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KeyRegistration(name: string, args?: KeyRegistrationArgs, opts?: CustomResourceOptions);
    @overload
    def KeyRegistration(resource_name: str,
                        args: Optional[KeyRegistrationArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def KeyRegistration(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        aws_account_id: Optional[str] = None,
                        key_registrations: Optional[Sequence[KeyRegistrationKeyRegistrationArgs]] = None,
                        region: Optional[str] = None)
    func NewKeyRegistration(ctx *Context, name string, args *KeyRegistrationArgs, opts ...ResourceOption) (*KeyRegistration, error)
    public KeyRegistration(string name, KeyRegistrationArgs? args = null, CustomResourceOptions? opts = null)
    public KeyRegistration(String name, KeyRegistrationArgs args)
    public KeyRegistration(String name, KeyRegistrationArgs args, CustomResourceOptions options)
    
    type: aws:quicksight:KeyRegistration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KeyRegistrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KeyRegistrationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KeyRegistrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyRegistrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyRegistrationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var keyRegistrationResource = new Aws.Quicksight.KeyRegistration("keyRegistrationResource", new()
    {
        AwsAccountId = "string",
        KeyRegistrations = new[]
        {
            new Aws.Quicksight.Inputs.KeyRegistrationKeyRegistrationArgs
            {
                KeyArn = "string",
                DefaultKey = false,
            },
        },
        Region = "string",
    });
    
    example, err := quicksight.NewKeyRegistration(ctx, "keyRegistrationResource", &quicksight.KeyRegistrationArgs{
    	AwsAccountId: pulumi.String("string"),
    	KeyRegistrations: quicksight.KeyRegistrationKeyRegistrationArray{
    		&quicksight.KeyRegistrationKeyRegistrationArgs{
    			KeyArn:     pulumi.String("string"),
    			DefaultKey: pulumi.Bool(false),
    		},
    	},
    	Region: pulumi.String("string"),
    })
    
    var keyRegistrationResource = new KeyRegistration("keyRegistrationResource", KeyRegistrationArgs.builder()
        .awsAccountId("string")
        .keyRegistrations(KeyRegistrationKeyRegistrationArgs.builder()
            .keyArn("string")
            .defaultKey(false)
            .build())
        .region("string")
        .build());
    
    key_registration_resource = aws.quicksight.KeyRegistration("keyRegistrationResource",
        aws_account_id="string",
        key_registrations=[{
            "key_arn": "string",
            "default_key": False,
        }],
        region="string")
    
    const keyRegistrationResource = new aws.quicksight.KeyRegistration("keyRegistrationResource", {
        awsAccountId: "string",
        keyRegistrations: [{
            keyArn: "string",
            defaultKey: false,
        }],
        region: "string",
    });
    
    type: aws:quicksight:KeyRegistration
    properties:
        awsAccountId: string
        keyRegistrations:
            - defaultKey: false
              keyArn: string
        region: string
    

    KeyRegistration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The KeyRegistration resource accepts the following input properties:

    AwsAccountId string
    KeyRegistrations List<KeyRegistrationKeyRegistration>
    Registered keys. See key_registration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    AwsAccountId string
    KeyRegistrations []KeyRegistrationKeyRegistrationArgs
    Registered keys. See key_registration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId String
    keyRegistrations List<KeyRegistrationKeyRegistration>
    Registered keys. See key_registration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId string
    keyRegistrations KeyRegistrationKeyRegistration[]
    Registered keys. See key_registration.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    aws_account_id str
    key_registrations Sequence[KeyRegistrationKeyRegistrationArgs]
    Registered keys. See key_registration.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId String
    keyRegistrations List<Property Map>
    Registered keys. See key_registration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KeyRegistration resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing KeyRegistration Resource

    Get an existing KeyRegistration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KeyRegistrationState, opts?: CustomResourceOptions): KeyRegistration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_account_id: Optional[str] = None,
            key_registrations: Optional[Sequence[KeyRegistrationKeyRegistrationArgs]] = None,
            region: Optional[str] = None) -> KeyRegistration
    func GetKeyRegistration(ctx *Context, name string, id IDInput, state *KeyRegistrationState, opts ...ResourceOption) (*KeyRegistration, error)
    public static KeyRegistration Get(string name, Input<string> id, KeyRegistrationState? state, CustomResourceOptions? opts = null)
    public static KeyRegistration get(String name, Output<String> id, KeyRegistrationState state, CustomResourceOptions options)
    resources:  _:    type: aws:quicksight:KeyRegistration    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AwsAccountId string
    KeyRegistrations List<KeyRegistrationKeyRegistration>
    Registered keys. See key_registration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    AwsAccountId string
    KeyRegistrations []KeyRegistrationKeyRegistrationArgs
    Registered keys. See key_registration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId String
    keyRegistrations List<KeyRegistrationKeyRegistration>
    Registered keys. See key_registration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId string
    keyRegistrations KeyRegistrationKeyRegistration[]
    Registered keys. See key_registration.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    aws_account_id str
    key_registrations Sequence[KeyRegistrationKeyRegistrationArgs]
    Registered keys. See key_registration.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    awsAccountId String
    keyRegistrations List<Property Map>
    Registered keys. See key_registration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Supporting Types

    KeyRegistrationKeyRegistration, KeyRegistrationKeyRegistrationArgs

    KeyArn string
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    DefaultKey bool
    Whether the key is set as the default key for encryption and decryption use.
    KeyArn string
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    DefaultKey bool
    Whether the key is set as the default key for encryption and decryption use.
    keyArn String
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    defaultKey Boolean
    Whether the key is set as the default key for encryption and decryption use.
    keyArn string
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    defaultKey boolean
    Whether the key is set as the default key for encryption and decryption use.
    key_arn str
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    default_key bool
    Whether the key is set as the default key for encryption and decryption use.
    keyArn String
    ARN of the AWS KMS key that is registered for encryption and decryption use.
    defaultKey Boolean
    Whether the key is set as the default key for encryption and decryption use.

    Import

    Using pulumi import, import QuickSight key registration using the AWS account ID. For example:

    $ pulumi import aws:quicksight/keyRegistration:KeyRegistration example "012345678901"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.7.0 published on Friday, Sep 5, 2025 by Pulumi